From fe622fb2bd0be43f01f46c10bab38663aee61aee Mon Sep 17 00:00:00 2001
From: Patrick Ziegler <ziegler.patrick@hotmail.de>
Date: Thu, 26 Mar 2026 06:21:54 +0100
Subject: [PATCH] [GEF] Harmonize GraphicalEditPolicy with upstream class

This is a continuation of 88f0df310f43ae1ba98e6c6560d32f05edbde39c. In
addition to deprecating the "EditPolicy" class, we now also deprecated
the "GraphicalEditPolicy" in favor of the GEF class.

All "Design" specific logic has been moved to the "DesignEditPolicy".
Classes extending the "GraphicalEditPolicy" now extend the
"DesignEditPolicy" and the "DesignEditPolicy" now extends the previously
deprecated "EditPolicy" for backwards compatibility.
---
 .../policy/TabOrderContainerEditPolicy.java   |  6 +-
 org.eclipse.wb.core/.settings/.api_filters    | 65 +++++++++++++
 .../gef/core/policies/DesignEditPolicy.java   | 65 ++++++++++++-
 .../wb/gef/core/policies/EditPolicy.java      |  6 +-
 .../wb/gef/graphical/GraphicalEditPart.java   | 48 +++++++++-
 .../policies/DirectTextEditPolicy.java        |  7 +-
 .../policies/GraphicalEditPolicy.java         | 94 ++-----------------
 .../graphical/policies/LayoutEditPolicy.java  |  5 +-
 .../policies/SelectionEditPolicy.java         |  3 +-
 .../wb/core/gef/policy/PolicyUtils.java       | 35 +++++--
 .../layout/grid/AbstractGridHelper.java       | 18 +++-
 org.eclipse.wb.rcp/META-INF/MANIFEST.MF       |  2 +-
 .../policy/forms/layout/grid/GridHelper.java  |  5 +-
 .../swing/FormLayout/gef/FormGridHelper.java  |  5 +-
 .../swing/MigLayout/gef/MigGridHelper.java    |  5 +-
 org.eclipse.wb.swing/META-INF/MANIFEST.MF     |  2 +-
 .../gef/policy/layout/gbl/GridHelper.java     |  5 +-
 .../gef/policy/layout/grid/GridHelper.java    |  5 +-
 18 files changed, 256 insertions(+), 125 deletions(-)

diff --git a/org.eclipse.wb.core.java/src/org/eclipse/wb/core/gef/policy/TabOrderContainerEditPolicy.java b/org.eclipse.wb.core.java/src/org/eclipse/wb/core/gef/policy/TabOrderContainerEditPolicy.java
index f51a58563..8a0e602e6 100644
--- a/org.eclipse.wb.core.java/src/org/eclipse/wb/core/gef/policy/TabOrderContainerEditPolicy.java
+++ b/org.eclipse.wb.core.java/src/org/eclipse/wb/core/gef/policy/TabOrderContainerEditPolicy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2025 Google, Inc. and others.
+ * Copyright (c) 2011, 2026 Google, Inc. and others.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
@@ -19,8 +19,8 @@
 import org.eclipse.wb.draw2d.FigureUtils;
 import org.eclipse.wb.draw2d.Layer;
 import org.eclipse.wb.gef.core.IEditPartViewer;
+import org.eclipse.wb.gef.core.policies.DesignEditPolicy;
 import org.eclipse.wb.gef.graphical.GraphicalEditPart;
-import org.eclipse.wb.gef.graphical.policies.GraphicalEditPolicy;
 import org.eclipse.wb.internal.core.DesignerPlugin;
 import org.eclipse.wb.internal.core.gef.tools.TabOrderContainerRequest;
 import org.eclipse.wb.internal.core.model.property.Property;
@@ -41,7 +41,7 @@
  * @author lobas_av
  * @coverage core.gef.policy
  */
