Skip to content

Commit efb1ee1

Browse files
ptzieglerazoitl
authored andcommitted
Mark several deprecated Draw2D fields and methods as "for removal"
A lot of those elements have been marked as deprecated since forever, with replacements being available. By marking them for removal, we are able to remove/internalize them after 2027.
1 parent ed40940 commit efb1ee1

File tree

7 files changed

+81
-58
lines changed

7 files changed

+81
-58
lines changed

org.eclipse.draw2d/src/org/eclipse/draw2d/Figure.java

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,33 +100,38 @@ public class Figure implements IFigure {
100100
protected Dimension maxSize;
101101

102102
/**
103-
* @deprecated access using {@link #getLocalFont()}
103+
* @deprecated access using {@link #getLocalFont()}. This field will be made
104+
* private after the 2027-09 release.
104105
*/
105-
@Deprecated
106+
@Deprecated(forRemoval = true, since = "2025-09")
106107
protected Font font;
107108

108109
/**
109-
* @deprecated access using {@link #getLocalBackgroundColor()}.
110+
* @deprecated access using {@link #getLocalBackgroundColor()}. This field will
111+
* be made private after the 2027-09 release.
110112
*/
111-
@Deprecated
113+
@Deprecated(forRemoval = true, since = "2025-09")
112114
protected Color bgColor;
113115

114116
/**
115-
* @deprecated access using {@link #getLocalForegroundColor()}.
117+
* @deprecated access using {@link #getLocalForegroundColor()}. This field will
118+
* be made private after the 2027-09 release.
116119
*/
117-
@Deprecated
120+
@Deprecated(forRemoval = true, since = "2025-09")
118121
protected Color fgColor;
119122

120123
/**
121-
* @deprecated access using {@link #getBorder()}
124+
* @deprecated access using {@link #getBorder()} This field will be made private
125+
* after the 2027-09 release.
122126
*/
123-
@Deprecated
127+
@Deprecated(forRemoval = true, since = "2025-09")
124128
protected Border border;
125129

126130
/**
127-
* @deprecated access using {@link #getToolTip()}
131+
* @deprecated access using {@link #getToolTip()} This field will be made
132+
* private after the 2027-09 release.
128133
*/
129-
@Deprecated
134+
@Deprecated(forRemoval = true, since = "2025-09")
130135
protected IFigure toolTip;
131136

132137
private AncestorHelper ancestorHelper;
@@ -2201,9 +2206,10 @@ public void setConstraint(IFigure child, Object constraint) {
22012206
/**
22022207
* Iterates over a Figure's children in reverse order.
22032208
*
2204-
* @deprecated use ReverseFigureChildrenIterator instead
2209+
* @deprecated use ReverseFigureChildrenIterator instead. This class will be
2210+
* removed after the 2027-09 release.
22052211
*/
2206-
@Deprecated
2212+
@Deprecated(forRemoval = true, since = "2025-09")
22072213
public static class FigureIterator {
22082214
private final List<? extends IFigure> list;
22092215
private int index;

org.eclipse.draw2d/src/org/eclipse/draw2d/FlowLayout.java

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2024 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation 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
@@ -42,17 +42,19 @@ protected class WorkingData {
4242
/**
4343
* Constant to specify components to be aligned on the left/top
4444
*
45-
* @deprecated Use {@link OrderedLayout#ALIGN_TOPLEFT} instead.
45+
* @deprecated Use {@link OrderedLayout#ALIGN_TOPLEFT} instead. This field will
46+
* be removed after the 2027-09 release.
4647
*/
47-
@Deprecated
48+
@Deprecated(forRemoval = true, since = "2025-09")
4849
public static final int ALIGN_LEFTTOP = ALIGN_TOPLEFT;
4950

5051
/**
5152
* Constant to specify components to be aligned on the right/bottom
5253
*
53-
* @deprecated Use {@link OrderedLayout#ALIGN_BOTTOMRIGHT} instead.
54+
* @deprecated Use {@link OrderedLayout#ALIGN_BOTTOMRIGHT} instead. This field
55+
* will be removed after the 2027-09 release.
5456
*/
55-
@Deprecated
57+
@Deprecated(forRemoval = true, since = "2025-09")
5658
public static final int ALIGN_RIGHTBOTTOM = ALIGN_BOTTOMRIGHT;
5759

5860
protected WorkingData data = null;
@@ -62,36 +64,40 @@ protected class WorkingData {
6264
* row/column should be filled by the last item in that row/column.
6365
*
6466
* @deprecated Use {@link OrderedLayout#setStretchMinorAxis(boolean)} and
65-
* {@link OrderedLayout#isStretchMinorAxis()} instead.
67+
* {@link OrderedLayout#isStretchMinorAxis()} instead. This field
68+
* will be made private after the 2027-09 release.
6669
*/
67-
@Deprecated
70+
@Deprecated(forRemoval = true, since = "2025-09")
6871
protected boolean fill;
6972

7073
/**
7174
* The alignment along the major axis.
7275
*
7376
* @deprecated Use {@link #getMajorAlignment()} and
74-
* {@link #setMajorAlignment(int)} instead.
77+
* {@link #setMajorAlignment(int)} instead. This field will be made
78+
* private after the 2027-09 release.
7579
*/
76-
@Deprecated
80+
@Deprecated(forRemoval = true, since = "2025-09")
7781
protected int majorAlignment = ALIGN_TOPLEFT;
7882

7983
/**
8084
* The spacing along the major axis.
8185
*
8286
* @deprecated Use {@link #getMajorSpacing()} and {@link #setMajorSpacing(int)}
83-
* instead.
87+
* instead. This field will be made private after the 2027-09
88+
* release.
8489
*/
85-
@Deprecated
90+
@Deprecated(forRemoval = true, since = "2025-09")
8691
protected int majorSpacing = 5;
8792

8893
/**
8994
* The spacing along the minor axis.
9095
*
9196
* @deprecated Use {@link #getMinorSpacing()} and {@link #setMinorSpacing(int)}
92-
* instead.
97+
* instead. This field will be made private after the 2027-09
98+
* release.
9399
*/
94-
@Deprecated
100+
@Deprecated(forRemoval = true, since = "2025-09")
95101
protected int minorSpacing = 5;
96102

97103
/**

org.eclipse.draw2d/src/org/eclipse/draw2d/LayeredPane.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2010 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation 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
@@ -130,11 +130,12 @@ public void removeLayer(Object key) {
130130
/**
131131
* Removes the given layer from this layered pane.
132132
*
133-
* @deprecated call {@link IFigure#remove(IFigure)} instead
133+
* @deprecated call {@link IFigure#remove(IFigure)} instead. This method will be
134+
* removed after the 2027-09 release.
134135
* @param layer the layer to be removed
135136
* @since 2.0
136137
*/
137-
@Deprecated
138+
@Deprecated(forRemoval = true, since = "2025-09")
138139
public void removeLayer(IFigure layer) {
139140
remove(layer);
140141
}

org.eclipse.draw2d/src/org/eclipse/draw2d/OrderedLayout.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2024 IBM Corporation and others.
2+
* Copyright (c) 2011, 2025 IBM Corporation 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
@@ -34,35 +34,37 @@ public abstract class OrderedLayout extends AbstractHintLayout {
3434
* Constant to specify components should be layed out horizontally
3535
*
3636
* @deprecated Pulled up from derived layout manager and deprecated here because
37-
* unused.
37+
* unused. This field will be removed after the 2027-09 release.
3838
*/
39-
@Deprecated
39+
@Deprecated(forRemoval = true, since = "2025-09")
4040
public static final boolean HORIZONTAL = true;
4141
/**
4242
* Constant to specify components should be layed out vertically
4343
*
4444
* @deprecated Pulled up from derived layout manager and deprecated here because
45-
* unused.
45+
* unused. This field will be removed after the 2027-09 release.
4646
*/
47-
@Deprecated
47+
@Deprecated(forRemoval = true, since = "2025-09")
4848
public static final boolean VERTICAL = false;
4949

5050
/**
5151
* The horizontal property.
5252
*
5353
* @deprecated Use {@link #setHorizontal(boolean)} and {@link #isHorizontal()}
54-
* instead.
54+
* instead. This field will be made private after the 2027-09
55+
* release.
5556
*/
56-
@Deprecated
57+
@Deprecated(forRemoval = true, since = "2025-09")
5758
protected boolean horizontal;
5859

5960
/**
6061
* The alignment along the minor axis.
6162
*
6263
* @deprecated Use {@link #getMinorAlignment()} and
63-
* {@link #setMinorAlignment(int)} instead.
64+
* {@link #setMinorAlignment(int)} instead. This field will be made
65+
* private after the 2027-09 release.
6466
*/
65-
@Deprecated
67+
@Deprecated(forRemoval = true, since = "2025-09")
6668
protected int minorAlignment;
6769

6870
/**

org.eclipse.draw2d/src/org/eclipse/draw2d/SWTEventDispatcher.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ public class SWTEventDispatcher extends EventDispatcher {
3232
/**
3333
* Used to tell if any button is pressed without regard to the specific button.
3434
*
35-
* @deprecated Use {@link SWT#BUTTON_MASK} instead.
35+
* @deprecated Use {@link SWT#BUTTON_MASK} instead. This field will be removed
36+
* after the 2027-09 release.
3637
*/
37-
@Deprecated
38+
@Deprecated(forRemoval = true, since = "2025-09")
3839
protected static final int ANY_BUTTON = SWT.BUTTON_MASK;
3940

4041
private boolean figureTraverse = true;

org.eclipse.draw2d/src/org/eclipse/draw2d/Shape.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2010 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation 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
@@ -28,9 +28,10 @@ public abstract class Shape extends Figure {
2828
* The width of this shape's outline.
2929
*
3030
* @deprecated Use {@link #setLineWidth(int)} or
31-
* {@link #setLineWidthFloat(float)} instead.
31+
* {@link #setLineWidthFloat(float)} instead. This field will be
32+
* made private with the 2027-09 release.
3233
*/
33-
@Deprecated
34+
@Deprecated(forRemoval = true, since = "2025-09")
3435
protected int lineWidth;
3536

3637
/**
@@ -47,9 +48,10 @@ public abstract class Shape extends Figure {
4748
/**
4849
* The line style to be used for this shape's outline.
4950
*
50-
* @deprecated Use {@link #setLineStyle(int)} instead.
51+
* @deprecated Use {@link #setLineStyle(int)} instead. This field will be made
52+
* private with the 2027-09 release.
5153
*/
52-
@Deprecated
54+
@Deprecated(forRemoval = true, since = "2025-09")
5355
protected int lineStyle;
5456

5557
/**

org.eclipse.draw2d/src/org/eclipse/draw2d/ToolbarLayout.java

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2024 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation 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
@@ -31,34 +31,36 @@ public class ToolbarLayout extends OrderedLayout {
3131
/**
3232
* Constant for horizontal alignment
3333
*
34-
* @deprecated Unused.
34+
* @deprecated Unused. This field will be removed after the 2027-09 release.
3535
*/
36-
@Deprecated
36+
@Deprecated(forRemoval = true, since = "2025-09")
3737
public static final boolean HORIZONTAL = true;
3838

3939
/**
4040
* Constant for vertical alignment
4141
*
42-
* @deprecated Unused.
42+
* @deprecated Unused. This field will be removed after the 2027-09 release.
4343
*/
44-
@Deprecated
44+
@Deprecated(forRemoval = true, since = "2025-09")
4545
public static final boolean VERTICAL = false;
4646

4747
/**
4848
* Sets whether children should "stretch" with their container
4949
*
5050
* @deprecated Use {@link OrderedLayout#setStretchMinorAxis(boolean)} and
51-
* {@link OrderedLayout#isStretchMinorAxis()} instead.
51+
* {@link OrderedLayout#isStretchMinorAxis()} instead. This field
52+
* will be made private after the 2027-09 release.
5253
*/
53-
@Deprecated
54+
@Deprecated(forRemoval = true, since = "2025-09")
5455
protected boolean matchWidth;
5556

5657
/**
5758
* Space in pixels between Figures
5859
*
5960
* @deprecated Use {@link #getSpacing()} and {@link #setSpacing(int)} instead.
61+
* This field will be made private after the 2027-09 release.
6062
*/
61-
@Deprecated
63+
@Deprecated(forRemoval = true, since = "2025-09")
6264
protected int spacing;
6365

6466
/**
@@ -252,9 +254,10 @@ protected boolean isSensitiveVertically(IFigure parent) {
252254
* value is false.
253255
*
254256
* @return <code>true</code> if stretch minor axis is enabled
255-
* @deprecated Use {@link #isStretchMinorAxis()} instead.
257+
* @deprecated Use {@link #isStretchMinorAxis()} instead. This method will be
258+
* removed after the 2027-09 release.
256259
*/
257-
@Deprecated
260+
@Deprecated(forRemoval = true, since = "2025-09")
258261
public boolean getStretchMinorAxis() {
259262
return isStretchMinorAxis();
260263
}
@@ -387,11 +390,12 @@ public void layout(IFigure parent) {
387390
* Sets children's width (if vertically oriented) or height (if horizontally
388391
* oriented) to stretch with their container.
389392
*
390-
* @deprecated use {@link #setStretchMinorAxis(boolean)}
393+
* @deprecated use {@link #setStretchMinorAxis(boolean)}. This method will be
394+
* removed after the 2027-09 release.
391395
* @param match whether to stretch children
392396
* @since 2.0
393397
*/
394-
@Deprecated
398+
@Deprecated(forRemoval = true, since = "2025-09")
395399
public void setMatchWidth(boolean match) {
396400
matchWidth = match;
397401
}
@@ -423,9 +427,10 @@ public void setStretchMinorAxis(boolean value) {
423427
* @param flag whether the orientation should be vertical
424428
* @since 2.0
425429
* @deprecated Use {@link #setHorizontal(boolean)} with argument
426-
* <code>false</code> instead.
430+
* <code>false</code> instead. This method will be removed after the
431+
* 2027-09 release.
427432
*/
428-
@Deprecated
433+
@Deprecated(forRemoval = true, since = "2025-09")
429434
public void setVertical(boolean flag) {
430435
setHorizontal(!flag);
431436
}

0 commit comments

Comments
 (0)