Class ElementMatcher

java.lang.Object
org.eclipse.e4.ui.workbench.modeling.ElementMatcher
All Implemented Interfaces:
Selector

public class ElementMatcher extends Object implements Selector
This is an implementation of a Selector that implements the existing 'findElements'. Clients may subclass this and override the 'select' method in order to define custom filters.
Since:
1.1
  • Constructor Details

    • ElementMatcher

      public ElementMatcher(String id, Class<?> clazz, String tag)
      Parameters:
      id - The elementId of the desired element
      clazz - The class specification of the desired element
      tag - A tag which must be specified on the desired element
    • ElementMatcher

      public ElementMatcher(String id, Class<?> clazz, List<String> tagsToMatch)
      Parameters:
      id - The elementId of the desired element
      clazz - The class specification of the desired element
      tagsToMatch - A list of tags which must all be specified on the desired element
  • Method Details

    • select

      public boolean select(MApplicationElement element)
      Description copied from interface: Selector
      Call for each element to find matching elements
      Specified by:
      select in interface Selector
      Parameters:
      element - the element
      Returns:
      true if matches else false