IDEA-115240 Tags from scheme helptopic.xsd are not recognized

WEB-7228 fix rolled back
This commit is contained in:
Dmitry Avdeev
2013-10-24 15:22:03 +04:00
parent de44ee0a41
commit 3b9d91511a
6 changed files with 2072 additions and 19 deletions
@@ -2001,6 +2001,18 @@ public class XmlHighlightingTest extends DaemonAnalyzerTestCase {
}, true, true);
}
public void testDtdWithXsd() throws Exception {
doTest(
new VirtualFile[] {
getVirtualFile(BASE_PATH + "DtdWithXsd/help.xml"),
getVirtualFile(BASE_PATH + "DtdWithXsd/helptopic.xsd"),
getVirtualFile(BASE_PATH + "DtdWithXsd/html-entities.dtd")
},
true,
false
);
}
@Override
protected void setUp() throws Exception {
super.setUp();
+107
View File
@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic SYSTEM "html-entities.dtd">
<topic id="Directories_Used_by_product_to_Store_Settings_Caches_Plugins_and_Logs" xsi:noNamespaceSchemaLocation="helptopic.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<header >
<intro>
<p>Location of the IDE files depends on the operating system, and %product% version.</p>
<p>In this section:</p>
<tag-list of="chapter" title-source="title"/>
</intro>
</header>
<content>
<chapter title="Windows">
<p>All the files are located under this directory by default:</p>
<p>Windows Vista, 7, 8</p>
<code style="block">
&lt;SYSTEM DRIVE&gt;\Users\&lt;USER ACCOUNT NAME&gt;\.&lt;PRODUCT&gt;&lt;VERSION&gt;
</code>
<p>Windows XP</p>
<code style="block">
&lt;SYSTEM DRIVE&gt;\Documents and Settings\&lt;USER ACCOUNT NAME&gt;\.&lt;PRODUCT>&lt;VERSION&gt;
</code>
<h3>Example</h3>
<list>
<li for="ij">IntelliJ IDEA 13 Ultimate Edition:<br/>
<code style="block">
c:\Users\John\.IntelliJIdea13\
</code>
</li>
<li for="ij">IntelliJ IDEA 13 Community Edition
<code style="block">
c:\Users\John\.IdeaIC13\
</code>
</li>
<li for="ps,ws">WebStorm 7.0, PhpStorm 7.0
<code style="block">
c:\Users\John\.WebIde70\
</code>
</li>
<li for="rm">RubyMine 6.0
<code style="block">
c:\Users\John\.RubyMine60\
</code>
</li>
<li for="py">PyCharm 3.0
<code style="block">
c:\Users\John\.PyCharm30\
</code>
</li>
</list>
<!--
<h3>Sub-directories</h3>
<p>Under this directory you'll find the following sub-directories:</p>
<list>
<li><b>config</b>: configuration (idea.config.path)</li>
<li><b>config\plugins</b>: plugins (idea.plugins.path)</li>
<li><b>system</b>: caches, local history, etc (idea.system.path)</li>
<li><b>system\log</b>: logs and thread dumps (idea.log.path)</li>
</list>
-->
<p>Refer to the page <a href="topicId47">Project and IDE Settings</a>.</p>
</chapter>
<chapter title="Linux and the Other UNIX Systems" caps="aswritten">
<p>Product directory starting with dot can be found in the user home directory. The pattern is:</p>
<code style="block">
~/.&lt;PRODUCT&gt;&lt;VERSION&gt;
</code>
<p>~ is an alias for the home directory, for example <code style="inline">/home/john</code>.</p>
</chapter>
<chapter title="MacOS" caps="aswritten">
<list>
<li>
<b>Configuration</b><br/>
<code style="block">
~/Library/Preferences/&lt;PRODUCT&gt;&lt;VERSION&gt;
</code>
</li>
<li>
<b>Caches</b><br/>
<code style="block">
~/Library/Caches/&lt;PRODUCT&gt;&lt;VERSION&gt;
</code>
</li>
<li>
<b>Plugins</b><br/>
<code style="block">
~/Library/Application Support/&lt;PRODUCT&gt;&lt;VERSION&gt;
</code>
</li>
<li>
<b>Logs</b><br/>
<code style="block">
~/Library/Logs/&lt;PRODUCT&gt;&lt;VERSION&gt;
</code>
</li>
</list>
<p>where &lt;PRODUCT&gt; is <for id="rm,py,ij">%product%</for><for id="ij">(%product% Ultimate Edition),
IdeaIC (%product% Community Edition)</for><for id="ps,ws">WebIde (WebStrom and PhpStorm use this common directory)</for>. </p>
</chapter>
</content>
<seealso>
<category id="2">
<link>topicId47</link><!--project and ide settings-->
</category>
</seealso>
</topic>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY Command "&#x2318;">
<!ENTITY Option "&#x2325;">
<!ENTITY Control "&#x2303;">
<!ENTITY Shift "&#x21E7;">
<!ENTITY CapsLock "&#x21EA;">
<!ENTITY Return "&#x21A9;">
<!ENTITY Enter "&#x2324;">
<!ENTITY Delete "&#x232B;">
<!ENTITY ForwardDelete "&#x2326;">
<!ENTITY Escape "&#x238B;">
<!ENTITY MenuItem "&#x25B8;">
<!ENTITY Eject "&#x23CF;">
<!ENTITY Power "&#x233D;">
<!ENTITY Tab "&#x21E5;">
<!ENTITY PageUp "&#x21DE;">
<!ENTITY PageDown "&#x21DF;">
<!ENTITY Home "&#x2196;">
<!ENTITY End "&#x2198;">
<!ENTITY LeftArrow "&#x2190;">
<!ENTITY RightArrow "&#x2192;">
<!ENTITY UpArrow "&#x2191;">
<!ENTITY DownArrow "&#x2193;">
<!ENTITY pcnt "&#37;">
<!ENTITY quot "&#34;">
<!ENTITY apos "&#39;">
<!ENTITY amp "&#38;">
<!ENTITY lt "&#60;">
<!ENTITY gt "&#62;">
<!ENTITY nbsp "&#160;">
<!ENTITY iexcl "&#161;">
<!ENTITY cent "&#162;">
<!ENTITY pound "&#163;">
<!ENTITY curren "&#164;">
<!ENTITY yen "&#165;">
<!ENTITY brvbar "&#166;">
<!ENTITY sect "&#167;">
<!ENTITY uml "&#168;">
<!ENTITY copy "&#169;">
<!ENTITY ordf "&#170;">
<!ENTITY laquo "&#171;">
<!ENTITY not "&#172;">
<!ENTITY shy "&#173;">
<!ENTITY reg "&#174;">
<!ENTITY macr "&#175;">
<!ENTITY deg "&#176;">
<!ENTITY plusmn "&#177;">
<!ENTITY sup2 "&#178;">
<!ENTITY sup3 "&#179;">
<!ENTITY acute "&#180;">
<!ENTITY micro "&#181;">
<!ENTITY para "&#182;">
<!ENTITY middot "&#183;">
<!ENTITY cedil "&#184;">
<!ENTITY sup "&#185;">
<!ENTITY ordm "&#186;">
<!ENTITY raquo "&#187;">
<!ENTITY frac14 "&#188;">
<!ENTITY frac12 "&#189;">
<!ENTITY frac34 "&#190;">
<!ENTITY iquest "&#191;">
<!ENTITY times "&#215;">
<!ENTITY divide "&#247;">
<!ENTITY Agrave "&#192;">
<!ENTITY Aacute "&#193;">
<!ENTITY Acirc "&#194;">
<!ENTITY Atilde "&#195;">
<!ENTITY Auml "&#196;">
<!ENTITY Aring "&#197;">
<!ENTITY AElig "&#198;">
<!ENTITY Ccedil "&#199;">
<!ENTITY Egrave "&#200;">
<!ENTITY Eacute "&#201;">
<!ENTITY Ecirc "&#202;">
<!ENTITY Euml "&#203;">
<!ENTITY Igrave "&#204;">
<!ENTITY Iacute "&#205;">
<!ENTITY Icirc "&#206;">
<!ENTITY Iuml "&#207;">
<!ENTITY ETH "&#208;">
<!ENTITY Ntilde "&#209;">
<!ENTITY Ograve "&#210;">
<!ENTITY Oacute "&#211;">
<!ENTITY Ocirc "&#212;">
<!ENTITY Otilde "&#213;">
<!ENTITY Ouml "&#214;">
<!ENTITY Oslash "&#216;">
<!ENTITY Ugrave "&#217;">
<!ENTITY Uacute "&#218;">
<!ENTITY Ucirc "&#219;">
<!ENTITY Uuml "&#220;">
<!ENTITY Yacute "&#221;">
<!ENTITY THORN "&#222;">
<!ENTITY szlig "&#223;">
<!ENTITY agrave "&#224;">
<!ENTITY aacute "&#225;">
<!ENTITY acirc "&#226;">
<!ENTITY atilde "&#227;">
<!ENTITY auml "&#228;">
<!ENTITY aring "&#229;">
<!ENTITY aelig "&#230;">
<!ENTITY ccedil "&#231;">
<!ENTITY egrave "&#232;">
<!ENTITY eacute "&#233;">
<!ENTITY ecirc "&#234;">
<!ENTITY euml "&#235;">
<!ENTITY igrave "&#236;">
<!ENTITY iacute "&#237;">
<!ENTITY icirc "&#238;">
<!ENTITY iuml "&#239;">
<!ENTITY eth "&#240;">
<!ENTITY ntilde "&#241;">
<!ENTITY ograve "&#242;">
<!ENTITY oacute "&#243;">
<!ENTITY ocirc "&#244;">
<!ENTITY otilde "&#245;">
<!ENTITY ouml "&#246;">
<!ENTITY oslash "&#248;">
<!ENTITY ugrave "&#249;">
<!ENTITY uacute "&#250;">
<!ENTITY ucirc "&#251;">
<!ENTITY uuml "&#252;">
<!ENTITY yacute "&#253;">
<!ENTITY thorn "&#254;">
<!ENTITY yuml "&#255;">
<!ENTITY mdash "&#8212;">
@@ -891,16 +891,13 @@ public class XmlTagImpl extends XmlElementImpl implements XmlTag {
if (parent instanceof XmlDocument) {
final XmlExtension extension = XmlExtension.getExtensionByElement(parent);
if (extension != null) {
final String[][] defaultNamespace = extension.getNamespacesFromDocument((XmlDocument)parent);
final String[][] defaultNamespace = extension.getNamespacesFromDocument((XmlDocument)parent, map != null);
if (defaultNamespace != null) {
if (map == null) {
map = new BidirectionalMap<String, String>();
}
for (final String[] prefix2ns : defaultNamespace) {
final String prefix = prefix2ns[0];
if (!map.containsKey(prefix) || extension.canOverrideNamespace(prefix)) {
map.put(prefix, getRealNs(prefix2ns[1]));
}
map.put(prefix2ns[0], getRealNs(prefix2ns[1]));
}
}
}
@@ -87,22 +87,9 @@ public abstract class XmlExtension {
return new TagNameReference(nameElement, startTagFlag);
}
/**
* @deprecated use {@link com.intellij.xml.XmlExtension#getNamespacesFromDocument(XmlDocument parent)} instead
*/
@Deprecated
@Nullable
public String[][] getNamespacesFromDocument(final XmlDocument parent, boolean declarationsExist) {
return XmlUtil.getDefaultNamespaces(parent);
}
@Nullable
public String[][] getNamespacesFromDocument(final XmlDocument parent) {
return getNamespacesFromDocument(parent, false);
}
public boolean canOverrideNamespace(final String prefix) {
return false;
return declarationsExist ? null : XmlUtil.getDefaultNamespaces(parent);
}
public boolean canBeDuplicated(XmlAttribute attribute) {