From 9892c2ba829f2edfb4bbd72c0fd9c4374cbf49a3 Mon Sep 17 00:00:00 2001 From: Johannes Dicks Date: Mon, 27 Jun 2016 15:52:45 +0200 Subject: [PATCH] #787 : visible priorities should start with 1 --- .../providers/TransitionPriorityDecorationProvider.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/TransitionPriorityDecorationProvider.java b/plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/TransitionPriorityDecorationProvider.java index 246402efc5..eca33e9463 100644 --- a/plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/TransitionPriorityDecorationProvider.java +++ b/plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/TransitionPriorityDecorationProvider.java @@ -83,7 +83,8 @@ public static class PriorityDecorator extends BaseDecorator { public PriorityDecorator(IDecoratorTarget decoratorTarget) { super(decoratorTarget); } - + + @Override public void refresh() { removeDecoration(); @@ -119,7 +120,9 @@ public void createDecorators(TransitionEditPart editPart) { public int getPriority(TransitionEditPart editPart) { Transition transition = ((Transition) editPart.resolveSemanticElement()); Vertex container = (Vertex) transition.eContainer(); - return container.getOutgoingTransitions().indexOf(transition); + int indexOf = container.getOutgoingTransitions().indexOf(transition); + // visible priority should start with 1 + return indexOf+1; } }