Package org.eclipse.help.ui.internal
Class DefaultHelpUI
java.lang.Object
org.eclipse.ui.help.AbstractHelpUI
org.eclipse.help.ui.internal.DefaultHelpUI
This class is an implementation of the Help UI. In is registered into the helpSupport extension
point, and is responsible for handling requests to display help. The methods on this class
interact with the actual UI component handling the display.
Most methods delegate most work to HelpDisplay class; only the UI specific ones implemented in place.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
displayContext
(IContext context, int x, int y) Displays context-sensitive help for specified contextvoid
Displays dynamic help.void
Displays help.void
displayHelpResource
(String href) Displays a help resource specified as a url.void
Displays search.static DefaultHelpUI
boolean
Returnstrue
if the context-sensitive help window is currently being displayed,false
if not.static boolean
isDisplayModal
(Shell activeShell) static boolean
Resolves the help resource href according to the help system implementation.void
Starts the search.static void
static boolean
showInWorkbenchBrowser
(String url, boolean onlyInternal)
-
Constructor Details
-
DefaultHelpUI
public DefaultHelpUI()Constructor.
-
-
Method Details
-
getInstance
-
displayHelp
public void displayHelp()Displays help.- Specified by:
displayHelp
in classAbstractHelpUI
-
displaySearch
public void displaySearch()Displays search.- Overrides:
displaySearch
in classAbstractHelpUI
-
displayDynamicHelp
public void displayDynamicHelp()Displays dynamic help.- Overrides:
displayDynamicHelp
in classAbstractHelpUI
-
search
Starts the search.- Overrides:
search
in classAbstractHelpUI
- Parameters:
expression
- the search expression
-
showIndex
public static void showIndex() -
displayHelpResource
Displays a help resource specified as a url.- a URL in a format that can be returned by
IHelpResource.getHref()
- a URL query in the format format key=value&key=value ... The valid keys are: "tab", "toc", "topic", "contextId". For example, toc="/myplugin/mytoc.xml"&topic="/myplugin/references/myclass.html" is valid.
- Specified by:
displayHelpResource
in classAbstractHelpUI
- Parameters:
href
- the URL of the help resource.Valid href are as described in
IHelpResource.getHref()
- a URL in a format that can be returned by
-
displayContext
Displays context-sensitive help for specified context- Specified by:
displayContext
in classAbstractHelpUI
- Parameters:
context
- the context to displayx
- int positioning informationy
- int positioning information
-
resolve
Description copied from class:AbstractHelpUI
Resolves the help resource href according to the help system implementation.- Overrides:
resolve
in classAbstractHelpUI
- Parameters:
href
- the help resourcedocumentOnly
- iftrue
, the resulting URL must point at the document referenced by href. Otherwise, it can be a URL that contains additional elements like navigation that the help system adds to the document.- Returns:
- the fully resolved URL of the help resource or
null
if not supported. Help systems that use application servers typically return URLs with http: protocol. Simple help system implementations can return URLs with file: protocol.
-
unresolve
-
isContextHelpDisplayed
public boolean isContextHelpDisplayed()Returnstrue
if the context-sensitive help window is currently being displayed,false
if not.- Specified by:
isContextHelpDisplayed
in classAbstractHelpUI
- Returns:
true
if the context-sensitive help window is currently being displayed,false
if not
-
isDisplayModal
-
showInWorkbenchBrowser
-
isOpeningHelpView
public static boolean isOpeningHelpView()
-