从 Eclipse 插件启动 URL

2022-01-16 00:00:00 eclipse-plugin java eclipse

我希望我的 Eclipse 插件能够让用户的默认浏览器打开一个 URL.这似乎是非常标准的行为,但我找不到任何有关如何执行此操作的文档.

I'd like to have my Eclipse plugin cause a URL to be opened by the users' default browser. This seems like pretty standard behavior, but I haven't been able to find any docs on how to do this.

谁能帮忙?

推荐答案

你在找:

final IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().createBrowser( ... );
browser.openURL(url);

相关文章