[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools] Re: new proj wizard

I can see in ServerCore where I can query the installed servers and runtimes but how would I add a new runtime or server?



Konstantin Komissarchik wrote:

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.RuntimeManager.getRuntime( <name>)

Then you will want to call IFacetedProject.setTargetedRuntimes(List<IRuntime>) on your project.

- Konstantin