gpt4 book ai didi

eclipse - 以编程方式打开 Eclipse 帮助窗口中的特定帮助主题?

转载 作者:行者123 更新时间:2023-12-02 11:38:36 24 4
gpt4 key购买 nike

如何在 Linux(Ubuntu 14.04) 上以编程方式运行的 eclipse 帮助窗口中打开特定帮助主题?

例如:我想以语法方式打开“任务 View ”帮助,如下图所示。

enter image description here我尝试过:

PlatformUI.getWorkbench().getHelpSystem() .displayHelpResource("/org.eclipse.platform.doc.user/concepts/ctskview.htm");

但是帮助主题是在外部浏览器(firefox)中打开的,而不是在 eclipse 帮助窗口中打开的。

如何在 Eclipse 帮助窗口中打开此主题(在 Eclipse 工作台中单击帮助 > 帮助内容菜单时打开的窗口)。

最佳答案

根据您的打印屏幕,您正在使用 Linux。内部窗口仅适用于 Windows。

查看 DefaultHelpUI 中的代码(在非 Windows 平台上,显示模态窗口时使用外部):

private boolean useExternalBrowser(String url) {
// On non Windows platforms, use external when modal window is displayed
if (!Constants.OS_WIN32.equalsIgnoreCase(Platform.getOS())) {
Display display = Display.getCurrent();
if (display != null) {
if (insideModalParent(display))
return true;
}
}

// Use external when no help frames are to be displayed, otherwise no
// navigation buttons.
if (url != null) {
if (url.indexOf("?noframes=true") > 0 //$NON-NLS-1$
|| url.indexOf("&noframes=true") > 0) { //$NON-NLS-1$
return true;
}
}
return false;
}

关于eclipse - 以编程方式打开 Eclipse 帮助窗口中的特定帮助主题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39343480/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com