|
|
|
Re: new proj wizard [message #203526 is a reply to message #203519] |
Fri, 02 November 2007 18:41 |
Eclipse User |
|
|
|
Originally posted by: kosta.bea.com
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
|
|
|
|
Re: new proj wizard [message #203548 is a reply to message #203540] |
Fri, 02 November 2007 19:32 |
Eclipse User |
|
|
|
Originally posted by: kosta.bea.com
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 #203563 is a reply to message #203556] |
Fri, 02 November 2007 20:17 |
John Kenny Messages: 62 Registered: July 2009 |
Member |
|
|
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 #203570 is a reply to message #203556] |
Fri, 02 November 2007 20:19 |
Eclipse User |
|
|
|
Originally posted by: kosta.bea.com
You need to definite a server runtime. You can do that using api located
in this package:
org.eclipse.wst.server.core
The starting class for that api is called ServerCore.
Once you have create the runtime, you will be able to see it in the
Targeted Runtimes properties page of your project, but it will not be
selected, you can go back to the faceted project api.
Use the following method to find the runtime. Note that this IRuntime is
different than server.core's IRuntime.
org.eclipse.wst.common.project.facet.core.runtime.RuntimeMan ager.getRuntime(
<name>)
Then you will want to call
IFacetedProject.setTargetedRuntimes(List<IRuntime>) on your project.
- Konstantin
|
|
|
|
|
|
Re: new proj wizard [message #203921 is a reply to message #203915] |
Wed, 07 November 2007 17:26 |
Eclipse User |
|
|
|
Originally posted by: kosta.bea.com
This is an aspect of how the JBoss adapter works. I am not 100%
positive, but you may have to cast down to the internal
RuntimeWorkingCopy class in order to access that configuration.
- Konstantin
|
|
|
Re: new proj wizard [message #203964 is a reply to message #203526] |
Wed, 07 November 2007 22:16 |
John Kenny Messages: 62 Registered: July 2009 |
Member |
|
|
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.03895 seconds