Skip to content

Commit c6f3515

Browse files
committed
[GEF] Use GEF EditPart interface everywhere else
In continuation of 28f2926, which now updates all imports of the WindowBuilder edit-part with an import of the GEF edit-part, with only a handful of references remaining that can't yet be adapted, as they would require an explicit type-cast.
1 parent bd9fdef commit c6f3515

File tree

114 files changed

+281
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+281
-236
lines changed

org.eclipse.wb.core.java/src/org/eclipse/wb/core/gef/policy/DirectTextPropertyEditPolicy.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2025 Google, Inc. and others.
2+
* Copyright (c) 2011, 2026 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -15,7 +15,6 @@
1515
import org.eclipse.wb.core.gef.part.AbstractComponentEditPart;
1616
import org.eclipse.wb.core.model.AbstractComponentInfo;
1717
import org.eclipse.wb.core.model.JavaInfo;
18-
import org.eclipse.wb.gef.core.EditPart;
1918
import org.eclipse.wb.gef.core.requests.KeyRequest;
2019
import org.eclipse.wb.gef.graphical.policies.DirectTextEditPolicy;
2120
import org.eclipse.wb.internal.core.model.JavaInfoUtils;
@@ -31,6 +30,7 @@
3130
import org.eclipse.draw2d.geometry.Dimension;
3231
import org.eclipse.draw2d.geometry.Point;
3332
import org.eclipse.draw2d.geometry.Rectangle;
33+
import org.eclipse.gef.EditPart;
3434
import org.eclipse.gef.EditPolicy;
3535
import org.eclipse.gef.Request;
3636
import org.eclipse.jface.preference.IPreferenceStore;
@@ -101,7 +101,7 @@ private static void installEx(EditPart editPart, AbstractComponentInfo component
101101
Property property = PropertyUtils.getByPath(component, propertyPath);
102102
if (property != null) {
103103
EditPolicy policy = new DirectTextPropertyEditPolicy(component, property);
104-
editPart.installEditPolicy(policy);
104+
editPart.installEditPolicy(policy.getClass(), policy);
105105
return;
106106
}
107107
}

org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/gef/part/AbstractWrapperEditPart.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2025 Google, Inc. and others.
2+
* Copyright (c) 2011, 2026 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -16,14 +16,14 @@
1616
import org.eclipse.wb.core.model.IWrapper;
1717
import org.eclipse.wb.core.model.IWrapperInfo;
1818
import org.eclipse.wb.draw2d.Figure;
19-
import org.eclipse.wb.gef.core.EditPart;
2019
import org.eclipse.wb.gef.graphical.GraphicalEditPart;
2120

2221
import org.eclipse.draw2d.ColorConstants;
2322
import org.eclipse.draw2d.Graphics;
2423
import org.eclipse.draw2d.IFigure;
2524
import org.eclipse.draw2d.geometry.Point;
2625
import org.eclipse.draw2d.geometry.Rectangle;
26+
import org.eclipse.gef.EditPart;
2727
import org.eclipse.gef.EditPolicy;
2828
import org.eclipse.jface.resource.ImageDescriptor;
2929
import org.eclipse.swt.graphics.Image;

org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/gef/part/nonvisual/ArrayObjectEditPart.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2025 Google, Inc. and others.
2+
* Copyright (c) 2011, 2026 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -14,11 +14,11 @@
1414

1515
import org.eclipse.wb.core.gef.policy.selection.NonResizableSelectionEditPolicy;
1616
import org.eclipse.wb.draw2d.Figure;
17-
import org.eclipse.wb.gef.core.EditPart;
1817
import org.eclipse.wb.gef.graphical.GraphicalEditPart;
1918
import org.eclipse.wb.internal.core.model.nonvisual.AbstractArrayObjectInfo;
2019

