Class AbstractSectionParm
java.lang.Object
org.eclipse.ui.forms.AbstractFormPart
org.eclipse.ui.forms.SectionPart
org.apache.uima.taeconfigurator.editors.ui.AbstractSection
org.apache.uima.taeconfigurator.editors.ui.AbstractSectionParm
- All Implemented Interfaces:
StandardStrings
,org.eclipse.swt.widgets.Listener
,org.eclipse.ui.forms.IFormPart
- Direct Known Subclasses:
ParameterDelegatesSection
,ParameterSection
,ParameterSettingsSection
,ValueSection
The Class AbstractSectionParm.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The Constant COMMON_GROUP.protected static final String
The Constant COMMON_GROUP_HEADER.protected ConfigurationParameter[]
The common parms.protected ConfigurationParameterDeclarations
The cpd.protected static final String
The Constant DELEGATE_HEADER.protected static final String
The Constant EXTERNAL_OVERRIDE_INDICATOR.protected static final String
The Constant FLOWCTLR_HEADER.protected static final String
The Constant GROUP_HEADER.protected Map
The group parms.protected static final String
The Constant MULTI_VALUE_INDICATOR.protected final String
The name header.protected static final String
The Constant NO_EXTERNAL_OVERRIDE_INDICATOR.static final String
The Constant NOT_IN_ANY_GROUP.protected static final String
The Constant NOT_IN_ANY_GROUP_HEADER.protected static final String
The Constant OPTIONAL_INDICATOR.protected final String
The override header.protected org.eclipse.swt.widgets.Tree
The parameter section tree.protected static final String
The Constant REQUIRED_INDICATOR.protected ParameterSettingsSection
The settings.protected org.eclipse.swt.widgets.Tree
The settings tree.protected boolean
The show overrides.protected static final String
The Constant SINGLE_VALUE_INDICATOR.protected boolean
The split group names.protected org.eclipse.swt.widgets.Tree
The tree.The Constant typeNamesW.Fields inherited from class org.apache.uima.taeconfigurator.editors.ui.AbstractSection
capabilityArray0, configurationGroup0, configurationGroupArray0, configurationParameter0, configurationParameterArray0, editor, ENABLED, EQUAL_WIDTH, externalResourceBinding0, externalResourceDescription0, featureDescriptionArray0, fsIndexDescription0, HEADER_VISIBLE, HORIZONTAL_BUTTONS, IMPORTABLE_PART_CONTEXT, initialFormWidth, LINES_VISIBLE, nameValuePairArray0, NO_MIN_HEIGHT, NOT_SELECTED, NOTHING_SELECTED, PLUGIN_ID, SELECTED, sofaMapping0, stringArray0, toolkit, treeItemArray0, typeDescription0, typePriorityList0, valueChanged, VERTICAL_BUTTONS, WIDTH_NOT_SPECIFIED
Fields inherited from interface org.apache.uima.taeconfigurator.StandardStrings
S_, S_ADD, S_DESCRIPTION, S_DOWN, S_DOWN_TIP, S_EDIT, S_EDIT_TIP, S_EXPORT, S_EXPORT_TIP, S_REMOVE, S_REMOVE_TIP, S_UP, S_UP_TIP
-
Constructor Summary
ConstructorDescriptionAbstractSectionParm
(MultiPageEditor aEditor, org.eclipse.swt.widgets.Composite parent, String header, String description) Instantiates a new abstract section parm. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.swt.widgets.TreeItem
addGroupToGUI
(String names, ConfigurationGroup cg) Adds the group to GUI.protected void
addNewConfigurationParameterToGUI
(ConfigurationParameter newCP, org.eclipse.swt.widgets.TreeItem group) This is called sometimes with Settings group.protected void
clearAndRefillTree
(boolean usingGroups) Two modes: settingsDisplayMode - if true, shows groups one name at a time, and puts all <common> parms in other groupsvoid
disposeAllChildItems
(org.eclipse.swt.widgets.TreeItem parent) Dispose all child items.void
enable()
Enable.protected void
fill
(ConfigurationParameter[] parms, org.eclipse.swt.widgets.TreeItem group) called by refresh() when no groups, just plain parm sets, also for group case.protected void
fillOverrides
(org.eclipse.swt.widgets.TreeItem parent, ConfigurationParameter modelCP) Fill overrides.protected void
fillParmItem
(org.eclipse.swt.widgets.TreeItem item, ConfigurationParameter parm) Takes an existing model parm and fills a pre-allocated treeItem. 3 callers: addNewConfigurationParameter, alterExistingConfigurationParamater (editing), fill (bulk update from refresh)protected String[]
Gets the all group names.protected String[]
Gets the all group names.Gets the configuration parameter settings.protected ConfigGroup
getCorrespondingModelGroup
(org.eclipse.swt.widgets.TreeItem item) Gets the corresponding model group.protected ConfigurationParameter
getCorrespondingModelParm
(org.eclipse.swt.widgets.TreeItem item) Gets the corresponding model parm.protected int
getItemIndex
(org.eclipse.swt.widgets.TreeItem parent, org.eclipse.swt.widgets.TreeItem child) Gets the item index.protected int
getItemIndex
(org.eclipse.swt.widgets.Tree parent, org.eclipse.swt.widgets.TreeItem child) Gets the item index.protected String
Gets the name.protected String
getName
(org.eclipse.swt.widgets.TreeItem item) Gets the name.protected org.eclipse.swt.widgets.TreeItem[]
getSettingsGroups
(org.eclipse.swt.widgets.TreeItem group) get set of settings group from settingsTree that correspond to parmsection group.protected org.eclipse.swt.widgets.TreeItem
find settings tree item for group name.protected org.eclipse.swt.widgets.TreeItem[]
getSettingsParameter
(org.eclipse.swt.widgets.TreeItem containingGroup, String sourceItemName) Works between parameter tree and settings tree.static String
groupNameArrayToString
(String[] strings) Group name array to string.protected String[]
groupNamesToArray
(String names) Group names to array.abstract void
handleEvent
(org.eclipse.swt.widgets.Event event) protected boolean
isCommonGroup
(org.eclipse.swt.widgets.TreeItem item) Checks if is common group.protected boolean
Checks if is common group selection.protected boolean
isDelegate
(org.eclipse.swt.widgets.TreeItem item) Checks if is delegate.protected boolean
isGroup
(org.eclipse.swt.widgets.TreeItem item) Checks if is group.protected boolean
Checks if is group selection.protected boolean
isNOT_IN_ANY_GROUP
(org.eclipse.swt.widgets.TreeItem item) Checks if is not in any group.protected boolean
isOverride
(org.eclipse.swt.widgets.TreeItem item) Checks if is override.protected boolean
Checks if is override selection.protected boolean
isParameter
(org.eclipse.swt.widgets.TreeItem item) Checks if is parameter.protected boolean
Checks if is parm selection.protected String
Parm gui string.void
Removes the common parm settings from multiple groups.void
removeIncludedParmSettingsFromMultipleGroups
(String[] groupNames, ConfigurationParameter[] cps) Remove some of the parameter settings associated with this particular group, not all the parameters for that group name (some parameters may be associated with other instances of a particular group name.)void
removeIncludedParmSettingsFromSingleGroup
(String groupName, ConfigurationParameter[] cps) Removes the included parm settings from single group.void
removeParmSettingFromMultipleGroups
(org.eclipse.swt.widgets.TreeItem parmItem, boolean removeFromGUI) Remove a parameter from all groups it lives in the Settings.protected void
setGroupText
(org.eclipse.swt.widgets.TreeItem groupItem, String names) Sets the group text.void
Sets the settings.protected void
showDescriptionAsToolTip
(org.eclipse.swt.widgets.Event event) Show description as tool tip.void
updateParmInSettingsGUI
(ConfigurationParameter existingCP, org.eclipse.swt.widgets.TreeItem existingTreeItem, String prevName) Update parm in settings GUI.Methods inherited from class org.apache.uima.taeconfigurator.editors.ui.AbstractSection
addCapabilitySet, addListenerForPastableWidget, convertNull, copyTableItem, copyTreeItem, createByNameImport, createImport, createLocationImport, enableBorders, enableCtrl, finishAggregateChangeAction, formatName, getAnalysisEngineMetaData, getAvailableTypeNames, getCapabilities, getCapabilities, getCapabilitySofaNames, getCapabilitySofaNames, getConfigurationParameterDeclarations, getDelegateAnalysisEngineSpecifiersWithImports, getDescriptionForDescriptor, getExternalResourceBindings, getExternalResourceDependencies, getExternalResources, getFeature, getFlowControllerDeclaration, getFsIndexCollection, getFsIndexDescriptionFromTableTreeItem, getIndex, getIndex, getItemIndex, getMergedTypeSystemDescription, getMetaDataFromDescription, getNameSpace, getOperationalProperties, getPreviousSelection, getResourceManagerConfiguration, getShortFeatureName, getShortName, getSofaMappings, getSofaMappings, getToolkit, getTypeFromFullFeatureName, getTypeOrFeature, getTypePriorities, getTypeSystemDescription, handleDefaultIndexKind, initialize, isAeDescriptor, isAggregate, isArrayOrListType, isCasConsumerDescriptor, isCasInitializerDescriptor, isCollectionReaderDescriptor, isExtResAndBindingsDescriptor, isFlowControllerDescriptor, isFSArrayOrListType, isIndexableRange, isIndexDescriptor, isJmsDescriptor, isLocalProcessingDescriptor, isParmGroup, isPrimitive, isTypePriorityDescriptor, isTypeSystemDescriptor, isValidAe, isValidAggregateChange, markRestOfPageStale, markStale, markStaleIfDifferent, maybeSetSelection, maybeShortenFileName, multiLineFix, new2ColumnComposite, new3ColumnComposite, new4ColumnComposite, newButtonContainer, newButtonContainer, newCComboWithTip, newCheckBox, newComposite, newDescriptionTextBox, newLabeledCComboWithTip, newLabeledTextField, newLabeledTextField, newLabelWithData, newLabelWithTip, newLabelWithTip, newNcolumnComposite, newPushButton, newPushButton, newPushButton, newRadioButton, newTable, newTable, newTable, newTableColumn, newTableColumn, newTableColumn, newTableColumn, newTextWithTip, newTextWithTip, newTree, newTree, newTreeColumn, newTreeColumn, newTreeColumn, newTreeColumn, newUnUpdatableTextWithTip, packTable, packTree, parseDescriptor, parseDescriptor, parseToFitInToolTips, produceUniqueComponentKey, readImport, removeChildren, requestPopUpOverImport, revertMsg, revertOrContinue, revertTypeSystem, setButtonSelection, setFileDirty, setFlowControllerDeclaration, setMargins, setSelectionOneUp, setToolTipText, setupToPrintFile, setValueChanged, setValueChangedBoolean, setValueChangedCapitalBoolean, setValueChangedInt, setValueChangedKeys, setVnsHostAndPort, setVnsHostAndPort, showExceptionReadingImportedDescriptor, spacer, stringArrayAdd, stringArrayRemove, swapIndexKeys, swapTableItems, swapTreeItems, typeOrFeatureArrayAdd, typeOrFeatureArrayRemove, typeOrFeatureArrayRemove
Methods inherited from class org.eclipse.ui.forms.SectionPart
expansionStateChanged, expansionStateChanging, getSection, hookListeners, setFocus
Methods inherited from class org.eclipse.ui.forms.AbstractFormPart
commit, dispose, getManagedForm, isDirty, isStale, markDirty, markStale, refresh, setFormInput
-
Field Details
-
NOT_IN_ANY_GROUP
The Constant NOT_IN_ANY_GROUP. -
COMMON_GROUP
The Constant COMMON_GROUP. -
DELEGATE_HEADER
The Constant DELEGATE_HEADER. -
FLOWCTLR_HEADER
The Constant FLOWCTLR_HEADER.- See Also:
-
GROUP_HEADER
The Constant GROUP_HEADER. -
COMMON_GROUP_HEADER
The Constant COMMON_GROUP_HEADER. -
NOT_IN_ANY_GROUP_HEADER
The Constant NOT_IN_ANY_GROUP_HEADER. -
OVERRIDE_HEADER
The override header. -
MULTI_VALUE_INDICATOR
The Constant MULTI_VALUE_INDICATOR.- See Also:
-
SINGLE_VALUE_INDICATOR
The Constant SINGLE_VALUE_INDICATOR.- See Also:
-
OPTIONAL_INDICATOR
The Constant OPTIONAL_INDICATOR.- See Also:
-
REQUIRED_INDICATOR
The Constant REQUIRED_INDICATOR.- See Also:
-
EXTERNAL_OVERRIDE_INDICATOR
The Constant EXTERNAL_OVERRIDE_INDICATOR.- See Also:
-
NO_EXTERNAL_OVERRIDE_INDICATOR
The Constant NO_EXTERNAL_OVERRIDE_INDICATOR.- See Also:
-
nameHeader
The name header.- See Also:
-
typeNamesW
The Constant typeNamesW. -
tree
protected org.eclipse.swt.widgets.Tree treeThe tree. -
parameterSectionTree
protected org.eclipse.swt.widgets.Tree parameterSectionTreeThe parameter section tree. -
showOverrides
protected boolean showOverridesThe show overrides. -
splitGroupNames
protected boolean splitGroupNamesThe split group names. -
commonParms
The common parms. -
groupParms
The group parms. -
cpd
The cpd. -
settings
The settings. -
settingsTree
protected org.eclipse.swt.widgets.Tree settingsTreeThe settings tree.
-
-
Constructor Details
-
AbstractSectionParm
public AbstractSectionParm(MultiPageEditor aEditor, org.eclipse.swt.widgets.Composite parent, String header, String description) Instantiates a new abstract section parm.- Parameters:
aEditor
- the a editorparent
- the parentheader
- the headerdescription
- the description
-
-
Method Details
-
setSettings
Sets the settings.- Parameters:
v
- the new settings
-
enable
public void enable()Description copied from class:AbstractSection
Enable.- Specified by:
enable
in classAbstractSection
-
handleEvent
public abstract void handleEvent(org.eclipse.swt.widgets.Event event) -
clearAndRefillTree
protected void clearAndRefillTree(boolean usingGroups) Two modes: settingsDisplayMode - if true, shows groups one name at a time, and puts all <common> parms in other groups- Parameters:
usingGroups
- the using groups
-
fill
called by refresh() when no groups, just plain parm sets, also for group case.- Parameters:
parms
- the parmsgroup
- <Not in any group> if not in a group, otherwise the group tree item
-
groupNameArrayToString
Group name array to string.- Parameters:
strings
- the strings- Returns:
- the string
-
groupNamesToArray
Group names to array.- Parameters:
names
- the names- Returns:
- the string[]
-
fillParmItem
Takes an existing model parm and fills a pre-allocated treeItem. 3 callers: addNewConfigurationParameter, alterExistingConfigurationParamater (editing), fill (bulk update from refresh)- Parameters:
item
- the itemparm
- the parm
-
parmGuiString
Parm gui string.- Parameters:
parm
- the parm- Returns:
- the string
-
setGroupText
Sets the group text.- Parameters:
groupItem
- the group itemnames
- the names
-
addGroupToGUI
Adds the group to GUI.- Parameters:
names
- the namescg
- the cg- Returns:
- the tree item
-
addNewConfigurationParameterToGUI
protected void addNewConfigurationParameterToGUI(ConfigurationParameter newCP, org.eclipse.swt.widgets.TreeItem group) This is called sometimes with Settings group.- Parameters:
newCP
- the new CPgroup
- - is never null. May be <Not in any group>, indicate no groups; may be the "<Common>" group; or may be a regular group with a set of group names
-
fillOverrides
protected void fillOverrides(org.eclipse.swt.widgets.TreeItem parent, ConfigurationParameter modelCP) Fill overrides.- Parameters:
parent
- the parentmodelCP
- the model CP
-
isOverride
protected boolean isOverride(org.eclipse.swt.widgets.TreeItem item) Checks if is override.- Parameters:
item
- the item- Returns:
- true, if is override
-
isParameter
protected boolean isParameter(org.eclipse.swt.widgets.TreeItem item) Checks if is parameter.- Parameters:
item
- the item- Returns:
- true, if is parameter
-
isGroup
protected boolean isGroup(org.eclipse.swt.widgets.TreeItem item) Checks if is group.- Parameters:
item
- the item- Returns:
- true, if is group
-
isNOT_IN_ANY_GROUP
protected boolean isNOT_IN_ANY_GROUP(org.eclipse.swt.widgets.TreeItem item) Checks if is not in any group.- Parameters:
item
- the item- Returns:
- true, if is not in any group
-
isCommonGroup
protected boolean isCommonGroup(org.eclipse.swt.widgets.TreeItem item) Checks if is common group.- Parameters:
item
- the item- Returns:
- true, if is common group
-
isDelegate
protected boolean isDelegate(org.eclipse.swt.widgets.TreeItem item) Checks if is delegate.- Parameters:
item
- the item- Returns:
- true, if is delegate
-
isGroupSelection
protected boolean isGroupSelection()Checks if is group selection.- Returns:
- true, if is group selection
-
isCommonGroupSelection
protected boolean isCommonGroupSelection()Checks if is common group selection.- Returns:
- true, if is common group selection
-
isOverrideSelection
protected boolean isOverrideSelection()Checks if is override selection.- Returns:
- true, if is override selection
-
isParmSelection
protected boolean isParmSelection()Checks if is parm selection.- Returns:
- true, if is parm selection
-
getName
Gets the name.- Parameters:
item
- the item- Returns:
- the name
-
getName
Gets the name.- Parameters:
s
- the s- Returns:
- the name
-
getItemIndex
protected int getItemIndex(org.eclipse.swt.widgets.TreeItem parent, org.eclipse.swt.widgets.TreeItem child) Gets the item index.- Parameters:
parent
- the parentchild
- the child- Returns:
- the item index
-
getItemIndex
protected int getItemIndex(org.eclipse.swt.widgets.Tree parent, org.eclipse.swt.widgets.TreeItem child) Gets the item index.- Parameters:
parent
- the parentchild
- the child- Returns:
- the item index
-
getSettingsParameter
protected org.eclipse.swt.widgets.TreeItem[] getSettingsParameter(org.eclipse.swt.widgets.TreeItem containingGroup, String sourceItemName) Works between parameter tree and settings tree. We don't use any relative index offsets. Instead, we search for the item with the same parameter name.- Parameters:
containingGroup
- in parm section; if null = means all groups (common parms)sourceItemName
- the source item name- Returns:
- the settings parameter
-
getSettingsGroups
protected org.eclipse.swt.widgets.TreeItem[] getSettingsGroups(org.eclipse.swt.widgets.TreeItem group) get set of settings group from settingsTree that correspond to parmsection group.- Parameters:
group
- the group- Returns:
- set of settings group from settingsTree that correspond to parm-section group
-
getSettingsGroupTreeItemByName
find settings tree item for group name.- Parameters:
name
- the name- Returns:
- settings tree item for group name
-
getCorrespondingModelParm
Gets the corresponding model parm.- Parameters:
item
- the item- Returns:
- the corresponding model parm
-
getCorrespondingModelGroup
Gets the corresponding model group.- Parameters:
item
- the item- Returns:
- the corresponding model group
-
getConfigurationParameterSettings
Gets the configuration parameter settings.- Returns:
- the configuration parameter settings
-
getModelSettings
-
removeParmSettingFromMultipleGroups
public void removeParmSettingFromMultipleGroups(org.eclipse.swt.widgets.TreeItem parmItem, boolean removeFromGUI) Remove a parameter from all groups it lives in the Settings. If settings page is shown, also update the GUI.- Parameters:
parmItem
- in ParameterSection of parameter belonging to (multiple) groupsremoveFromGUI
- the remove from GUI
-
updateParmInSettingsGUI
public void updateParmInSettingsGUI(ConfigurationParameter existingCP, org.eclipse.swt.widgets.TreeItem existingTreeItem, String prevName) Update parm in settings GUI.- Parameters:
existingCP
- the existing CPexistingTreeItem
- the existing tree itemprevName
- the prev name
-
getAllGroupNames
Gets the all group names.- Returns:
- the all group names
-
getAllGroupNames
Gets the all group names.- Parameters:
aCpd
- the a cpd- Returns:
- all named groups, excludes <Common> and <Not in any group>
-
removeCommonParmSettingsFromMultipleGroups
public void removeCommonParmSettingsFromMultipleGroups()Removes the common parm settings from multiple groups. -
removeIncludedParmSettingsFromMultipleGroups
public void removeIncludedParmSettingsFromMultipleGroups(String[] groupNames, ConfigurationParameter[] cps) Remove some of the parameter settings associated with this particular group, not all the parameters for that group name (some parameters may be associated with other instances of a particular group name.) If no other group-set contains a particular individual group name, in the Settings: remove the common parameters, and remove the individual group itself. Remove the particular group-set definition. Note that a group may be defined in more than one group-set. Method: for the group-set, get the parms. Remove just those parms from all groups. Remove the group on the settings page (together with common parms for it) if no other group-set has this group name Remove the group-set.- Parameters:
groupNames
- the group namescps
- the cps
-
removeIncludedParmSettingsFromSingleGroup
public void removeIncludedParmSettingsFromSingleGroup(String groupName, ConfigurationParameter[] cps) Removes the included parm settings from single group.- Parameters:
groupName
- the group namecps
- in ParameterSection of items an array of tree items to remove Can be all items under a particular group, or a set of items from different groups
-
disposeAllChildItems
public void disposeAllChildItems(org.eclipse.swt.widgets.TreeItem parent) Dispose all child items.- Parameters:
parent
- the parent
-
showDescriptionAsToolTip
protected void showDescriptionAsToolTip(org.eclipse.swt.widgets.Event event) Show description as tool tip.- Parameters:
event
- the event
-