Package net.ssehub.easy.dslCore.ui
Class ConfigurationEditorFactory
- java.lang.Object
-
- net.ssehub.easy.dslCore.ui.ConfigurationEditorFactory
-
public class ConfigurationEditorFactory extends java.lang.ObjectImplements a factory for creating EASy configuration editors. This is needed to decouple optional DSL editors from the EASy UI.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceConfigurationEditorFactory.IConfigurationEditorCreatorDefines the instance of an editor creator.
-
Field Summary
Fields Modifier and Type Field Description private static ConfigurationEditorFactory.IConfigurationEditorCreatorcreator
-
Constructor Summary
Constructors Constructor Description ConfigurationEditorFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.eclipse.jface.viewers.ViewerFiltercreateAttributeFilter(java.lang.String attributeNameRegEx, java.lang.String valueRegEx, boolean showAllNestedElements)Creates a simple attribute filter.static org.eclipse.jface.viewers.TreeViewercreateEditor(Configuration config, org.eclipse.swt.widgets.Composite parent)Creates a configuration editor.static org.eclipse.jface.viewers.ViewerFiltercreateNameFilter(java.lang.String nameRegEx, boolean showAllNestedElements)Creates a name filter.static org.eclipse.jface.viewers.ViewerFiltercreateNonFrozenFilter(boolean showAllNestedElements)Creates a filter for non-frozen variables.static voidsetCreator(ConfigurationEditorFactory.IConfigurationEditorCreator cfgCreator)Defines the editor creator.
-
-
-
Field Detail
-
creator
private static ConfigurationEditorFactory.IConfigurationEditorCreator creator
-
-
Method Detail
-
setCreator
public static void setCreator(ConfigurationEditorFactory.IConfigurationEditorCreator cfgCreator)
Defines the editor creator.- Parameters:
cfgCreator- the creator instance
-
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 editorparent- 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.PatternSyntaxExceptionCreates a name filter.- Parameters:
nameRegEx- a regular expression for including namesshowAllNestedElements- 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.PatternSyntaxExceptionCreates a simple attribute filter.- Parameters:
attributeNameRegEx- the name of the attribute as regular expressionvalueRegEx- a regular expression to be applied on the text representation of valuesshowAllNestedElements- 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
-
-