Index: Eclipse UI/org/eclipse/ui/browser/AbstractWorkbenchBrowserSupport.java =================================================================== RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/browser/AbstractWorkbenchBrowserSupport.java,v retrieving revision 1.2 diff -u -r1.2 AbstractWorkbenchBrowserSupport.java --- Eclipse UI/org/eclipse/ui/browser/AbstractWorkbenchBrowserSupport.java 25 Mar 2005 19:44:16 -0000 1.2 +++ Eclipse UI/org/eclipse/ui/browser/AbstractWorkbenchBrowserSupport.java 8 May 2005 02:06:55 -0000 @@ -39,4 +39,11 @@ return createBrowser(AS_EXTERNAL, SHARED_EXTERNAL_BROWSER_ID, null, null); } + + /* (non-Javadoc) + * @see org.eclipse.ui.browser.IWorkbenchBrowserSupport#isInternalWebBrowserAvailable() + */ + public boolean isInternalWebBrowserAvailable() { + return false; + } } \ No newline at end of file Index: Eclipse UI/org/eclipse/ui/browser/IWorkbenchBrowserSupport.java =================================================================== RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/browser/IWorkbenchBrowserSupport.java,v retrieving revision 1.3 diff -u -r1.3 IWorkbenchBrowserSupport.java --- Eclipse UI/org/eclipse/ui/browser/IWorkbenchBrowserSupport.java 25 Mar 2005 19:44:16 -0000 1.3 +++ Eclipse UI/org/eclipse/ui/browser/IWorkbenchBrowserSupport.java 8 May 2005 02:06:55 -0000 @@ -45,7 +45,6 @@ * This interface is not intended to be implemented by clients. * * @see IWebBrowser - * * @since 3.1 */ @@ -67,7 +66,6 @@ /** * Style constant (value 1<<3) indicating that status will be tracked * and shown for the browser (page loading progress, text messages etc.). - * */ int STATUS = 1 << 3; @@ -75,7 +73,6 @@ * Style constant (value 1<<4) indicating that the internal web * browser will reopen after restarting the workbench (if used). In * addition, the URLs will appear in the MRU list. - * */ int PERSISTENT = 1 << 4; @@ -128,7 +125,6 @@ * a name used for the presentation of the internal browser * @param tooltip * a tooltip used for the presentation of the internal browser - * * @return the browser instance that can be used to open the URL. Clients * intending to reuse the instance for all the URLs should cache the * instance and call IWebBrowser#openURL() on it. Clients are @@ -151,7 +147,6 @@ * opened, it will be returned instead of creating a new one. * Passing null will create a new instance with a * generated id every time. - * * @return the browser instance that can be used to open the URL. Clients * intending to reuse the instance for all the URLs should cache the * instance and call IWebBrowser#openURL() on it. Clients are @@ -175,4 +170,16 @@ * if the operation failed for some reason */ IWebBrowser getExternalBrowser() throws PartInitException; + + /** + * Tests whether web browser as an SWT widget can be created in this + * workbench instance. If this method returns false, + * createBrowser would ignore browser styles + * AS_EDITOR and AS_VIEW and always create an + * external browser. + * + * @return true if internal web browser can be created on + * this platform, false otherwise. + */ + boolean isInternalWebBrowserAvailable(); } \ No newline at end of file Index: Eclipse UI/org/eclipse/ui/internal/browser/WorkbenchBrowserSupport.java =================================================================== RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/browser/WorkbenchBrowserSupport.java,v retrieving revision 1.6 diff -u -r1.6 WorkbenchBrowserSupport.java --- Eclipse UI/org/eclipse/ui/internal/browser/WorkbenchBrowserSupport.java 28 Mar 2005 21:26:56 -0000 1.6 +++ Eclipse UI/org/eclipse/ui/internal/browser/WorkbenchBrowserSupport.java 8 May 2005 02:06:56 -0000 @@ -72,7 +72,7 @@ }; /** - * + * Cannot be instantiated from outside. */ private WorkbenchBrowserSupport() { } @@ -89,15 +89,28 @@ return instance; } + /* (non-Javadoc) + * @see org.eclipse.ui.browser.IWorkbenchBrowserSupport#createBrowser(int, java.lang.String, java.lang.String, java.lang.String) + */ public IWebBrowser createBrowser(int style, String browserId, String name, String tooltip) throws PartInitException { return getActiveSupport() .createBrowser(style, browserId, name, tooltip); } + /* (non-Javadoc) + * @see org.eclipse.ui.browser.IWorkbenchBrowserSupport#createBrowser(java.lang.String) + */ public IWebBrowser createBrowser(String browserId) throws PartInitException { return getActiveSupport().createBrowser(browserId); } + + /* (non-Javadoc) + * @see org.eclipse.ui.browser.IWorkbenchBrowserSupport#isInternalWebBrowserAvailable() + */ + public boolean isInternalWebBrowserAvailable() { + return getActiveSupport().isInternalWebBrowserAvailable(); + } private IWorkbenchBrowserSupport getActiveSupport() { if (initialized == false) {