Create an Eclipse plugin that responds to links in the internal web browser

落花浮王杯 提交于 2019-12-24 09:14:17

问题


Is there any way to hook into the eclipse web browser? I'm opening a link using IWorkbenchBrowserSupport.createBrowser, but after the page is launched I want to be able to take some action based on links clicked within the browser. Can you create a listener for browser events?


回答1:


No. IWorkbenchBrowserSupport.createBrowser returns an IWebBrowser. The IWebBrowser interface only defines 3 methods.

  • close()
  • getId()
  • openURL(URL url)

I believe that openURL is used to navigate to another web page using the URL address text box.

You could write your own web browser that would allow you to create listeners for browser events.



来源:https://stackoverflow.com/questions/9517680/create-an-eclipse-plugin-that-responds-to-links-in-the-internal-web-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!