An action's enablement and/or visibility can be defined using the elements enablement and visibility respectively. These two elements contain a boolean expression that is evaluated to determine the enablement and/or visibility.
The syntax is the same for the enablement and visibility elements. Both contain only one boolean expression sub-element. In the simplest case, this will be an objectClass, objectState, pluginState, or systemProperty element. In the more complex case, the and, or, and not elements can be combined to form a boolean expression. Both the and, and or elements must contain 2 sub-elements. The not element must contain only 1 sub-element.
An action's enablement and/or visibility can be defined using the elements enablement and visibility respectively. These two elements contain a boolean expression that is evaluated to determine the enablement and/or visibility.
The syntax is the same for the enablement and visibility elements. Both contain only one boolean expression sub-element. In the simplest case, this will be an objectClass, objectState, pluginState, or systemProperty element. In the more complex case, the and, or, and not elements can be combined to form a boolean expression. Both the and, and or elements must contain 2 sub-elements. The not element must contain only 1 sub-element.
<!ELEMENT extension (navigatorContent)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT navigatorContent (enables , emfEnablement)>
<!ATTLIST navigatorContent
contentProvider CDATA #IMPLIED
labelProvider CDATA #IMPLIED
actionProvider CDATA #IMPLIED
id CDATA #IMPLIED
openListener CDATA #IMPLIED
priority (lowest|lower|low|normal|high|higher|highest)
name CDATA #REQUIRED
enabledByDefault (true | false)
icon CDATA #IMPLIED
sorter CDATA #IMPLIED>
The root element of the extension schema. Defines information used by the Common Navigator to find available extensions.
<!ELEMENT enables (and | or | not | objectClass | objectState | pluginState | systemProperty)>
This element is used to define the enablement for the extension. Objects which are accepted by the expression will cause the extension to be invoked.
<!ELEMENT enablement (and | or | not | objectClass | objectState | pluginState | systemProperty)>
This element is used to define the enablement for the extension.
<!ELEMENT visibility (and | or | not | objectClass | objectState | pluginState | systemProperty)>
This element is used to define the visibility for the extension.
<!ELEMENT and (and | or | not | objectClass | objectState | pluginState | systemProperty)>
This element represent a boolean AND operation on the result of evaluating it's two sub-element expressions.
<!ELEMENT or (and | or | not | objectClass | objectState | pluginState | systemProperty)>
This element represent a boolean OR operation on the result of evaluating it's two sub-element expressions.
<!ELEMENT not (and | or | not | objectClass | objectState | pluginState | systemProperty)>
This element represent a boolean NOT operation on the result of evaluating it's sub-element expressions.
<!ELEMENT objectClass EMPTY>
<!ATTLIST objectClass
name CDATA #REQUIRED
adaptable (true | false) >
This element is used to evaluate the class or interface of each object in the current selection. If each object in the selection implements the specified class or interface, the expression is evaluated as true.
<!ELEMENT objectState EMPTY>
<!ATTLIST objectState
name CDATA #REQUIRED
value CDATA #REQUIRED>
This element is used to evaluate the attribute state of each object in the current selection. If each object in the selection has the specified attribute state, the expression is evaluated as true. To evaluate this type of expression, each object in the selection must implement, or adapt to, org.eclipse.ui.IActionFilter interface.
<!ELEMENT pluginState EMPTY>
<!ATTLIST pluginState
id CDATA #REQUIRED
value (installed|activated) "installed">
This element is used to evaluate the state of a plug-in. The state of the plug-in may be one of the following: installed or activated.
<!ELEMENT systemProperty EMPTY>
<!ATTLIST systemProperty
name CDATA #REQUIRED
value CDATA #REQUIRED>
This element is used to evaluate the state of some system property. The property value is retrieved from the java.lang.System.
<!ELEMENT emfEnablement (package+)>
This element is used to define the enablement for the extension.
<!ELEMENT package EMPTY>
<!ATTLIST package
uri CDATA #IMPLIED>