This is an old revision of the document!


Core Expressions

Core expressions are declared in the plugin.xml file.

Selection of Specific Class

To check if the selection is an instance of a specific class.

    <extension
         point="org.eclipse.core.expressions.definitions">
      <definition
            id="miworkplace.ui.core.expression.isConnection">
         <with
               variable="org.eclipse.ui.selection">
            <iterate
                  ifEmpty="false"
                  operator="or">
               <instanceof
                     value="miworkplace.connection.api.IConnection">
               </instanceof>
            </iterate>
         </with>
      </definition>
   </extension>

The bundle org.eclipse.core.expressions needs to be added as a dependency to get the core expression extension point.