Class SimulinkModel
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.model.SimulinkModel
- All Implemented Interfaces:
AutoCloseable,IGenericSimulinkModel,IOperationContributorProvider,IModel
- Direct Known Subclasses:
SimulinkModelInEclipse
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.epsilon.eol.models.IModel
IModel.AmbiguityCheckResult -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected booleanstatic final Stringprotected doublestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringCONSTANTSstatic final Stringstatic final Stringstatic final StringDeprecated.static final Stringprotected SearchPreferencesFIELDSprotected booleanDeprecated.static final Stringprotected Stringprotected ModelOperationContributorstatic final Stringprotected booleanFields 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, workingDirFields inherited from class org.eclipse.epsilon.eol.models.CachedModel
allContentsCache, kindCache, PROPERTY_CACHED, PROPERTY_CONCURRENT, typeCacheFields 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToCache(String type, ISimulinkModelElement instance) protected Collection<ISimulinkModelElement>protected voidcreateInstance(String type) createInstance(String type, Collection<Object> parameters) protected ISimulinkModelElementcreateInstanceInModel(String type) voidprotected booleandeleteElementInModel(Object instance) Returns true iff the given instance was deleted from the model.findBlocks(Integer depth) protected Collection<ISimulinkModelElement>getAllOfKindFromModel(String kind_) protected Collection<ISimulinkModelElement>getAllOfTypeFromModel(String type) getElementById(String id) getElementId(Object instance) getTypeNameOf(Object instance) Returns a string representing the type of the instance object.booleanbooleanbooleanbooleanbooleanisInstantiable(String type) booleanDeprecated.booleanvoidload(StringProperties properties, IRelativePathResolver resolver) protected voidbooleanUsed to test whether an object is contained in this model.protected voidremoveFromCache(ISimulinkModelElement instance) voidsetElementId(Object instance, String newId) voidsetFindOptimisationEnabled(boolean enabled) voidsetFollowLinks(boolean followLinks) If true, adds the 'Follow_Link' parameter to the 'find_system' method in MATLABvoidsetIncludeCommented(boolean includeCommented) voidsetLookUnderMasks(String lookUnderMasks) voidsetSearchPreferences(SearchPreferences searchPreferences) voidsetShowInMatlabEditor(boolean openMatlabEditor) Deprecated.protected voidsetSimulinkModelName(File name) protected voidsetSimulinkModelName(String name) voidsetUseCurrentSimulinkModel(boolean useCurrentSimulinkModel) voidsimulate()booleanstore()booleanMethods 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, statementWithResultMethods inherited from class org.eclipse.epsilon.eol.models.CachedModel
allContents, clearCache, dispose, getAllOfKind, getAllOfKindOrType, getAllOfType, initCaches, isCachingEnabled, isConcurrent, load, setCachingEnabled, setConcurrent, wrapMethods inherited from class org.eclipse.epsilon.eol.models.Model
allInstances, getAliases, getFullyQualifiedTypeNameOf, getMetamodel, getName, getPropertyGetter, getPropertySetter, getTransactionSupport, getTypeOf, isModelElement, isOfKind, isOfType, isPropertySet, isReadOnLoad, isStoredOnDisposal, knowsAboutProperty, load, load, setName, setReadOnLoad, setStoredOnDisposalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.epsilon.eol.models.IModel
allContents, checkAmbiguity, close, dispose, getAliases, getAllOfKind, getAllOfType, getFullyQualifiedTypeNameOf, getMetamodel, getName, getPropertyGetter, getPropertySetter, getTransactionSupport, getTypeOf, isModelElement, isOfKind, isOfType, isPropertySet, isReadOnLoad, isStoredOnDisposal, knowsAboutProperty, load, load, load, setName, setReadOnLoad, setStoredOnDisposal
-
Field Details
-
PROPERTY_SHOW_IN_MATLAB_EDITOR
Deprecated.- See Also:
-
PROPERTY_FOLLOW_LINKS
CONSTANTS- See Also:
-
PROPERTY_LOOK_UNDER_MASKS
- See Also:
-
PROPERTY_INCLUDE_COMMENTED
- See Also:
-
PROPERTY_CURRENT_SIMULINK_MODEL
- See Also:
-
PROPERTY_FIND_OPTIMISATION
- See Also:
-
BLOCK
- See Also:
-
SIMULINK
- See Also:
-
STATEFLOW
- See Also:
-
GET_PARAM
- See Also:
-
LOAD_SYSTEM
- See Also:
-
OPEN_SYSTEM
- See Also:
-
NEW_SYSTEM
- See Also:
-
SAVE_SYSTEM
- See Also:
-
searchPreferences
FIELDS -
simulinkOperationContributor
-
useCurrentSimulinkModel
protected boolean useCurrentSimulinkModel -
findOptimisationEnabled
protected boolean findOptimisationEnabled -
showInMatlabEditor
Deprecated. -
handle
protected double handle -
simulinkModelName
-
-
Constructor Details
-
SimulinkModel
public SimulinkModel()
-
-
Method Details
-
loadModel
- Overrides:
loadModelin classAbstractSimulinkModel- Throws:
EolModelLoadingException
-
closeMatlabModel
protected void closeMatlabModel()- Specified by:
closeMatlabModelin classAbstractSimulinkModel
-
createInstanceInModel
protected ISimulinkModelElement createInstanceInModel(String type) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException - Overrides:
createInstanceInModelin classAbstractSimulinkModel- Throws:
EolModelElementTypeNotFoundExceptionEolNotInstantiableModelElementTypeException
-
addToCache
protected void addToCache(String type, ISimulinkModelElement instance) throws EolModelElementTypeNotFoundException - Overrides:
addToCachein classCachedModel<ISimulinkModelElement>- Throws:
EolModelElementTypeNotFoundException
-
removeFromCache
protected void removeFromCache(ISimulinkModelElement instance) throws EolModelElementTypeNotFoundException - Overrides:
removeFromCachein classCachedModel<ISimulinkModelElement>- Throws:
EolModelElementTypeNotFoundException
-
deleteElement
- Specified by:
deleteElementin interfaceIModel- Overrides:
deleteElementin classCachedModel<ISimulinkModelElement>- Throws:
EolRuntimeException
-
createInstance
public ISimulinkModelElement createInstance(String type) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException - Specified by:
createInstancein interfaceIModel- Overrides:
createInstancein classCachedModel<ISimulinkModelElement>- Throws:
EolModelElementTypeNotFoundExceptionEolNotInstantiableModelElementTypeException
-
createInstance
public Object createInstance(String type, Collection<Object> parameters) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException - Specified by:
createInstancein interfaceIModel- Overrides:
createInstancein classModel- Throws:
EolModelElementTypeNotFoundExceptionEolNotInstantiableModelElementTypeException
-
deleteElementInModel
Description copied from class:CachedModelReturns true iff the given instance was deleted from the model.- Specified by:
deleteElementInModelin classCachedModel<ISimulinkModelElement>- Throws:
EolRuntimeException
-
allContentsFromModel
- Specified by:
allContentsFromModelin classCachedModel<ISimulinkModelElement>
-
getAllOfTypeFromModel
protected Collection<ISimulinkModelElement> getAllOfTypeFromModel(String type) throws EolModelElementTypeNotFoundException - Specified by:
getAllOfTypeFromModelin classCachedModel<ISimulinkModelElement>- Throws:
EolModelElementTypeNotFoundException
-
getAllOfKindFromModel
protected Collection<ISimulinkModelElement> getAllOfKindFromModel(String kind_) throws EolModelElementTypeNotFoundException - Specified by:
getAllOfKindFromModelin classCachedModel<ISimulinkModelElement>- Throws:
EolModelElementTypeNotFoundException
-
load
public void load(StringProperties properties, IRelativePathResolver resolver) throws EolModelLoadingException - Specified by:
loadin interfaceIModel- Overrides:
loadin classAbstractSimulinkModel- Throws:
EolModelLoadingException
-
simulate
- Throws:
InterruptedException
-
hasType
-
getTypeNameOf
Description copied from interface:IModelReturns 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:
getTypeNameOfin interfaceIModel- Parameters:
instance- The model object whose type is to be determined.- Returns:
- the name of the type of the model object, instance.
-
getElementById
- Specified by:
getElementByIdin interfaceIModel
-
setElementId
- Specified by:
setElementIdin interfaceIModel
-
getElementId
- Specified by:
getElementIdin interfaceIModel
-
owns
Description copied from interface:IModelUsed to test whether an object is contained in this model.- Specified by:
ownsin interfaceIModel- Overrides:
ownsin classAbstractSimulinkModel- Parameters:
instance- the Java object to test.- Returns:
- true if and only if instance is contained by this model.
-
store
-
store
public boolean store() -
isInstantiable
- Specified by:
isInstantiablein interfaceIModel- Overrides:
isInstantiablein classAbstractSimulinkModel
-
getSimulinkModelName
-
setSimulinkModelName
-
setSimulinkModelName
-
getOperationContributor
- Specified by:
getOperationContributorin interfaceIOperationContributorProvider
-
getHandle
-
isUseCurrentSimulinkModel
public boolean isUseCurrentSimulinkModel() -
setUseCurrentSimulinkModel
public void setUseCurrentSimulinkModel(boolean useCurrentSimulinkModel) -
setShowInMatlabEditor
Deprecated.If true, the model will be shown in the MATLAB Editor. If the model is already loaded, it will not open it again. If false, the model will not be open in the MATLAB editor, but won't close an already open model -
isShowInMatlabEditor
Deprecated. -
getSearchPreferences
-
setSearchPreferences
-
isFollowLinks
public boolean isFollowLinks() -
setFollowLinks
public void setFollowLinks(boolean followLinks) If true, adds the 'Follow_Link' parameter to the 'find_system' method in MATLAB -
getLookUnderMasks
-
setLookUnderMasks
-
isIncludeCommented
public boolean isIncludeCommented() -
setIncludeCommented
public void setIncludeCommented(boolean includeCommented) -
isFindOptimisationEnabled
public boolean isFindOptimisationEnabled() -
setFindOptimisationEnabled
public void setFindOptimisationEnabled(boolean enabled) -
getChildren
- Throws:
MatlabException
-
findBlocks
- Throws:
MatlabException
-
findBlocks
- Throws:
MatlabException
-