Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 126223 - Add eclipse property tester for facets
Summary: Add eclipse property tester for facets
Status: CLOSED FIXED
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.common (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 1.5 M5   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-02 12:45 EST by John Lanuti CLA
Modified: 2006-02-15 12:56 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Lanuti CLA 2006-02-02 12:45:40 EST
The org.eclipse.core.expressions.propertyTesters extension point provides a way to contribute your own property testers for enablement on object contributions or other extensions.  You just define your own property tester, and add an enablement clause which uses a test of some sort like for nature:

<and>
   <instanceof value="org.eclipse.core.resources.IProject"/>
   <test property="org.eclipse.core.resources.projectNature"
       value="org.eclipse.jdt.core.javanature"/>
</and>

This is what we need for facets because nature is no longer specific enough.  This would allow us to hang options based on facets defined on the project.
Comment 1 Konstantin Komissarchik CLA 2006-02-13 14:06:35 EST
Implemented. The name of the property is "org.eclipse.wst.common.project.facet.core.projectFacet". The value consists of a facet id followed by an optional version expression (separated by a colon). Here are some examples:

"jst.web"
"jst.web:2.2,2.3"
"jst.web:&lt;=2.3"
Comment 2 Konstantin Komissarchik CLA 2006-02-13 14:08:38 EST
forgot to resolve
Comment 3 John Lanuti CLA 2006-02-15 12:56:55 EST
Verified.  This, to me, is a major improvement in the ease of extending usage with facets.  Thanks Kosta.