Package net.ssehub.easy.producer.ui.core
Class GUIUtils
- java.lang.Object
-
- net.ssehub.easy.producer.ui.core.GUIUtils
-
public class GUIUtils extends java.lang.ObjectStatic functions used inside the GUI, e.g. open an editor.- Author:
- El-Sharkawy
-
-
Constructor Summary
Constructors Modifier Constructor Description privateGUIUtils()Should prevent instantiation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidopenEditor(ProductLineProject plp, EditorType desiredEditor)Opens an appropriate editor to edit specific parts of the givenProductLineProject.private static voidopenFileInEditor(org.eclipse.core.resources.IFile file)Open the given file in an appropriate editor.static voidopenFileInWS(java.io.File file)Opens the specified file inside an appropriate editor, e.g.static voidopenProductLineEditor(ProductLineProject plp)Opens theEditorfor the givenProductLineProject.static voidopenProject(PLPInfo plp, java.lang.String projectName)Opens an IVML file with the given file name (project name) inside the IVML-Editor.
-
-
-
Method Detail
-
openProductLineEditor
public static void openProductLineEditor(ProductLineProject plp) throws org.eclipse.ui.PartInitException
Opens theEditorfor the givenProductLineProject.- Parameters:
plp- An existing and loadedProductLineProject, which should be edited inside theEditor.- 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.PartInitExceptionOpens 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.PartInitExceptionOpen 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 givenProductLineProject.- Parameters:
plp- TheProductLineProjectwhich shall be edited.desiredEditor- Specification which part of theProductLineProjectshould be edited.- Throws:
org.eclipse.ui.PartInitException- if the editor could not be created or initialized
-
-