Create java project in code [message #250078] |
Fri, 07 December 2007 10:04  |
Eclipse User |
|
|
|
I'd like to be able to create a Java project in code, rather than having
my users do it. The scenario is that my application needs a java project
behind the scenes, but my users (in most cases) won't be writing Java
code. So, when they need to create a new project, I would just like to
ask them to specify the name of the project, and then handle the rest of
the settings myself.
Unfortunately, the JavaProjectWizard handles much of the creation and it
is internal. I'd really like a way to pass settings into the wizard and
run it without showing the UI. I've tried the following:
IProject project =
ResourcesPlugin.getWorkspace().getRoot().getProject("Test");
IJavaProject create = JavaCore.create(project);
BasicNewResourceWizard.selectAndReveal(project,
PlatformUI.getWorkbench().getActiveWorkbenchWindow());
But it doesn't work because the performFinish method in the
JavaProjectWizard does a whole lot more.
Any ideas? This seems like it should be pretty straightforward.
|
|
|
Re: Create java project in code [message #250082 is a reply to message #250078] |
Fri, 07 December 2007 10:15  |
Eclipse User |
|
|
|
Or, at the very least, when I tell the user they have to create a java
project before they can start creating files in the workspace, it would be
nice to be able to direct them to the JavaProjectWizard rather than
telling the "Hey, you have to create a Java project" and then two seconds
later asking them "Which type of project would you like to create?"
|
|
|
Powered by
FUDForum. Page generated in 0.05650 seconds