Package de.uka.ipd.sdq.featureinstance
Class FeatureConfigFunctionality
java.lang.Object
de.uka.ipd.sdq.featureinstance.FeatureConfigFunctionality
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkMandatory
(Feature node, AdapterFactoryEditingDomain editingDomain) Checks if a Feature `node` is a mandatory Featureprotected void
checkParents
(Object current, CheckboxTreeViewer treeViewer, FeatureConfig overridesConfig, AdapterFactoryEditingDomain editingDomain) Checks recursively parent nodes, if a Node is checkedgetConfiguration
(Resource resource) Checks if the Configuration object can be accessed in the loaded resource and returns it if possiblevoid
grayFeatureGroups
(ChildRelation curRelation, CheckboxTreeViewer treeViewer) Grays out the FeatureGroups in the treeViewerInitializes the adapterFactory, the commandStack and with these objects the editingDomainboolean
isFeatureDiagramReferenceCorrect
(Resource existingResource) Checks if a newly loaded featureconfig-file references the opened FeatureDiagram resourceprotected boolean
isPersisted
(Resource resource, AdapterFactoryEditingDomain editingDomain) This returns whether something has been persisted to the URI of the specified resource.void
markDefaultConfig
(FeatureConfig defaultConfig, CheckboxTreeViewer treeViewer) Checks/unchecks the defaultConfiguration in the Viewervoid
markOverridesConfig
(FeatureConfig overridesConfig, CheckboxTreeViewer treeViewer) Checks/unchecks the configurationOverrides in the ViewernavigateToFeatureDiagram
(Feature feature, AdapterFactoryEditingDomain editingDomain) Navigates to the FeatureDiagram from a given Feature-objectvoid
selectMandatoryFeatures
(ChildRelation curRelation, CheckboxTreeViewer treeViewer, FeatureConfig overridesConfig) Selects recursively the mandatory Featuresvoid
uncheckInModel
(Feature element, boolean state, FeatureConfig overridesConfig) Registers changes made in the TreeViewer to the resourcevoid
uncheckParents
(Object current, CheckboxTreeViewer treeViewer, FeatureConfig overridesConfig, AdapterFactoryEditingDomain editingDomain) Unchecks recursively parent nodes, if no children nodes are checked
-
Constructor Details
-
FeatureConfigFunctionality
public FeatureConfigFunctionality()
-
-
Method Details
-
getConfiguration
Checks if the Configuration object can be accessed in the loaded resource and returns it if possible- Parameters:
resource
- The resource from which the Configuration-object can be accessed (a *.featureconfig-file)- Returns:
- Returns a Configuration-object or null, if it can be accessed (e.g. no *.featureconfig-file)
-
uncheckParents
public void uncheckParents(Object current, CheckboxTreeViewer treeViewer, FeatureConfig overridesConfig, AdapterFactoryEditingDomain editingDomain) Unchecks recursively parent nodes, if no children nodes are checked- Parameters:
current
- The unchecked Feature
-
checkParents
protected void checkParents(Object current, CheckboxTreeViewer treeViewer, FeatureConfig overridesConfig, AdapterFactoryEditingDomain editingDomain) Checks recursively parent nodes, if a Node is checked- Parameters:
current
- The checked Feature
-
initializeEditingDomain
Initializes the adapterFactory, the commandStack and with these objects the editingDomain -
isFeatureDiagramReferenceCorrect
Checks if a newly loaded featureconfig-file references the opened FeatureDiagram resource- Parameters:
existingResource
- Newly loaded Resource-object (should be a featureconfig-file)- Returns:
false
, if existingResource doesn't include a Configuration-object or if no ConifgNode references to the opened modeltrue
otherwise
-
selectMandatoryFeatures
public void selectMandatoryFeatures(ChildRelation curRelation, CheckboxTreeViewer treeViewer, FeatureConfig overridesConfig) Selects recursively the mandatory Features- Parameters:
curRelation
- The ChildRelation, where the selecting should start
-
uncheckInModel
Registers changes made in the TreeViewer to the resource- Parameters:
element
- The changed Featurestate
- The checked/unchecked state
-
markDefaultConfig
Checks/unchecks the defaultConfiguration in the Viewer -
markOverridesConfig
Checks/unchecks the configurationOverrides in the Viewer -
checkMandatory
Checks if a Feature `node` is a mandatory Feature- Parameters:
node
- The Feature which needs to be checked- Returns:
true
, if node is a mandatory Featurefalse
, else
-
grayFeatureGroups
Grays out the FeatureGroups in the treeViewer- Parameters:
curRoot
- The current ChildRelation
-
isPersisted
This returns whether something has been persisted to the URI of the specified resource. The implementation uses the URI converter from the editor's resource set to try to open an input stream.- Generated class or method.
-