以编程方式在 Eclipse 帮助 window 中打开特定的帮助主题?
Opening specific help topic in eclipse help window programatically?
如何在 Linux(Ubuntu 14.04) 上以编程方式 运行 在 eclipse 帮助 window 中打开特定的帮助主题?
例如:我想以编程方式打开 "Tasks view" 帮助,如下图所示。
我试过:
PlatformUI.getWorkbench().getHelpSystem() .displayHelpResource("/org.eclipse.platform.doc.user/concepts/ctskview.htm");
但是帮助主题是在外部浏览器 (firefox) 中打开的,而不是在 eclipse 帮助窗口中打开的。
如何在 Eclipse 帮助窗口中打开此主题(Window 在 Eclipse workbench 中单击 Help > Help contents
菜单时打开)。
根据您的打印屏幕,您正在使用 Linux。内部 Window 仅适用于 Windows.
看看DefaultHelpUI
中的代码(在非Windows平台上,显示模态window时使用外部):
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;
}
如何在 Linux(Ubuntu 14.04) 上以编程方式 运行 在 eclipse 帮助 window 中打开特定的帮助主题?
例如:我想以编程方式打开 "Tasks view" 帮助,如下图所示。
PlatformUI.getWorkbench().getHelpSystem() .displayHelpResource("/org.eclipse.platform.doc.user/concepts/ctskview.htm");
但是帮助主题是在外部浏览器 (firefox) 中打开的,而不是在 eclipse 帮助窗口中打开的。
如何在 Eclipse 帮助窗口中打开此主题(Window 在 Eclipse workbench 中单击 Help > Help contents
菜单时打开)。
根据您的打印屏幕,您正在使用 Linux。内部 Window 仅适用于 Windows.
看看DefaultHelpUI
中的代码(在非Windows平台上,显示模态window时使用外部):
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;
}