From 59398dedd36f2b69bb431f10085af825ea052781 Mon Sep 17 00:00:00 2001 From: acuccuru Date: Thu, 25 Apr 2013 09:59:55 +0000 Subject: 405391: [Moka] Moka shall provide an implementation of the fUML Execution Model https://bugs.eclipse.org/bugs/show_bug.cgi?id=405391 Includes some additional conditionals to avoid waiting for an animation step if there is no graphical representation to animate --- .../eclipse/papyrus/moka/fuml/debug/ControlDelegate.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'sandbox') diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/ControlDelegate.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/ControlDelegate.java index b539d31fc8b..f1c9c577b26 100644 --- a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/ControlDelegate.java +++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/src/org/eclipse/papyrus/moka/fuml/debug/ControlDelegate.java @@ -250,17 +250,19 @@ public class ControlDelegate { if (element instanceof ActivityEdge) { ActivityEdge edge = (ActivityEdge)element ; if (edge.getSource() instanceof Pin) { - AnimationUtils.getInstance().addAnimationMarker(edge.getSource()) ; - if (AnimationUtils.getInstance().diagramsExistFor(element)) { + if (AnimationUtils.getInstance().diagramsExistFor(edge.getSource())) { + AnimationUtils.getInstance().addAnimationMarker(edge.getSource()) ; Thread.sleep(MokaConstants.MOKA_ANIMATION_DELAY) ; + AnimationUtils.getInstance().removeAnimationMarker(edge.getSource()) ; } - AnimationUtils.getInstance().removeAnimationMarker(edge.getSource()) ; } } // Animates the element - AnimationUtils.getInstance().addAnimationMarker(element) ; - Thread.sleep(MokaConstants.MOKA_ANIMATION_DELAY) ; - AnimationUtils.getInstance().removeAnimationMarker(element) ; + if (AnimationUtils.getInstance().diagramsExistFor(element)) { + AnimationUtils.getInstance().addAnimationMarker(element) ; + Thread.sleep(MokaConstants.MOKA_ANIMATION_DELAY) ; + AnimationUtils.getInstance().removeAnimationMarker(element) ; + } } catch (InterruptedException e) { Activator.log.error(e) ; } -- cgit v1.2.3