Eclipse plugin. Browser in Editor
How开发者_开发技巧 to add Browser object into editor?
Have a look at the following example.
http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/SWTBrowser.htm
Window/Show Views/Other then select "Internal Web Browser"
If you're developing an eclipse plug-in, try this:
int style = IWorkbenchBrowserSupport.AS_EDITOR | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.STATUS;
IWebBrowser browser = WorkbenchBrowserSupport.getInstance().createBrowser(style, "MyBrowserID", "MyBrowserName", "MyBrowser Tooltip");
browser.openURL(new URL("http://www.google.com"));
Source: http://blog.roweware.com/2007/07/24/open-url-in-eclipse/
精彩评论