Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » expression-based activity using <test property="org.eclipse.core.runtime.product"> :
expression-based activity using <test property="org.eclipse.core.runtime.product"> : [message #336963] Thu, 16 July 2009 16:02 Go to next message
Edoardo Comar is currently offline Edoardo ComarFriend
Messages: 102
Registered: July 2009
Senior Member
Targeting 3.4.2,
I have bound some UI contributions (wizards) to an expression-based
activity using a definition reference in its <enabledWhen> :

<extension point="org.eclipse.ui.activities">
<activity id="foo.activity.definitions" name="foo">
<enabledWhen>
<reference definitionId="fooDefinitionsAccessible"/>
</enabledWhen>
</activity>

<activityPatternBinding>...
</activityPatternBinding>
</extension>

<extension point="org.eclipse.ui.newWizards">
...


It all works perfectly if I use systemTest in the definition, e.g.

<extension point="org.eclipse.core.expressions.definitions">
<definition id="fooDefinitionsAccessible">
<systemTest property="java.vendor" value="IBM Corporation" />
</definition>
</extension>

However I need the expression to check for product id (or even better
for isBundleInstalled)

as soon as I change the above to

<extension point="org.eclipse.core.expressions.definitions">
<definition id="fooDefinitionsAccessible">
<test property="org.eclipse.core.runtime.product"
args="foo.product"
forcePluginActivation="true" />
</definition>
</extension>


Then my activity is always disabled
Adding a breakpoint to
org.eclipse.core.internal.expressions.propertytester.Platfor mPropertyTester
and launching in debug ... execution seem to never get there.

I hope I'm just using the wrong syntax ?
Re: expression-based activity using <test property="org.eclipse.core.runtime.product"&g [message #336967 is a reply to message #336963] Thu, 16 July 2009 20:19 Go to previous message
Edoardo Comar is currently offline Edoardo ComarFriend
Messages: 102
Registered: July 2009
Senior Member
Solved !

<extension point="org.eclipse.core.expressions.definitions">
<definition id="fooDefinitionsAccessible">
<with variable="org.eclipse.core.runtime.Platform">
<test property="org.eclipse.core.runtime.product"
value="fooproduct"
/>
</with>
</definition>
</extension>

<extension point="org.eclipse.ui.activities">
<activity
id="foodefinitions"
name="foo">
<enabledWhen>
<reference definitionId="fooDefinitionsAccessible"/>
</enabledWhen>
</activity>

<activityPatternBinding
activityId="foodefinitions"
pattern="...">
</activityPatternBinding>
</extension>


Edoardo Comar wrote:
> Targeting 3.4.2,
> I have bound some UI contributions (wizards) to an expression-based
> activity using a definition reference in its <enabledWhen> :
>
> <extension point="org.eclipse.ui.activities">
> <activity id="foo.activity.definitions" name="foo">
> <enabledWhen>
> <reference definitionId="fooDefinitionsAccessible"/>
> </enabledWhen>
> </activity>
>
> <activityPatternBinding>...
> </activityPatternBinding>
> </extension>
>
> <extension point="org.eclipse.ui.newWizards">
> ...
>
>
> It all works perfectly if I use systemTest in the definition, e.g.
>
> <extension point="org.eclipse.core.expressions.definitions">
> <definition id="fooDefinitionsAccessible">
> <systemTest property="java.vendor" value="IBM Corporation" />
> </definition>
> </extension>
>
> However I need the expression to check for product id (or even better
> for isBundleInstalled)
>
> as soon as I change the above to
>
> <extension point="org.eclipse.core.expressions.definitions">
> <definition id="fooDefinitionsAccessible">
> <test property="org.eclipse.core.runtime.product"
> args="foo.product"
> forcePluginActivation="true" />
> </definition>
> </extension>
>
>
> Then my activity is always disabled
> Adding a breakpoint to
> org.eclipse.core.internal.expressions.propertytester.Platfor mPropertyTester
> and launching in debug ... execution seem to never get there.
>
> I hope I'm just using the wrong syntax ?
Previous Topic:Master configuration initialization
Next Topic:History of console(s)
Goto Forum:
  


Current Time: Thu Apr 25 15:11:36 GMT 2024

Powered by FUDForum. Page generated in 0.02632 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top