| var laneFigure = GmfGraph!RoundedRectangle.all.selectOne(r|r.name="LaneFigure"); |
| var poolFigure = GmfGraph!RoundedRectangle.all.selectOne(r|r.name="PoolFigure"); |
| |
| poolFigure.setCustomLayout("org.eclipse.epsilon.eugenia.bpmn.diagram.custom.SwimlaneLayout"); |
| laneFigure.setCustomLayout("org.eclipse.epsilon.eugenia.bpmn.diagram.custom.SwimlaneLayout"); |
| |
| var laneLabelFigure = GmfGraph!Label.all.selectOne(l|l.name="LaneLabelFigure"); |
| var poolLabelFigure = GmfGraph!Label.all.selectOne(l|l.name="PoolLabelFigure"); |
| laneLabelFigure.makeVertical(); |
| poolLabelFigure.makeVertical(); |
| |
| var circleDecoration = new GmfGraph!CustomDecoration; |
| circleDecoration.qualifiedClassName = "org.eclipse.epsilon.eugenia.bpmn.diagram.custom.CircleDecoration"; |
| circleDecoration.name = "Circle"; |
| GmfGraph!FigureGallery.all.first().figures.add(circleDecoration); |
| GmfGraph!PolylineConnection.all.selectOne(pc|pc.name="MessageFlowFigure").sourceDecoration = circleDecoration; |
| |
| operation GmfGraph!Layoutable setCustomLayout(class : String) { |
| var layout = new GmfGraph!CustomLayout; |
| layout.qualifiedClassName = class; |
| self.layout = layout; |
| } |
| |
| operation GmfGraph!Label makeVertical() { |
| var labelFigure = self; |
| var labelFigureName = labelFigure.name; |
| var labelFigureText = labelFigure.text; |
| var figure = labelFigure.eContainer(); |
| var labelFigureChildAccess = GmfGraph!ChildAccess.all.selectOne(ca|ca.figure = labelFigure); |
| delete labelFigure; |
| labelFigure = new GmfGraph!VerticalLabel; |
| labelFigure.name = labelFigureName; |
| labelFigure.text = labelFigureText; |
| figure.children.add(0, labelFigure); |
| labelFigureChildAccess.figure = labelFigure; |
| } |