JDT creating dynamic web project
I want to develop a plug-in in eclipse that create new dynamic web project. I create Java project and add project facet to convert it to dynamic web project, but it creates a static web project.
any help is appreciated IJavaProject javaProject = createProject(projectName +"-web",new String[] {JavaCore.NATURE_ID}); IFacetedProject facetedProject = ProjectFacetsManager.create(javaProject.getProject(), true, null); IProjectDescription description1 = javaProject.getProject().getDescription(); description1.setNatureIds(new String[] {"org.eclipse.jem.workbench.JavaEMFNature", "org.eclipse.wst.common.modulecore.ModuleCoreNature", "org.eclipse.wst.common.project.facet.core.nature", "org.eclipse.wst.jsdt.core.jsNature"}); javaProject.getProject().setDescription(description1, null); IProjectFacet wstWebFacet = ProjectFacetsManager.getProjectFacet (IModuleConstants.WST_WEB_MODULE); facetedProject.installProjectFacet(wstWebFacet.getDefaultVersion(), null, null); |
Accepted answer
Ralph Schoon (63.1k●3●36●46)
| answered Jul 31 '13, 11:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jul 31 '13, 11:27 a.m.
You should probably ask this kind of questions at http://www.eclipse.org/ as they have noting to do with Jazz.
Ralph Schoon selected this answer as the correct answer
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.