Class ConfigurationEditorFactory


  • public class ConfigurationEditorFactory
    extends java.lang.Object
    Implements a factory for creating EASy configuration editors. This is needed to decouple optional DSL editors from the EASy UI.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • ConfigurationEditorFactory

        public ConfigurationEditorFactory()
    • Method Detail

      • createEditor

        public static org.eclipse.jface.viewers.TreeViewer createEditor​(Configuration config,
                                                                        org.eclipse.swt.widgets.Composite parent)
        Creates a configuration editor.
        Parameters:
        config - the configuration to be shown in the editor
        parent - the UI parent
        Returns:
        the editor, null if none can be created, e.g., creator missing
      • createNameFilter

        public static org.eclipse.jface.viewers.ViewerFilter createNameFilter​(java.lang.String nameRegEx,
                                                                              boolean showAllNestedElements)
                                                                       throws java.util.regex.PatternSyntaxException
        Creates a name filter.
        Parameters:
        nameRegEx - a regular expression for including names
        showAllNestedElements - if all nested elements or only the selected ones shall be displayed
        Returns:
        the name filter
        Throws:
        java.util.regex.PatternSyntaxException - in case of an erroneous pattern syntax
      • createAttributeFilter

        public static org.eclipse.jface.viewers.ViewerFilter createAttributeFilter​(java.lang.String attributeNameRegEx,
                                                                                   java.lang.String valueRegEx,
                                                                                   boolean showAllNestedElements)
                                                                            throws java.util.regex.PatternSyntaxException
        Creates a simple attribute filter.
        Parameters:
        attributeNameRegEx - the name of the attribute as regular expression
        valueRegEx - a regular expression to be applied on the text representation of values
        showAllNestedElements - if all nested elements or only the selected ones shall be displayed
        Returns:
        the name filter
        Throws:
        java.util.regex.PatternSyntaxException - in case of an erroneous pattern syntax
      • createNonFrozenFilter

        public static org.eclipse.jface.viewers.ViewerFilter createNonFrozenFilter​(boolean showAllNestedElements)
        Creates a filter for non-frozen variables.
        Parameters:
        showAllNestedElements - if all nested elements or only the selected ones shall be displayed
        Returns:
        the name filter