# Class DefaultHelpUI

java.lang.Object
org.eclipse.ui.help.AbstractHelpUI
org.eclipse.help.ui.internal.DefaultHelpUI

public class DefaultHelpUI extends AbstractHelpUI
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

Constructors
Constructor
Description
`DefaultHelpUI()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`displayContext(IContext context, int x, int y)`
Displays context-sensitive help for specified context
`void`
`displayDynamicHelp()`
Displays dynamic help.
`void`
`displayHelp()`
Displays help.
`void`
`displayHelpResource(String href)`
Displays a help resource specified as a url.
`void`
`displaySearch()`
Displays search.
`static DefaultHelpUI`
`getInstance()`
`boolean`
`isContextHelpDisplayed()`
Returns `true` if the context-sensitive help window is currently being displayed, `false` if not.
`static boolean`
`isDisplayModal(Shell activeShell)`
`static boolean`
`isOpeningHelpView()`
`URL`
`resolve(String href, boolean documentOnly)`
Resolves the help resource href according to the help system implementation.
`void`
`search(String expression)`
Starts the search.
`static void`
`showIndex()`
`static boolean`
`showInWorkbenchBrowser(String url, boolean onlyInternal)`
`String`
`unresolve(URL url)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DefaultHelpUI

public DefaultHelpUI()
Constructor.

## Method Details

### getInstance

public static DefaultHelpUI getInstance()

### displayHelp

public void displayHelp()
Displays help.

Specified by:
  `displayHelp` in class `AbstractHelpUI`

### displaySearch

public void displaySearch()
Displays search.

Overrides:
  `displaySearch` in class `AbstractHelpUI`

### displayDynamicHelp

public void displayDynamicHelp()
Displays dynamic help.

Overrides:
  `displayDynamicHelp` in class `AbstractHelpUI`

### search

public void search(String expression)
Starts the search.

Overrides:
  `search` in class `AbstractHelpUI`
Parameters:
  `expression` - the search expression

### showIndex

public static void showIndex()

### displayHelpResource

public void displayHelpResource(String href)
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 class `AbstractHelpUI`
Parameters:
  `href` - the URL of the help resource.

  Valid href are as described in `IHelpResource.getHref()`

### displayContext

public void displayContext(IContext context, int x, int y)
Displays context-sensitive help for specified context

Specified by:
  `displayContext` in class `AbstractHelpUI`
Parameters:
  `context` - the context to display
  `x` - int positioning information
  `y` - int positioning information

### resolve

public URL resolve(String href, boolean documentOnly)
Description copied from class: `AbstractHelpUI`
Resolves the help resource href according to the help system implementation.

Overrides:
  `resolve` in class `AbstractHelpUI`
Parameters:
  `href` - the help resource
  `documentOnly` - if `true`, 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

public String unresolve(URL url)

### isContextHelpDisplayed

public boolean isContextHelpDisplayed()
Returns `true` if the context-sensitive help window is currently being displayed, `false` if not.

Specified by:
  `isContextHelpDisplayed` in class `AbstractHelpUI`
Returns:
  `true` if the context-sensitive help window is currently being displayed, `false` if not

### isDisplayModal

public static boolean isDisplayModal(Shell activeShell)

### showInWorkbenchBrowser

public static boolean showInWorkbenchBrowser(String url, boolean onlyInternal)

### isOpeningHelpView

public static boolean isOpeningHelpView()