Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2011-04-08 05:08:38 +0000
committerHenrik Rentz-Reichert2011-04-08 05:08:38 +0000
commitb62bb13a736cc8b0fdef106854e44499fee18894 (patch)
treee790eb9693a570cf329563e3a20255012a3a5a1d /plugins/org.eclipse.etrice.ui.structure
parent9c2fddec379fc6f224db2855ce9af0e19e916bd5 (diff)
downloadorg.eclipse.etrice-b62bb13a736cc8b0fdef106854e44499fee18894.tar.gz
org.eclipse.etrice-b62bb13a736cc8b0fdef106854e44499fee18894.tar.xz
org.eclipse.etrice-b62bb13a736cc8b0fdef106854e44499fee18894.zip
ui.structure: improved deletion of graphics algorithms
(to avoid dangling HREFs)
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.java12
1 files changed, 7 insertions, 5 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 6785a19e0..3af02616b 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
@@ -314,21 +314,23 @@ public class ActorContainerRefSupport {
if (containerGa.getGraphicsAlgorithmChildren().size()==1) {
// the visible outer frame
- GraphicsAlgorithm ga = containerGa.getGraphicsAlgorithmChildren().get(0);
+ GraphicsAlgorithm borderRect = containerGa.getGraphicsAlgorithmChildren().get(0);
int nw = w-2*MARGIN;
int nh = h-2*MARGIN;
- ga.setWidth(nw);
- ga.setHeight(nh);
+ borderRect.setWidth(nw);
+ borderRect.setHeight(nh);
Object bo = getBusinessObjectForPictogramElement(containerShape);
if (bo instanceof ActorContainerRef) {
ActorContainerRef acr = (ActorContainerRef) bo;
- ga.getGraphicsAlgorithmChildren().clear();
+ while (!borderRect.getGraphicsAlgorithmChildren().isEmpty()) {
+ EcoreUtil.delete(borderRect.getGraphicsAlgorithmChildren().get(0), true);
+ }
EObject parent = containerShape.getContainer().getLink().getBusinessObjects().get(0);
Color lineColor = manageColor(isInherited(acr, parent)?INHERITED_COLOR:LINE_COLOR);
- addSubStructureHint(acr, (Rectangle) ga, lineColor);
+ addSubStructureHint(acr, (Rectangle) borderRect, lineColor);
}
if (!containerShape.getChildren().isEmpty()) {

Back to the top