new proj wizard [message #203504] |
Fri, 02 November 2007 13:49  |
Eclipse User |
|
|
|
I want to write my own custom new proj wizard. The wizard will ask a
minimal set of questions - I want the output to be a "Dynamic Web
Project" plus a few artifact I manually add.
What is the right way to create a project from my wizard and set it up
appropriately as a dynamic web project?
|
|
|
|
|
|
|
|
|
Re: new proj wizard [message #203563 is a reply to message #203556] |
Fri, 02 November 2007 16:17   |
Eclipse User |
|
|
|
Nevermind - this seems to work:
IFacetedProject fp = ProjectFacetsManager.create(proj, true, monitor);
fp.installProjectFacet(ProjectFacetsManager.getProjectFacet( "jst.java")
.getDefaultVersion(), null, monitor);
fp.installProjectFacet(ProjectFacetsManager.getProjectFacet( "jst.web")
.getDefaultVersion(), null, monitor);
jkenny wrote:
> Gotcha - hopefully one last thing - I am creating the project - but how
> do I set the "Default Server" used by Run on Server - so that the
> project is readly to deploy in the servers view right after creation?
>
> Right now - I don't see a Server entry at all in the project properties.
>
>
>
> Konstantin Komissarchik wrote:
>
>> If you get the sdk version of WTP from the download site, it contains
>> the source code as well as documentation for extenders. This includes
>> documentation about the extension points as well javadoc. Of course,
>> the trouble with looking at javadoc for something as large as WTP, is
>> that you kinda have to know which way to look first. :)
>>
>> - Konstantin
|
|
|
|
|
|
|
|
Re: new proj wizard [message #203964 is a reply to message #203526] |
Wed, 07 November 2007 17:16   |
Eclipse User |
|
|
|
Why does adding the facets occasionally (not every time) give me a
"CoreException: One or more constraints have not been staisfied"?
2007-11-07 17:12:41,791 ERROR [org.eclipse.core.runtime.CoreException:
One or more constraints have not been satisfied.]
2007-11-07 17:12:41,791 ERROR [ @
org.eclipse.wst.common.project.facet.core.internal.FacetedPr oject.modifyInternal(FacetedProject.java:282)]
2007-11-07 17:12:41,791 ERROR [ @
org.eclipse.wst.common.project.facet.core.internal.FacetedPr oject.access$2(FacetedProject.java:264)]
2007-11-07 17:12:41,791 ERROR [ @
org.eclipse.wst.common.project.facet.core.internal.FacetedPr oject$1.run(FacetedProject.java:249)]
2007-11-07 17:12:41,791 ERROR [ @
org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1737)]
2007-11-07 17:12:41,791 ERROR [ @
org.eclipse.wst.common.project.facet.core.internal.FacetedPr oject.modify(FacetedProject.java:259)]
2007-11-07 17:12:41,791 ERROR [ @
org.eclipse.wst.common.project.facet.core.internal.FacetedPr oject.installProjectFacet(FacetedProject.java:216)]
2007-11-07 17:12:41,791 ERROR [ @
com.jk.applications.sce.ui.wizards.ProjectCreationAction.add EclipseProjectFacets(ProjectCreationAction.java:428)]
Konstantin Komissarchik wrote:
> Ok. The api that you want is available in the following package:
>
> org.eclipse.wst.common.project.facet.core.*
>
> A dynamic web project is basically a project with at least "jst.java"
> and "jst.web" facets installed.
>
> The following class is an entry point to the API with a bunch of static
> methods:
>
> org.eclipse.wst.common.project.facet.core.ProjectFacetsManag er
>
> You will want to call one of the create methods on ProjectFacetsManager
> to get an IFacetedProject object. That object has methods for setting
> the runtime, installing facets, etc.
>
> - Konstantin
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.28453 seconds