Skip to content

Commit d24da3f

Browse files
committed
[GEF] Mark our EditPart copy as for-removal
This marks our copy as "for removal" and updates all references to work on the GEF interface instead.
1 parent 7609cd4 commit d24da3f

File tree

33 files changed

+133
-77
lines changed

33 files changed

+133
-77
lines changed

org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/gef/EditPartFactory2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2024 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
@@ -47,7 +47,7 @@ private EditPartFactory2() {
4747
//
4848
////////////////////////////////////////////////////////////////////////////
4949
@Override
50-
public org.eclipse.wb.gef.core.EditPart createEditPart(EditPart context, Object model) {
50+
public EditPart createEditPart(EditPart context, Object model) {
5151
if (model == null) {
5252
return null;
5353
}

org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/gefTree/EditPartFactory2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2024 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
@@ -47,7 +47,7 @@ private EditPartFactory2() {
4747
//
4848
////////////////////////////////////////////////////////////////////////////
4949
@Override
50-
public org.eclipse.wb.gef.core.EditPart createEditPart(EditPart context, Object model) {
50+
public EditPart createEditPart(EditPart context, Object model) {
5151
if (model == null) {
5252
return null;
5353
}

org.eclipse.wb.core/.settings/.api_filters

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,40 @@
3030
</message_arguments>
3131
</filter>
3232
</resource>
33+
<resource path="src/org/eclipse/wb/core/gef/MatchingEditPartFactory.java" type="org.eclipse.wb.core.gef.MatchingEditPartFactory">
34+
<filter comment="Restructuring of internal EditPart" id="338792546">
35+
<message_arguments>
36+
<message_argument value="org.eclipse.wb.core.gef.MatchingEditPartFactory"/>
37+
<message_argument value="createEditPart(EditPart, Object)"/>
38+
</message_arguments>
39+
</filter>
40+
</resource>
41+
<resource path="src/org/eclipse/wb/core/gef/part/menu/MenuEditPartFactory.java" type="org.eclipse.wb.core.gef.part.menu.MenuEditPartFactory">
42+
<filter comment="Restructuring of internal EditPart" id="338792546">
43+
<message_arguments>
44+
<message_argument value="org.eclipse.wb.core.gef.part.menu.MenuEditPartFactory"/>
45+
<message_argument value="createMenu(Object, IMenuInfo)"/>
46+
</message_arguments>
47+
</filter>
48+
<filter comment="Restructuring of internal EditPart" id="338792546">
49+
<message_arguments>
50+
<message_argument value="org.eclipse.wb.core.gef.part.menu.MenuEditPartFactory"/>
51+
<message_argument value="createMenuItem(Object, IMenuItemInfo)"/>
52+
</message_arguments>
53+
</filter>
54+
<filter comment="Restructuring of internal EditPart" id="338792546">
55+
<message_arguments>
56+
<message_argument value="org.eclipse.wb.core.gef.part.menu.MenuEditPartFactory"/>
57+
<message_argument value="createMenuMac(Object, IMenuInfo)"/>
58+
</message_arguments>
59+
</filter>
60+
<filter comment="Restructuring of internal EditPart" id="338792546">
61+
<message_arguments>
62+
<message_argument value="org.eclipse.wb.core.gef.part.menu.MenuEditPartFactory"/>
63+
<message_argument value="createPopupMenu(Object, IMenuPopupInfo)"/>
64+
</message_arguments>
65+
</filter>
66+
</resource>
3367
<resource path="src/org/eclipse/wb/core/gef/policy/PolicyUtils.java" type="org.eclipse.wb.core.gef.policy.PolicyUtils">
3468
<filter comment="Restructuring of internal GraphicalEditPart" id="338792546">
3569
<message_arguments>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
*
2727
* @author lobas_av
2828
* @coverage gef.core
29+
* @deprecated Cast to {@link org.eclipse.gef.EditPart EditPart} directly or
30+
* extend {@link AbstractEditPart}.
2931
*/
32+
@Deprecated(forRemoval = true, since = "2026-06")
3033
public abstract class EditPart extends org.eclipse.gef.editparts.AbstractEditPart {
3134

3235
////////////////////////////////////////////////////////////////////////////

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2024 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
@@ -12,6 +12,7 @@
1212
*******************************************************************************/
1313
package org.eclipse.wb.gef.core;
1414

15+
import org.eclipse.gef.EditPart;
1516
import org.eclipse.gef.EditPartViewer;
1617

1718
/**
@@ -28,5 +29,5 @@ public interface IEditPartFactory extends org.eclipse.gef.EditPartFactory {
2829
* Creates a new {@link EditPart} given the specified <i>context</i> and <i>model</i>.
2930
*/
3031
@Override
31-
EditPart createEditPart(org.eclipse.gef.EditPart context, Object model);
32+
EditPart createEditPart(EditPart context, Object model);
3233
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2024 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
@@ -30,7 +30,7 @@ public class ParentTargetDragEditPartTracker extends DragEditPartTracker {
3030
// Constructor
3131
//
3232
////////////////////////////////////////////////////////////////////////////
33-
public ParentTargetDragEditPartTracker(org.eclipse.wb.gef.core.EditPart sourceEditPart) {
33+
public ParentTargetDragEditPartTracker(EditPart sourceEditPart) {
3434
super(sourceEditPart);
3535
}
3636

org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/graphical/GraphicalEditPart.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* @deprecated Extend {@link AbstractGraphicalEditPart} directly or cast to
3535
* {@link org.eclipse.gef.GraphicalEditPart GraphicalEditPart}.
3636
*/
37+
@SuppressWarnings("removal")
3738
@Deprecated(since = "2026-06", forRemoval = true)
3839
public abstract class GraphicalEditPart extends org.eclipse.wb.gef.core.EditPart implements org.eclipse.gef.GraphicalEditPart {
3940
private IFigure m_figure;

org.eclipse.wb.core/src-gef/org/eclipse/wb/gef/tree/TreeEditPart.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* @author lobas_av
3030
* @coverage gef.tree
3131
*/
32+
@SuppressWarnings("removal")
3233
public abstract class TreeEditPart extends org.eclipse.wb.gef.core.EditPart implements org.eclipse.gef.TreeEditPart {
3334
private TreeItem m_widget;
3435
private boolean m_expandedShouldRestore;

org.eclipse.wb.core/src/org/eclipse/wb/core/gef/MatchingEditPartFactory.java

Lines changed: 12 additions & 12 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
@@ -60,10 +60,10 @@ public MatchingEditPartFactory(List<String> modelPackages, List<String> partPack
6060
//
6161
////////////////////////////////////////////////////////////////////////////
6262
@Override
63-
public org.eclipse.wb.gef.core.EditPart createEditPart(EditPart context, Object model) {
63+
public EditPart createEditPart(EditPart context, Object model) {
6464
Class<?> modelClass = model.getClass();
6565
for (; modelClass != null; modelClass = modelClass.getSuperclass()) {
66-
org.eclipse.wb.gef.core.EditPart editPart = createEditPart(model, modelClass);
66+
EditPart editPart = createEditPart(model, modelClass);
6767
if (editPart != null) {
6868
return editPart;
6969
}
@@ -86,17 +86,17 @@ public org.eclipse.wb.gef.core.EditPart createEditPart(EditPart context, Object
8686
* @return the {@link EditPart} corresponding to <code>modelClass</code>, may be <code>null</code>
8787
* , if no match found.
8888
*/
89-
private org.eclipse.wb.gef.core.EditPart createEditPart(Object model, Class<?> modelClass) {
89+
private EditPart createEditPart(Object model, Class<?> modelClass) {
9090
// "Info" suffix
9191
{
92-
org.eclipse.wb.gef.core.EditPart editPart = createEditPart(model, modelClass, "Info");
92+
EditPart editPart = createEditPart(model, modelClass, "Info");
9393
if (editPart != null) {
9494
return editPart;
9595
}
9696
}
9797
// no suffix
9898
{
99-
org.eclipse.wb.gef.core.EditPart editPart = createEditPart(model, modelClass, "");
99+
EditPart editPart = createEditPart(model, modelClass, "");
100100
if (editPart != null) {
101101
return editPart;
102102
}
@@ -107,7 +107,7 @@ private org.eclipse.wb.gef.core.EditPart createEditPart(Object model, Class<?> m
107107
if (modelClassName.contains("$")) {
108108
modelClassName = StringUtils.remove(modelClassName, "Info");
109109
modelClassName = StringUtils.remove(modelClassName, "$");
110-
org.eclipse.wb.gef.core.EditPart editPart = createEditPart(model, modelClass, modelClassName, "");
110+
EditPart editPart = createEditPart(model, modelClass, modelClassName, "");
111111
if (editPart != null) {
112112
return editPart;
113113
}
@@ -120,15 +120,15 @@ private org.eclipse.wb.gef.core.EditPart createEditPart(Object model, Class<?> m
120120
/**
121121
* Implementation for {@link #createEditPart(Object, Class)}, with single model suffix.
122122
*/
123-
private org.eclipse.wb.gef.core.EditPart createEditPart(Object model, Class<?> modelClass, String modelSuffix) {
123+
private EditPart createEditPart(Object model, Class<?> modelClass, String modelSuffix) {
124124
String modelClassName = modelClass.getName();
125125
return createEditPart(model, modelClass, modelClassName, modelSuffix);
126126
}
127127

128128
/**
129129
* Implementation for {@link #createEditPart(Object, Class)}, with single model suffix.
130130
*/
131-
private org.eclipse.wb.gef.core.EditPart createEditPart(Object model,
131+
private EditPart createEditPart(Object model,
132132
Class<?> modelClass,
133133
String modelClassName,
134134
String modelSuffix) {
@@ -144,7 +144,7 @@ private org.eclipse.wb.gef.core.EditPart createEditPart(Object model,
144144
// create corresponding EditPart, use "EditPart" prefix
145145
{
146146
String partClassName = partPackage + componentName + "EditPart";
147-
org.eclipse.wb.gef.core.EditPart editPart = createEditPart0(model, modelClass, partClassName);
147+
EditPart editPart = createEditPart0(model, modelClass, partClassName);
148148
if (editPart != null) {
149149
return editPart;
150150
}
@@ -155,14 +155,14 @@ private org.eclipse.wb.gef.core.EditPart createEditPart(Object model,
155155
return null;
156156
}
157157

158-
private static org.eclipse.wb.gef.core.EditPart createEditPart0(Object model, Class<?> modelClass, String partClassName) {
158+
private static EditPart createEditPart0(Object model, Class<?> modelClass, String partClassName) {
159159
try {
160160
ClassLoader classLoader = modelClass.getClassLoader();
161161
Class<?> partClass = classLoader.loadClass(partClassName);
162162
// try all constructors
163163
for (Constructor<?> constructor : partClass.getConstructors()) {
164164
try {
165-
return (org.eclipse.wb.gef.core.EditPart) constructor.newInstance(model);
165+
return (EditPart) constructor.newInstance(model);
166166
} catch (Throwable e) {
167167
// ignore
168168
}

org.eclipse.wb.core/src/org/eclipse/wb/core/gef/part/menu/MenuEditPartFactory.java

Lines changed: 7 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,7 +12,6 @@
1212
*******************************************************************************/
1313
package org.eclipse.wb.core.gef.part.menu;
1414

15-
import org.eclipse.wb.gef.core.EditPart;
1615
import org.eclipse.wb.internal.core.gef.part.menu.MacMenuEditPart;
1716
import org.eclipse.wb.internal.core.gef.part.menu.MenuEditPart;
1817
import org.eclipse.wb.internal.core.gef.part.menu.MenuItemEditPart;
@@ -21,6 +20,8 @@
2120
import org.eclipse.wb.internal.core.model.menu.IMenuItemInfo;
2221
import org.eclipse.wb.internal.core.model.menu.IMenuPopupInfo;
2322

23+
import org.eclipse.gef.EditPart;
24+
2425
/**
2526
* Factory for "menu" {@link EditPart}s.
2627
*
@@ -30,27 +31,31 @@
3031
public final class MenuEditPartFactory {
3132
/**
3233
* @return the {@link EditPart} for {@link IMenuInfo}.
34+
* @since 1.24
3335
*/
3436
public static EditPart createPopupMenu(Object toolkitModel, IMenuPopupInfo popup) {
3537
return new MenuPopupEditPart(toolkitModel, popup);
3638
}
3739

3840
/**
3941
* @return the {@link EditPart} for {@link IMenuInfo}.
42+
* @since 1.24
4043
*/
4144
public static EditPart createMenu(Object toolkitModel, IMenuInfo menu) {
4245
return new MenuEditPart(toolkitModel, menu);
4346
}
4447

4548
/**
4649
* @return the {@link EditPart} for {@link IMenuInfo}, used on Mac.
50+
* @since 1.24
4751
*/
4852
public static EditPart createMenuMac(Object toolkitModel, IMenuInfo menu) {
4953
return new MacMenuEditPart(toolkitModel, menu);
5054
}
5155

5256
/**
5357
* @return the {@link EditPart} for {@link IMenuItemInfo}.
58+
* @since 1.24
5459
*/
5560
public static EditPart createMenuItem(Object toolkitModel, IMenuItemInfo item) {
5661
return new MenuItemEditPart(toolkitModel, item);

0 commit comments

Comments
 (0)