public class GeppettoModelAccess
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private GeppettoLibrary |
commonlibrary |
private EditingDomain |
editingDomain |
private GeppettoModel |
geppettoModel |
Constructor and Description |
---|
GeppettoModelAccess(GeppettoModel geppettoModel) |
Modifier and Type | Method and Description |
---|---|
void |
addLibrary(GeppettoLibrary library) |
void |
addTag(Tag tag) |
void |
addTypeToLibrary(Type type,
GeppettoLibrary targetLibrary) |
void |
addVariable(Variable variable) |
void |
addVariableToType(Variable newVar,
CompositeType targetType) |
Type |
getOrCreateSimpleType(java.lang.String typeToRetrieve,
java.util.List<GeppettoLibrary> libraries) |
Pointer |
getPointer(java.lang.String instancePath) |
java.util.List<Query> |
getQueries() |
Query |
getQuery(java.lang.String queryPath) |
Type |
getType(EClass eclass)
Usage commonLibraryAccess.getType(TypesPackage.Literals.PARAMETER_TYPE);
|
Type |
getType(EClass eclass,
java.lang.String id)
Usage commonLibraryAccess.getType(TypesPackage.Literals.VISUAL_TYPE, "particles");
|
private void |
markAsUnsynched(ISynchable object)
This method will set the synched attribute for the object to false indicating that whatever version of the object exists client side it is now out of synch
|
void |
removeType(EObject object) |
void |
setObjectAttribute(EObject object,
java.lang.Object field,
java.lang.Object value)
This method will change an attribute of an object
|
void |
swapType(ImportType typeToBeReplaced,
Type newType,
GeppettoLibrary library)
Note this command won't remove the typeToBeReplaced from its container in case it's being iterated over
|
private GeppettoModel geppettoModel
private GeppettoLibrary commonlibrary
private EditingDomain editingDomain
public GeppettoModelAccess(GeppettoModel geppettoModel) throws GeppettoVisitingException
GeppettoVisitingException
public Type getType(EClass eclass) throws GeppettoVisitingException
GeppettoVisitingException
public Type getType(EClass eclass, java.lang.String id) throws GeppettoVisitingException
eclass
- id
- GeppettoVisitingException
public Pointer getPointer(java.lang.String instancePath) throws GeppettoModelException
instancePath
- GeppettoModelException
public void addVariable(Variable variable)
variable
- public void addTag(Tag tag)
tag
- public void addLibrary(GeppettoLibrary library)
tag
- public void addTypeToLibrary(Type type, GeppettoLibrary targetLibrary)
tag
- public void setObjectAttribute(EObject object, java.lang.Object field, java.lang.Object value)
object
- the object target of the operationfield
- the field to set, needs to come from the Literals enumeration inside the package, e.g. GeppettoPackage.Literals.NODE__NAME to change the namevalue
- the new valueprivate void markAsUnsynched(ISynchable object)
object
- public Type getOrCreateSimpleType(java.lang.String typeToRetrieve, java.util.List<GeppettoLibrary> libraries)
typeToRetrieve
- libraries
- public void addVariableToType(Variable newVar, CompositeType targetType)
newVar
- targetType
- public void swapType(ImportType typeToBeReplaced, Type newType, GeppettoLibrary library)
typeToBeReplaced
- newType
- library
- public void removeType(EObject object)
object
- public Query getQuery(java.lang.String queryPath)
queryPath
- public java.util.List<Query> getQueries()