Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Previous revision
core_expressions [2013/11/02 08:36]
core_expressions [2021/04/05 13:46] (current)
mihael
Line 1: Line 1:
 +====== 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.
 +
 +<sxh xml>
 +    <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>
 +</sxh>
 +
 +The bundle ''org.eclipse.core.expressions'' needs to be added as a dependency to get the core expression extension point.
 +
 +{{tag>eclipse e4}}