i created a new plugin in eclipse that adds a new project entry, which can then be used to add a new project.
however, when I go to the project properties, I get the following:

instead of this:

So my question is how to make my project also include all java things (for example: Java build path, etc.), since I want this project to be based on the default java project.
how am i doing the project now (code):
@Override public boolean performFinish() { if (project != null) { return true; } final IProject projectHandle = wizardPage.getProjectHandle(); URI projectURI = (!wizardPage.useDefaults()) ? wizardPage.getLocationURI() : null; IWorkspace workspace = ResourcesPlugin.getWorkspace(); final IProjectDescription desc = workspace.newProjectDescription(projectHandle.getName()); desc.setLocationURI(projectURI); WorkspaceModifyOperation op = new WorkspaceModifyOperation() { protected void execute(IProgressMonitor monitor) throws CoreException { createProject(desc, projectHandle, monitor); } }; try { getContainer().run(true, true, op); } catch (InterruptedException e) { return false; } catch (InvocationTargetException e) { Throwable realException = e.getTargetException(); MessageDialog.openError(getShell(), "Error", realException.getMessage()); return false; } project = projectHandle; if (project == null) { return false; } BasicNewProjectResourceWizard.updatePerspective(config); BasicNewProjectResourceWizard.selectAndReveal(project, workbench.getActiveWorkbenchWindow()); return true; }
edit ***
ok, so the solution is to add a face to the project. if I do it manually after creating a new project through my plugin - from the right click, the project properties - it works. How to add this facet programmatically?
edit 2 ***
ok, so this is done through:
description.setNatureIds
but not really.
this is what the project looks like when I manually add a facet to it (and so I want it to look):

and this is how it looks when I add the nature identifier "org.eclipse.jdt.core.javanature" programmaticaly (not the way I want it)

, therefore ... how to fix it? Do I need a different nature?
here is the contents of the .project file when I manually add the facet:
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>test</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.wst.common.project.facet.core.builder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.wst.common.project.facet.core.nature</nature> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>
a .classpath file is also added (when adding a face manually, but there is no such file when it is added programmatically):
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> <attributes> <attribute name="owner.project.facets" value="java"/> </attributes> </classpathentry> <classpathentry kind="output" path="bin"/> </classpath>
here is also my createProject () method:
private void createProject(IProjectDescription description, IProject proj, IProgressMonitor monitor) throws CoreException, OperationCanceledException { try { monitor.beginTask("", 2000); proj.create(description, new SubProgressMonitor(monitor, 10)); if (monitor.isCanceled()) { throw new OperationCanceledException(); } proj.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(monitor, 10)); IContainer container = (IContainer) proj; [ *** ] } finally { monitor.done(); } }