de.cau.cs.kieler.kies.transformation
Class EsterelToSyncChartDataComponent

java.lang.Object
  extended by de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
      extended by de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent
          extended by de.cau.cs.kieler.kies.transformation.AbstractTransformationDataComponent
              extended by de.cau.cs.kieler.kies.transformation.EsterelToSyncChartDataComponent
All Implemented Interfaces:
IDataComponent, IJSONObjectDataComponent, IExecutableExtension

public class EsterelToSyncChartDataComponent
extends AbstractTransformationDataComponent

DataComponent for transforming an esterel program step-wise into a SyncCharts.

Rating red

Field Summary
static String GLOBALVAR_REC
          global variable determining whether the transformation should be run recursively, hence everything is transformed within one step.
static String INITIAL_TRANSFORMATION
          first transformation being executed.
 
Fields inherited from class de.cau.cs.kieler.kies.transformation.AbstractTransformationDataComponent
currentContext, currentDescriptor, facade, globalVars, headless, kiviMode, rootRegion, rootState
 
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
EsterelToSyncChartDataComponent()
          default constructor providing one global variable.
EsterelToSyncChartDataComponent(boolean kiviMode)
           
 
Method Summary
 void doPostTransformation()
          this method is called if there are no further steps to do and the transformation will terminate.
 String[] getBasePackages()
          
 TransformationDescriptor getNextTransformation()
          
 State getRootState()
           
 String getTransformationFile()
          
 void initialize()
          Initialize.
 KiemProperty[] provideProperties()
          Provide properties for this component.
 void setRootState(State theRootState)
           
 
Methods inherited from class de.cau.cs.kieler.kies.transformation.AbstractTransformationDataComponent
fetchRootRegionAndState, finished, getActiveEditorEditingDomain, getCurrentContext, getCurrentDescriptor, getDomain, getEditingDomainForResourceSet, getXtendFacade, isFinished, isHistoryObserver, isObserver, isProducer, setGlobalVariable, setHeadless, step, wrapup
 
Methods inherited from class de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent
getInitialVariables, provideFilterKeysJSON, provideInitialVariables, setInitialVariables
 
Methods inherited from class de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
checkProperties, finalize, getConfigurationElement, getCurrentComponentID, getDataComponentId, getName, getPluginId, getProperties, getShell, isDeltaObserver, isHistoryStep, isInvisible, isMacroStepDone, isMaster, isMasterImplementingGUI, isMultiInstantiable, masterCommand, masterGetAimedStepDuration, masterGUI, masterGUIisEnabled, masterIsPaused, masterIsRunning, masterSetAimedStepDuration, masterSetKIEMInstance, notifyEvent, provideEventOfInterest, provideFilterKeys, setConfigurationElemenet, setCurrentComponentID, setHistoryStep, setInitializationData, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_TRANSFORMATION

public static final String INITIAL_TRANSFORMATION
first transformation being executed.

See Also:
Constant Field Values

GLOBALVAR_REC

public static final String GLOBALVAR_REC
global variable determining whether the transformation should be run recursively, hence everything is transformed within one step.

See Also:
Constant Field Values
Constructor Detail

EsterelToSyncChartDataComponent

public EsterelToSyncChartDataComponent()
default constructor providing one global variable. Namely GLOBALVAR_REC, determining whether transformation should be executed recursively or not.


EsterelToSyncChartDataComponent

public EsterelToSyncChartDataComponent(boolean kiviMode)
Parameters:
kiviMode - pass true if this data component is used in a way that does not use KIEM.
Method Detail

initialize

public void initialize()
                throws KiemInitializationException
Initialize. Do some initializing prior to execution. If an error occurs during initialization, the DataComponent should raise a KiemInitializationException.

Specified by:
initialize in interface IDataComponent
Overrides:
initialize in class AbstractTransformationDataComponent
Throws:
KiemInitializationException - a KiemInitializationException

getNextTransformation

public TransformationDescriptor getNextTransformation()

Specified by:
getNextTransformation in class AbstractTransformationDataComponent
Returns:
either the next transformation or null if nothing can be transformed anymore.

getBasePackages

public String[] getBasePackages()

Specified by:
getBasePackages in class AbstractTransformationDataComponent
Returns:
all base packages needed for the transformations planned.

getTransformationFile

public String getTransformationFile()

Specified by:
getTransformationFile in class AbstractTransformationDataComponent
Returns:
the actual transformation file (.ext)

provideProperties

public KiemProperty[] provideProperties()
Provide properties for this component. The component may create and publicize its properties with this method. They will be set/modified by the execution manager during the user edits them. Whenever the user decides to run/start the execution the properties are tested (see below) and the component may use there settings.

The following lists a simple example for such properties:
\ATOverride
public KiemProperty[] provideProperties() {
KiemProperty[] properties = new KiemProperty[7];
properties[0] = new KiemProperty(
"state name",
"state");
properties[1] = new KiemProperty(
"some bool",
true);
properties[2] = new KiemProperty(
"an integer",
2);
properties[3] = new KiemProperty(
"a file",
new KiemPropertyTypeFile(),
"c:/nothing.txt");
String[] items = {"trace 1","trace 2", "trace 3", "trace 4"};
properties[4] = new KiemProperty(
"a choice",
new KiemPropertyTypeChoice(items),
items[2]);
properties[5] = new KiemProperty(
"workspace file",
new KiemPropertyTypeWorkspaceFile(),
"/nothing.txt");
properties[6] = new KiemProperty(
"editor",
new KiemPropertyTypeEditor(),
"");
return properties;
}

These are built-in types that can always be extended using the KiemProperty class.

Overrides:
provideProperties in class AbstractDataComponent
Returns:
the KiemProperty[] or null if no properties are provided

doPostTransformation

public void doPostTransformation()
this method is called if there are no further steps to do and the transformation will terminate.

Specified by:
doPostTransformation in class AbstractTransformationDataComponent

setRootState

public void setRootState(State theRootState)
Overrides:
setRootState in class AbstractTransformationDataComponent
Parameters:
theRootState - the rootState to set

getRootState

public State getRootState()
Overrides:
getRootState in class AbstractTransformationDataComponent
Returns:
the rootState