value of entity as a quick doc

#WEB-5022 fixed
This commit is contained in:
Dennis Ushakov
2016-04-29 21:24:34 +03:00
parent 417da122ac
commit 1940ef659f
2 changed files with 9 additions and 0 deletions
@@ -62,6 +62,10 @@ public class XmlDocumentationProvider implements DocumentationProvider {
if (element instanceof SchemaPrefix) {
return ((SchemaPrefix)element).getQuickNavigateInfo();
}
if (element instanceof XmlEntityDecl) {
final XmlAttributeValue value = ((XmlEntityDecl)element).getValueElement();
return value != null ? value.getText() : null;
}
return null;
}
@@ -74,6 +74,11 @@ public class XmlDocumentationTest extends LightPlatformCodeInsightFixtureTestCas
assertEquals("XML Namespace Prefix \"xs\" (http://www.w3.org/2001/XMLSchema)", context.getQuickNavigateInfo());
}
public void testEntityValue() throws Exception {
DocumentationTestContext context = new DocumentationTestContext("9.xml");
assertEquals("\"«\"", context.getQuickNavigateInfo());
}
public void testXmlDoc6() throws Exception {
final String testName = getTestName(false);
doQuickDocGenerationTestWithCheckExpectedResult((Object)"car",testName + ".xml", testName + ".xsd");