[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] Understanding Runtimes and Multiple facets

Great thank Konstantin. 

The missing peice of the puzzle was making a facet compatible with any runtime - as the Maven facet isn't runtime aware :)

P

On 6/26/06, Konstantin Komissarchik <kosta@xxxxxxx> wrote:

Philip,

 

A runtime has to support all of the facets installed on a project in order to be selectable. A runtime is supposed to define completely the environment in which the project will be running in. Since you say you have created runtime support mappings for the "jst.jbi.bindingcomponent" facet, I can only assume it's the "jst.maven" facet that's preventing the runtime from being selectable. If a facet does not have any specific runtime requirements (besides those requirements already specified by facets it depends on), it needs to declare so explicitly. Here is an example:

 


<extension point="org.eclipse.wst.common.project.facet.core.runtimes
">

  <supported>
    <runtime-component any="true
"/>
    <facet id="jst.maven
"/>
  </supported>
</extension>

 

Hope this helps,

 

- Konstantin

 


From: wtp-dev-bounces@xxxxxxxxxxx [mailto: wtp-dev-bounces@xxxxxxxxxxx] On Behalf Of Philip Dodds
Sent: Monday, June 26, 2006 11:29 AM
To: General discussion of project-wide or architectural issues.
Subject: [wtp-dev] Understanding Runtimes and Multiple facets

 

Hi,

I am having a bit of a rough time understand how multiple facets and runtimes work.

I wanted to have a project with three facets:

jst.java
jst.jbi.bindingcomponent <- New JBI support
jst.maven <- Support for Apache Maven via facet

I have runtimes configured to support jst.jbi.bindingcomponent .. However,  they never get enabled,  it seems the filters on the runtimes exclude a runtime because any of the facets aren't supported? Does this mean that a runtime needs to support all the facets of a project to be used with it or was the intention that if your runtime supports one of the facets then you use it?


For an example of what I mean I patched the following to allow a runtime to be added in the properties?


### Eclipse Workspace Patch 1.0
#P org.eclipse.wst.common.project.facet.ui
Index: src/org/eclipse/wst/common/project/facet/ui/internal/RuntimesPropertyPage.java
===================================================================
RCS file: /cvsroot/webtools/wst/components/common/plugins/org.eclipse.wst.common.project.facet.ui/src/org/eclipse/wst/common/project/facet/ui/internal/RuntimesPropertyPage.java,v
retrieving revision 1.2
diff -u -r1.2 RuntimesPropertyPage.java
--- src/org/eclipse/wst/common/project/facet/ui/internal/RuntimesPropertyPage.java    16 May 2006 18:33:29 -0000    1.2
+++ src/org/eclipse/wst/common/project/facet/ui/internal/RuntimesPropertyPage.java    26 Jun 2006 18:25:55 -0000
@@ -98,13 +98,13 @@
                             final IProjectFacetVersion fv
                                 = (IProjectFacetVersion) itr.next();
                            
-                            if( ! runtime.supports( fv ) )
+                            if( runtime.supports( fv ) )
                             {
-                                return false;
+                                return true;
                             }
                         }
                        
-                        return true;
+                        return false;
                     }
                 }
             );


Cheers

P

_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev