mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-65955 pass full help-ref to html descriptor
This commit is contained in:
@@ -92,9 +92,7 @@ public class HtmlDescriptorsTable {
|
||||
private static void loadHtmlElements(final String resourceName, List<String> htmlTagNames) throws JDOMException, IOException {
|
||||
final Document document = JDOMUtil.loadDocument(HtmlDescriptorsTable.class.getResourceAsStream(resourceName));
|
||||
final List elements = document.getRootElement().getChildren(TAG_ELEMENT_NAME);
|
||||
HtmlDocumentationProvider.setBaseHtmlExtDocUrl(
|
||||
document.getRootElement().getAttribute(BASE_HELP_REF_ATTR).getValue()
|
||||
);
|
||||
final String baseHtmlExtDocUrl = document.getRootElement().getAttribute(BASE_HELP_REF_ATTR).getValue();
|
||||
|
||||
for (Object object : elements) {
|
||||
final Element element = (Element)object;
|
||||
@@ -103,7 +101,7 @@ public class HtmlDescriptorsTable {
|
||||
|
||||
HtmlTagDescriptor value = new HtmlTagDescriptor();
|
||||
ourTagTable.put(htmlTagName, value);
|
||||
value.setHelpRef(element.getAttributeValue(HELPREF_ATTR));
|
||||
value.setHelpRef(baseHtmlExtDocUrl + element.getAttributeValue(HELPREF_ATTR));
|
||||
value.setDescription(element.getAttributeValue(DESCRIPTION_ATTR));
|
||||
value.setName(htmlTagName);
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ import java.util.List;
|
||||
* @author maxim
|
||||
*/
|
||||
public class HtmlDocumentationProvider implements DocumentationProvider {
|
||||
private static String ourBaseHtmlExtDocUrl;
|
||||
private static DocumentationProvider ourStyleProvider;
|
||||
private static DocumentationProvider ourScriptProvider;
|
||||
|
||||
@@ -75,7 +74,7 @@ public class HtmlDocumentationProvider implements DocumentationProvider {
|
||||
final EntityDescriptor descriptor = findDocumentationDescriptor(element, context);
|
||||
|
||||
if (descriptor!=null) {
|
||||
return ourBaseHtmlExtDocUrl + descriptor.getHelpRef();
|
||||
return descriptor.getHelpRef();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@@ -311,14 +310,6 @@ public class HtmlDocumentationProvider implements DocumentationProvider {
|
||||
return PsiTreeUtil.getParentOfType(context,XmlTag.class,false);
|
||||
}
|
||||
|
||||
public static void setBaseHtmlExtDocUrl(String baseHtmlExtDocUrl) {
|
||||
ourBaseHtmlExtDocUrl = baseHtmlExtDocUrl;
|
||||
}
|
||||
|
||||
static String getBaseHtmlExtDocUrl() {
|
||||
return ourBaseHtmlExtDocUrl;
|
||||
}
|
||||
|
||||
public static void registerScriptDocumentationProvider(final DocumentationProvider provider) {
|
||||
ourScriptProvider = provider;
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ public class XmlDocumentationProvider implements DocumentationProvider {
|
||||
if (descriptor != null && append) {
|
||||
buf.append("<br>");
|
||||
buf.append(XmlBundle.message("html.quickdoc.additional.template",
|
||||
HtmlDocumentationProvider.getBaseHtmlExtDocUrl() + descriptor.getHelpRef(),
|
||||
descriptor.getHelpRef(),
|
||||
BASE_SITEPOINT_URL + tag.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user