From b826fc0f5fd016477b1b5835c4345ba6bd33d949 Mon Sep 17 00:00:00 2001 From: Patrick Ziegler Date: Wed, 28 Jan 2026 19:05:09 +0100 Subject: [PATCH] [GEF] Remove duplicate removeChild(EditPart) method The `removeChild(EditPart)` method defined in the WindowBuilder edit-part is functionally identical to the one defined by the GEF edit-part and can be removed. --- .../org/eclipse/wb/gef/core/EditPart.java | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/EditPart.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/EditPart.java index e4f13837e..77f21cffe 100644 --- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/EditPart.java +++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/EditPart.java @@ -174,31 +174,6 @@ protected void refreshChildren() { } } - /** - * Removes a child {@link EditPart}. This method is called from - * {@link #refreshChildren()}. The following events occur in the order listed: - *
    - *
  1. deactivate() is called if the child is active - *
  2. {@link EditPart#removeNotify()} is called on the child. - *
  3. The child's parent is set to null - *
- *

- */ - protected final void removeChild(EditPart childPart) { - int index = getChildren().indexOf(childPart); - if (index == -1) { - return; - } - fireRemovingChild(childPart, index); - if (isActive()) { - childPart.deactivate(); - } - childPart.removeNotify(); - removeChildVisual(childPart); - getChildren().remove(childPart); - childPart.setParent(null); - } - /** * Convenience method for returning the {@link IEditPartViewer} for this part. */