-public final class TabOrderContainerEditPolicy extends GraphicalEditPolicy {
+public final class TabOrderContainerEditPolicy extends DesignEditPolicy {
 	public static final Request TAB_ORDER_REQUEST = new Request("tab order");
 	public static final String TAB_CONTAINER_ROLE = "tab container role";
 	public static final String REQ_CONTAINER_TAB_ORDER = "container tab order";
diff --git a/org.eclipse.wb.core/.settings/.api_filters b/org.eclipse.wb.core/.settings/.api_filters
index 50145d474..2c90b7a13 100644
--- a/org.eclipse.wb.core/.settings/.api_filters
+++ b/org.eclipse.wb.core/.settings/.api_filters
@@ -8,6 +8,56 @@
             </message_arguments>
         </filter>
     </resource>
+    <resource path="src/org/eclipse/wb/core/gef/policy/PolicyUtils.java" type="org.eclipse.wb.core.gef.policy.PolicyUtils">
+        <filter comment="Restructuring of internal GraphicalEditPart" id="338792546">
+            <message_arguments>
+                <message_argument value="org.eclipse.wb.core.gef.policy.PolicyUtils"/>
+                <message_argument value="eraseBorderTargetFeedback(GraphicalEditPart)"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Restructuring of internal GraphicalEditPolicy" id="338792546">
+            <message_arguments>
+                <message_argument value="org.eclipse.wb.core.gef.policy.PolicyUtils"/>
+                <message_argument value="eraseBorderTargetFeedback(GraphicalEditPolicy)"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Restructuring of internal GraphicalEditPart" id="338792546">
+            <message_arguments>
+                <message_argument value="org.eclipse.wb.core.gef.policy.PolicyUtils"/>
+                <message_argument value="getAbsoluteBounds(GraphicalEditPart)"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Restructuring of internal GraphicalEditPart" id="338792546">
+            <message_arguments>
+                <message_argument value="org.eclipse.wb.core.gef.policy.PolicyUtils"/>
+                <message_argument value="showBorderTargetFeedback(GraphicalEditPart)"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Restructuring of internal GraphicalEditPolicy" id="338792546">
+            <message_arguments>
+                <message_argument value="org.eclipse.wb.core.gef.policy.PolicyUtils"/>
+                <message_argument value="showBorderTargetFeedback(GraphicalEditPolicy)"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Restructuring of internal GraphicalEditPolicy" id="338792546">
+            <message_arguments>
+                <message_argument value="org.eclipse.wb.core.gef.policy.PolicyUtils"/>
+                <message_argument value="translateAbsoluteToFeedback(GraphicalEditPolicy, Translatable)"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Restructuring of internal GraphicalEditPart" id="338792546">
+            <message_arguments>
+                <message_argument value="org.eclipse.wb.core.gef.policy.PolicyUtils"/>
+                <message_argument value="translateAbsoluteToModel(GraphicalEditPart, Translatable)"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Restructuring of internal GraphicalEditPolicy" id="338792546">
+            <message_arguments>
+                <message_argument value="org.eclipse.wb.core.gef.policy.PolicyUtils"/>
+                <message_argument value="translateModelToFeedback(GraphicalEditPolicy, Translatable)"/>
+            </message_arguments>
+        </filter>
+    </resource>
     <resource path="src/org/eclipse/wb/core/gef/policy/helpers/BroadcastListenerHelper.java" type="org.eclipse.wb.core.gef.policy.helpers.BroadcastListenerHelper">
         <filter comment="Method marked for removal" id="643846161">
             <message_arguments>
@@ -54,4 +104,19 @@
             </message_arguments>
         </filter>
     </resource>
+    <resource path="src/org/eclipse/wb/core/gef/policy/layout/grid/AbstractGridHelper.java" type="org.eclipse.wb.core.gef.policy.layout.grid.AbstractGridHelper">
+        <filter comment="Restructuring of internal GraphicalEditPolicy" id="338792546">
+            <message_arguments>
+                <message_argument value="org.eclipse.wb.core.gef.policy.layout.grid.AbstractGridHelper"/>
+                <message_argument value="getHost()"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Constructor marked for removal" id="643850349">
+            <message_arguments>
+                <message_argument value="GraphicalEditPolicy"/>
+                <message_argument value="AbstractGridHelper"/>
+                <message_argument value="AbstractGridHelper(GraphicalEditPolicy, boolean)"/>
+            </message_arguments>
+        </filter>
+    </resource>
 </component>
diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/policies/DesignEditPolicy.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/policies/DesignEditPolicy.java
index f08c0f946..893385148 100644
--- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/policies/DesignEditPolicy.java
+++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/policies/DesignEditPolicy.java
@@ -14,16 +14,22 @@
 
 import org.eclipse.wb.core.gef.policy.IDesignEditPolicy;
 import org.eclipse.wb.core.gef.policy.IEditPolicyListener;
+import org.eclipse.wb.draw2d.Layer;
+import org.eclipse.wb.gef.core.IEditPartViewer;
+import org.eclipse.wb.gef.graphical.policies.GraphicalEditPolicy;
 
 import org.eclipse.draw2d.EventListenerList;
+import org.eclipse.draw2d.IFigure;
 import org.eclipse.gef.EditPart;
 import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.LayerConstants;
 import org.eclipse.gef.Request;
+import org.eclipse.gef.editparts.LayerManager;
 
 import java.util.Iterator;
 
 @SuppressWarnings("removal")
-public class DesignEditPolicy extends org.eclipse.wb.gef.core.policies.EditPolicy implements IDesignEditPolicy, IRequestEditPolicy {
+public class DesignEditPolicy extends GraphicalEditPolicy implements IDesignEditPolicy, IRequestEditPolicy {
 	////////////////////////////////////////////////////////////////////////////
 	//
 	// Instance fields
@@ -143,4 +149,61 @@ private void fireDeactivate() {
 			listeners.forEachRemaining(listener -> listener.deactivatePolicy(this));
 		}
 	}
+
+	////////////////////////////////////////////////////////////////////////////
+	//
+	// Model Utils
+	//
+	////////////////////////////////////////////////////////////////////////////
+	/**
+	 * Convenience method to return the host's model.
+	 */
+	protected final Object getHostModel() {
+		return getHost().getModel();
+	}
+
+	////////////////////////////////////////////////////////////////////////////
+	//
+	// Layer's
+	//
+	////////////////////////////////////////////////////////////////////////////
+	/**
+	 * Obtains the specified layer.
+	 */
+	@Override
+	protected final Layer getLayer(Object layer) {
+		if (isOnMenuLayer()) {
+			if (LayerConstants.HANDLE_LAYER.equals(layer)) {
+				layer = IEditPartViewer.MENU_HANDLE_LAYER;
+			} else if (IEditPartViewer.HANDLE_LAYER_STATIC.equals(layer)) {
+				layer = IEditPartViewer.MENU_HANDLE_LAYER_STATIC;
+			} else if (LayerConstants.FEEDBACK_LAYER.equals(layer)) {
+				layer = IEditPartViewer.MENU_FEEDBACK_LAYER;
+			}
+		}
+		return (Layer) super.getLayer(layer);
+	}
+
+	/**
+	 * @return the {@link Layer} for {@link IEditPartViewer#FEEDBACK_LAYER}.
+	 */
+	@Override
+	protected Layer getFeedbackLayer() {
+		return getLayer(LayerConstants.FEEDBACK_LAYER);
+	}
+
+	/**
+	 * @return <code>true</code> if host {@link EditPart} is located on
+	 *         {@link IEditPartViewer#MENU_PRIMARY_LAYER}.
+	 */
+	private boolean isOnMenuLayer() {
+		Layer menuPrimaryLayer = (Layer) LayerManager.Helper.find(getHost()).getLayer(IEditPartViewer.MENU_PRIMARY_LAYER);
+		for (IFigure figure = getHostFigure(); figure != null; figure = figure.getParent()) {
+			if (figure == menuPrimaryLayer) {
+				return true;
+			}
+		}
+		// no, probably normal PRIMARY_LAYER
+		return false;
+	}
 }
diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/policies/EditPolicy.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/policies/EditPolicy.java
index 247927f93..563f48c5f 100644
--- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/policies/EditPolicy.java
+++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/policies/EditPolicy.java
@@ -12,14 +12,14 @@
  *******************************************************************************/
 package org.eclipse.wb.gef.core.policies;
 
-import org.eclipse.gef.editpolicies.AbstractEditPolicy;
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
 
 /**
  * @author lobas_av
  * @coverage gef.core
- * @deprecated Extend {@link AbstractEditPolicy} directly.
+ * @deprecated Extend {@link GraphicalEditPolicy} directly.
  */
 @Deprecated(since = "2026-06", forRemoval = true)
-public abstract class EditPolicy extends AbstractEditPolicy {
+public abstract class EditPolicy extends GraphicalEditPolicy {
 	// Empty
 }
\ No newline at end of file
diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/GraphicalEditPart.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/GraphicalEditPart.java
index ee705a727..9354bab4d 100644
--- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/GraphicalEditPart.java
+++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/GraphicalEditPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2025 Google, Inc. and others.
+ * Copyright (c) 2011, 2026 Google, Inc. and others.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
@@ -12,19 +12,26 @@
  *******************************************************************************/
 package org.eclipse.wb.gef.graphical;
 
-import org.eclipse.wb.gef.core.EditPart;
 import org.eclipse.wb.gef.core.tools.DragEditPartTracker;
 import org.eclipse.wb.gef.core.tools.Tool;
+import org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils;
 
+import org.eclipse.draw2d.EventListenerList;
 import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
 import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.NodeListener;
 import org.eclipse.gef.Request;
 
+import java.util.Collections;
+import java.util.List;
+
 /**
  * @author lobas_av
  * @coverage gef.graphical
  */
-public abstract class GraphicalEditPart extends EditPart {
+public abstract class GraphicalEditPart extends org.eclipse.wb.gef.core.EditPart implements org.eclipse.gef.GraphicalEditPart {
 	private IFigure m_figure;
 
 	////////////////////////////////////////////////////////////////////////////
@@ -108,6 +115,41 @@ protected boolean removeSelfVisual() {
 		return false;
 	}
 
+	@Override
+	@SuppressWarnings("unchecked")
+	public List<? extends GraphicalEditPart> getChildren() {
+		return (List<? extends GraphicalEditPart>) super.getChildren();
+	}
+
+	@Override
+	public void addNodeListener(NodeListener listener) {
+		getEventListenerList().addListener(NodeListener.class, listener);
+	}
+
+	@Override
+	public void removeNodeListener(NodeListener listener) {
+		getEventListenerList().removeListener(NodeListener.class, listener);
+	}
+
+	private EventListenerList getEventListenerList() {
+		return (EventListenerList) ReflectionUtils.getFieldObject(this, "eventListeners");
+	}
+
+	@Override
+	public List<? extends ConnectionEditPart> getSourceConnections() {
+		return Collections.emptyList();
+	}
+
+	@Override
+	public List<? extends ConnectionEditPart> getTargetConnections() {
+		return Collections.emptyList();
+	}
+
+	@Override
+	public void setLayoutConstraint(EditPart child, IFigure figure, Object constraint) {
+		figure.getParent().setConstraint(figure, constraint);
+	}
+
 	////////////////////////////////////////////////////////////////////////////
 	//
 	// DragTracking
diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/DirectTextEditPolicy.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/DirectTextEditPolicy.java
index 6e90e78b9..610cd9101 100644
--- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/DirectTextEditPolicy.java
+++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/DirectTextEditPolicy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2025 Google, Inc. and others.
+ * Copyright (c) 2011, 2026 Google, Inc. and others.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
@@ -12,10 +12,13 @@
  *******************************************************************************/
 package org.eclipse.wb.gef.graphical.policies;
 
+import org.eclipse.wb.gef.core.policies.DesignEditPolicy;
+
 import org.eclipse.draw2d.IFigure;
 import org.eclipse.draw2d.geometry.Dimension;
 import org.eclipse.draw2d.geometry.Point;
 import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
@@ -32,7 +35,7 @@
  * @author scheglov_ke
  * @coverage gef.graphical
  */
-public abstract class DirectTextEditPolicy extends GraphicalEditPolicy {
+public abstract class DirectTextEditPolicy extends DesignEditPolicy {
 	////////////////////////////////////////////////////////////////////////////
 	//
 	// Access
diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/GraphicalEditPolicy.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/GraphicalEditPolicy.java
index a25af0f09..5b8fa7d19 100644
--- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/GraphicalEditPolicy.java
+++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/GraphicalEditPolicy.java
@@ -12,21 +12,18 @@
  *******************************************************************************/
 package org.eclipse.wb.gef.graphical.policies;
 
-import org.eclipse.wb.draw2d.Layer;
-import org.eclipse.wb.gef.core.IEditPartViewer;
-import org.eclipse.wb.gef.core.policies.DesignEditPolicy;
+import org.eclipse.wb.gef.core.policies.EditPolicy;
 import org.eclipse.wb.gef.graphical.GraphicalEditPart;
 
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.LayerConstants;
-import org.eclipse.gef.editparts.LayerManager;
-
 /**
  * @author lobas_av
  * @coverage gef.graphical
+ * @deprecated Extend {@link org.eclipse.gef.editpolicies.GraphicalEditPolicy
+ *             GraphicalEditPolicy} directly.
  */
-public class GraphicalEditPolicy extends DesignEditPolicy {
+@SuppressWarnings("removal")
+@Deprecated(since = "2026-06", forRemoval = true)
+public class GraphicalEditPolicy extends EditPolicy {
 	////////////////////////////////////////////////////////////////////////////
 	//
 	// Access
@@ -35,86 +32,9 @@ public class GraphicalEditPolicy extends DesignEditPolicy {
 	/**
 	 * @return the <i>host</i> {@link GraphicalEditPart} on which this policy is installed.
 	 */
+	@Deprecated(since = "2026-06", forRemoval = true)
 	@Override
 	public GraphicalEditPart getHost() {
 		return (GraphicalEditPart) super.getHost();
 	}
-
-	////////////////////////////////////////////////////////////////////////////
-	//
-	// Figure
-	//
-	////////////////////////////////////////////////////////////////////////////
-	/**
-	 * Convenience method to return the host's {@link IFigure}.
-	 */
-	protected final IFigure getHostFigure() {
-		return getHost().getFigure();
-	}
-
-	/**
-	 * Convenience method to return the host's model.
-	 */
-	protected final Object getHostModel() {
-		return getHost().getModel();
-	}
-
-	////////////////////////////////////////////////////////////////////////////
-	//
-	// Layer's
-	//
-	////////////////////////////////////////////////////////////////////////////
-	/**
-	 * Obtains the specified layer.
-	 */
-	//@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "ES_COMPARING_PARAMETER_STRING_WITH_EQ")
-	protected final Layer getLayer(String name) {
-		if (isOnMenuLayer()) {
-			if (name == LayerConstants.HANDLE_LAYER) {
-				name = IEditPartViewer.MENU_HANDLE_LAYER;
-			} else if (name == IEditPartViewer.HANDLE_LAYER_STATIC) {
-				name = IEditPartViewer.MENU_HANDLE_LAYER_STATIC;
-			} else if (name == LayerConstants.FEEDBACK_LAYER) {
-				name = IEditPartViewer.MENU_FEEDBACK_LAYER;
-			}
-		}
-		return (Layer) LayerManager.Helper.find(getHost()).getLayer(name);
-	}
-
-	/**
-	 * @return the {@link Layer} for {@link IEditPartViewer#FEEDBACK_LAYER}.
-	 */
-	protected Layer getFeedbackLayer() {
-		return getLayer(LayerConstants.FEEDBACK_LAYER);
-	}
-
-	/**
-	 * Adds the specified <code>{@link IFigure}</code> to the {@link IEditPartViewer#FEEDBACK_LAYER}.
-	 */
-	protected final void addFeedback(IFigure figure) {
-		getFeedbackLayer().add(figure);
-	}
-
-	/**
-	 * Removes the specified <code>{@link IFigure}</code> to the {@link IEditPartViewer#FEEDBACK_LAYER}
-	 * .
-	 */
-	protected final void removeFeedback(IFigure figure) {
-		getFeedbackLayer().remove(figure);
-	}
-
-	/**
-	 * @return <code>true</code> if host {@link EditPart} is located on
-	 *         {@link IEditPartViewer#MENU_PRIMARY_LAYER}.
-	 */
-	private boolean isOnMenuLayer() {
-		Layer menuPrimaryLayer = (Layer) LayerManager.Helper.find(getHost()).getLayer(IEditPartViewer.MENU_PRIMARY_LAYER);
-		for (IFigure figure = getHostFigure(); figure != null; figure = figure.getParent()) {
-			if (figure == menuPrimaryLayer) {
-				return true;
-			}
-		}
-		// no, probably normal PRIMARY_LAYER
-		return false;
-	}
 }
\ No newline at end of file
diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/LayoutEditPolicy.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/LayoutEditPolicy.java
index 4e56acc99..956140e3c 100644
--- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/LayoutEditPolicy.java
+++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/LayoutEditPolicy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2025 Google, Inc. and others.
+ * Copyright (c) 2011, 2026 Google, Inc. and others.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
@@ -12,6 +12,7 @@
  *******************************************************************************/
 package org.eclipse.wb.gef.graphical.policies;
 
+import org.eclipse.wb.gef.core.policies.DesignEditPolicy;
 import org.eclipse.wb.gef.core.policies.IEditPartDecorationListener;
 import org.eclipse.wb.gef.core.policies.ILayoutRequestValidator;
 import org.eclipse.wb.gef.core.requests.ChangeBoundsRequest;
@@ -31,7 +32,7 @@
  * @author lobas_av
  * @coverage gef.graphical
  */
-public abstract class LayoutEditPolicy extends GraphicalEditPolicy {
+public abstract class LayoutEditPolicy extends DesignEditPolicy {
 	private final EditPartListener m_listener = new EditPartListener.Stub() {
 		@Override
 		public void childAdded(EditPart child, int index) {
diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/SelectionEditPolicy.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/SelectionEditPolicy.java
index 3b30f1050..402dc2c00 100644
--- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/SelectionEditPolicy.java
+++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/SelectionEditPolicy.java
@@ -15,6 +15,7 @@
 import org.eclipse.wb.draw2d.FigureUtils;
 import org.eclipse.wb.draw2d.Layer;
 import org.eclipse.wb.gef.core.IEditPartViewer;
+import org.eclipse.wb.gef.core.policies.DesignEditPolicy;
 import org.eclipse.wb.gef.graphical.handles.Handle;
 
 import org.eclipse.gef.EditPart;
@@ -38,7 +39,7 @@
  * @author lobas_av
  * @coverage gef.graphical
  */
-public abstract class SelectionEditPolicy extends GraphicalEditPolicy {
+public abstract class SelectionEditPolicy extends DesignEditPolicy {
 	private final EditPartListener listener = new EditPartListener.Stub() {
 		@Override
 		public void selectedStateChanged(org.eclipse.gef.EditPart part) {
diff --git a/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/PolicyUtils.java b/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/PolicyUtils.java
index b4fb9dd6b..e6cc7b2b4 100644
--- a/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/PolicyUtils.java
+++ b/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/PolicyUtils.java
@@ -19,8 +19,6 @@
 import org.eclipse.wb.draw2d.border.Border;
 import org.eclipse.wb.draw2d.border.CompoundBorder;
 import org.eclipse.wb.draw2d.border.LineBorder;
-import org.eclipse.wb.gef.graphical.GraphicalEditPart;
-import org.eclipse.wb.gef.graphical.policies.GraphicalEditPolicy;
 import org.eclipse.wb.gef.graphical.policies.LayoutEditPolicy;
 import org.eclipse.wb.gef.graphical.policies.SelectionEditPolicy;
 import org.eclipse.wb.internal.core.DesignerPlugin;
@@ -35,8 +33,10 @@
 import org.eclipse.gef.EditPart;
 import org.eclipse.gef.EditPartViewer;
 import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
 import org.eclipse.gef.LayerConstants;
 import org.eclipse.gef.editparts.LayerManager;
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
 
 import java.lang.reflect.Method;
 import java.util.Objects;
@@ -57,6 +57,8 @@ public abstract class PolicyUtils {
 
 	/**
 	 * Shows border around given {@link EditPolicy} host figure.
+	 *
+	 * @since 1.24
 	 */
 	public static void showBorderTargetFeedback(final GraphicalEditPolicy policy) {
 		ExecutionUtils.runLog(() -> {
@@ -67,6 +69,8 @@ public static void showBorderTargetFeedback(final GraphicalEditPolicy policy) {
 
 	/**
 	 * Shows border around given {@link GraphicalEditPart} figure.
+	 *
+	 * @since 1.24
 	 */
 	public static void showBorderTargetFeedback(GraphicalEditPart part) {
 		Layer feedbackLayer = (Layer) LayerManager.Helper.find(part.getViewer()).getLayer(LayerConstants.FEEDBACK_LAYER);
@@ -99,6 +103,8 @@ private static void showBorderTargetFeedback(Layer layer, GraphicalEditPart part
 
 	/**
 	 * Erases border feedback.
+	 *
+	 * @since 1.24
 	 */
 	public static void eraseBorderTargetFeedback(GraphicalEditPolicy policy) {
 		GraphicalEditPart part = policy.getHost();
@@ -107,6 +113,8 @@ public static void eraseBorderTargetFeedback(GraphicalEditPolicy policy) {
 
 	/**
 	 * Erases border feedback.
+	 *
+	 * @since 1.24
 	 */
 	public static void eraseBorderTargetFeedback(GraphicalEditPart part) {
 		IFigure borderFeedback = (IFigure) part.getViewer().getControl().getData(BORDER_FEEDBACK_KEY);
@@ -132,11 +140,11 @@ public static Border createTargetBorder() {
 	//
 	////////////////////////////////////////////////////////////////////////////
 	/**
-	 * Invokes {@link EditPolicy#getLayer(java.lang.String)}.
+	 * Invokes {@link GraphicalEditPolicy#getLayer(java.lang.Object)}.
 	 */
-	private static Layer getLayer(GraphicalEditPolicy policy, String name) throws Exception {
-		Method method = findPolicyMethod(policy, "getLayer(java.lang.String)");
-		return (Layer) ReflectionUtils.invokeMethod(method, policy, name);
+	private static Layer getLayer(GraphicalEditPolicy policy, Object layer) throws Exception {
+		Method method = findPolicyMethod(policy, "getLayer(java.lang.Object)");
+		return (Layer) ReflectionUtils.invokeMethod(method, policy, layer);
 	}
 
 	/**
@@ -154,6 +162,7 @@ private static Method findPolicyMethod(GraphicalEditPolicy policy, String signat
 	////////////////////////////////////////////////////////////////////////////
 	/**
 	 * @return absolute bounds of given {@link EditPart}'s {@link IFigure}.
+	 * @since 1.24
 	 */
 	public static Rectangle getAbsoluteBounds(GraphicalEditPart editPart) {
 		IFigure figure = editPart.getFigure();
@@ -167,6 +176,9 @@ public static Rectangle getAbsoluteBounds(GraphicalEditPart editPart) {
 	// Geometry utilities
 	//
 	////////////////////////////////////////////////////////////////////////////
+	/**
+	 * @since 1.24
+	 */
 	public static void translateAbsoluteToFeedback(GraphicalEditPolicy policy, Translatable t) {
 		try {
 			IFigure layer = getLayer(policy, LayerConstants.FEEDBACK_LAYER);
@@ -195,8 +207,10 @@ public static void translateAbsoluteToModel(LayoutEditPolicy policy, Translatabl
 	}
 
 	/**
-	 * Converts 'absolute' coordinates into coordinates by <code>toContainer</code> {@link EditPart}.
-	 * Useful during reparenting.
+	 * Converts 'absolute' coordinates into coordinates by <code>toContainer</code>
+	 * {@link EditPart}. Useful during reparenting.
+	 *
+	 * @since 1.24
 	 */
 	public static void translateAbsoluteToModel(GraphicalEditPart toContainer, Translatable t) {
 		try {
@@ -217,7 +231,10 @@ public static void translateAbsoluteToModel(GraphicalEditPart toContainer, Trans
 	}
 
 	/**
-	 * Translates given {@link Translatable} from model coordinates into feedback layer coordinates.
+	 * Translates given {@link Translatable} from model coordinates into feedback
+	 * layer coordinates.
+	 *
+	 * @since 1.24
 	 */
 	public static void translateModelToFeedback(GraphicalEditPolicy policy, Translatable t) {
 		if (policy instanceof LayoutEditPolicy) {
diff --git a/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/grid/AbstractGridHelper.java b/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/grid/AbstractGridHelper.java
index b5a529d7f..bd6c9278c 100644
--- a/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/grid/AbstractGridHelper.java
+++ b/org.eclipse.wb.core/src/org/eclipse/wb/core/gef/policy/layout/grid/AbstractGridHelper.java
@@ -20,8 +20,6 @@
 import org.eclipse.wb.draw2d.Polyline;
 import org.eclipse.wb.draw2d.RectangleFigure;
 import org.eclipse.wb.gef.core.IEditPartViewer;
-import org.eclipse.wb.gef.graphical.GraphicalEditPart;
-import org.eclipse.wb.gef.graphical.policies.GraphicalEditPolicy;
 import org.eclipse.wb.gef.graphical.policies.LayoutEditPolicy;
 import org.eclipse.wb.gef.graphical.policies.SelectionEditPolicy;
 import org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils;
@@ -36,7 +34,9 @@
 import org.eclipse.draw2d.geometry.Translatable;
 import org.eclipse.gef.EditPart;
 import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
 import org.eclipse.gef.editparts.LayerManager;
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
 import org.eclipse.swt.graphics.Color;
 
 import java.lang.reflect.Field;
@@ -75,6 +75,19 @@ public abstract class AbstractGridHelper {
 	// Constructor
 	//
 	////////////////////////////////////////////////////////////////////////////
+
+	/**
+	 * @deprecated Use @link #AbstractGridHelper(GraphicalEditPolicy, boolean)}
+	 *             instead.
+	 */
+	@Deprecated(since = "2026-06", forRemoval = true)
+	public AbstractGridHelper(@SuppressWarnings("removal") org.eclipse.wb.gef.graphical.policies.GraphicalEditPolicy editPolicy, boolean forTarget) {
+		this((GraphicalEditPolicy) editPolicy, forTarget);
+	}
+
+	/**
+	 * @since 1.24
+	 */
 	public AbstractGridHelper(GraphicalEditPolicy editPolicy, boolean forTarget) {
 		m_editPolicy = editPolicy;
 		// colors
@@ -323,6 +336,7 @@ protected final Object getAbstractLayout() {
 
 	/**
 	 * @return the host {@link EditPart}.
+	 * @since 1.24
 	 */
 	protected GraphicalEditPart getHost() {
 		if (m_editPolicy instanceof LayoutEditPolicy) {
diff --git a/org.eclipse.wb.rcp/META-INF/MANIFEST.MF b/org.eclipse.wb.rcp/META-INF/MANIFEST.MF
index 987b0feea..7dae0fe47 100644
--- a/org.eclipse.wb.rcp/META-INF/MANIFEST.MF
+++ b/org.eclipse.wb.rcp/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wb.rcp;singleton:=true
-Bundle-Version: 1.10.0.qualifier
+Bundle-Version: 1.11.0.qualifier
 Bundle-ClassPath: .
 Bundle-Activator: org.eclipse.wb.internal.rcp.Activator
 Bundle-Vendor: %providerName
diff --git a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/layout/grid/GridHelper.java b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/layout/grid/GridHelper.java
index 350d8a3eb..0d60132a9 100644
--- a/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/layout/grid/GridHelper.java
+++ b/org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/gef/policy/forms/layout/grid/GridHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011 Google, Inc.
+ * Copyright (c) 2011, 2026 Google, Inc. and others.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
@@ -14,10 +14,11 @@
 
 import org.eclipse.wb.core.gef.policy.layout.grid.AbstractGridHelper;
 import org.eclipse.wb.core.gef.policy.layout.grid.IGridInfo;
-import org.eclipse.wb.gef.graphical.policies.GraphicalEditPolicy;
 import org.eclipse.wb.internal.rcp.model.forms.layout.table.ITableWrapLayoutInfo;
 import org.eclipse.wb.internal.swt.model.widgets.IControlInfo;
 
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+
 /**
  * Helper for displaying grid for {@link ITableWrapLayoutInfo}.
  *
diff --git a/org.eclipse.wb.swing.FormLayout/src/org/eclipse/wb/internal/swing/FormLayout/gef/FormGridHelper.java b/org.eclipse.wb.swing.FormLayout/src/org/eclipse/wb/internal/swing/FormLayout/gef/FormGridHelper.java
index a1dd24112..79408c03b 100644
--- a/org.eclipse.wb.swing.FormLayout/src/org/eclipse/wb/internal/swing/FormLayout/gef/FormGridHelper.java
+++ b/org.eclipse.wb.swing.FormLayout/src/org/eclipse/wb/internal/swing/FormLayout/gef/FormGridHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011 Google, Inc.
+ * Copyright (c) 2011, 2026 Google, Inc. and others.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
@@ -14,9 +14,10 @@
 
 import org.eclipse.wb.core.gef.policy.layout.grid.AbstractGridHelper;
 import org.eclipse.wb.core.gef.policy.layout.grid.IGridInfo;
-import org.eclipse.wb.gef.graphical.policies.GraphicalEditPolicy;
 import org.eclipse.wb.internal.swing.FormLayout.model.FormLayoutInfo;
 
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+
 /**
  * Helper for displaying grid for {@link FormLayoutInfo}.
  *
diff --git a/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigGridHelper.java b/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigGridHelper.java
index 5554a3338..ad17292d3 100644
--- a/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigGridHelper.java
+++ b/org.eclipse.wb.swing.MigLayout/src/org/eclipse/wb/internal/swing/MigLayout/gef/MigGridHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011 Google, Inc.
+ * Copyright (c) 2011, 2026 Google, Inc. and others.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
@@ -14,9 +14,10 @@
 
 import org.eclipse.wb.core.gef.policy.layout.grid.AbstractGridHelper;
 import org.eclipse.wb.core.gef.policy.layout.grid.IGridInfo;
-import org.eclipse.wb.gef.graphical.policies.GraphicalEditPolicy;
 import org.eclipse.wb.internal.swing.MigLayout.model.MigLayoutInfo;
 
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+
 /**
  * Helper for displaying grid for {@link MigLayoutInfo}.
  *
diff --git a/org.eclipse.wb.swing/META-INF/MANIFEST.MF b/org.eclipse.wb.swing/META-INF/MANIFEST.MF
index ff4194306..9c6b8cde1 100644
--- a/org.eclipse.wb.swing/META-INF/MANIFEST.MF
+++ b/org.eclipse.wb.swing/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.wb.swing;singleton:=true
-Bundle-Version: 1.11.0.qualifier
+Bundle-Version: 1.12.0.qualifier
 Bundle-ClassPath: .
 Bundle-Activator: org.eclipse.wb.internal.swing.Activator
 Bundle-Vendor: %providerName
diff --git a/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/layout/gbl/GridHelper.java b/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/layout/gbl/GridHelper.java
index 916759d11..922dfc08b 100644
--- a/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/layout/gbl/GridHelper.java
+++ b/org.eclipse.wb.swing/src/org/eclipse/wb/internal/swing/gef/policy/layout/gbl/GridHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011 Google, Inc.
+ * Copyright (c) 2011, 2026 Google, Inc. and others.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
@@ -14,9 +14,10 @@
 
 import org.eclipse.wb.core.gef.policy.layout.grid.AbstractGridHelper;
 import org.eclipse.wb.core.gef.policy.layout.grid.IGridInfo;
-import org.eclipse.wb.gef.graphical.policies.GraphicalEditPolicy;
 import org.eclipse.wb.internal.swing.model.layout.gbl.AbstractGridBagLayoutInfo;
 
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+
 /**
  * Helper for displaying grid for {@link AbstractGridBagLayoutInfo}.
  *
diff --git a/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/layout/grid/GridHelper.java b/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/layout/grid/GridHelper.java
index cfdad5ec9..8c29e2b07 100644
--- a/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/layout/grid/GridHelper.java
+++ b/org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/gef/policy/layout/grid/GridHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011 Google, Inc.
+ * Copyright (c) 2011, 2026 Google, Inc. and others.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License 2.0 which is available at
@@ -14,9 +14,10 @@
 
 import org.eclipse.wb.core.gef.policy.layout.grid.AbstractGridHelper;
 import org.eclipse.wb.core.gef.policy.layout.grid.IGridInfo;
-import org.eclipse.wb.gef.graphical.policies.GraphicalEditPolicy;
 import org.eclipse.wb.internal.swt.model.layout.grid.IGridLayoutInfo;
 
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+
 /**
  * Helper for displaying grid for {@link IGridLayoutInfo}.
  *
