From bb2cd6faffcaaad1c666ef3865856561cc509cce Mon Sep 17 00:00:00 2001
From: Lukas Ladenberger <lukas.ladenberger@googlemail.com>
Date: Fri, 9 Nov 2012 10:36:41 +0100
Subject: [PATCH] added label attribute to signal

---
 .../src/de/bmotionstudio/gef/editor/model/Signal.java         | 4 ++++
 .../src/de/bmotionstudio/gef/editor/part/SignalPart.java      | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Signal.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Signal.java
index 5065cca3..3d45a52e 100644
--- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Signal.java
+++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Signal.java
@@ -10,6 +10,7 @@ import org.eclipse.draw2d.geometry.Rectangle;
 import de.bmotionstudio.gef.editor.attribute.AttributeLights;
 import de.bmotionstudio.gef.editor.attribute.AttributeTrackDirection;
 import de.bmotionstudio.gef.editor.attribute.BAttributeHeight;
+import de.bmotionstudio.gef.editor.attribute.BAttributeLabel;
 import de.bmotionstudio.gef.editor.attribute.BAttributeSize;
 import de.bmotionstudio.gef.editor.command.CreateCommand;
 
@@ -54,6 +55,9 @@ public class Signal extends BControl {
 		initAttribute(new AttributeTrackDirection(AttributeTrackDirection.RIGHT));
 		initAttribute(new AttributeLights(2));
 
+		BAttributeLabel aLabel = new BAttributeLabel("Signal");
+		initAttribute(aLabel);
+
 	}
 
 	@Override
diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/SignalPart.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/SignalPart.java
index 33eadbe1..0a0560ac 100644
--- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/SignalPart.java
+++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/SignalPart.java
@@ -76,7 +76,7 @@ public class SignalPart extends BMSAbstractEditPart {
 
 		}
 
-		if (aID.equals(AttributeConstants.ATTRIBUTE_ID)) {
+		if (aID.equals(AttributeConstants.ATTRIBUTE_LABEL)) {
 			((SignalFigure) getFigure()).setLabel(value.toString());
 		}
 
-- 
GitLab