Skip to content

Commit 68255e3

Browse files
committed
Remove unused and deprecated IHelp internal code
Even the deprecated API used can be removed now as it's notice period passed.
1 parent 6361505 commit 68255e3

File tree

1 file changed

+1
-145
lines changed

1 file changed

+1
-145
lines changed

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java

Lines changed: 1 addition & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2004, 2016 IBM Corporation and others.
2+
* Copyright (c) 2004, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -27,9 +27,7 @@
2727
import org.eclipse.help.HelpSystem;
2828
import org.eclipse.help.IContext;
2929
import org.eclipse.help.IContext2;
30-
import org.eclipse.help.IHelp;
3130
import org.eclipse.help.IHelpResource;
32-
import org.eclipse.help.IToc;
3331
import org.eclipse.jface.action.IAction;
3432
import org.eclipse.jface.action.LegacyActionTools;
3533
import org.eclipse.swt.custom.BusyIndicator;
@@ -173,7 +171,6 @@ public void removeExtension(IExtension source, Object[] objects) {
173171
if (object == pluggableHelpUI) {
174172
isInitialized = false;
175173
pluggableHelpUI = null;
176-
helpCompatibilityWrapper = null;
177174
// remove ourselves - we'll be added again in initalize if
178175
// needed
179176
PlatformUI.getWorkbench().getExtensionTracker().unregisterHandler(handler);
@@ -182,121 +179,6 @@ public void removeExtension(IExtension source, Object[] objects) {
182179
}
183180
};
184181

185-
/**
186-
* Compatibility implementation of old IHelp interface.
187-
* WorkbenchHelp.getHelpSupport and IHelp were deprecated in 3.0.
188-
*/
189-
private class CompatibilityIHelpImplementation implements IHelp {
190-
191-
/** @deprecated */
192-
@Deprecated
193-
@Override
194-
public void displayHelp() {
195-
// real method - forward to help UI if available
196-
AbstractHelpUI helpUI = getHelpUI();
197-
if (helpUI != null) {
198-
helpUI.displayHelp();
199-
}
200-
}
201-
202-
/** @deprecated */
203-
@Deprecated
204-
@Override
205-
public void displayContext(IContext context, int x, int y) {
206-
// real method - forward to help UI if available
207-
AbstractHelpUI helpUI = getHelpUI();
208-
if (helpUI != null) {
209-
helpUI.displayContext(context, x, y);
210-
}
211-
}
212-
213-
/** @deprecated */
214-
@Deprecated
215-
@Override
216-
public void displayContext(String contextId, int x, int y) {
217-
// convenience method - funnel through the real method
218-
IContext context = HelpSystem.getContext(contextId);
219-
if (context != null) {
220-
displayContext(context, x, y);
221-
}
222-
}
223-
224-
/** @deprecated */
225-
@Deprecated
226-
@Override
227-
public void displayHelpResource(String href) {
228-
// real method - forward to help UI if available
229-
AbstractHelpUI helpUI = getHelpUI();
230-
if (helpUI != null) {
231-
helpUI.displayHelpResource(href);
232-
}
233-
}
234-
235-
/** @deprecated */
236-
@Deprecated
237-
@Override
238-
public void displayHelpResource(IHelpResource helpResource) {
239-
// convenience method - funnel through the real method
240-
displayHelpResource(helpResource.getHref());
241-
}
242-
243-
/** @deprecated */
244-
@Deprecated
245-
@Override
246-
public void displayHelp(String toc) {
247-
// deprecated method - funnel through the real method
248-
displayHelpResource(toc);
249-
}
250-
251-
/** @deprecated */
252-
@Deprecated
253-
@Override
254-
public void displayHelp(String toc, String selectedTopic) {
255-
// deprecated method - funnel through the real method
256-
displayHelpResource(selectedTopic);
257-
}
258-
259-
/** @deprecated */
260-
@Deprecated
261-
@Override
262-
public void displayHelp(String contextId, int x, int y) {
263-
// deprecated method - funnel through the real method
264-
displayContext(contextId, x, y);
265-
}
266-
267-
/** @deprecated */
268-
@Deprecated
269-
@Override
270-
public void displayHelp(IContext context, int x, int y) {
271-
// deprecated method - funnel through the real method
272-
displayContext(context, x, y);
273-
}
274-
275-
/** @deprecated */
276-
@Deprecated
277-
@Override
278-
public IContext getContext(String contextId) {
279-
// non-UI method - forward to HelpSystem
280-
return HelpSystem.getContext(contextId);
281-
}
282-
283-
/** @deprecated */
284-
@Deprecated
285-
@Override
286-
public IToc[] getTocs() {
287-
// non-UI method - forward to HelpSystem
288-
return HelpSystem.getTocs();
289-
}
290-
291-
/** @deprecated */
292-
@Deprecated
293-
@Override
294-
public boolean isContextHelpDisplayed() {
295-
// real method - forward to pluggedhelp UI
296-
return WorkbenchHelpSystem.this.isContextHelpDisplayed();
297-
}
298-
}
299-
300182
/**
301183
* A wrapper for action help context that passes the action text to be used as a
302184
* title.
@@ -350,12 +232,6 @@ public String getText() {
350232
}
351233
}
352234

353-
/**
354-
* Compatibility wrapper, or <code>null</code> if none. Do not access directly;
355-
* see getHelpSupport().
356-
*/
357-
private IHelp helpCompatibilityWrapper = null;
358-
359235
/**
360236
* The listener to attach to various widgets.
361237
*/
@@ -414,7 +290,6 @@ public static void disposeIfNecessary() {
414290
*/
415291
public void dispose() {
416292
pluggableHelpUI = null;
417-
helpCompatibilityWrapper = null;
418293
isInitialized = false;
419294
PlatformUI.getWorkbench().getExtensionTracker().unregisterHandler(handler);
420295
}
@@ -541,25 +416,6 @@ private HelpListener getHelpListener() {
541416
return helpListener;
542417
}
543418

544-
/**
545-
* Returns the help support system for the platform, if available.
546-
*
547-
* @return the help support system, or <code>null</code> if none
548-
* @deprecated Use the static methods on this class and on
549-
* {@link org.eclipse.help.HelpSystem HelpSystem}instead of the
550-
* IHelp methods on the object returned by this method.
551-
*/
552-
@Deprecated(forRemoval = true, since = "2023-12")
553-
public IHelp getHelpSupport() {
554-
AbstractHelpUI helpUI = getHelpUI();
555-
if (helpUI != null && helpCompatibilityWrapper == null) {
556-
// create instance only once, and only if needed
557-
helpCompatibilityWrapper = new CompatibilityIHelpImplementation();
558-
}
559-
return helpCompatibilityWrapper;
560-
561-
}
562-
563419
/**
564420
* Sets the given help contexts on the given action.
565421
* <p>

0 commit comments

Comments
 (0)