diff --git a/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/ThreeDeeView.java b/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/ThreeDeeView.java
index 3c6bd42..10a34e3 100644
--- a/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/ThreeDeeView.java
+++ b/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/ThreeDeeView.java
@@ -64,14 +64,13 @@
{
public static final String ID = "org.eclipse.emf.cdo.threedee.ui.ThreeDeeWorld";
+ @SuppressWarnings("unused")
private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, ThreeDeeView.class);
private IListener frontendListener = new FrontendListener();
private DescriptorViewListener descriptorViewListener = new DescriptorViewListener();
- // private ElementViewListener elementViewListener = new ElementViewListener();
-
private ThreeDeeWorld world;
private LayoutAction layoutAction = new LayoutAction();
@@ -200,11 +199,11 @@
{
if (event instanceof TransmissionEvent)
{
- world.showCall((Element)event.getSource(), ((TransmissionEvent)event).getReceiver());
+ world.showCall((Element)event.getSource(), ((TransmissionEvent)event).getReceiver(), true);
}
else if (event instanceof CallEvent)
{
- world.showCall((Element)event.getSource(), ((CallEvent)event).getTarget());
+ world.showCall((Element)event.getSource(), ((CallEvent)event).getTarget(), false);
}
}
diff --git a/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/ThreeDeeWorld.java b/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/ThreeDeeWorld.java
index 473f1e1..8fae341 100644
--- a/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/ThreeDeeWorld.java
+++ b/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/ThreeDeeWorld.java
@@ -703,7 +703,7 @@
parent.addChild(child);
}
- public void showCall(Element source, Element target)
+ public void showCall(Element source, Element target, boolean transmission)
{
if (source == null)
{
@@ -711,7 +711,7 @@
return;
}
- getCallThread().add(source, target);
+ getCallThread().add(source, target, transmission);
}
public void setShowCrossReferences(boolean showCrossReferences)
@@ -800,13 +800,13 @@
setDaemon(true);
}
- public synchronized void add(Element source, Element target)
+ public synchronized void add(Element source, Element target, boolean transmission)
{
Pair<Element, Element> key = new Pair<Element, Element>(source, target);
CallShape call = calls.get(key);
if (call == null)
{
- call = new CallShape(source, target);
+ call = new CallShape(source, target, transmission);
call.setGeometry(getLineGeometry(source, target));
universe.addBranchGraph(call);
calls.put(key, call);
diff --git a/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/nodes/CallShape.java b/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/nodes/CallShape.java
index c95c56f..f0e4f99 100644
--- a/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/nodes/CallShape.java
+++ b/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/nodes/CallShape.java
@@ -14,28 +14,23 @@
import org.eclipse.emf.cdo.threedee.ui.ThreeDeeUtil;
import org.eclipse.net4j.util.collection.Pair;
-import org.eclipse.net4j.util.concurrent.ConcurrencyUtil;
import javax.media.j3d.Appearance;
import javax.media.j3d.TransparencyAttributes;
-import java.awt.Color;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* @author Eike Stepper
*/
-public class CallShape extends LineShape
+public class CallShape extends LineShape implements IColors
{
- public CallShape(Element from, Element to)
+ public CallShape(Element from, Element to, boolean transmission)
{
- super(new Pair<Element, Element>(from, to), createAppearance());
+ super(new Pair<Element, Element>(from, to), createAppearance(transmission));
}
- private static Appearance createAppearance()
+ private static Appearance createAppearance(boolean transmission)
{
- Appearance appearance = ThreeDeeUtil.getDefaultAppearance(Color.red);
+ Appearance appearance = ThreeDeeUtil.getDefaultAppearance(transmission ? green : red);
TransparencyAttributes transparencyAttributes = appearance.getTransparencyAttributes();
if (transparencyAttributes == null)
diff --git a/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/nodes/IColors.java b/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/nodes/IColors.java
index 97f6443..24da6ed 100644
--- a/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/nodes/IColors.java
+++ b/org.eclipse.emf.cdo.threedee.ui/src/org/eclipse/emf/cdo/threedee/ui/nodes/IColors.java
@@ -32,4 +32,8 @@
public static final Color3f yellow = new Color3f(Color.yellow);
public static final Color3f blue = new Color3f(Color.blue);
+
+ public static final Color3f green = new Color3f(Color.green);
+
+ public static final Color3f red = new Color3f(Color.red);
}