Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] Questions about future IActionFilter now that XML expressions are available

Some experimentation leads me to believe that for actions, XML expressions are not enabled (yet???). The <test> tag is flagged by the PDE. If you ignore that the if becomes very clear in the exception that is thrown at runtime.

This example.

<objectContribution
objectClass="org.eclipse.core.resources.IFile"
adaptable="true"
id="com.ibm.jdg2e.contributions.IFile">
<action
label="JDG2E: Smart Refresh"
class="com.ibm.jdg2e.contributions.SmartRefreshAction"
menubarPath="additions"
id="com.ibm.jdg2e.pm.SmartRefresh">
<enablement>
<not>
<test
property="com.ibm.jdg2e.contributions.IFileExtender.isSynchronized">
</test>
</not>
</enablement>
</action>
</objectContribution>

Had this result:
java.lang.IllegalStateException: Action _expression_ unrecognized element: test
at org.eclipse.ui.internal.ActionExpression.createExpression(ActionExpression.java:141)

Jim D'Anjou


Back to the top