|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent
de.cau.cs.kieler.kies.transformation.AbstractTransformationDataComponent
public abstract class AbstractTransformationDataComponent
Abstract implementation of a TransformationDataComponent.
Field Summary | |
---|---|
protected ITransformationContext |
currentContext
the current transformation context. |
protected TransformationDescriptor |
currentDescriptor
the current transformation descriptor. |
protected org.eclipse.xtend.XtendFacade |
facade
currently used facade. |
protected Map<String,org.eclipse.xtend.expression.Variable> |
globalVars
global variables for the certain transformation. |
protected boolean |
headless
headless execution omits checks for an opened editor. |
protected boolean |
kiviMode
is the transformation executed by KiVi? |
protected Region |
rootRegion
root region of the current resource. |
protected State |
rootState
root state of the current resource. |
Fields inherited from class de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent |
---|
MASTER_CMD_MACROSTEP, MASTER_CMD_PAUSE, MASTER_CMD_RUN, MASTER_CMD_STEP, MASTER_CMD_STEPBACK, MASTER_CMD_STOP |
Constructor Summary | |
---|---|
AbstractTransformationDataComponent(Map<String,org.eclipse.xtend.expression.Variable> globVars,
boolean abusemode)
Any extending class has to provide a map with global Variables. |
Method Summary | |
---|---|
abstract void |
doPostTransformation()
this method is called if there are no further steps to do and the transformation will terminate. |
protected void |
fetchRootRegionAndState()
fetches the root region and root state of the currently active synccharts editor. |
protected void |
finished()
mark this transformation finished and throw a new KiemExecutionException in order to
terminate the current execution. |
protected TransactionalEditingDomain |
getActiveEditorEditingDomain()
|
abstract String[] |
getBasePackages()
|
ITransformationContext |
getCurrentContext()
|
TransformationDescriptor |
getCurrentDescriptor()
|
TransactionalEditingDomain |
getDomain()
|
protected TransactionalEditingDomain |
getEditingDomainForResourceSet(ResourceSet rs)
|
abstract TransformationDescriptor |
getNextTransformation()
|
State |
getRootState()
|
abstract String |
getTransformationFile()
|
org.eclipse.xtend.XtendFacade |
getXtendFacade()
|
void |
initialize()
Initialize. |
boolean |
isFinished()
|
boolean |
isHistoryObserver()
Flags that this component can handle past, already computed history values. |
boolean |
isObserver()
To check whether the DataComponent is an observer. |
boolean |
isProducer()
To check whether the DataComponent is a producer. |
boolean |
setGlobalVariable(String globalVar,
boolean value)
set the value of a global variable. |
void |
setHeadless(boolean headless)
|
void |
setRootState(State rootState)
|
JSONObject |
step(JSONObject arg0)
Step method for a DataObserver and a DataPrroducer. |
void |
wrapup()
Wrap-up. |
Methods inherited from class de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent |
---|
getInitialVariables, provideFilterKeysJSON, provideInitialVariables, setInitialVariables |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.eclipse.xtend.XtendFacade facade
protected Map<String,org.eclipse.xtend.expression.Variable> globalVars
protected boolean kiviMode
protected ITransformationContext currentContext
protected TransformationDescriptor currentDescriptor
protected boolean headless
protected State rootState
protected Region rootRegion
Constructor Detail |
---|
public AbstractTransformationDataComponent(Map<String,org.eclipse.xtend.expression.Variable> globVars, boolean abusemode)
globVars
- Map with global Variables for the XtendFacade.abusemode
- pass true
if this data component is used in a way that does not use KIEM.Method Detail |
---|
public void initialize() throws KiemInitializationException
KiemInitializationException
.
KiemInitializationException
- a KiemInitializationExceptionpublic JSONObject step(JSONObject arg0) throws KiemExecutionException
KiemExecutionException
that is then catched by the execution manager an brought to
the user's attention.
arg0
- the concrete JSONObject of input data (if observer)
KiemExecutionException
- a KiemExecutionExceptionpublic void wrapup() throws KiemInitializationException
KiemInitializationException
.
KiemInitializationException
- a KiemInitializationExceptionpublic boolean isObserver()
public boolean isProducer()
public boolean isHistoryObserver()
isHistoryObserver
in class AbstractDataComponent
public boolean setGlobalVariable(String globalVar, boolean value)
globalVar
only use the GLOBVAR
constants defined by the specific transformation data component.
globalVar
- variable to changevalue
- new value
public org.eclipse.xtend.XtendFacade getXtendFacade()
XtendFacade
public abstract String[] getBasePackages()
public abstract String getTransformationFile()
public abstract TransformationDescriptor getNextTransformation()
null
if nothing can be transformed
anymore.public abstract void doPostTransformation()
protected void finished() throws KiemExecutionException
KiemExecutionException
in order to
terminate the current execution.
KiemExecutionException
- a exception letting the user know that the current execution finished.protected TransactionalEditingDomain getActiveEditorEditingDomain()
protected TransactionalEditingDomain getEditingDomainForResourceSet(ResourceSet rs)
rs
- some resource set.
protected void fetchRootRegionAndState()
public TransactionalEditingDomain getDomain()
public boolean isFinished()
public ITransformationContext getCurrentContext()
public TransformationDescriptor getCurrentDescriptor()
public void setHeadless(boolean headless)
headless
- the headless to setpublic void setRootState(State rootState)
rootState
- the rootState to setpublic State getRootState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |