use of com.intellij.ide.plugins.HelpSetPath in project intellij-community by JetBrains.
the class HelpManagerImpl method createHelpSet.
@Nullable
private static HelpSet createHelpSet() {
String urlToHelp = ApplicationInfo.getInstance().getHelpURL() + "/" + HELP_HS;
HelpSet mainHelpSet = loadHelpSet(urlToHelp);
if (mainHelpSet == null)
return null;
// merge plugins help sets
IdeaPluginDescriptor[] pluginDescriptors = PluginManagerCore.getPlugins();
for (IdeaPluginDescriptor pluginDescriptor : pluginDescriptors) {
HelpSetPath[] sets = pluginDescriptor.getHelpSets();
for (HelpSetPath hsPath : sets) {
String url = "jar:file:///" + pluginDescriptor.getPath().getAbsolutePath() + "/help/" + hsPath.getFile() + "!";
if (!hsPath.getPath().startsWith("/")) {
url += "/";
}
url += hsPath.getPath();
HelpSet pluginHelpSet = loadHelpSet(url);
if (pluginHelpSet != null) {
mainHelpSet.add(pluginHelpSet);
}
}
}
return mainHelpSet;
}
Aggregations