|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.mofscript.editor.ExecutionUtility
public class ExecutionUtility
Utility class for managing compilation and execution from the editor
Constructor Summary | |
---|---|
ExecutionUtility()
|
Method Summary | |
---|---|
void |
clearMarkers(org.eclipse.core.resources.IFile ifile)
Clears the markers for a given file resource |
MOFScriptSpecification |
compile(org.eclipse.core.resources.IFile theFile,
java.lang.String contents)
Compiles a transformation. |
MOFScriptSpecification |
compile(org.eclipse.core.resources.IFile theFile,
java.lang.String contents,
boolean silent)
|
void |
execute(org.eclipse.core.resources.IFile file,
java.lang.String type,
boolean showOpenDialog)
Executes a transformation. |
void |
executeModelDirect(org.eclipse.core.resources.IFile transformationFile)
Executes a MOFSript model directly - no compile |
void |
executeMOFScript2Text(org.eclipse.core.resources.IFile mofscriptModelFile)
Fetches the MOFScript to Text transformation and executes that on an input transformation |
java.lang.String |
getCurrentInputDir()
Retrieves the current input directory |
MOFScriptSpecification |
getCurrentTransformation()
Retrieves the current transformatation |
java.lang.String |
getFirstInputFile()
Retrieves the current input file |
boolean |
openSourceModelFile(java.lang.String title,
java.lang.String[] filter,
java.util.List parameters)
Shows a file dialog to select a source model file. |
void |
run()
Threaded transformation execution |
void |
setRootDirectoryProperty(org.eclipse.core.resources.IFile file)
Sets the root directory property for a given file resource The root directory property is used when generating output files If a transformation only specifies relative paths, this property is used for absolute location |
void |
storeMofScriptModel(MOFScriptSpecification transformation,
org.eclipse.core.resources.IFile transformationFile)
Stores a MOFScript transformation as a model |
void |
updateMarkers(org.eclipse.core.resources.IFile fileResource,
java.util.Iterator errors)
Updates the error markers for a file resource. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExecutionUtility()
Method Detail |
---|
public MOFScriptSpecification getCurrentTransformation()
public java.lang.String getFirstInputFile()
public java.lang.String getCurrentInputDir()
public void updateMarkers(org.eclipse.core.resources.IFile fileResource, java.util.Iterator errors)
fileResource
- errors
- public void clearMarkers(org.eclipse.core.resources.IFile ifile)
ifile
- public void setRootDirectoryProperty(org.eclipse.core.resources.IFile file)
file
- public MOFScriptSpecification compile(org.eclipse.core.resources.IFile theFile, java.lang.String contents, boolean silent)
theFile
- contents
- silent
-
public MOFScriptSpecification compile(org.eclipse.core.resources.IFile theFile, java.lang.String contents)
inputSource
- - The input source file.contents
- - String representation of the file contents. May be null.public void execute(org.eclipse.core.resources.IFile file, java.lang.String type, boolean showOpenDialog)
file
- - the transformation file resource. This is only used for setting
execution and resource propertiestype
- - type of transformation (currently not used)showOpenDialog
- - If an file open dialog should be shownpublic boolean openSourceModelFile(java.lang.String title, java.lang.String[] filter, java.util.List parameters)
title
- filter
- parameters
-
public void executeModelDirect(org.eclipse.core.resources.IFile transformationFile)
transformationFile
- - should contain a MOFScript modelpublic void executeMOFScript2Text(org.eclipse.core.resources.IFile mofscriptModelFile)
public void storeMofScriptModel(MOFScriptSpecification transformation, org.eclipse.core.resources.IFile transformationFile)
transformationFile
- public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |