Procházet zdrojové kódy

Refactored PictogramEditPolicy to DecorationProvider

Andreas Mülder před 14 roky
rodič
revize
0943d19e88
22 změnil soubory, kde provedl 348 přidání a 2354 odebrání
  1. 2 1
      plugins/org.yakindu.sct.generator.base/src/org/yakindu/sct/generator/base/util/AbstractXpandCodeGeneratorSubscriber.java
  2. 0 261
      plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/FactoryExtension.java
  3. 0 1191
      plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/ModelSequencer.java
  4. 0 181
      plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/StatechartExtensions.java
  5. 1 2
      plugins/org.yakindu.sct.statechart.builder/src/org/yakindu/sct/builder/SCTBuilder.java
  6. 2 1
      plugins/org.yakindu.sct.statechart.builder/src/org/yakindu/sct/builder/subscriber/IBuilderSubscriber.java
  7. 2 0
      plugins/org.yakindu.sct.ui.editor/META-INF/MANIFEST.MF
  8. 7 1
      plugins/org.yakindu.sct.ui.editor/plugin.xml
  9. 15 18
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editor/BreadcrumbDiagramEditor.java
  10. 68 0
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/breadcrumb/BreadcrumbEditorUtil.java
  11. 2 1
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editor/TrackingFileEditorInput.java
  12. 1 0
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editor/StatechartDiagramEditor.java
  13. 0 6
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editparts/StateEditPart.java
  14. 0 110
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/pictogram/OpenSubstatechartHandler.java
  15. 0 95
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/pictogram/Pictogram.java
  16. 0 372
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/pictogram/PictogramEditPolicy.java
  17. 0 53
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/pictogram/PictogramFigure.java
  18. 0 42
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/pictogram/SubchartPictogram.java
  19. 3 15
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/StatechartValidationDecorationProvider.java
  20. 125 0
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/submachine/SubStateDecorator.java
  21. 93 0
      plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/submachine/SubmachineDecorationProvider.java
  22. 27 4
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerTest.java

+ 2 - 1
plugins/org.yakindu.sct.generator.base/src/org/yakindu/sct/generator/base/util/AbstractXpandCodeGeneratorSubscriber.java

