Skip to content

Instantly share code, notes, and snippets.

@waldofe
Forked from hudsonsferreira/gist:3710053
Created September 19, 2012 00:01
Show Gist options
  • Save waldofe/3746828 to your computer and use it in GitHub Desktop.
Save waldofe/3746828 to your computer and use it in GitHub Desktop.
modelo de patch para inserir no Yakindu
//deve ser inserido no metodo createStatechartModel da classe FactoryUtils
//path: org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/factories/FactoryUtils.java
State myState = SGraphFactory.eINSTANCE.createState();
myState.setName("Hudson");
region.getVertices().add(myState);
Node myStateNode = ViewService.createNode(
getRegionCompartmentView(regionView), myState,
SemanticHints.STATE, preferencesHint);
setStateViewLayoutConstraint(myStateNode);
State myState2 = SGraphFactory.eINSTANCE.createState();
myState2.setName("Ferreira");
region.getVertices().add(myState2);
Node myStateNode2 = ViewService.createNode(
getRegionCompartmentView(regionView), myState2,
SemanticHints.STATE, preferencesHint);
setStateViewLayoutConstraint(myStateNode2);
Transition myTransition = SGraphFactory.eINSTANCE.createTransition();
myTransition.setSource(myState);
myTransition.setTarget(myState2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment