Web browser support. This class allows you to open URLs using internal or
external Web browsers. Implementers may provide varying levels of support.
The most rudimentary support that must be provided is to open URLs in an
external web browser window. Everything else is a hint that browser support
implementation may choose to honor but is not required (although a good
implementation should aspire to support all the styles if possible on the
given platform).
The support has a two-phase approach to opening URLs. A browser instance is
created first, then openURL is called on it. This provides for
browser instance reuse for as long as needed. The step of creating the
browser instance encourages reuse itself by not creating new instances of
browsers if one with the same id is already open. It also makes it possible
to reuse browser instances restored after workbench is restarted.
The simplest way to open a URL is:
IWorkbenchSupport.createBrowser("myId").openURL(url);
The call above will show the provided URL by reusing the browser instance
with the matching id, or creating a new one if one does not exist already.
When more advanced control over the behavior of a browser instance is
required, it is recommended to create the instance first, then reuse it as
needed.
This interface is not intended to be implemented by clients.
See Also: IWebBrowser since: 3.1 |