Skip to content

Commit 0fd8816

Browse files
committed
Add deprecation annotations to members of deprecated classes
Fixes new warnings due to https://eclipse.dev/eclipse/markdown/?f=news/4.38/jdt.md#changes-concerning-deprecation-warnings
1 parent 2df129f commit 0fd8816

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TypedListener.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class TypedListener implements Listener {
4848
/**
4949
* The receiver's event listener
5050
*/
51+
@Deprecated(forRemoval = true, since = "3.129.0 (removal in 2027-03 or later)")
5152
protected EventListener eventListener;
5253

5354
/**
@@ -82,6 +83,7 @@ public TypedListener (SWTEventListener listener) {
8283
* @noreference This method is not intended to be referenced by clients.
8384
*/
8485

86+
@Deprecated(forRemoval = true, since = "3.129.0 (removal in 2027-03 or later)")
8587
public TypedListener (EventListener listener) {
8688
eventListener = listener;
8789
}
@@ -99,6 +101,7 @@ public TypedListener (EventListener listener) {
99101
*
100102
* @noreference This method is not intended to be referenced by clients.
101103
*/
104+
@Deprecated(forRemoval = true, since = "3.129.0 (removal in 2027-03 or later)")
102105
public EventListener getEventListener () {
103106
// At the moment all typed listeners implement SWTEventListener but that interface is intended to be removed in the future and then they will only implement EventListener.
104107
// This method should not be called for typed listeners listeners that only implement EventListener.
@@ -119,6 +122,7 @@ public EventListener getEventListener () {
119122
*
120123
* @noreference This method is not intended to be referenced by clients.
121124
*/
125+
@Deprecated(forRemoval = true, since = "3.129.0 (removal in 2027-03 or later)")
122126
@Override
123127
public void handleEvent (Event e) {
124128
switch (e.type) {

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/LegacySWTFontRegistry.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ final class LegacySWTFontRegistry implements SWTFontRegistry {
3737
private Map<FontData, Font> fontsMap = new HashMap<>();
3838
private Device device;
3939

40+
@Deprecated(forRemoval= true, since= "2025-09")
4041
LegacySWTFontRegistry(Device device) {
4142
this.device = device;
4243
}
4344

45+
@Deprecated(forRemoval= true, since= "2025-09")
4446
@Override
4547
public Font getSystemFont(int zoom) {
4648
if (fontsMap.containsKey(KEY_SYSTEM_FONTS)) {
@@ -61,6 +63,7 @@ public Font getSystemFont(int zoom) {
6163
return font;
6264
}
6365

66+
@Deprecated(forRemoval= true, since= "2025-09")
6467
@Override
6568
public Font getFont(FontData fontData, int zoom) {
6669
if (fontsMap.containsKey(fontData)) {
@@ -77,6 +80,7 @@ public Font getFont(FontData fontData, int zoom) {
7780
return font;
7881
}
7982

83+
@Deprecated(forRemoval= true, since= "2025-09")
8084
@Override
8185
public Font getFont(long fontHandle, int zoom) {
8286
return Font.win32_new(device, fontHandle, zoom);
@@ -88,6 +92,7 @@ private Font registerFont(FontData fontData, Font font) {
8892
return font;
8993
}
9094

95+
@Deprecated(forRemoval= true, since= "2025-09")
9196
@Override
9297
public void dispose() {
9398
for (Font font : fontsMap.values()) {

0 commit comments

Comments
 (0)