Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » API for creating a simple PlugIn-Project without using the New-Wizard
API for creating a simple PlugIn-Project without using the New-Wizard [message #54483] Tue, 19 April 2005 12:54 Go to next message
Eclipse UserFriend
Originally posted by: Manuel.Moser.gmx.de

Hi,

I´ve got a problem.
A program should create one or more PlugIn-Projects underneeth.

So I want to create a PlugIn-Project without using the wizard.
The only parameters I want to set, are the project name and the
targetDirectory.

The project should only contains the src/bin folders, the plugin.xml and
the buildProperties..

If u have done this before, please let me know..

best regarts
Manuel M.
Re: API for creating a simple PlugIn-Project without using the New-Wizard [message #55038 is a reply to message #54483] Tue, 19 April 2005 21:30 Go to previous message
Steve Blass is currently offline Steve BlassFriend
Messages: 121
Registered: July 2009
Senior Member
Manuel Moser wrote:
> Hi,
>
> I´ve got a problem.
> A program should create one or more PlugIn-Projects underneeth.
>
> So I want to create a PlugIn-Project without using the wizard.
> The only parameters I want to set, are the project name and the
> targetDirectory.
>
> The project should only contains the src/bin folders, the plugin.xml and
> the buildProperties..
>
> If u have done this before, please let me know..
>
> best regarts
> Manuel M.

The following will create and open a project for you. Creating the
folders and files inside is left as an exercise only because this
example doesn't do that.

// open default project
String defaultProject=Messages.getString("_defaultProjectName");
IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
IProject project= root.getProject(defaultProject);
if (!project.exists() )
try {
project.create(null);
} catch (CoreException e1) {
e1.printStackTrace();
}
if (!project.isOpen())
try {
project.open(null);
} catch (CoreException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
}

The 'Contrbituing to Eclipse' book has a fairly complete example of
creating Java projects programatically that include the nature and
builder pieces.

-
Steve
Previous Topic:Eclipse not working after 3.0.2 upgrade
Next Topic:what are exactly required by org.eclipse.releng.basebuilder?
Goto Forum:
  


Current Time: Sat Dec 21 13:48:19 GMT 2024

Powered by FUDForum. Page generated in 0.07025 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top