|
|
|
|
Re: Programatically adding facets to a pre-existing project [message #204629 is a reply to message #204494] |
Fri, 16 November 2007 16:01 |
bouge Messages: 13 Registered: July 2009 |
Junior Member |
|
|
ProjectFacetsManager handles our core usecase of upgrading a facet-less
preject to our new facet beautifully! One issue I'm hitting is that
because we depend on jst.java and jst.web, I need to be able to set the
jst.web Content directory path in some circumstances. By default, it
sets the content dir to 'WebContent', but there are instances were I
need to set that to something different. I am familiar with setting
facet properties via the DataModel, but does that apply when using the
ProjectFacetsManager api's? Sorry if I'm missing something obvious here.
Also, does anybody happen to know if jst.web can have no content
directory set? That is, having WEB-INF at the root of the project,
instead of buried in the content dir?
Thanks again,
bouge
Mike Bourgeois wrote:
> Actually after reading the project thread below I think I'm all set.
> Looks like ProjectFacetsManager does everything I need to know about.
> Thanks,
> bouge
>
>
>
>
|
|
|
Re: Programatically adding facets to a pre-existing project [message #204634 is a reply to message #204629] |
Fri, 16 November 2007 16:48 |
Eclipse User |
|
|
|
Originally posted by: kosta.bea.com
Here is how you can get at the datamodel that you can use to
parameterize the installation of the jst.web facet. I believe you can
set web content path to project root, but I don't recall exactly which
value you have to use. Experiment with either null or an empty string.
IProjectFacetVersion jstWebSomething = ...
IActionDefinition actionDef = jstWebSomething.getActionDefinition(
IFacetedProject.Action.Type.INSTALL );
IDataModel dm = (IDataModel) actionDef.createConfigObject();
Hope this helps,
- Konstantin
|
|
|
|
Powered by
FUDForum. Page generated in 0.08806 seconds