2120
import org.eclipse.draw2d.IFigure;
21+
import org.eclipse.gef.EditPart;
2222
import org.eclipse.gef.EditPolicy;
2323
/**
2424
* {@link EditPart} for <i>array objects</i> model.

org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/gef/part/nonvisual/NonVisualBeanEditPart.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2025 Google, Inc. and others.
2+
* Copyright (c) 2011, 2026 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -15,12 +15,12 @@
1515
import org.eclipse.wb.core.gef.policy.selection.NonResizableSelectionEditPolicy;
1616
import org.eclipse.wb.core.model.JavaInfo;
1717
import org.eclipse.wb.core.model.ObjectInfo;
18-
import org.eclipse.wb.gef.core.EditPart;
1918
import org.eclipse.wb.gef.graphical.GraphicalEditPart;
2019
import org.eclipse.wb.internal.core.model.nonvisual.NonVisualBeanInfo;
2120

2221
import org.eclipse.draw2d.IFigure;
23-
import org.eclipse.gef.EditPolicy;
22+
import org.eclipse.gef.EditPart;
23+
import org.eclipse.gef.EditPolicy;
2424
import org.eclipse.jface.resource.ImageDescriptor;
2525

2626
/**

org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/gef/policy/OpenListenerEditPolicy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2023 Google, Inc.
2+
* Copyright (c) 2011, 2026 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -13,13 +13,13 @@
1313
package org.eclipse.wb.internal.core.gef.policy;
1414

1515
import org.eclipse.wb.core.model.JavaInfo;
16-
import org.eclipse.wb.gef.core.EditPart;
1716
import org.eclipse.wb.gef.core.policies.EditPolicy;
1817
import org.eclipse.wb.internal.core.model.JavaInfoUtils;
1918
import org.eclipse.wb.internal.core.model.property.event.EventsProperty;
2019
import org.eclipse.wb.internal.core.utils.execution.ExecutionUtils;
2120
import org.eclipse.wb.internal.core.utils.execution.RunnableEx;
2221

22+
import org.eclipse.gef.EditPart;
2323
import org.eclipse.gef.Request;
2424
import org.eclipse.gef.RequestConstants;
2525

org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/RequestProcessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2025 Google, Inc. and others.
2+
* Copyright (c) 2011, 2026 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -14,6 +14,7 @@
1414

1515
import org.eclipse.wb.gef.core.tools.Tool;
1616

17+
import org.eclipse.gef.EditPart;
1718
import org.eclipse.gef.EditPolicy;
1819
import org.eclipse.gef.Request;
1920

org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/core/tools/DragEditPartTracker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2025 Google, Inc. and others.
2+
* Copyright (c) 2011, 2026 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -49,7 +49,7 @@ public class DragEditPartTracker extends SelectEditPartTracker {
4949
// Constructor
5050
//
5151
////////////////////////////////////////////////////////////////////////////
52-
public DragEditPartTracker(org.eclipse.wb.gef.core.EditPart sourceEditPart) {
52+
public DragEditPartTracker(EditPart sourceEditPart) {
5353
super(sourceEditPart);
5454
setDefaultCursor(SharedCursors.CURSOR_MOVE);
5555
setDisabledCursor(SharedCursors.CURSOR_NO);

org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/policies/SelectionEditPolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
import org.eclipse.wb.draw2d.FigureUtils;
1616
import org.eclipse.wb.draw2d.Layer;
17-
import org.eclipse.wb.gef.core.EditPart;
1817
import org.eclipse.wb.gef.core.IEditPartViewer;
1918
import org.eclipse.wb.gef.graphical.handles.Handle;
2019

20+
import org.eclipse.gef.EditPart;
2121
import org.eclipse.gef.EditPartListener;
2222
import org.eclipse.gef.EditPolicy;
2323
import org.eclipse.gef.LayerConstants;

org.eclipse.wb.rcp.nebula/src/org/eclipse/wb/internal/rcp/nebula/collapsiblebuttons/CollapsibleButtonDropTool.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2023 Google, Inc.
2+
* Copyright (c) 2011, 2026 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -12,11 +12,11 @@
1212
*******************************************************************************/
1313
package org.eclipse.wb.internal.rcp.nebula.collapsiblebuttons;
1414

15-
import org.eclipse.wb.gef.core.EditPart;
1615
import org.eclipse.wb.gef.core.tools.AbstractCreationTool;
1716
import org.eclipse.wb.gef.core.tools.Tool;
1817
import org.eclipse.wb.internal.swt.model.widgets.ControlInfo;
1918

19+
import org.eclipse.gef.EditPart;
2020
import org.eclipse.gef.EditPartViewer;
2121
import org.eclipse.gef.Request;
2222

@@ -43,7 +43,7 @@ protected void selectAddedObjects() {
4343
ControlInfo button = request.getButton();
4444
if (button != null) {
4545
EditPartViewer viewer = getCurrentViewer();
46-
EditPart editPart = (EditPart) viewer.getEditPartRegistry().get(button);
46+
EditPart editPart = viewer.getEditPartRegistry().get(button);
4747
if (editPart != null) {
4848
viewer.select(editPart);
4949
}

org.eclipse.wb.rcp.nebula/src/org/eclipse/wb/internal/rcp/nebula/collapsiblebuttons/CollapsibleButtonsEditPart.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011 Google, Inc.
2+
* Copyright (c) 2011, 2026 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -12,10 +12,11 @@
1212
*******************************************************************************/
1313
package org.eclipse.wb.internal.rcp.nebula.collapsiblebuttons;
1414

15-
import org.eclipse.wb.gef.core.EditPart;
1615
import org.eclipse.wb.gef.graphical.policies.TerminatorLayoutEditPolicy;
1716
import org.eclipse.wb.internal.swt.gef.part.CompositeEditPart;
1817

18+
import org.eclipse.gef.EditPart;
19+
1920
/**
2021
* {@link EditPart} for {@link CollapsibleButtonsInfo}.
2122
*

0 commit comments

Comments
 (0)