Community
Participate
Working Groups
Michael, Tim, I know it is a bit late but I have a use case in Help where I need to know if the browser support can show documents 'in place' i.e. using internal browser widget. If true, I would ask the editor to show the document in place, otherwise I would go to Help and ask to show the document in a separate help window. The use case here is that I don't want to use external browser support for help documents because users would loose the context. In the workbench window, it makes sense to show the document only because the context (search results, All Topics, Related Topics etc.) is also visible next to it. In order to do this, I need to be able to ask IWorkbenchBrowserSupport if internal browser is possible without actually creating one. There is no real work involved to do this for the several reasons: 1) The fallback implementation in the workbench would return 'false' all the time 2) The 'reference' implementation that Tim is providing already has this method on WebBrowserUtil class. 3) We can add the method to AbstractWorkbenchBrowserSupport that is meant to be extended without breaking anybody because we can provide the default implementation (return false). Here is the proposed method for IWorkbenchBrowserSupport: /** * Tests whether web browser as an SWT widget can be created in this * workbench instance. If this method returns <code>false</code>, * browser styles <code>AS_EDITOR</code> and <code>AS_VIEW</code> * will be ignored and external browser will always be created. * * @return <code>true</code> if internal web browser can be created on * this platform, <code>false</code> otherwise. */ boolean isInternalWebBrowserAvailable();
It goes without saying that I will be providing org.eclipse.ui.workbench patch for this.
This API change makes good sense. Suggested rewording of second sentence: "If this method returns <code>false</code>, <code>createBrowser</code> would ignore browser styles <code>AS_EDITOR</code> and <code>AS_VIEW</code> and always create an external browser."
Created attachment 20807 [details] API implementation Implemented - ready for release.
Hey - I just realized I have commit rights :-). I synchronized by force of habbit and released without thinking only to find out 15 minutes later that org.eclipse.ui.workbench no longer shows outgoing changes :-). In that case, this defects is done.
Closing as fixed.
regarding comment #4, dejan, no offense but I'm a little worried that Denis may have mixed up some of the UI rights. It is important (in the big picture) what we know who can commit to which projects. I am going to investigate.
No problem.