Class GUIUtils


  • public class GUIUtils
    extends java.lang.Object
    Static functions used inside the GUI, e.g. open an editor.
    Author:
    El-Sharkawy
    • Constructor Detail

      • GUIUtils

        private GUIUtils()
        Should prevent instantiation.
    • Method Detail

      • openProductLineEditor

        public static void openProductLineEditor​(ProductLineProject plp)
                                          throws org.eclipse.ui.PartInitException
        Opens the Editor for the given ProductLineProject.
        Parameters:
        plp - An existing and loaded ProductLineProject, which should be edited inside the Editor.
        Throws:
        org.eclipse.ui.PartInitException - if the editor could not be created or initialized
      • openProject

        public static void openProject​(PLPInfo plp,
                                       java.lang.String projectName)
                                throws org.eclipse.ui.PartInitException
        Opens an IVML file with the given file name (project name) inside the IVML-Editor.
        Parameters:
        plp - The ProductLineProject which contains the desired IVML file.
        projectName - The project name of the desired IVML file (file name without the .ivml extension).
        Throws:
        org.eclipse.ui.PartInitException - if the editor could not be created or initialized
      • openFileInWS

        public static void openFileInWS​(java.io.File file)
                                 throws org.eclipse.ui.PartInitException
        Opens the specified file inside an appropriate editor, e.g. a IVML file inside the IVML editor. The file must be located inside the workspace.
        Parameters:
        file - The file which shall be opened in an IVML-Editor.
        Throws:
        org.eclipse.ui.PartInitException - if the editor could not be created or initialized
      • openFileInEditor

        private static void openFileInEditor​(org.eclipse.core.resources.IFile file)
                                      throws org.eclipse.ui.PartInitException
        Open the given file in an appropriate editor.
        Parameters:
        file - The file to open.
        Throws:
        org.eclipse.ui.PartInitException - if the editor could not be created or initialized
      • openEditor

        public static void openEditor​(ProductLineProject plp,
                                      EditorType desiredEditor)
                               throws org.eclipse.ui.PartInitException
        Opens an appropriate editor to edit specific parts of the given ProductLineProject.
        Parameters:
        plp - The ProductLineProject which shall be edited.
        desiredEditor - Specification which part of the ProductLineProject should be edited.
        Throws:
        org.eclipse.ui.PartInitException - if the editor could not be created or initialized