Class SimulinkDictionaryModel
- java.lang.Object
-
- org.eclipse.epsilon.eol.models.Model
-
- org.eclipse.epsilon.eol.models.CachedModel<ISimulinkModelElement>
-
- org.eclipse.epsilon.emc.simulink.model.AbstractSimulinkModel
-
- org.eclipse.epsilon.emc.simulink.dictionary.model.SimulinkDictionaryModel
-
- All Implemented Interfaces:
AutoCloseable
,ISimulinkDictionaryModelElement
,ISimulinkModelElement
,IGenericSimulinkModel
,IModel
,IModelElement
- Direct Known Subclasses:
SimulinkDictionaryModelInEclipse
public class SimulinkDictionaryModel extends AbstractSimulinkModel implements ISimulinkDictionaryModelElement
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.epsilon.eol.models.IModel
IModel.AmbiguityCheckResult
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
CREATE_FILE
protected DictionaryModelOperationContributor
dicOperationContributor
protected MatlabHandleElement
dictionaryHandle
protected static String
OPEN_FILE
-
Fields inherited from class org.eclipse.epsilon.emc.simulink.model.AbstractSimulinkModel
closeOnDispose, enableTryCatch, engine, engineJarPath, enginePoolSize, ENV_ENGINE_JAR_PATH, ENV_LIBRARY_PATH, ENV_MATLAB_PATH, file, libraryPath, matlabPath, openOnLoad, paths, PROPERTY_CLOSE_ON_DISPOSE, PROPERTY_CURRENT_SIMULINK_PROJECT, PROPERTY_ENABLE_TRY_CATCH, PROPERTY_ENGINE_JAR_PATH, PROPERTY_ENGINE_POOL_SIZE, PROPERTY_FILE, PROPERTY_LIBRARY_PATH, PROPERTY_MATLAB_PATH, PROPERTY_OPEN_ON_LOAD, PROPERTY_PATHS, PROPERTY_REDUCE_EXCHANGES, PROPERTY_SIMULINK_PROJECT, PROPERTY_TRACK_API, PROPERTY_WORKING_DIR, reduceExchanges, simulinkProject, useCurrentProject, workingDir
-
Fields inherited from class org.eclipse.epsilon.eol.models.CachedModel
allContentsCache, kindCache, PROPERTY_CACHED, PROPERTY_CONCURRENT, typeCache
-
Fields inherited from class org.eclipse.epsilon.eol.models.Model
aliases, ENV_PREFIX, name, PROPERTY_ALIASES, PROPERTY_NAME, PROPERTY_READONLOAD, PROPERTY_READONLY, PROPERTY_STOREONDISPOSAL, propertyGetter, propertySetter, readOnLoad, storeOnDisposal
-
-
Constructor Summary
Constructors Constructor Description SimulinkDictionaryModel()
-
Method Summary
-
Methods inherited from class org.eclipse.epsilon.emc.simulink.model.AbstractSimulinkModel
addPath, addPath, disposeModel, flush, getAllTypeNamesOf, getCacheKeyForType, getEngine, getEngineJarPath, getEnumerationValue, getFile, getLibraryPath, getMatlabPath, getPaths, getProject, getWorkingDir, getWorkspaceVariable, isCloseOnDispose, isEnableTryCatch, isLoaded, isOpenOnLoad, isReduceExchanges, isTrackApi, isUseCurrentProject, parseMatlabEngineVariable, resolvePaths, setCloseOnDispose, setEnableTryCatch, setEngine, setEngineJarPath, setFile, setLibraryPath, setMatlabPath, setOpenOnLoad, setProject, setProject, setReduceExchanges, setTrackApi, setUseCurrentProject, setWorkingDir, statement, statementWithResult
-
Methods inherited from class org.eclipse.epsilon.eol.models.CachedModel
addToCache, allContents, clearCache, createInstance, deleteElement, dispose, getAllOfKind, getAllOfKindOrType, getAllOfType, initCaches, isCachingEnabled, isConcurrent, load, removeFromCache, setCachingEnabled, setConcurrent, wrap
-
Methods inherited from class org.eclipse.epsilon.eol.models.Model
allInstances, createInstance, getAliases, getFullyQualifiedTypeNameOf, getMetamodel, getName, getPropertyGetter, getPropertySetter, getTransactionSupport, getTypeOf, isModelElement, isOfKind, isOfType, isPropertySet, isReadOnLoad, isStoredOnDisposal, knowsAboutProperty, load, load, setName, setReadOnLoad, setStoredOnDisposal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.epsilon.eol.models.IModel
allContents, checkAmbiguity, close, createInstance, createInstance, deleteElement, dispose, getAliases, getAllOfKind, getAllOfType, getFullyQualifiedTypeNameOf, getMetamodel, getName, getPropertyGetter, getPropertySetter, getTransactionSupport, getTypeOf, isModelElement, isOfKind, isOfType, isPropertySet, isReadOnLoad, isStoredOnDisposal, knowsAboutProperty, load, load, load, setName, setReadOnLoad, setStoredOnDisposal
-
Methods inherited from interface org.eclipse.epsilon.emc.simulink.model.element.ISimulinkModelElement
equals, getEngine
-
-
-
-
Field Detail
-
CREATE_FILE
protected static final String CREATE_FILE
- See Also:
- Constant Field Values
-
OPEN_FILE
protected static final String OPEN_FILE
- See Also:
- Constant Field Values
-
dictionaryHandle
protected MatlabHandleElement dictionaryHandle
-
dicOperationContributor
protected DictionaryModelOperationContributor dicOperationContributor
-
-
Method Detail
-
loadModel
protected void loadModel() throws EolModelLoadingException
- Overrides:
loadModel
in classAbstractSimulinkModel
- Throws:
EolModelLoadingException
-
load
public void load(StringProperties properties, IRelativePathResolver resolver) throws EolModelLoadingException
- Specified by:
load
in interfaceIModel
- Overrides:
load
in classAbstractSimulinkModel
- Throws:
EolModelLoadingException
-
getTypeNameOf
public String getTypeNameOf(Object instance)
Description copied from interface:IModel
Returns a string representing the type of the instance object. The value returned by this function can be passed to createInstance to instantiate another object of the same type as instance.- Specified by:
getTypeNameOf
in interfaceIModel
- Parameters:
instance
- The model object whose type is to be determined.- Returns:
- the name of the type of the model object, instance.
-
getElementById
public Object getElementById(String id)
- Specified by:
getElementById
in interfaceIModel
-
getElementId
public String getElementId(Object instance)
- Specified by:
getElementId
in interfaceIModel
-
setElementId
public void setElementId(Object instance, String newId)
- Specified by:
setElementId
in interfaceIModel
-
owns
public boolean owns(Object instance)
Description copied from interface:IModel
Used to test whether an object is contained in this model.- Specified by:
owns
in interfaceIModel
- Overrides:
owns
in classAbstractSimulinkModel
- Parameters:
instance
- the Java object to test.- Returns:
- true if and only if instance is contained by this model.
-
isInstantiable
public boolean isInstantiable(String type)
- Specified by:
isInstantiable
in interfaceIModel
- Overrides:
isInstantiable
in classAbstractSimulinkModel
-
closeMatlabModel
protected void closeMatlabModel()
- Specified by:
closeMatlabModel
in classAbstractSimulinkModel
-
allContentsFromModel
protected Collection<ISimulinkModelElement> allContentsFromModel()
- Specified by:
allContentsFromModel
in classCachedModel<ISimulinkModelElement>
-
getAllOfTypeFromModel
protected Collection<ISimulinkModelElement> getAllOfTypeFromModel(String type) throws EolModelElementTypeNotFoundException
- Specified by:
getAllOfTypeFromModel
in classCachedModel<ISimulinkModelElement>
- Throws:
EolModelElementTypeNotFoundException
-
getAllOfKindFromModel
protected Collection<ISimulinkModelElement> getAllOfKindFromModel(String kind) throws EolModelElementTypeNotFoundException
- Specified by:
getAllOfKindFromModel
in classCachedModel<ISimulinkModelElement>
- Throws:
EolModelElementTypeNotFoundException
-
createInstanceInModel
protected ISimulinkModelElement createInstanceInModel(String type) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException
- Overrides:
createInstanceInModel
in classAbstractSimulinkModel
- Throws:
EolModelElementTypeNotFoundException
EolNotInstantiableModelElementTypeException
-
deleteElementInModel
protected boolean deleteElementInModel(Object instance) throws EolRuntimeException
Description copied from class:CachedModel
Returns true iff the given instance was deleted from the model.- Specified by:
deleteElementInModel
in classCachedModel<ISimulinkModelElement>
- Throws:
EolRuntimeException
-
getOwningModel
public IModel getOwningModel()
- Specified by:
getOwningModel
in interfaceIModelElement
-
getProperty
public Object getProperty(String property) throws EolRuntimeException
- Specified by:
getProperty
in interfaceISimulinkModelElement
- Throws:
EolRuntimeException
-
setProperty
public void setProperty(String property, Object value) throws EolRuntimeException
- Specified by:
setProperty
in interfaceISimulinkModelElement
- Throws:
EolRuntimeException
-
getAllTypeNamesOf
public Collection<String> getAllTypeNamesOf()
- Specified by:
getAllTypeNamesOf
in interfaceISimulinkModelElement
-
deleteElementInModel
public boolean deleteElementInModel() throws EolRuntimeException
- Specified by:
deleteElementInModel
in interfaceISimulinkModelElement
- Throws:
EolRuntimeException
-
getType
public String getType()
- Specified by:
getType
in interfaceISimulinkModelElement
-
getHandle
public MatlabHandleElement getHandle()
- Specified by:
getHandle
in interfaceISimulinkModelElement
-
-