|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sintef.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. |
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 |
java.lang.String |
getCurrentInputDir()
Retrieves the current input directory |
MOFScriptSpecification |
getCurrentTransformation()
Retrieves the current transformatation |
java.lang.String |
getFirstInputFile()
Retrieves the current input file |
protected void |
mofScriptTextToModel(org.eclipse.core.resources.IFile transformationFile,
java.lang.String content,
MOFScriptSpecification transformationSpec)
Executes a MOFScript transformation of MOFScript input - based on textual MOFScript files |
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 |
protected void |
setExecutionResourceProperties(org.eclipse.core.resources.IFile file)
Sets some properties on the transformation file |
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 |
protected void |
threadExecute()
Executes a transformation in a thread |
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 |
---|
clone, equals, finalize, 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)
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
-
protected void threadExecute()
protected void setExecutionResourceProperties(org.eclipse.core.resources.IFile file)
file
- public void executeModelDirect(org.eclipse.core.resources.IFile transformationFile)
transformationFile
- - should contain a MOFScript modelpublic void storeMofScriptModel(MOFScriptSpecification transformation, org.eclipse.core.resources.IFile transformationFile)
transformationFile
- protected void mofScriptTextToModel(org.eclipse.core.resources.IFile transformationFile, java.lang.String content, MOFScriptSpecification transformationSpec)
transformationFile
- content
- 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 |