Activities based on source variables [message #509219] |
Thu, 21 January 2010 12:14  |
Eclipse User |
|
|
|
I am attempting to use activities to set when a perspective is enabled or disabled. The activity has an enabled when that uses a source variable to determine if it is enabled or disabled. I have several source variables that could set the perspective to be visible so I am using an 'or' statement in my enabled when to accomplish this. However, it does not seem to be working properly for me, which I am certain is something that I am doing wrong, lol. If I do any one of these alone then it works perfectly. Otherwise it seems to only check the first variable and not bother to check the rest of the variables. So if the variable EMAIL.ADMIN is set to ENABLED, then the perspective shows up. But if EMAIL.ADMIN is not set to ENABLED and EMAIL_DELETE_EMAIL_ADDRESS is set to ENABLED, the perspective is not enabled. Here is what my activity looks like:
<extension point="org.eclipse.ui.activities">
<activity id="com.myExample.plugin.email.activity.emailPerspective" name="Email Perspective">
<enabledWhen>
<or>
<with variable="EMAIL.ADMIN">
<equals value="ENABLED"> </equals>
</with>
<with variable="EMAIL_DELETE_EMAIL_ADDRESS">
<equals value="ENABLED"> </equals>
</with>
<with variable="EMAIL_DELETE_TEMPLATE">
<equals value="ENABLED"> </equals>
</with>
<with variable="EMAIL_FIND_EMAIL_AUDIT">
<equals value="ENABLED"> </equals>
</with>
<with variable="EMAIL_SAVE_TEMPLATE">
<equals value="ENABLED"> </equals>
</with>
<with variable="EMAIL_SAVE_EMAIL_ADDRESS">
<equals value="ENABLED"> </equals>
</with>
<with variable="EMAIL_FIND_TEMPLATES">
<equals value="ENABLED"> </equals>
</with>
<with variable="EMAIL_FIND_EMAIL_ADDRESS">
<equals value="ENABLED"> </equals>
</with>
<with variable="EMAIL_DELETE_AUDIT">
<equals value="ENABLED"> </equals>
</with>
</or>
</enabledWhen>
</activity>
<activityPatternBinding activityId="com.myExample.plugin.email.activity.emailPerspective" pattern="com.myExample.plugin.email/com.myExample.plugin.email.perspective">
</activityPatternBinding>
</extension>
Thanks,
Dwain
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03312 seconds