@@ -27,7 +27,8 @@ public abstract class AbstractXpandCodeGeneratorSubscriber implements
 		try {
 			IProject project = resource.getProject();
 			Statechart statechart;
-
+			if (resource == null || !resource.exists())
+				return;
 			statechart = GeneratorBaseUtil.loadStatechart(resource);
 
 			ExecutionFlow executionFlow = GeneratorBaseUtil

+ 0 - 261
plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/FactoryExtension.java

@@ -1,261 +0,0 @@
-package org.yakindu.sct.model.sexec.transformation;
-
-import com.google.inject.Inject;
-import java.util.ArrayList;
-import java.util.HashMap;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.xtext.naming.IQualifiedNameProvider;
-import org.eclipse.xtext.naming.QualifiedName;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.yakindu.sct.model.sexec.Call;
-import org.yakindu.sct.model.sexec.Check;
-import org.yakindu.sct.model.sexec.CheckRef;
-import org.yakindu.sct.model.sexec.ExecutionFlow;
-import org.yakindu.sct.model.sexec.ExecutionState;
-import org.yakindu.sct.model.sexec.ScheduleTimeEvent;
-import org.yakindu.sct.model.sexec.SexecFactory;
-import org.yakindu.sct.model.sexec.Step;
-import org.yakindu.sct.model.sexec.TimeEvent;
-import org.yakindu.sct.model.sexec.UnscheduleTimeEvent;
-import org.yakindu.sct.model.sexec.transformation.StatechartExtensions;
-import org.yakindu.sct.model.sgraph.Reaction;
-import org.yakindu.sct.model.sgraph.Scope;
-import org.yakindu.sct.model.sgraph.State;
-import org.yakindu.sct.model.sgraph.Statechart;
-import org.yakindu.sct.model.sgraph.Statement;
-import org.yakindu.sct.model.sgraph.Transition;
-import org.yakindu.sct.model.stext.stext.EventDefinition;
-import org.yakindu.sct.model.stext.stext.InterfaceScope;
-import org.yakindu.sct.model.stext.stext.InternalScope;
-import org.yakindu.sct.model.stext.stext.ReactionTrigger;
-import org.yakindu.sct.model.stext.stext.StextFactory;
-import org.yakindu.sct.model.stext.stext.VariableDefinition;
-
-@SuppressWarnings("all")
-public class FactoryExtension {
-  
-  @Inject
-  private IQualifiedNameProvider qfnProvider;
-  
-  @Inject
-  private StatechartExtensions sce;
-  
-  private final HashMap<ArrayList<?>,ExecutionFlow> _createCache_create = new HashMap<ArrayList<?>,ExecutionFlow>();
-  
-  public ExecutionFlow create(final Statechart statechart) {
-    final ArrayList<?>_cacheKey = CollectionLiterals.newArrayList(statechart);
-    ExecutionFlow r;
-    synchronized (_createCache_create) {
-      if (_createCache_create.containsKey(_cacheKey)) {
-        return _createCache_create.get(_cacheKey);
-      }
-      SexecFactory _sexecFactory = this.sexecFactory();
-      ExecutionFlow _createExecutionFlow = _sexecFactory.createExecutionFlow();
-      r = _createExecutionFlow;
-      _createCache_create.put(_cacheKey, r);
-    }
-    String _name = statechart.getName();
-    r.setName(_name);
-    return r;
-  }
-  
-  private final HashMap<ArrayList<?>,InterfaceScope> _createCache_create_1 = new HashMap<ArrayList<?>,InterfaceScope>();
-  
-  protected Scope _create(final InterfaceScope scope) {
-    final ArrayList<?>_cacheKey = CollectionLiterals.newArrayList(scope);
-    InterfaceScope r;
-    synchronized (_createCache_create_1) {
-      if (_createCache_create_1.containsKey(_cacheKey)) {
-        return _createCache_create_1.get(_cacheKey);
-      }
-      StextFactory _stextFactory = this.stextFactory();
-      InterfaceScope _createInterfaceScope = _stextFactory.createInterfaceScope();
-      r = _createInterfaceScope;
-      _createCache_create_1.put(_cacheKey, r);
-    }
-    String _name = scope.getName();
-    r.setName(_name);
-    return r;
-  }
-  
-  private final HashMap<ArrayList<?>,InternalScope> _createCache_create_2 = new HashMap<ArrayList<?>,InternalScope>();
-  
-  protected Scope _create(final InternalScope scope) {
-    final ArrayList<?>_cacheKey = CollectionLiterals.newArrayList(scope);
-    InternalScope r;
-    synchronized (_createCache_create_2) {
-      if (_createCache_create_2.containsKey(_cacheKey)) {
-        return _createCache_create_2.get(_cacheKey);
-      }
-      StextFactory _stextFactory = this.stextFactory();
-      InternalScope _createInternalScope = _stextFactory.createInternalScope();
-      r = _createInternalScope;
-      _createCache_create_2.put(_cacheKey, r);
-    }
-    return r;
-  }
-  
-  private final HashMap<ArrayList<?>,EventDefinition> _createCache_create_3 = new HashMap<ArrayList<?>,EventDefinition>();
-  
-  public EventDefinition create(final EventDefinition event) {
-    final ArrayList<?>_cacheKey = CollectionLiterals.newArrayList(event);
-    EventDefinition r;
-    synchronized (_createCache_create_3) {
-      if (_createCache_create_3.containsKey(_cacheKey)) {
-        return _createCache_create_3.get(_cacheKey);
-      }
-      EventDefinition _copy = EcoreUtil.<EventDefinition>copy(event);
-      r = _copy;
-      _createCache_create_3.put(_cacheKey, r);
-    }
-    return r;
-  }
-  
-  private final HashMap<ArrayList<?>,VariableDefinition> _createCache_create_4 = new HashMap<ArrayList<?>,VariableDefinition>();
-  
-  public VariableDefinition create(final VariableDefinition v) {
-    final ArrayList<?>_cacheKey = CollectionLiterals.newArrayList(v);
-    VariableDefinition r;
-    synchronized (_createCache_create_4) {
-      if (_createCache_create_4.containsKey(_cacheKey)) {
-        return _createCache_create_4.get(_cacheKey);
-      }
-      VariableDefinition _copy = EcoreUtil.<VariableDefinition>copy(v);
-      r = _copy;
-      _createCache_create_4.put(_cacheKey, r);
-    }
-    return r;
-  }
-  
-  private final HashMap<ArrayList<?>,ExecutionState> _createCache_create_5 = new HashMap<ArrayList<?>,ExecutionState>();
-  
-  public ExecutionState create(final State state) {
-    final ArrayList<?>_cacheKey = CollectionLiterals.newArrayList(state);
-    ExecutionState r;
-    synchronized (_createCache_create_5) {
-      if (_createCache_create_5.containsKey(_cacheKey)) {
-        return _createCache_create_5.get(_cacheKey);
-      }
-      SexecFactory _sexecFactory = this.sexecFactory();
-      ExecutionState _createExecutionState = _sexecFactory.createExecutionState();
-      r = _createExecutionState;
-      _createCache_create_5.put(_cacheKey, r);
-    }
-    {
-      String _name = state.getName();
-      r.setSimpleName(_name);
-      QualifiedName _fullyQualifiedName = this.qfnProvider.getFullyQualifiedName(state);
-      String _string = _fullyQualifiedName.toString();
-      String _replaceAll = _string.replaceAll(" ", "");
-      r.setName(_replaceAll);
-    }
-    return r;
-  }
-  
-  private final HashMap<ArrayList<?>,Check> _createCache_createCheck = new HashMap<ArrayList<?>,Check>();
-  
-  public Check createCheck(final ReactionTrigger tr) {
-    final ArrayList<?>_cacheKey = CollectionLiterals.newArrayList(tr);
-    Check r;
-    synchronized (_createCache_createCheck) {
-      if (_createCache_createCheck.containsKey(_cacheKey)) {
-        return _createCache_createCheck.get(_cacheKey);
-      }
-      SexecFactory _sexecFactory = this.sexecFactory();
-      Check _createCheck = _sexecFactory.createCheck();
-      r = _createCheck;
-      _createCache_createCheck.put(_cacheKey, r);
-    }
-    Reaction _reaction = this.sce.reaction(tr);
-    String _id = this.sce.id(_reaction);
-    r.setName(_id);
-    return r;
-  }
-  
-  private final HashMap<ArrayList<?>,org.yakindu.sct.model.sexec.Reaction> _createCache_create_6 = new HashMap<ArrayList<?>,org.yakindu.sct.model.sexec.Reaction>();
-  
-  public org.yakindu.sct.model.sexec.Reaction create(final Transition tr) {
-    final ArrayList<?>_cacheKey = CollectionLiterals.newArrayList(tr);
-    org.yakindu.sct.model.sexec.Reaction r;
-    synchronized (_createCache_create_6) {
-      if (_createCache_create_6.containsKey(_cacheKey)) {
-        return _createCache_create_6.get(_cacheKey);
-      }
-      SexecFactory _sexecFactory = this.sexecFactory();
-      org.yakindu.sct.model.sexec.Reaction _createReaction = _sexecFactory.createReaction();
-      r = _createReaction;
-      _createCache_create_6.put(_cacheKey, r);
-    }
-    String _id = this.sce.id(tr);
-    r.setName(_id);
-    return r;
-  }
-  
-  public CheckRef newRef(final Check check) {
-    CheckRef _xblockexpression = null;
-    {
-      SexecFactory _sexecFactory = this.sexecFactory();
-      CheckRef _createCheckRef = _sexecFactory.createCheckRef();
-      final CheckRef r = _createCheckRef;
-      r.setCheck(check);
-      _xblockexpression = (r);
-    }
-    return _xblockexpression;
-  }
-  
-  public Call newCall(final Step step) {
-    Call _xblockexpression = null;
-    {
-      SexecFactory _sexecFactory = this.sexecFactory();
-      Call _createCall = _sexecFactory.createCall();
-      final Call r = _createCall;
-      r.setStep(step);
-      _xblockexpression = (r);
-    }
-    return _xblockexpression;
-  }
-  
-  public ScheduleTimeEvent newScheduleTimeEvent(final TimeEvent te, final Statement timeValue) {
-    ScheduleTimeEvent _xblockexpression = null;
-    {
-      SexecFactory _sexecFactory = this.sexecFactory();
-      ScheduleTimeEvent _createScheduleTimeEvent = _sexecFactory.createScheduleTimeEvent();
-      final ScheduleTimeEvent r = _createScheduleTimeEvent;
-      r.setTimeEvent(te);
-      r.setTimeValue(timeValue);
-      _xblockexpression = (r);
-    }
-    return _xblockexpression;
-  }
-  
-  public UnscheduleTimeEvent newUnscheduleTimeEvent(final TimeEvent te) {
-    UnscheduleTimeEvent _xblockexpression = null;
-    {
-      SexecFactory _sexecFactory = this.sexecFactory();
-      UnscheduleTimeEvent _createUnscheduleTimeEvent = _sexecFactory.createUnscheduleTimeEvent();
-      final UnscheduleTimeEvent r = _createUnscheduleTimeEvent;
-      r.setTimeEvent(te);
-      _xblockexpression = (r);
-    }
-    return _xblockexpression;
-  }
-  
-  public SexecFactory sexecFactory() {
-    return SexecFactory.eINSTANCE;
-  }
-  
-  public StextFactory stextFactory() {
-    return StextFactory.eINSTANCE;
-  }
-  
-  public Scope create(final Scope scope) {
-    if ((scope instanceof InterfaceScope)) {
-      return _create((InterfaceScope)scope);
-    } else if ((scope instanceof InternalScope)) {
-      return _create((InternalScope)scope);
-    } else {
-      throw new IllegalArgumentException("Unhandled parameter types: " +
-        java.util.Arrays.<Object>asList(scope).toString());
-    }
-  }
-}

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 1191
plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/ModelSequencer.java


+ 0 - 181
plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/StatechartExtensions.java

@@ -1,181 +0,0 @@
-package org.yakindu.sct.model.sexec.transformation;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.xtext.EcoreUtil2;
-import org.eclipse.xtext.xbase.lib.ComparableExtensions;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.Functions.Function2;
-import org.eclipse.xtext.xbase.lib.IntegerExtensions;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.ObjectExtensions;
-import org.eclipse.xtext.xbase.lib.StringExtensions;
-import org.yakindu.sct.model.sgraph.Reaction;
-import org.yakindu.sct.model.sgraph.Region;
-import org.yakindu.sct.model.sgraph.State;
-import org.yakindu.sct.model.sgraph.Statechart;
-import org.yakindu.sct.model.sgraph.Transition;
-import org.yakindu.sct.model.sgraph.Trigger;
-import org.yakindu.sct.model.sgraph.Vertex;
-import org.yakindu.sct.model.stext.stext.TimeEventSpec;
-
-@SuppressWarnings("all")
-public class StatechartExtensions {
-  
-  public int maxOrthogonality(final Statechart sc) {
-    EList<Region> _regions = sc.getRegions();
-    final Function2<Integer,Region,Integer> _function = new Function2<Integer,Region,Integer>() {
-        public Integer apply(final Integer o , final Region r) {
-          int _maxOrthogonality = StatechartExtensions.this.maxOrthogonality(r);
-          int _operator_plus = IntegerExtensions.operator_plus(((Integer)_maxOrthogonality), o);
-          return ((Integer)_operator_plus);
-        }
-      };
-    Integer _fold = IterableExtensions.<Region, Integer>fold(_regions, ((Integer)0), _function);
-    return _fold;
-  }
-  
-  public int maxOrthogonality(final Region r) {
-    EList<Vertex> _vertices = r.getVertices();
-    final Function2<Integer,Vertex,Integer> _function = new Function2<Integer,Vertex,Integer>() {
-        public Integer apply(final Integer s , final Vertex v) {
-          int _xblockexpression = (int) 0;
-          {
-            int _maxOrthogonality = StatechartExtensions.this.maxOrthogonality(v);
-            final int mo = _maxOrthogonality;
-            int _xifexpression = (int) 0;
-            boolean _operator_greaterThan = ComparableExtensions.<Integer>operator_greaterThan(((Integer)mo), s);
-            if (_operator_greaterThan) {
-              _xifexpression = mo;
-            } else {
-              _xifexpression = s;
-            }
-            _xblockexpression = (_xifexpression);
-          }
-          return ((Integer)_xblockexpression);
-        }
-      };
-    Integer _fold = IterableExtensions.<Vertex, Integer>fold(_vertices, ((Integer)0), _function);
-    return _fold;
-  }
-  
-  protected int _maxOrthogonality(final Vertex v) {
-    return 0;
-  }
-  
-  protected int _maxOrthogonality(final State s) {
-    Integer _xifexpression = null;
-    EList<Region> _subRegions = s.getSubRegions();
-    int _size = _subRegions.size();
-    boolean _operator_greaterThan = ComparableExtensions.<Integer>operator_greaterThan(((Integer)_size), ((Integer)0));
-    if (_operator_greaterThan) {
-      EList<Region> _subRegions_1 = s.getSubRegions();
-      final Function2<Integer,Region,Integer> _function = new Function2<Integer,Region,Integer>() {
-          public Integer apply(final Integer o , final Region r) {
-            int _maxOrthogonality = StatechartExtensions.this.maxOrthogonality(r);
-            int _operator_plus = IntegerExtensions.operator_plus(((Integer)_maxOrthogonality), o);
-            return ((Integer)_operator_plus);
-          }
-        };
-      Integer _fold = IterableExtensions.<Region, Integer>fold(_subRegions_1, ((Integer)0), _function);
-      _xifexpression = _fold;
-    } else {
-      _xifexpression = 1;
-    }
-    return _xifexpression;
-  }
-  
-  public Reaction reaction(final Trigger tr) {
-    EObject _eContainer = tr.eContainer();
-    return ((Reaction) _eContainer);
-  }
-  
-  public Statechart statechart(final State state) {
-    Region _parentRegion = state.getParentRegion();
-    Statechart _statechart = this.statechart(_parentRegion);
-    return _statechart;
-  }
-  
-  public Statechart statechart(final Region region) {
-    Statechart _xifexpression = null;
-    EObject _eContainer = region.eContainer();
-    if ((_eContainer instanceof org.yakindu.sct.model.sgraph.Statechart)) {
-      EObject _eContainer_1 = region.eContainer();
-      _xifexpression = ((Statechart) _eContainer_1);
-    } else {
-      EObject _eContainer_2 = region.eContainer();
-      Statechart _statechart = this.statechart(((State) _eContainer_2));
-      _xifexpression = _statechart;
-    }
-    return _xifexpression;
-  }
-  
-  public List<TimeEventSpec> timeEventSpecs(final State state) {
-    EList<Transition> _outgoingTransitions = state.getOutgoingTransitions();
-    ArrayList<TimeEventSpec> _arrayList = new ArrayList<TimeEventSpec>();
-    final Function2<ArrayList<TimeEventSpec>,Transition,ArrayList<TimeEventSpec>> _function = new Function2<ArrayList<TimeEventSpec>,Transition,ArrayList<TimeEventSpec>>() {
-        public ArrayList<TimeEventSpec> apply(final ArrayList<TimeEventSpec> s , final Transition r) {
-          ArrayList<TimeEventSpec> _xblockexpression = null;
-          {
-            List<EObject> _eAllContentsAsList = EcoreUtil2.eAllContentsAsList(r);
-            Iterable<TimeEventSpec> _filter = IterableExtensions.<TimeEventSpec>filter(_eAllContentsAsList, org.yakindu.sct.model.stext.stext.TimeEventSpec.class);
-            final Function1<TimeEventSpec,Boolean> _function_1 = new Function1<TimeEventSpec,Boolean>() {
-                public Boolean apply(final TimeEventSpec tes) {
-                  boolean _add = s.add(tes);
-                  return ((Boolean)_add);
-                }
-              };
-            IterableExtensions.<TimeEventSpec>forEach(_filter, _function_1);
-            _xblockexpression = (s);
-          }
-          return _xblockexpression;
-        }
-      };
-    ArrayList<TimeEventSpec> _fold = IterableExtensions.<Transition, ArrayList<TimeEventSpec>>fold(_outgoingTransitions, _arrayList, _function);
-    return _fold;
-  }
-  
-  protected String _id(final Object obj) {
-    return null;
-  }
-  
-  protected String _id(final Transition t) {
-    Comparable<? extends Object> _xifexpression = null;
-    Vertex _source = t.getSource();
-    boolean _operator_notEquals = ObjectExtensions.operator_notEquals(_source, null);
-    if (_operator_notEquals) {
-      Vertex _source_1 = t.getSource();
-      EList<Transition> _outgoingTransitions = _source_1.getOutgoingTransitions();
-      int _indexOf = _outgoingTransitions.indexOf(t);
-      _xifexpression = _indexOf;
-    } else {
-      _xifexpression = "";
-    }
-    String _operator_plus = StringExtensions.operator_plus("tr", _xifexpression);
-    return _operator_plus;
-  }
-  
-  public int maxOrthogonality(final Vertex s) {
-    if ((s instanceof State)) {
-      return _maxOrthogonality((State)s);
-    } else if ((s instanceof Vertex)) {
-      return _maxOrthogonality((Vertex)s);
-    } else {
-      throw new IllegalArgumentException("Unhandled parameter types: " +
-        java.util.Arrays.<Object>asList(s).toString());
-    }
-  }
-  
-  public String id(final Object t) {
-    if ((t instanceof Transition)) {
-      return _id((Transition)t);
-    } else if ((t instanceof Object)) {
-      return _id((Object)t);
-    } else {
-      throw new IllegalArgumentException("Unhandled parameter types: " +
-        java.util.Arrays.<Object>asList(t).toString());
-    }
-  }
-}

+ 1 - 2
plugins/org.yakindu.sct.statechart.builder/src/org/yakindu/sct/builder/SCTBuilder.java

@@ -1,6 +1,5 @@
 package org.yakindu.sct.builder;
 
-import java.io.IOException;
 import java.util.List;
 import java.util.Map;
 
@@ -75,7 +74,7 @@ public class SCTBuilder extends IncrementalProjectBuilder {
 		for (IBuilderSubscriber builderSubscriber : subscriber) {
 			try {
 				builderSubscriber.doBuild(resource);
-			} catch (IOException e) {
+			} catch (Exception e) {
 				e.printStackTrace();
 			}
 		}

+ 2 - 1
plugins/org.yakindu.sct.statechart.builder/src/org/yakindu/sct/builder/subscriber/IBuilderSubscriber.java

@@ -3,6 +3,7 @@ package org.yakindu.sct.builder.subscriber;
 import java.io.IOException;
 
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
 
 /**
  * 
@@ -11,6 +12,6 @@ import org.eclipse.core.resources.IResource;
  */
 public interface IBuilderSubscriber {
 
-	public void doBuild(IResource resource) throws IOException;
+	public void doBuild(IResource resource) throws IOException, CoreException;
 
 }

+ 2 - 0
plugins/org.yakindu.sct.ui.editor/META-INF/MANIFEST.MF

@@ -46,10 +46,12 @@ Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Export-Package: org.yakindu.sct.ui.editor,
  org.yakindu.sct.ui.editor.actions,
+ org.yakindu.sct.ui.editor.breadcrumb,
  org.yakindu.sct.ui.editor.editor,
  org.yakindu.sct.ui.editor.editparts,
  org.yakindu.sct.ui.editor.extensions,
  org.yakindu.sct.ui.editor.policies,
  org.yakindu.sct.ui.editor.providers,
+ org.yakindu.sct.ui.editor.submachine,
  org.yakindu.sct.ui.editor.wizards
 Bundle-Vendor: YAKINDU

+ 7 - 1
plugins/org.yakindu.sct.ui.editor/plugin.xml

@@ -595,7 +595,8 @@
          <Priority name="Medium"/>
       </MarkerNavigationProvider>
    </extension>
-   
+   	
+   	<!-- Decoration Providers -->
    <extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
       <decoratorProvider class="org.yakindu.sct.ui.editor.providers.StatechartValidationDecorationProvider">
          <Priority name="Lowest"/>
@@ -603,6 +604,11 @@
          <context decoratorTargets="PRIMARY_VIEW"/>
       </decoratorProvider>
    </extension>
+   <extension point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders"> 
+		<decoratorProvider class="org.yakindu.sct.ui.editor.submachine.SubmachineDecorationProvider"> 
+			<Priority name="Lowest" />
+ 		</decoratorProvider> 
+ </extension> 
    
    <!-- Global Action handler -->
     <extension point="org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders" id="global-print-actions">

+ 15 - 18
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editor/BreadcrumbDiagramEditor.java

@@ -1,4 +1,4 @@
-package org.yakindu.sct.ui.editor.editor;
+package org.yakindu.sct.ui.editor.breadcrumb;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -28,6 +28,7 @@ import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.yakindu.sct.ui.editor.StatechartImages;
+import org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor;
 
 @SuppressWarnings("restriction")
 public abstract class BreadcrumbDiagramEditor extends DiagramDocumentEditor {
@@ -38,7 +39,6 @@ public abstract class BreadcrumbDiagramEditor extends DiagramDocumentEditor {
 		super(hasFlyoutPalette);
 		history = new ArrayList<IFile>(0);
 	}
-	
 
 	@Override
 	public void createPartControl(Composite parent) {
@@ -56,7 +56,6 @@ public abstract class BreadcrumbDiagramEditor extends DiagramDocumentEditor {
 		return (IFileEditorInput) super.getEditorInput();
 	}
 
-	@Override
 	public void setInput(IEditorInput input) {
 		super.setInput(input);
 		if (input instanceof TrackingFileEditorInput) {
@@ -65,7 +64,7 @@ public abstract class BreadcrumbDiagramEditor extends DiagramDocumentEditor {
 		if (history.isEmpty()) {
 			history.add(getEditorInput().getFile());
 		}
-	}
+	};
 
 	private void createBreadcrumpViewer(Composite parent) {
 		MyBreadcrumpViewer viewer = new MyBreadcrumpViewer(parent, SWT.NONE);
@@ -102,24 +101,28 @@ public abstract class BreadcrumbDiagramEditor extends DiagramDocumentEditor {
 			}
 
 			public Object[] getChildren(TreePath parentPath) {
-				return input.subList(parentPath.getSegmentCount(), input.size()).toArray();
+				return input
+						.subList(parentPath.getSegmentCount(), input.size())
+						.toArray();
 			}
 		});
 		viewer.setLabelProvider(new MyLabelProvider());
 		viewer.setInput(getInputHistory());
 		viewer.addSelectionChangedListener(new ISelectionChangedListener() {
-			
+
 			public void selectionChanged(SelectionChangedEvent event) {
 				ISelection selection = event.getSelection();
-				if(selection instanceof IStructuredSelection){
-					IFile firstElement = (IFile) ((IStructuredSelection) selection).getFirstElement();
-					System.out.println("Selection event ;" + firstElement);
+				if (selection instanceof IStructuredSelection) {
+					IFile firstElement = (IFile) ((IStructuredSelection) selection)
+							.getFirstElement();
 					final IWorkbenchPage page = PlatformUI.getWorkbench()
 							.getActiveWorkbenchWindow().getActivePage();
 
 					try {
-						TrackingFileEditorInput input = new TrackingFileEditorInput(firstElement);
-						input.setHistory(history.subList(0, history.indexOf(firstElement)));
+						TrackingFileEditorInput input = new TrackingFileEditorInput(
+								firstElement);
+						input.setHistory(history.subList(0,
+								history.indexOf(firstElement)));
 						page.openEditor(input, StatechartDiagramEditor.ID);
 					} catch (PartInitException e) {
 						e.printStackTrace();
@@ -130,14 +133,11 @@ public abstract class BreadcrumbDiagramEditor extends DiagramDocumentEditor {
 
 	}
 
-
 	@Override
 	protected void createGraphicalViewer(Composite parent) {
 		super.createGraphicalViewer(parent);
 		GridDataFactory.fillDefaults().grab(true, true).applyTo(parent);
 	}
-	
-	
 
 	public List<IFile> getHistory() {
 		return history;
@@ -147,13 +147,12 @@ public abstract class BreadcrumbDiagramEditor extends DiagramDocumentEditor {
 			ITreePathLabelProvider {
 
 		public void updateLabel(ViewerLabel label, TreePath elementPath) {
-			IFile lastSegment = (IFile)elementPath.getLastSegment();
+			IFile lastSegment = (IFile) elementPath.getLastSegment();
 			label.setText(lastSegment.getName());
 			label.setImage(StatechartImages.LOGO.image());
 		}
 	}
 
-	@SuppressWarnings("restriction")
 	public class MyBreadcrumpViewer extends BreadcrumbViewer {
 
 		public MyBreadcrumpViewer(Composite parent, int style) {
@@ -167,7 +166,5 @@ public abstract class BreadcrumbDiagramEditor extends DiagramDocumentEditor {
 		}
 
 	}
-	
-	
 
 }

+ 68 - 0
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/breadcrumb/BreadcrumbEditorUtil.java

@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.ui.editor.breadcrumb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor;
+
+import de.itemis.xtext.utils.jface.viewers.util.ActiveEditorResolver;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class BreadcrumbEditorUtil {
+
+	public static void openEditor(IFile file) throws ExecutionException {
+		if (!file.exists()) {
+			return;
+		}
+		ActiveEditorResolver resolver = new ActiveEditorResolver();
+		Display.getDefault().syncExec(resolver);
+		IEditorPart result = resolver.getResult();
+		List<IFile> newHistory = new ArrayList<IFile>();
+		if (result instanceof BreadcrumbDiagramEditor) {
+			List<IFile> history = ((BreadcrumbDiagramEditor) result)
+					.getHistory();
+			newHistory.addAll(history);
+		} else {
+			IEditorInput editorInput = result.getEditorInput();
+			if (editorInput instanceof IFileEditorInput)
+				newHistory.add(((IFileEditorInput) editorInput).getFile());
+		}
+
+		newHistory.add(file);
+		TrackingFileEditorInput fileEditorInput = new TrackingFileEditorInput(
+				file);
+		fileEditorInput.setHistory(newHistory);
+
+		final IWorkbenchPage page = PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow().getActivePage();
+
+		try {
+			page.openEditor(fileEditorInput, StatechartDiagramEditor.ID);
+		} catch (PartInitException e) {
+			e.printStackTrace();
+		}
+	}
+}

+ 2 - 1
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editor/TrackingFileEditorInput.java

@@ -1,4 +1,4 @@
-package org.yakindu.sct.ui.editor.editor;
+package org.yakindu.sct.ui.editor.breadcrumb;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -22,5 +22,6 @@ public class TrackingFileEditorInput extends FileEditorInput {
 	public void setHistory(List<IFile> history) {
 		this.history = history;
 	}
+	
 
 }

+ 1 - 0
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editor/StatechartDiagramEditor.java

@@ -23,6 +23,7 @@ import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.ide.IGotoMarker;
 import org.yakindu.sct.ui.editor.DiagramActivator;
+import org.yakindu.sct.ui.editor.breadcrumb.BreadcrumbDiagramEditor;
 import org.yakindu.sct.ui.editor.utils.IYakinduSctHelpContextIds;
 import org.yakindu.sct.ui.editor.validation.ValidationAction;
 

+ 0 - 6
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editparts/StateEditPart.java

@@ -10,7 +10,6 @@
  */
 package org.yakindu.sct.ui.editor.editparts;
 
-import java.util.Collections;
 import java.util.List;
 
 import org.eclipse.draw2d.GridData;
@@ -48,8 +47,6 @@ import org.yakindu.sct.model.sgraph.State;
 import org.yakindu.sct.ui.editor.editor.figures.StateFigure;
 import org.yakindu.sct.ui.editor.editor.figures.utils.GridDataFactory;
 import org.yakindu.sct.ui.editor.editor.figures.utils.MapModeUtils;
-import org.yakindu.sct.ui.editor.pictogram.PictogramEditPolicy;
-import org.yakindu.sct.ui.editor.pictogram.SubchartPictogram;
 import org.yakindu.sct.ui.editor.preferences.StatechartColorConstants;
 
 /**
@@ -130,9 +127,6 @@ public class StateEditPart extends ShapeNodeEditPart implements
 						return UnexecutableCommand.INSTANCE;
 					}
 				});
-		installEditPolicy(PictogramEditPolicy.ROLE, new PictogramEditPolicy(
-				Collections.singletonList(new SubchartPictogram())));
-
 	}
 
 	@Override

+ 0 - 110
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/pictogram/OpenSubstatechartHandler.java

@@ -1,110 +0,0 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.sct.ui.editor.pictogram;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.yakindu.sct.model.sgraph.State;
-import org.yakindu.sct.model.sgraph.Statechart;
-import org.yakindu.sct.ui.editor.editor.BreadcrumbDiagramEditor;
-import org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor;
-import org.yakindu.sct.ui.editor.editor.TrackingFileEditorInput;
-
-import de.itemis.xtext.utils.jface.viewers.util.ActiveEditorResolver;
-
-/**
- * Opens the selected Statechart for a SubmachineState in a new/existing editor.
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public class OpenSubstatechartHandler extends AbstractHandler {
-
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		State selectedState = getSelectedSubmachineState(event);
-		if (selectedState == null)
-			return null;
-		Statechart substatechart = selectedState.getSubstatechart();
-		Resource eResource = substatechart.eResource();
-		ActiveEditorResolver resolver = new ActiveEditorResolver();
-		Display.getDefault().syncExec(resolver);
-		IEditorPart result = resolver.getResult();
-		List<IFile> newHistory = new ArrayList<IFile>();
-		if(result instanceof BreadcrumbDiagramEditor){
-			List<IFile> history = ((BreadcrumbDiagramEditor) result).getHistory();
-			newHistory.addAll(history);
-		} else{
-			IEditorInput editorInput = result.getEditorInput();
-			if(editorInput instanceof IFileEditorInput)
-			newHistory.add(((IFileEditorInput) editorInput).getFile());
-		}
-
-		IFile file = WorkspaceSynchronizer.getFile(eResource);
-		newHistory.add(file);
-		TrackingFileEditorInput fileEditorInput = new TrackingFileEditorInput(
-				file);
-		fileEditorInput.setHistory(newHistory);
-
-		final IWorkbenchPage page = PlatformUI.getWorkbench()
-				.getActiveWorkbenchWindow().getActivePage();
-
-		try {
-			page.openEditor(fileEditorInput, StatechartDiagramEditor.ID);
-		} catch (PartInitException e) {
-			e.printStackTrace();
-		}
-		return null;
-	}
-
-	public static State getSelectedSubmachineState(final ExecutionEvent event) {
-		IGraphicalEditPart editPart = getSelectedEditPart(event);
-		if (editPart == null)
-			return null;
-		EObject semanticElement = editPart.resolveSemanticElement();
-		if (!(semanticElement instanceof State))
-			return null;
-		return (State) semanticElement;
-	}
-
-	public static IGraphicalEditPart getSelectedEditPart(
-			final ExecutionEvent event) {
-		final ISelection selection = HandlerUtil.getCurrentSelection(event);
-		if (selection != null && selection instanceof IStructuredSelection
-				&& !((IStructuredSelection) selection).isEmpty()) {
-
-			final Object next = ((IStructuredSelection) selection).iterator()
-					.next();
-			if (next instanceof IGraphicalEditPart) {
-				return (IGraphicalEditPart) next;
-			}
-		}
-		return null;
-	}
-}

+ 0 - 95
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/pictogram/Pictogram.java

@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010  itemis AG (http://www.itemis.de)
- * All rights reserved. 
- * 
- * Contributors:
- *     itemis AG - initial API and implementation
- *******************************************************************************/
-package org.yakindu.sct.ui.editor.pictogram;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * This is a data class to comprise a description, an image, as well as a
- * handler (and a context validator).
- * 
- * @author Alexander Nyssen
- */
-public class Pictogram {
-
-	/**
-	 * This is a data class to comprise a context validator.
-	 * 
-	 * @author Alexander Nyssen
-	 */
-	public interface IHandlerContextValidator {
-
-		IHandlerContextValidator DEFAULT = new IHandlerContextValidator() {
-
-			public boolean isValidContext(ExecutionEvent event) {
-				return true;
-			}
-		};
-
-		boolean isValidContext(ExecutionEvent event);
-	}
-
-	protected IGraphicalEditPart host;
-
-	private final String description;
-
-	private final Image image;
-
-	private final IHandler handler;
-
-	private final IHandlerContextValidator handlerContextValidator;
-
-	public Pictogram(final String description, final Image image,
-			final IHandler handler) {
-		this(description, image, handler, IHandlerContextValidator.DEFAULT);
-	}
-
-	public Pictogram(final String description, final Image image,
-			final IHandler handler,
-			final IHandlerContextValidator handlerContextValidator) {
-		this.description = description;
-		this.image = image;
-		this.handler = handler;
-		this.handlerContextValidator = handlerContextValidator;
-	}
-
-	public String getDescription() {
-		return description;
-	}
-
-	public Image getImage() {
-		return image;
-	}
-
-	public IHandler getHandler() {
-		return handler;
-	}
-
-	public IHandlerContextValidator getHandlerContextValidator() {
-		return handlerContextValidator;
-	}
-
-	public void setHost(IGraphicalEditPart host) {
-		this.host = host;
-	}
-
-	public EObject getElement() {
-		if (host != null) {
-			final Object model = host.getModel();
-			if (model != null && model instanceof View) {
-				return ((View) host).getElement();
-			}
-		}
-		return null;
-	}
-}

+ 0 - 372
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/pictogram/PictogramEditPolicy.java

@@ -1,372 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010  itemis AG (http://www.itemis.de)
- * All rights reserved. 
- * 
- * Contributors:
- *     itemis AG - initial API and implementation
- *******************************************************************************/
-package org.yakindu.sct.ui.editor.pictogram;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.draw2d.AncestorListener;
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.FigureListener;
-import org.eclipse.draw2d.FlowLayout;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Locator;
-import org.eclipse.draw2d.MouseEvent;
-import org.eclipse.draw2d.MouseListener;
-import org.eclipse.draw2d.RelativeLocator;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.LayerConstants;
-import org.eclipse.gef.editparts.LayerManager;
-import org.eclipse.gef.editpolicies.AbstractEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.ISources;
-
-/**
- * This is a pictogram edit policy which locates the icon and updates it inside
- * the host figure.
- * 
- * @author Alexander Nyssen
- * @author Andreas Muelder
- */
-public class PictogramEditPolicy extends AbstractEditPolicy {
-
-	public static final String ROLE = "Pictograms";
-
-	protected static final int DEFAULT_Y_ABSOLUTE_OFFSET = -7;
-
-	protected static final double DEFAULT_Y_RELATIVE_OFFSET = 0.0;
-
-	protected static final int DEFAULT_X_ABSOLUTE_OFFSET = -11;
-
-	protected static final double DEFAULT_X_RELATIVE_OFFSET = 0.0;
-
-	private IFigure pictogramContainerFigure;
-
-	private final FigureListener hostFigureListener = new FigureListener() {
-		public void figureMoved(final IFigure arg0) {
-			layoutPictogramContainer();
-			updatePictogramFigureStates();
-		}
-	};
-
-	private final AncestorListener hostFigureAncestorListener = new AncestorListener() {
-		public void ancestorMoved(IFigure ancestor) {
-			layoutPictogramContainer();
-			updatePictogramFigureStates();
-		}
-
-		public void ancestorAdded(IFigure ancestor) {
-		}
-
-		public void ancestorRemoved(IFigure ancestor) {
-		}
-	};
-
-	private final Adapter modelListener = new Adapter() {
-
-		public Notifier getTarget() {
-			return null;
-		}
-
-		public boolean isAdapterForType(final Object arg0) {
-			return false;
-		}
-
-		public void notifyChanged(final Notification notification) {
-			switch (notification.getEventType()) {
-			case Notification.REMOVING_ADAPTER:
-				return;
-			default:
-				updatePictogramFigureStates();
-			}
-		}
-
-		public void setTarget(final Notifier arg0) {
-		}
-	};
-
-	private Locator pictogramContainerFigureLocator;
-
-	private final List<Pictogram> pictograms = new ArrayList<Pictogram>();
-
-	private final Map<Pictogram, PictogramFigure> pictogramFigures = new HashMap<Pictogram, PictogramFigure>();
-
-	private final Map<PictogramFigure, MouseListener> figureListeners = new HashMap<PictogramFigure, MouseListener>();
-
-	private EObject registeredSemanticModelElement;
-
-	/**
-	 * positions the given figure at the bottom left corner of the reference
-	 * figure.
-	 * 
-	 * @author Alexander Nyssen
-	 */
-	public static final class BottomLeftRelativeLocator extends RelativeLocator {
-
-		private final double relativeX;
-
-		private final double relativeY;
-
-		private final int absoluteX;
-
-		private final int absoluteY;
-
-		public BottomLeftRelativeLocator(final IFigure reference,
-				final double relativeX, final int absoluteX,
-				final double relativeY, final int absoluteY) {
-			super(reference, relativeX, relativeY);
-			this.relativeX = relativeX;
-			this.absoluteX = absoluteX;
-			this.relativeY = relativeY;
-			this.absoluteY = absoluteY;
-		}
-
-		@Override
-		public void relocate(final IFigure targetFigure) {
-			final Rectangle referenceBox = getReferenceBox().getCopy();
-			getReferenceFigure().translateToAbsolute(referenceBox);
-			targetFigure.translateToRelative(referenceBox);
-			final Rectangle targetFigureBounds = new Rectangle(
-					referenceBox
-							.getBottomLeft()
-							.getTranslated(
-									new Dimension(
-											(int) (relativeX * referenceBox.width)
-													+ absoluteX
-													+ referenceBox.width
-													- targetFigure.getBounds().width,
-											(int) (relativeY * referenceBox.height)
-													+ absoluteY
-													- targetFigure
-															.getPreferredSize().height)),
-					targetFigure.getPreferredSize());
-			targetFigure.setBounds(targetFigureBounds);
-		}
-	}
-
-	/**
-	 * A pictogram container figure with flow layout.
-	 * 
-	 * @author Alexander Nyssen
-	 */
-	private static class PictogramContainerFigure extends Figure {
-		public PictogramContainerFigure() {
-			FlowLayout layout = new FlowLayout();
-			layout.setMajorAlignment(FlowLayout.ALIGN_BOTTOMRIGHT);
-			layout.setMinorAlignment(FlowLayout.ALIGN_BOTTOMRIGHT);
-			setLayoutManager(layout);
-		}
-	}
-
-	public PictogramEditPolicy(final List<? extends Pictogram> pictograms) {
-		this.pictograms.addAll(pictograms);
-	}
-
-	protected void updatePictogramFigureStates() {
-		// enable/disable figures dependent on the execution context
-		for (final Pictogram pictogram : pictogramFigures.keySet()) {
-			final PictogramFigure pictogramFigure = pictogramFigures
-					.get(pictogram);
-			final boolean validContext = pictogram.getHandlerContextValidator()
-					.isValidContext(createExecutionEvent(null));
-
-			pictogramFigure.setVisible(validContext);
-			pictogramFigure.repaint();
-		}
-	}
-
-	protected void executePictogramHandler(final Pictogram pictogram,
-			MouseEvent mouseEvent) {
-		final IHandler handler = pictogram.getHandler();
-		final ExecutionEvent executionEvent = createExecutionEvent(mouseEvent);
-		if (pictogram.getHandlerContextValidator().isValidContext(
-				executionEvent)) {
-			try {
-				handler.execute(executionEvent);
-			} catch (final ExecutionException e) {
-				e.printStackTrace();
-			}
-		}
-	}
-
-	@Override
-	public void activate() {
-		super.activate();
-		pictogramContainerFigure = new PictogramContainerFigure();
-		for (final Pictogram pictogram : getPictograms()) {
-			final PictogramFigure pictogramFigure = new PictogramFigure(
-					pictogram, getHost().getFigure());
-			pictogramFigures.put(pictogram, pictogramFigure);
-			pictogramContainerFigure.add(pictogramFigure);
-			figureListeners.put(pictogramFigure, new MouseListener() {
-
-				public void mouseDoubleClicked(final MouseEvent event) {
-				}
-
-				public void mousePressed(final MouseEvent event) {
-					executePictogramHandler(pictogram, event);
-				}
-
-				public void mouseReleased(final MouseEvent event) {
-				}
-
-			});
-			pictogramFigure.addMouseListener(figureListeners
-					.get(pictogramFigure));
-		}
-		// add pictogram figure to layer, keep it attached to the original
-		// figure using a locator
-		getFeedbackLayer().add(pictogramContainerFigure);
-		registerFigureListener(hostFigureListener);
-		registerAncestorListener(hostFigureAncestorListener);
-		registerSemanticModelListener(modelListener);
-		registerGraphModelListener(modelListener);
-		layoutPictogramContainer();
-		if (getHost().resolveSemanticElement() != null) {
-			updatePictogramFigureStates();
-		}
-	}
-
-	private void registerAncestorListener(AncestorListener listener) {
-		getHostFigure().addAncestorListener(listener);
-	}
-
-	@Override
-	public IGraphicalEditPart getHost() {
-		return (IGraphicalEditPart) super.getHost();
-	}
-
-	protected void registerFigureListener(final FigureListener figureListener) {
-		getHostFigure().addFigureListener(figureListener);
-	}
-
-	protected void unregisterFigureListener(final FigureListener figureListener) {
-		getHostFigure().removeFigureListener(figureListener);
-	}
-
-	protected void unregisterAncestorListener(
-			final AncestorListener figureListener) {
-		getHostFigure().removeAncestorListener(figureListener);
-	}
-
-	protected void registerSemanticModelListener(final Adapter modelListener) {
-		// be default register a listener at the host's semantic model
-		registeredSemanticModelElement = getHostSemanticModel();
-		if (registeredSemanticModelElement != null) {
-			registeredSemanticModelElement.eAdapters().add(modelListener);
-		}
-	}
-
-	protected void registerGraphModelListener(final Adapter modelListener) {
-		((View) getHost().getModel()).eAdapters().add(modelListener);
-	}
-
-	protected void unregisterGraphModelListener(final Adapter modelListener) {
-		((View) getHost().getModel()).eAdapters().remove(modelListener);
-	}
-
-	@Override
-	public void deactivate() {
-		unregisterGraphModelListener(modelListener);
-		unregisterSemanticModelListener(modelListener);
-		unregisterFigureListener(hostFigureListener);
-		unregisterAncestorListener(hostFigureAncestorListener);
-		getFeedbackLayer().remove(pictogramContainerFigure);
-		for (final Pictogram pictogram : getPictograms()) {
-			final PictogramFigure pictogramFigure = pictogramFigures
-					.get(pictogram);
-			pictogramFigure.removeMouseListener(figureListeners
-					.get(pictogramFigure));
-		}
-		super.deactivate();
-	}
-
-	protected void unregisterSemanticModelListener(final Adapter modelListener) {
-		if (registeredSemanticModelElement != null) {
-			registeredSemanticModelElement.eAdapters().remove(modelListener);
-		}
-	}
-
-	protected void layoutPictogramContainer() {
-		getPictogramContainerFigureLocator().relocate(pictogramContainerFigure);
-	}
-
-	protected Locator getPictogramContainerFigureLocator() {
-		if (pictogramContainerFigureLocator == null) {
-			pictogramContainerFigureLocator = createPictogramContainerFigureLocator();
-		}
-		return pictogramContainerFigureLocator;
-	}
-
-	protected BottomLeftRelativeLocator createPictogramContainerFigureLocator() {
-		// (5, -5) offset from bottom left corner of parent
-		return new BottomLeftRelativeLocator(getHostFigure(),
-				DEFAULT_X_RELATIVE_OFFSET, DEFAULT_X_ABSOLUTE_OFFSET,
-				DEFAULT_Y_RELATIVE_OFFSET, DEFAULT_Y_ABSOLUTE_OFFSET);
-	}
-
-	protected IFigure getFeedbackLayer() {
-		return LayerManager.Helper.find(getHost()).getLayer(
-				LayerConstants.CONNECTION_LAYER);
-	}
-
-	protected IFigure getHostFigure() {
-		return getHost().getFigure();
-	}
-
-	protected EObject getHostSemanticModel() {
-		final Object model = getHost().getModel();
-		if (model instanceof View) {
-			return ((View) model).getElement();
-		} else if (model instanceof EObject) {
-			return (EObject) model;
-		}
-		throw new IllegalStateException("Could not find semantic model");
-	}
-
-	public List<Pictogram> getPictograms() {
-		return pictograms;
-	}
-
-	private ExecutionEvent createExecutionEvent(MouseEvent mouseEvent) {
-		// assume the host's parent edit part is selected when executing the
-		// handler
-		return createExecutionEvent(getHost(), mouseEvent);
-	}
-
-	public static ExecutionEvent createExecutionEvent(
-			final IGraphicalEditPart editPart, MouseEvent mouseEvent) {
-		final IEvaluationContext context = new EvaluationContext(null, editPart);
-		context.addVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME,
-				new StructuredSelection(Collections.singletonList(editPart)));
-
-		final Map<String, String> parameters = new HashMap<String, String>();
-		if (mouseEvent != null) {
-			parameters.put("x", String.valueOf(mouseEvent.x));
-			parameters.put("y", String.valueOf(mouseEvent.y));
-		}
-
-		return new ExecutionEvent(null, parameters, null, context);
-	}
-
-}

+ 0 - 53
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/pictogram/PictogramFigure.java

@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010  itemis AG (http://www.itemis.de)
- * All rights reserved. 
- * 
- * Contributors:
- *     itemis AG - initial API and implementation
- *******************************************************************************/
-package org.yakindu.sct.ui.editor.pictogram;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.ImageFigure;
-import org.eclipse.draw2d.Label;
-
-/**
- * An image figure used to display a {@link Pictogram}.
- * 
- * @author Alexander Nyssen
- */
-public class PictogramFigure extends ImageFigure {
-
-	private static final int ENABLED_ALPHA_VALUE = 255;
-
-	private static final int DISABLED_ALPHA_VALUE = 20;
-
-	private static final int MIN_WIDTH = 50;
-
-	private final IFigure hostFigure;
-
-	public PictogramFigure(final Pictogram pictogram, IFigure hostFigure) {
-		super(pictogram.getImage());
-		this.hostFigure = hostFigure;
-		setToolTip(new Label(pictogram.getDescription()));
-	}
-
-	@Override
-	public void paint(Graphics graphics) {
-
-		if (hostFigure.getParent().isVisible()
-				&& hostFigure.getBounds().width >= MIN_WIDTH) {
-			graphics.pushState();
-			graphics.setAlpha(isEnabled() ? ENABLED_ALPHA_VALUE
-					: DISABLED_ALPHA_VALUE);
-			super.paint(graphics);
-			graphics.popState();
-		}
-	}
-
-	public IFigure getHostFigure() {
-		return hostFigure;
-	}
-
-}

+ 0 - 42
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/pictogram/SubchartPictogram.java

@@ -1,42 +0,0 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.sct.ui.editor.pictogram;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.yakindu.sct.model.sgraph.State;
-import org.yakindu.sct.ui.editor.StatechartImages;
-
-/**
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public class SubchartPictogram extends Pictogram {
-
-	public SubchartPictogram() {
-		super("Open Substatechart in new Editor",
-				StatechartImages.SUB_STATECHART_PICTOGRAM.image(),
-				new OpenSubstatechartHandler(),
-				getHandlerExecutionContextValidator());
-	}
-
-	private static IHandlerContextValidator getHandlerExecutionContextValidator() {
-		return new IHandlerContextValidator() {
-			public boolean isValidContext(ExecutionEvent event) {
-				State selectedState = OpenSubstatechartHandler
-						.getSelectedSubmachineState(event);
-				if (selectedState.getSubstatechart() == null)
-					return false;
-				return true;
-			}
-		};
-	}
-}

+ 3 - 15
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/StatechartValidationDecorationProvider.java

@@ -108,21 +108,9 @@ public class StatechartValidationDecorationProvider extends AbstractProvider
 		PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
 
 			public void run() {
-				try {
-					TransactionUtil.getEditingDomain(fdiagram).runExclusive(
-							new Runnable() {
-
-								public void run() {
-									for (Iterator it = decorators.iterator(); it
-											.hasNext();) {
-										IDecorator decorator = (IDecorator) it
-												.next();
-										decorator.refresh();
-									}
-								}
-							});
-				} catch (Exception e) {
-					e.printStackTrace();
+				for (Iterator it = decorators.iterator(); it.hasNext();) {
+					IDecorator decorator = (IDecorator) it.next();
+					decorator.refresh();
 				}
 			}
 		});

+ 125 - 0
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/submachine/SubStateDecorator.java

@@ -0,0 +1,125 @@
+package org.yakindu.sct.ui.editor.submachine;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.draw2d.ImageFigure;
+import org.eclipse.draw2d.MouseEvent;
+import org.eclipse.draw2d.MouseListener;
+import org.eclipse.draw2d.MouseMotionListener;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.render.util.DiagramRenderUtil;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.Decoration;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Direction;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.yakindu.sct.model.sgraph.State;
+
+import de.itemis.gmf.runtime.commons.decorators.BaseDecorator;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public abstract class SubStateDecorator extends BaseDecorator {
+
+	protected abstract boolean shouldDecorate(State state);
+
+	protected abstract Image getDecorationImage(State state);
+
+	protected abstract Diagram getTooltipDiagramToRender(State state);
+
+	protected abstract void mouseClicked(Decoration decoration,
+			State semanticElement);
+
+	protected abstract Direction getDecoratorPosition();
+
+	public SubStateDecorator(IDecoratorTarget decoratorTarget) {
+		super(decoratorTarget);
+	}
+
+	public void refresh() {
+		removeDecoration();
+		if (getDecoratorTarget().getAdapter(EditPart.class) instanceof IPrimaryEditPart) {
+			EObject semanticElement = (EObject) getDecoratorTarget()
+					.getAdapter(EObject.class);
+			if (semanticElement instanceof State) {
+				final State state = (State) semanticElement;
+				if (shouldDecorate(state)) {
+					final Decoration decoration = (Decoration) getDecoratorTarget()
+							.addShapeDecoration(getDecorationImage(state),
+									getDecoratorPosition(), -1, false);
+					renderToolTip(decoration, state);
+					decoration.addMouseListener(new MouseListener() {
+						public void mousePressed(MouseEvent me) {
+							mouseClicked(decoration, state);
+						}
+
+						public void mouseReleased(MouseEvent me) {
+						}
+
+						public void mouseDoubleClicked(MouseEvent me) {
+						}
+					});
+					setDecoration(decoration);
+				}
+			}
+		}
+	}
+
+	protected Image resize(Image image, int width, int height) {
+		Image scaled = new Image(Display.getDefault(), width, height);
+		GC gc = new GC(scaled);
+		gc.setAntialias(SWT.ON);
+		gc.setInterpolation(SWT.HIGH);
+		gc.drawImage(image, 0, 0, image.getBounds().width,
+				image.getBounds().height, 0, 0, width, height);
+		gc.dispose();
+		image.dispose();
+		return scaled;
+	}
+
+	protected void renderToolTip(final Decoration decoration,
+			final State semanticElement) {
+		decoration.addMouseMotionListener(new MouseMotionListener() {
+			public void mouseDragged(MouseEvent me) {
+			}
+
+			public void mouseEntered(MouseEvent me) {
+				decoration.setToolTip(new ImageFigure());
+				Diagram diagram = getTooltipDiagramToRender(semanticElement);
+				if (diagram != null) {
+					Image renderImage = renderImage(diagram);
+					ImageFigure toolTip = (ImageFigure) decoration.getToolTip();
+					if (toolTip.getImage() != null)
+						toolTip.getImage().dispose();
+					toolTip.setImage(renderImage);
+				}
+			}
+
+			public void mouseExited(MouseEvent me) {
+			}
+
+			public void mouseHover(MouseEvent me) {
+			}
+
+			public void mouseMoved(MouseEvent me) {
+			}
+		});
+	}
+
+	protected Image renderImage(Diagram diagram) {
+		Assert.isNotNull(diagram);
+		Image renderImage = DiagramRenderUtil.renderToSWTImage(diagram);
+		Image resize = resize(renderImage,
+				(int) (0.7071 * renderImage.getBounds().width),
+				(int) (0.7071 * renderImage.getBounds().height));
+		return resize;
+	}
+
+}

+ 93 - 0
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/submachine/SubmachineDecorationProvider.java

@@ -0,0 +1,93 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.ui.editor.submachine;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.Decoration;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Direction;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.xtext.EcoreUtil2;
+import org.yakindu.sct.model.sgraph.State;
+import org.yakindu.sct.ui.editor.StatechartImages;
+import org.yakindu.sct.ui.editor.breadcrumb.BreadcrumbEditorUtil;
+
+import de.itemis.gmf.runtime.commons.decorators.AbstractDecoratorProvider;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class SubmachineDecorationProvider extends AbstractDecoratorProvider
+		implements IDecoratorProvider {
+
+	private static final String DECORATOR_KEY = SubmachineDecorator.class
+			.getSimpleName();
+
+	public void createDecorators(IDecoratorTarget decoratorTarget) {
+		Object adapter = decoratorTarget.getAdapter(EObject.class);
+		if (adapter instanceof State)
+			decoratorTarget.installDecorator(DECORATOR_KEY,
+					new SubmachineDecorator(decoratorTarget));
+	}
+
+	public static class SubmachineDecorator extends SubStateDecorator {
+
+		public SubmachineDecorator(IDecoratorTarget decoratorTarget) {
+			super(decoratorTarget);
+		}
+
+		@Override
+		protected boolean shouldDecorate(State state) {
+			return state.getSubstatechart() != null;
+		}
+
+		@Override
+		protected Image getDecorationImage(State state) {
+			return StatechartImages.SUB_STATECHART_PICTOGRAM.image();
+		}
+
+		@Override
+		protected Diagram getTooltipDiagramToRender(State state) {
+			return (Diagram) EcoreUtil2.getObjectByType(state
+					.getSubstatechart().eResource().getContents(),
+					NotationPackage.Literals.DIAGRAM);
+		}
+
+		@Override
+		protected void mouseClicked(Decoration decoration, State semanticElement) {
+			URI uri = semanticElement.getSubstatechart().eResource().getURI();
+			IFile file = ResourcesPlugin.getWorkspace().getRoot()
+					.getFile(new Path(uri.toPlatformString(true)));
+			try {
+				BreadcrumbEditorUtil.openEditor(file);
+			} catch (ExecutionException e) {
+				e.printStackTrace();
+			}
+		}
+
+		@Override
+		protected Direction getDecoratorPosition() {
+			return IDecoratorTarget.Direction.SOUTH_EAST;
+		}
+
+	}
+
+}

+ 27 - 4
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerTest.java

@@ -1,8 +1,30 @@
 package org.yakindu.sct.model.sexec.transformation.test;
 
-import static org.junit.Assert.*;
-import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.*;
-
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createEntry;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createEntryAction;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createEventDefinition;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createExitAction;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createInterfaceScope;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createInternalScope;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createReactionEffect;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createReactionTrigger;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createRegion;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createRegularEventSpec;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createState;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createStatechart;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createTimeEventSpec;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createTimeTriggeredReaction;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createTransition;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createValue;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createVariableAssignment;
+import static org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil._createVariableDefinition;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -20,6 +42,8 @@ import org.yakindu.sct.model.sexec.TimeEvent;
 import org.yakindu.sct.model.sexec.UnscheduleTimeEvent;
 import org.yakindu.sct.model.sexec.transformation.ModelSequencer;
 import org.yakindu.sct.model.sexec.transformation.SequencerModule;
+import org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.OrthogonalFlatTSC;
+import org.yakindu.sct.model.sexec.transformation.test.SCTTestUtil.SimpleFlatTSC;
 import org.yakindu.sct.model.sgraph.Declaration;
 import org.yakindu.sct.model.sgraph.Entry;
 import org.yakindu.sct.model.sgraph.EntryKind;
@@ -34,7 +58,6 @@ import org.yakindu.sct.model.stext.stext.Assignment;
 import org.yakindu.sct.model.stext.stext.AssignmentOperator;
 import org.yakindu.sct.model.stext.stext.ElementReferenceExpression;
 import org.yakindu.sct.model.stext.stext.EventDefinition;
-import org.yakindu.sct.model.stext.stext.Expression;
 import org.yakindu.sct.model.stext.stext.InterfaceScope;
 import org.yakindu.sct.model.stext.stext.InternalScope;
 import org.yakindu.sct.model.stext.stext.LocalReaction;