Package org.eclipse.m2m.atl.core.ui.vm
Class RegularVMLauncher
java.lang.Object
org.eclipse.m2m.atl.core.ui.vm.RegularVMLauncher
- All Implemented Interfaces:
ILauncher
- Direct Known Subclasses:
ProfilerLauncher
The RegularVM implementation of the
ILauncher
.-
Field Summary
Fields inherited from interface org.eclipse.m2m.atl.core.launch.ILauncher
DEBUG_MODE, RUN_MODE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addInModel
(IModel model, String name, String referenceModelName) Adds an input model to the transformation context.void
addInOutModel
(IModel model, String name, String referenceModelName) Adds an input/output model to the transformation context.void
addLibrary
(String name, Object library) Adds a preloaded library module to the transformation, or anInputStream
.void
addOutModel
(IModel model, String name, String referenceModelName) Adds an output model to the transformation context.Returns the default ModelFactory name.getLibrary
(String libraryName) Returns a previously added library with the given name.Returns a previously added model with the given name.String[]
getModes()
Returns the supported modes.getName()
Returns theILauncher
name.void
initialize
(Map<String, Object> options) Initialize the launcher.protected Object
Launches the transformation using the specified debugger.launch
(String mode, org.eclipse.core.runtime.IProgressMonitor monitor, Map<String, Object> options, Object... modules) Launches the transformation using the given parameters and the given set of preloaded modules, orInputStream
.loadModule
(InputStream inputStream) Loads a transformation module from anInputStream
.
-
Constructor Details
-
RegularVMLauncher
public RegularVMLauncher()
-
-
Method Details
-
getName
Description copied from interface:ILauncher
Returns theILauncher
name. -
addInModel
Adds an input model to the transformation context. This method is also used to load the metamodels used in this transformation.- Specified by:
addInModel
in interfaceILauncher
- Parameters:
model
- the loaded modelname
- the name of the model as described in the main modulereferenceModelName
- the name of the metamodel as described in the main module- See Also:
-
addInOutModel
Adds an input/output model to the transformation context.- Specified by:
addInOutModel
in interfaceILauncher
- Parameters:
model
- the loaded modelname
- the name of the model as described in the main modulereferenceModelName
- the name of the metamodel as described in the main module- See Also:
-
addOutModel
Adds an output model to the transformation context.- Specified by:
addOutModel
in interfaceILauncher
- Parameters:
model
- the loaded modelname
- the name of the model as described in the main modulereferenceModelName
- the name of the metamodel as described in the main module- See Also:
-
addLibrary
Adds a preloaded library module to the transformation, or anInputStream
.- Specified by:
addLibrary
in interfaceILauncher
- Parameters:
name
- the name of the library as described in the main modulelibrary
- the loaded library- See Also:
-
initialize
Initialize the launcher.- Specified by:
initialize
in interfaceILauncher
- Parameters:
options
- initialization options- See Also:
-
getDefaultModelFactoryName
Returns the default ModelFactory name.- Specified by:
getDefaultModelFactoryName
in interfaceILauncher
- Returns:
- the default ModelFactory name
- See Also:
-
launch
public Object launch(String mode, org.eclipse.core.runtime.IProgressMonitor monitor, Map<String, Object> options, Object... modules) Launches the transformation using the given parameters and the given set of preloaded modules, orInputStream
.- Specified by:
launch
in interfaceILauncher
- Parameters:
mode
- the launching modemonitor
- the progress monitoroptions
- vm optionsmodules
- single module/ordered module set. A module set is used for superimposition, where the first module of the set is override by the next ones. A module can be passed as an InputStream or directly a module loaded by the loadModule method.- Returns:
- the transformation return result
- See Also:
-
org.eclipse.m2m.atl.core.launch.ILauncher#launch(java.lang.String, org.eclipse.core.runtime.IProgressMonitor, java.util.Map, java.io.InputStream[])
-
internalLaunch
protected Object internalLaunch(Debugger debugger, Map<String, Object> options, Object[] modules) throws AtlSuperimposeModule.AtlSuperimposeModuleExceptionLaunches the transformation using the specified debugger.- Parameters:
debugger
- the debuggeroptions
- the launch optionsmodules
- the transformation modules- Returns:
- the transformation return value
- Throws:
AtlSuperimposeModule.AtlSuperimposeModuleException
-
loadModule
Loads a transformation module from anInputStream
.- Specified by:
loadModule
in interfaceILauncher
- Parameters:
inputStream
- the input stream to load- Returns:
- the loaded module
- See Also:
-
getModel
Returns a previously added model with the given name. -
getLibrary
Returns a previously added library with the given name.- Specified by:
getLibrary
in interfaceILauncher
- Parameters:
libraryName
- the library name- Returns:
- a previously added library with the given name
- See Also:
-
getModes
Returns the supported modes.
-