Package de.uni_hildesheim.sse.ui
Class ModelConnector
- java.lang.Object
-
- de.uni_hildesheim.sse.ui.ModelConnector
-
public class ModelConnector extends java.lang.ObjectThis class is used to get information out of the variability model that cannot be accessed via the ECore model directly. This connector is required to display information in the outline view appropriately.- Author:
- kroeher
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringCONSTRAINT_ENDINGprivate de.uni_hildesheim.sse.ivml.ProjectivmlProject
-
Constructor Summary
Constructors Constructor Description ModelConnector()The constructor of the model connector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddIvmlProject(de.uni_hildesheim.sse.ivml.Project iProject)Add the IVML (Ecore) project to the connector, which is required to get (and load) to corresponding variability model project.private java.lang.StringbeautifyConstraintString(java.lang.String constraint)java.lang.StringgetConstraint(int numOfConstraint)java.lang.String[]getEvaluationBlocksElements(int evalNum)Returns the set of evaluation block elements of an evaluation expression.java.lang.StringgetTypeDefRestriction(java.lang.String typeName)private ProjectgetVarModelProject()This method returns the project of the variability model based on the added IVML model project.
-
-
-
Field Detail
-
ivmlProject
private de.uni_hildesheim.sse.ivml.Project ivmlProject
-
CONSTRAINT_ENDING
private static final java.lang.String CONSTRAINT_ENDING
- See Also:
- Constant Field Values
-
-
Method Detail
-
addIvmlProject
public void addIvmlProject(de.uni_hildesheim.sse.ivml.Project iProject)
Add the IVML (Ecore) project to the connector, which is required to get (and load) to corresponding variability model project.- Parameters:
iProject- The IVML project for which information should be retrieved
-
getEvaluationBlocksElements
public java.lang.String[] getEvaluationBlocksElements(int evalNum)
Returns the set of evaluation block elements of an evaluation expression. The evaluation expression is identified by the number of its occurrence in the IVML file. More precise, if the elements of the second evaluation expression shall be returned, add "2" as a parameter to this method.- Parameters:
evalNum- The number of the evaluation expression for which the elements should be returned.- Returns:
- A String array including all evaluation block elements or null if no element is included.
-
beautifyConstraintString
private java.lang.String beautifyConstraintString(java.lang.String constraint)
-
getConstraint
public java.lang.String getConstraint(int numOfConstraint)
-
getTypeDefRestriction
public java.lang.String getTypeDefRestriction(java.lang.String typeName)
-
getVarModelProject
private Project getVarModelProject()
This method returns the project of the variability model based on the added IVML model project. If the project is currently not loaded, it will load the project as well.- Returns:
- the variability model project.
-
-