Class FeatureModelInstanceEditor

    • Constructor Detail

      • FeatureModelInstanceEditor

        public FeatureModelInstanceEditor()
    • Method Detail

      • createContextMenuFor

        protected void createContextMenuFor​(StructuredViewer viewer)
      • fillContextMenu

        protected void fillContextMenu​(IMenuManager manager)
      • createResource

        protected void createResource​(URI uri)
        Loads the resource-object through the editingDomain
      • getResource

        protected Resource getResource()
        Returns:
        Returns the resource-object
      • startFileWizard

        protected URI startFileWizard​(String fileName,
                                      String message)
        Starts a ResourceWizard to create a new File
        Parameters:
        fileName - The default filename
        Returns:
        Returns the URI of the new file or null, if dialog was cancelled
      • startOpenDialog

        protected URI startOpenDialog​(String fileName)
        Starts a LoadResourceDialog
        Parameters:
        fileName - The default filename
        Returns:
        Returns the URI selected by the user in the dialog or null if no file was selected or the dialog cancelled
      • createNewConfigResource

        protected void createNewConfigResource​(URI newResourceURI,
                                               FeatureDiagram featureDiagram,
                                               FeatureConfig defaultRef)
        Creates a new Configuration-Resource with the given newResourceURI corresponding to the given featureDiagram Overrides the old (*.featuremodel) resource-object
        Parameters:
        newResourceURI - The URI for the new Resource
        featureDiagram - A FeatureDiagram-object to which the new Configuration should reference
        defaultRef - A reference to the defaultConfig object or null, if none exists
      • getFeatureDiagram

        protected FeatureDiagram getFeatureDiagram​(Resource resource)
        Checks if the FeatureDiagram object can be accessed in the loaded resource and returns it if possible
        Parameters:
        resource - The resource from which the FeatureDiagram-object can be accessed (a *.featuremodel-file)
        Returns:
        Returns a FeatureDiagram-object or null, if it can be accessed (e.g. no *.featuremodel-file)
      • handleFileCases

        protected void handleFileCases​(String fileExtension,
                                       String path,
                                       String fileName)
        Handles the different file types for the loaded resource.
        Parameters:
        fileExtension - The file extension of the loaded resource
        path - The complete path to the file including the fileName
        fileName - The filename
      • handleConfigCases

        protected Resource handleConfigCases​(Resource resource)
        Handles the different cases for a loaded *.featuremodel-resource http://sdqweb.ipd.uka.de/mediawiki/images/6/61/Check_Cases.png
        Parameters:
        resource - The resource in which the configuration object should be stored
        Returns:
        The resource object which stores the (prop. new) overrides config object
      • createEditor

        protected void createEditor()
        Creates the editor layout and content
      • createViewer

        public void createViewer​(FeatureDiagram root)
        Creates a treeViewer of the given FeatureDiagram
        Parameters:
        root - The FeatureDiagram-object which shall be displayed
      • doSaveAs

        protected void doSaveAs​(URI uri,
                                IEditorInput editorInput)
        Generated class or method.