|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kies.transformation.util.TransformationUtil
public final class TransformationUtil
Utility class providing convenient methods for the esterel to synccharts transformation and the pure synccharts optimization.
Nested Class Summary | |
---|---|
static class |
TransformationUtil.TransformationType
The enumeration is used to determine which type of headless transformation should be performed. |
Field Summary | |
---|---|
static Logger |
logger
KIES's own logger. |
Method Summary | |
---|---|
static void |
addToFrontOfList(List<State> list1,
List<State> list2)
Adds all elements of list2 to the front of list1. |
static boolean |
compareTrigger(Action t1,
Action t2)
Compares the triggers of two transitions. |
static Expression |
convertConstantExpression(ConstantExpression cexpr)
Converts an Esterel ConstantExpression into an equivalent Expression . |
static IFile |
createSyncchartDiagram(IFile kixsFile)
Creates a new synccharts diagram at the passed location. |
static void |
debug(Object obj)
may be used to print some debug information. |
static void |
doInitialEsterelTransformation(IFile strlFile,
IFile kixsFile)
Fill the root esterel elements into a new syncchart. |
static IEditorPart |
getActiveEditor()
|
static List<EObject> |
getCurrentEditorSelection()
|
static String |
getSerializedString(EObject e)
Returns the textual representation of the passed esterel object. |
static org.eclipse.xtend.expression.Variable |
getXtendVarBoolean(boolean bool)
|
static boolean |
isEsterelElement(EObject obj)
|
static void |
openKidsInEditor(IFile file)
|
static boolean |
performHeadlessTransformation(IFile kixsFile,
TransformationUtil.TransformationType type)
Performs a headless transformation on the passed kixsFile . |
static boolean |
performHeadlessTransformation(IFile kixsFile,
TransformationUtil.TransformationType type,
Map<String,Boolean> globalVars)
Performs a headless transformation on the passed kixsFile . |
static void |
raiseStatus(String message)
call this method from xtend in order to open a new status information window. |
static void |
refreshEditPolicies()
In case the active editor is a IDiagramWorkbenchPart all of its EditPolicies will be
refreshed. |
static void |
setBodyReference(State s,
EObject obj)
Convenient method for setting the body reference for a state. |
static IFile |
strlToKixs(IFile strlFile)
Performs initial transformation of the passed Esterel file into a SyncCharts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Logger logger
Method Detail |
---|
public static String getSerializedString(EObject e)
e
- esterel object
public static boolean isEsterelElement(EObject obj)
obj
- the EObject
to test
obj
is an esterel element, false otherwise. Passing null
will
result in false being returned.public static void setBodyReference(State s, EObject obj)
TextualCode
element is created and added to the passed state. The state's type is set to
StateType.TEXTUAL
s
- the parent stateobj
- any EObject
public static Expression convertConstantExpression(ConstantExpression cexpr)
ConstantExpression
into an equivalent Expression
. This is
in unambiguous order: IntValue
, FloatValue
, BooleanValue
or an
TextExpression
for a string constant or a referenced constant.
cexpr
- constant expression to convert
public static boolean compareTrigger(Action t1, Action t2)
t1
- chronologically first transitiont2
- chronologically second transition
public static void addToFrontOfList(List<State> list1, List<State> list2)
list1
- - end of the new listlist2
- - front of the new listpublic static IEditorPart getActiveEditor()
public static List<EObject> getCurrentEditorSelection()
public static void doInitialEsterelTransformation(IFile strlFile, IFile kixsFile)
strlFile
- esterel file to add to the syncchartskixsFile
- synccharts model filepublic static IFile createSyncchartDiagram(IFile kixsFile)
kixsFile
- file location
null
in case the action was canceled by the user.public static IFile strlToKixs(IFile strlFile)
strlFile
- esterel file to transform
IFile
. null
if nothing was created.public static void refreshEditPolicies()
IDiagramWorkbenchPart
all of its EditPolicies will be
refreshed.
public static boolean performHeadlessTransformation(IFile kixsFile, TransformationUtil.TransformationType type)
kixsFile
. The transformation can
either be a Esterel to SyncCharts transformation or a SyncCharts optimization depending on
the type
parameter.
kixsFile
- the file to transform.type
- TransformationUtil.TransformationType
determining the type of this transformation.
true
if the transformation was successful, false otherwise.public static boolean performHeadlessTransformation(IFile kixsFile, TransformationUtil.TransformationType type, Map<String,Boolean> globalVars)
kixsFile
. The transformation can
either be a Esterel to SyncCharts transformation or a SyncCharts optimization depending on
the type
parameter.
kixsFile
- the file to transform.type
- TransformationUtil.TransformationType
determining the type of this transformation.globalVars
- a map containing global variables that are me passed to the created data
component.
true
if the transformation was successful, false otherwise.public static void openKidsInEditor(IFile file)
file
- the IFile
that should be opened in a new SyncCharts editor. Either the
*.kids or the *.kixs file can be passed. In case the *.kixs file
is passed, a kids file with the same name is tried to be opened.public static org.eclipse.xtend.expression.Variable getXtendVarBoolean(boolean bool)
bool
- desired value
Variable
.public static void raiseStatus(String message)
message
- the message to displaypublic static void debug(Object obj)
obj
- any obj
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |