Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Problems implementing a new facet
Problems implementing a new facet [message #166849] Fri, 14 April 2006 16:28 Go to next message
Don Sedota is currently offline Don Sedota
Messages: 18
Registered: July 2009
Junior Member
I've been the investigating the possibility of using project facets for
our project. Based on the limited documentation that I can find on the
subject of project facets, I am under the assumption that they are used
for adding certain pieces of functionality to a WTP based project (i.e.
Dynamic Web Project). We have a certain type of project that "extends" the
Dynamic Web Project. Hence, we are looking to use a facet to represent the
functionality extension of the Dynamic Web Project.

I believe that I have set up the facet extensions and project wizard
correctly but am running into a snag. It seems that there is a check made
during the course of running the project wizard that checks to make sure
that the facets defined for the project are all defined as "runnable" on
the selected runtime (i.e. Tomcat 5.0). If the check fails (as in my case)
things blow up.

So, my questions are;

1) If this is true, how does a developer that does not create a new
runtime of his own, add a facet to an existing runtime (i.e. Tomcat 5.0)?

2) What is the advantage of using a facet as opposed to just using a
standalone nature to add the extra functionality?

Thanks.

- Don
Re: Problems implementing a new facet [message #166860 is a reply to message #166849] Fri, 14 April 2006 17:02 Go to previous messageGo to next message
Don Sedota is currently offline Don Sedota
Messages: 18
Registered: July 2009
Junior Member
No, I didn't post to answer my own question, but did stumble upon the
answer to question #1 shortly after posting. Using the
org.eclipse.wst.common.project.facet.core.runtimes extension point, you
can allow a facet to run on a particular runtime. For example to allow
facet "myfacet" to run on Tomcat 5.0, the following extension will do;

<extension point="org.eclipse.wst.common.project.facet.core.runtimes">
<supported>
<runtime-component id="org.eclipse.jst.server.tomcat" version="5.0"/>
<facet id="myfacet" version="1.0"/>
</supported>
</extension>

- Don
Re: Problems implementing a new facet [message #166876 is a reply to message #166860] Sat, 15 April 2006 12:05 Go to previous message
Eclipse User
Originally posted by: bdmetz.us.ibm.com.spam

Hi Don,

I thought I'd point you at some presentations which might help from
EclipseCon:

http://eclipsezilla.eclipsecon.org/php/attachment.php?bugid= 241

I can tell you to answer your #2 question, one major facet feature that I
think is a big improvement over natures is a uniform UI control over
installing/removing facets from projects and the ability to group and
prerequisite facets based on other facets being present. You can also sort
the order in which they are installed on a project and do some neat
install/uninstall/upgrade handlers.

"Don Sedota" <sedota@us.ibm.com> wrote in message
news:56669258965bd5d9d2f6de413aa02939$1@www.eclipse.org...
> No, I didn't post to answer my own question, but did stumble upon the
> answer to question #1 shortly after posting. Using the
> org.eclipse.wst.common.project.facet.core.runtimes extension point, you
> can allow a facet to run on a particular runtime. For example to allow
> facet "myfacet" to run on Tomcat 5.0, the following extension will do;
>
> <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
> <supported>
> <runtime-component id="org.eclipse.jst.server.tomcat" version="5.0"/>
> <facet id="myfacet" version="1.0"/>
> </supported>
> </extension>
>
> - Don
>
Previous Topic:org.eclipse.jst.ws.consumption.ui - WebServiceClientTypeWidget.java compile err
Next Topic:XForms tooling planned?
Goto Forum:
  


Current Time: Fri Aug 01 00:04:24 EDT 2014

Powered by FUDForum. Page generated in 0.04173 seconds