diff options
author | Henrik Rentz-Reichert | 2011-03-21 06:53:15 +0000 |
---|---|---|
committer | Henrik Rentz-Reichert | 2011-03-21 06:53:15 +0000 |
commit | 1d73ea23c0b05aff61d8cec4ccdf6c43da294dee (patch) | |
tree | 51f21de22fdb0ae75806cf20be50df141ba60d4f /plugins/org.eclipse.etrice.ui.structure | |
parent | 8d5e660e5e54633d088bf5b49962e323daf22160 (diff) | |
download | org.eclipse.etrice-1d73ea23c0b05aff61d8cec4ccdf6c43da294dee.tar.gz org.eclipse.etrice-1d73ea23c0b05aff61d8cec4ccdf6c43da294dee.tar.xz org.eclipse.etrice-1d73ea23c0b05aff61d8cec4ccdf6c43da294dee.zip |
ui.structure: update of label after changing ref name
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.structure')
-rw-r--r-- | plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java index 68bb2186e..0354f4bd0 100644 --- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java +++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/ActorContainerRefSupport.java @@ -378,24 +378,7 @@ public class ActorContainerRefSupport { // TODOHRR: introduce a method to revert changes
throw new RuntimeException();
- updateFigure(acr, context);
- }
-
- private void updateFigure(ActorContainerRef acr, ICustomContext context) {
- PictogramElement pe = context.getPictogramElements()[0];
- ContainerShape container = (ContainerShape)pe;
-
- // we clear the figure and rebuild it
-// GraphicsAlgorithm invisibleRect = pe.getGraphicsAlgorithm();
-// invisibleRect.getGraphicsAlgorithmChildren().clear();
-
-// createPortFigure(acr, false, container, invisibleRect, manageColor(DARK_COLOR), manageColor(BRIGHT_COLOR));
-
- GraphicsAlgorithm ga = container.getChildren().get(1).getGraphicsAlgorithm();
- if (ga instanceof Text) {
- ((Text)ga).setValue(acr.getName());
- }
-
+ updateLabel(acr, context.getPictogramElements()[0]);
}
}
@@ -601,6 +584,8 @@ public class ActorContainerRefSupport { }
}
+ updateLabel(acr, context.getPictogramElement());
+
InterfaceItemSupport.createRefItems(acr, containerShape, fp);
return true;
@@ -820,6 +805,15 @@ public class ActorContainerRefSupport { hint = borderRect.getGraphicsAlgorithmChildren().get(1);
hint.setLineVisible(hasSubStructure);
}
+
+ private static void updateLabel(ActorContainerRef acr, PictogramElement pe) {
+ ContainerShape container = (ContainerShape)pe;
+
+ GraphicsAlgorithm ga = container.getChildren().get(0).getGraphicsAlgorithm();
+ if (ga instanceof Text) {
+ ((Text)ga).setValue(RoomNameProvider.getRefLabelName(acr));
+ }
+ }
}
private class BehaviorProvider extends DefaultToolBehaviorProvider {
|