From 59a97e91d04223978575d68fba1201fc9f9722c5 Mon Sep 17 00:00:00 2001 From: Eclipse Platform Bot Date: Tue, 4 Nov 2025 03:43:33 +0000 Subject: [PATCH] Perform clean code of bundles/org.eclipse.jface --- .../eclipse/jface/fieldassist/DecoratedField.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/DecoratedField.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/DecoratedField.java index 6c27b3aca79..0b3bfc2ac38 100644 --- a/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/DecoratedField.java +++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/DecoratedField.java @@ -181,27 +181,32 @@ class Hover { /** * This info hover's shell. */ + @Deprecated Shell hoverShell; /** * The info hover text. */ + @Deprecated String text = EMPTY; /** * The region used to manage the shell shape */ + @Deprecated Region region; /** * Boolean indicating whether the last computed polygon location had an * arrow on left. (true if left, false if right). */ + @Deprecated boolean arrowOnLeft = true; /* * Create a hover parented by the specified shell. */ + @Deprecated Hover(Shell parent) { final Display display = parent.getDisplay(); hoverShell = new Shell(parent, SWT.NO_TRIM | SWT.ON_TOP @@ -229,6 +234,7 @@ public void mouseDown(MouseEvent e) { * border is true, compute the polygon inset by 1-pixel border. Consult * the arrowOnLeft flag to determine which side the arrow is on. */ + @Deprecated int[] getPolygon(boolean border) { Point e = getExtent(); int b = border ? 1 : 0; @@ -246,6 +252,7 @@ int[] getPolygon(boolean border) { * Dispose the hover, it is no longer needed. Dispose any resources * allocated by the hover. */ + @Deprecated void dispose() { if (!hoverShell.isDisposed()) { hoverShell.dispose(); @@ -258,6 +265,7 @@ void dispose() { /* * Set the visibility of the hover. */ + @Deprecated void setVisible(boolean visible) { if (visible) { if (!hoverShell.isVisible()) { @@ -273,6 +281,7 @@ void setVisible(boolean visible) { * and location of the hover to hover near the specified control, * pointing the arrow toward the target control. */ + @Deprecated void setText(String t, Control hoverNear, Control targetControl) { if (t == null) { t = EMPTY; @@ -304,6 +313,7 @@ void setText(String t, Control hoverNear, Control targetControl) { /* * Return whether or not the hover (shell) is visible. */ + @Deprecated boolean isVisible() { return hoverShell.isVisible(); } @@ -311,6 +321,7 @@ boolean isVisible() { /* * Compute the extent of the hover for the current text. */ + @Deprecated Point getExtent() { GC gc = new GC(hoverShell); Point e = gc.textExtent(text); @@ -323,6 +334,7 @@ Point getExtent() { /* * Compute a new shape for the hover shell. */ + @Deprecated void setNewShape() { Region oldRegion = region; region = new Region();