|
|
|
|
Re: Programatically adding facets to a pre-existing project [message #204629 is a reply to message #204494] |
Fri, 16 November 2007 11:01   |
Eclipse User |
|
|
|
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 #205393 is a reply to message #204634] |
Wed, 05 December 2007 15:29  |
Eclipse User |
|
|
|
No such luck with empty string, null, /, ., etc... Any other ideas on
how to set the webfacet to point to the project root for it's contentdir?
Looking at the WebFacetInstallDelegate leads me to beleive that it's
expecting a path name under project.
Thanks again,
bouge
Konstantin Komissarchik wrote:
> 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.04124 seconds