Class FeatureConfigFunctionality

java.lang.Object
de.uka.ipd.sdq.featureinstance.FeatureConfigFunctionality

public class FeatureConfigFunctionality extends Object
  • Constructor Details

    • FeatureConfigFunctionality

      public FeatureConfigFunctionality()
  • Method Details

    • getConfiguration

      public Configuration getConfiguration(Resource resource)
      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

      public AdapterFactoryEditingDomain initializeEditingDomain()
      Initializes the adapterFactory, the commandStack and with these objects the editingDomain
    • isFeatureDiagramReferenceCorrect

      public boolean isFeatureDiagramReferenceCorrect(Resource existingResource)
      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 model true 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

      public void uncheckInModel(Feature element, boolean state, FeatureConfig overridesConfig)
      Registers changes made in the TreeViewer to the resource
      Parameters:
      element - The changed Feature
      state - The checked/unchecked state
    • markDefaultConfig

      public void markDefaultConfig(FeatureConfig defaultConfig, CheckboxTreeViewer treeViewer)
      Checks/unchecks the defaultConfiguration in the Viewer
    • markOverridesConfig

      public void markOverridesConfig(FeatureConfig overridesConfig, CheckboxTreeViewer treeViewer)
      Checks/unchecks the configurationOverrides in the Viewer
    • checkMandatory

      public boolean checkMandatory(Feature node, AdapterFactoryEditingDomain editingDomain)
      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 Feature false, else
    • grayFeatureGroups

      public void grayFeatureGroups(ChildRelation curRelation, CheckboxTreeViewer treeViewer)
      Grays out the FeatureGroups in the treeViewer
      Parameters:
      curRoot - The current ChildRelation
    • isPersisted

      protected boolean isPersisted(Resource resource, AdapterFactoryEditingDomain editingDomain)
      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.