summaryrefslogtreecommitdiff
path: root/xml/impl
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2013-08-23 08:59:39 -0700
committerTor Norbye <tnorbye@google.com>2013-08-23 09:01:04 -0700
commit926bc53d2e5f6a9f66c98baa1624ad809edb1456 (patch)
treed33f240d802ad99c2222c8a7f30ebf83f9c3de33 /xml/impl
parentce0245dfc4d045479a910a98a0f8655e1ed1419a (diff)
downloadidea-926bc53d2e5f6a9f66c98baa1624ad809edb1456.tar.gz
Snapshot c27b4f50fbcb2a71ca2c7f2d85e67debfea58f27 from master branch of git://git.jetbrains.org/idea/community.git
c27b4f5: 2013-08-23 Bas Leijdekkers - don't report on final fields because those will already be highlighted as error 3422c86: 2013-08-23 Alexey Kudravtsev - stress gc to force collection 6ab46dc: 2013-08-23 nik - jps model: serialization for custom module source roots ab676f6: 2013-08-23 Alexey Kudravtsev - Merge remote-tracking branch 'origin/master' 6e02b38: 2013-08-23 Anna Kozlova - Merge remote-tracking branch 'origin/master' c0c7f84: 2013-08-23 Maxim.Mossienko - fixed typo 832256e: 2013-08-23 Anna Kozlova - extract enum: ensure normalized fields (IDEA-112590) d0fb95d: 2013-08-23 Anna Kozlova - override/implement: allow members to be in primary/secondary sets at the same time - filter them from the result; preselect first element when no selection was set before (IDEA-112563) 09e8df0: 2013-08-23 Anna Kozlova - IDEA-112551 "Expand lambda" does not add imports f095c6d: 2013-08-23 nik - deprecated methods and classes removed from API eab9f6d: 2013-08-23 Roman Shevchenko - Restore Windows FS loading for tests b68f03b: 2013-08-23 Alexey Kudravtsev - sometimes weak references are not collected under linux, try to stress gc to force them d005b15: 2013-08-23 Sergey Evdokimov - EA-48997 - UOE: MvcFramework.addJavaHome 67c6b67: 2013-08-23 Roman Shevchenko - Typo ee9f323: 2013-08-23 Sergey Evdokimov - EA-48888 - NPE: MavenModelPropertiesPatcher.patch 3a303b4: 2013-08-23 Gregory.Shrago - move Editor-based cell renderer to platform 40d766c: 2013-08-23 Sergey Simonchik - WEB-1887 Error run node from command window 295a5d8: 2013-08-23 Alexey Kudravtsev - cleanup 06a1d59: 2013-08-23 Alexey Kudravtsev - renamed 6b35c9d: 2013-08-23 Roman Shevchenko - test diagnostic 3f7e6c6: 2013-08-23 Roman Shevchenko - platform: unified loading of system libraries d0b8432: 2013-08-22 Roman Shevchenko - platform: URL class loader builder 2a785d2: 2013-08-22 Roman Shevchenko - platform: class cache logging centralized; obsolete timing dropped 1dc531f: 2013-08-22 Roman Shevchenko - platform: typos and cleanup a2e1fb4: 2013-08-23 Oleg Sukhodolsky - RUBY-14033: setShowFlattenMode() propagated to ChangesViewI so we could you it 52bffa9: 2013-08-23 Mikhail Golubev - Merge remote-tracking branch 'origin/master' 766a3a0: 2013-08-23 nik - manifest extensions extracted to separate file and moved to 'manifest' module so tests which don't depend on manifest support won't try to load its extensions 0d23c76: 2013-08-23 nik - remote servers: java-dependent classes extracted to separate modules 268559e: 2013-08-23 nik - set 'test' scope for dependencies on testFramework 524db30: 2013-08-22 nik - use API instead of impl 8d7b831: 2013-08-23 Dmitry Avdeev - IDEA-60895 No completion for enumerated and boolean values of xml tags: XmlEnumerationDescriptor introduced 58b6aca: 2013-08-22 Bas Leijdekkers - Respect code style "Use fully qualified names in javadoc" setting (for IDEA-111023) 23338f1: 2013-08-22 Max Medvedev - fix test data 3e6b3ff: 2013-08-22 Sergey Simonchik - One big read lock is splitted into several small read locks. WEB-8936 Karma: read access throwable exception for Coverage (attempt#2) 425a1e0: 2013-08-22 Anna Kozlova - avoid warnings on super abstract methods that they try to assign weaker access (IDEA-67584) 5ee69d4: 2013-08-22 Anna Kozlova - check overridden methods with different type params numbers for thrown exceptions (IDEA-67860) 1c787f1: 2013-08-22 Max Medvedev - IDEA-111192 Groovy: In-Place Introduce Field: Throwable GrIntroduceHandlerBase$4$1.run() 5130a52: 2013-08-22 Max Medvedev - Groovy: shorten references in completed types in templates 2004de2: 2013-08-22 Max Medvedev - Groovy: correct type template for introduce variable e8c1b32: 2013-08-22 Max Medvedev - shorten references in completed type elements in groovy files ffcc5d1: 2013-08-22 Bas Leijdekkers - IDEA-47151 (Settings of "Result of method call ignored" inspection should have choosers and/or completion for class and method names) a4d1018: 2013-08-22 Gregory.Shrago - EA-48983 - E: SwingUtilities.convertPoint a3b7858: 2013-08-22 peter - completion should insert qualified names in javadoc according to the code style settings (IDEA-111023) 3182137: 2013-08-22 Dmitry Trofimov - Updated libs. fb1408a: 2013-08-22 Dmitry Trofimov - Merge remote-tracking branch 'origin/master' ec043d6: 2013-08-22 Denis Fokin - IDEA-112130 Cannot type '{', '}' and '>' in editor when using a Czech keyboard a4b1aec: 2013-08-22 Dmitry Trofimov - Draw image override. 64059a6: 2013-08-22 Dmitry Trofimov - Action handling fixed. 471882a: 2013-08-22 Dmitry Avdeev - IDEA-112519 Do not check enumerated xml attribute value in case of injection cc07980: 2013-08-22 peter - correct javadoc completion test 6b486fd: 2013-08-22 Dmitry Avdeev - IDEA-64561 Provide navigation for XSD enum values: fix RNG fc9843e: 2013-08-22 Mikhail Golubev - IDEA-110012 Not all Redmine Issues Available on "Open Task" (Limited to 100?) b37c6d0: 2013-08-22 Maxim.Mossienko - do check cancelled during building file map / scanning file 1ff158b: 2013-08-22 Dmitry Trofimov - Fixed font selection. 48580bd: 2013-08-22 Dmitry Trofimov - Merge remote-tracking branch 'origin/master' e622120: 2013-08-22 Dmitry Trofimov - Updated lib. 814a6ac: 2013-08-22 Bas Leijdekkers - separate warning for constructors 81ff306: 2013-08-22 Maxim.Mossienko - synchronized collection cc869b4: 2013-08-22 Mikhail Golubev - Remove unused method 7e971f2: 2013-08-22 Maxim.Mossienko - proper caret position update on bulk mode end b2b87f5: 2013-08-22 Mikhail Golubev - Adjust completion to suggest variants not only on word boundaries 9d36545: 2013-08-22 Anton Makeev - Platform: restrict initial frame size to reasonable value (IDEA-96644) +review CR-IC @kb 9758bfe: 2013-08-22 Bas Leijdekkers - IDEA-112442 (False positive 'Result of method call ignored') fa1879e: 2013-08-22 Dmitry Avdeev - IDEA-64561 Provide navigation for XSD enum values 6ec1eb8: 2013-08-22 Dmitry Batkovich - CompilerOutputIndexer is enabled only in corresponding tests e33a3e8: 2013-08-22 Mikhail Golubev - Use JPasswordTextField for rendering values of hidden template variables 2405d26: 2013-08-22 Dmitry Avdeev - IDEA-64561 Provide navigation for XSD enum values: documentation 0aafeeb: 2013-08-22 Mikhail Golubev - Add EditorTextField as cell editor in HighlightedSelectorsTable e38a6a3: 2013-08-22 Nadya Zabrodina - Cosmetics 2ef0358: 2013-08-22 Evgeny Pasynkov - +prepend(byte, byte[]) 74932df: 2013-08-22 Denis Fokin - IDEA-108265. Multiple recent tasks at once could be provided. Minor issues are fixed. AppId is now one per process. 4860452: 2013-08-22 Mikhail Golubev - Merge remote-tracking branch 'origin/master' bc29214: 2013-08-22 Oleg Sukhodolsky - testFramework should not depend on remote-servers-impl (which depends on testFramework-java) 1b24edc: 2013-08-22 Roman Shevchenko - CR-IC-2008 (mock JRE update) 36e54e9: 2013-08-22 Dmitry Trofimov - Updated libs. 279fd2e: 2013-08-22 Dmitry Trofimov - Use dump aware actions. d73433c: 2013-08-22 Dmitry Trofimov - Merge remote-tracking branch 'origin/master' 100257e: 2013-08-22 Dmitry Trofimov - Libs updated. 0801a5f: 2013-08-22 Dmitry Trofimov - Use idea action system. 1a172fe: 2013-08-21 Mikhail Golubev - Remove remaining references to selector names via string literals 8330324: 2013-08-21 Mikhail Golubev - Add support of 'Download tasks in separate requests' feature in GenericRepository 0f241d4: 2013-08-21 Dmitry Trofimov - Actions should work while indexing. 38fc2f4: 2013-08-21 Mikhail Golubev - Refactored common handlers functionality to SelectorBasedResponse Handler. Add max parameter support to JsonPath and Regex response handlers. 98fb926: 2013-08-21 Dmitry Trofimov - Don't close tab on remote terminal logout. e4d5ad3: 2013-08-21 Mikhail Golubev - Results number limiting in GenericRepository and ResponseHandlers ec92ca6: 2013-08-21 Mikhail Golubev - NotNull check in TaskManagerImpl 0b9e2be: 2013-08-21 Mikhail Golubev - Update XPathResponseHandler: add lazy XPath expressions compiling, make selectors names constants 1614c5d: 2013-08-21 Dmitry Trofimov - Hide terminal view on last tab close. e49aa6c: 2013-08-20 Mikhail Golubev - Merge branch 'generic' d9fc248: 2013-08-20 Mikhail Golubev - Update response handlers of GenericRepository Change-Id: I84fdb10c62c68bfcd45967e9fdc4245052c31928
Diffstat (limited to 'xml/impl')
-rw-r--r--xml/impl/src/com/intellij/xml/util/XmlEnumeratedValueReferenceProvider.java (renamed from xml/impl/src/com/intellij/xml/util/XmlAttributeValueReferenceProvider.java)13
-rw-r--r--xml/impl/src/com/intellij/xml/util/XmlReferenceContributor.java2
-rw-r--r--xml/impl/src/com/intellij/xml/util/documentation/XmlDocumentationProvider.java20
3 files changed, 20 insertions, 15 deletions
diff --git a/xml/impl/src/com/intellij/xml/util/XmlAttributeValueReferenceProvider.java b/xml/impl/src/com/intellij/xml/util/XmlEnumeratedValueReferenceProvider.java
index 33d72010189d..590ae534eaa6 100644
--- a/xml/impl/src/com/intellij/xml/util/XmlAttributeValueReferenceProvider.java
+++ b/xml/impl/src/com/intellij/xml/util/XmlEnumeratedValueReferenceProvider.java
@@ -18,13 +18,15 @@ package com.intellij.xml.util;
import com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor;
import com.intellij.openapi.util.Key;
import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiLanguageInjectionHost;
import com.intellij.psi.PsiReference;
import com.intellij.psi.PsiReferenceProvider;
+import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
import com.intellij.psi.xml.XmlAttribute;
import com.intellij.psi.xml.XmlAttributeValue;
import com.intellij.util.ProcessingContext;
import com.intellij.xml.XmlAttributeDescriptor;
-import com.intellij.xml.impl.BasicXmlAttributeDescriptor;
+import com.intellij.xml.impl.XmlEnumerationDescriptor;
import com.intellij.xml.impl.schema.XmlSchemaTagsProcessor;
import org.jetbrains.annotations.NotNull;
@@ -32,7 +34,7 @@ import org.jetbrains.annotations.NotNull;
* @author Dmitry Avdeev
* Date: 15.08.13
*/
-public class XmlAttributeValueReferenceProvider extends PsiReferenceProvider {
+public class XmlEnumeratedValueReferenceProvider extends PsiReferenceProvider {
public final static Key<Boolean> SUPPRESS = Key.create("suppress attribute value references");
@@ -44,6 +46,9 @@ public class XmlAttributeValueReferenceProvider extends PsiReferenceProvider {
return PsiReference.EMPTY_ARRAY;
}
XmlAttributeValue value = (XmlAttributeValue)element;
+ if (value instanceof PsiLanguageInjectionHost && InjectedLanguageUtil.hasInjections((PsiLanguageInjectionHost)value)) {
+ return PsiReference.EMPTY_ARRAY;
+ }
String unquotedValue = value.getValue();
if (unquotedValue == null || XmlHighlightVisitor.skipValidation(value) || !XmlUtil.isSimpleXmlAttributeValue(unquotedValue, value)) {
return PsiReference.EMPTY_ARRAY;
@@ -51,9 +56,9 @@ public class XmlAttributeValueReferenceProvider extends PsiReferenceProvider {
PsiElement parent = value.getParent();
if (parent instanceof XmlAttribute) {
final XmlAttributeDescriptor descriptor = ((XmlAttribute)parent).getDescriptor();
- if (descriptor instanceof BasicXmlAttributeDescriptor &&
+ if (descriptor instanceof XmlEnumerationDescriptor &&
(descriptor.isFixed() || descriptor.isEnumerated() || unquotedValue.equals(descriptor.getDefaultValue()))) { // todo case insensitive
- return ((BasicXmlAttributeDescriptor)descriptor).getValueReferences(value);
+ return ((XmlEnumerationDescriptor)descriptor).getValueReferences(value);
}
}
return PsiReference.EMPTY_ARRAY;
diff --git a/xml/impl/src/com/intellij/xml/util/XmlReferenceContributor.java b/xml/impl/src/com/intellij/xml/util/XmlReferenceContributor.java
index 6fcd606e18fa..ae588622794a 100644
--- a/xml/impl/src/com/intellij/xml/util/XmlReferenceContributor.java
+++ b/xml/impl/src/com/intellij/xml/util/XmlReferenceContributor.java
@@ -89,6 +89,6 @@ public class XmlReferenceContributor extends PsiReferenceContributor {
new XmlEncodingReferenceProvider());
registrar.registerReferenceProvider(xmlAttributeValue(), new XmlPrefixReferenceProvider());
- registrar.registerReferenceProvider(xmlAttributeValue(), new XmlAttributeValueReferenceProvider(), PsiReferenceRegistrar.LOWER_PRIORITY);
+ registrar.registerReferenceProvider(xmlAttributeValue(), new XmlEnumeratedValueReferenceProvider(), PsiReferenceRegistrar.LOWER_PRIORITY);
}
}
diff --git a/xml/impl/src/com/intellij/xml/util/documentation/XmlDocumentationProvider.java b/xml/impl/src/com/intellij/xml/util/documentation/XmlDocumentationProvider.java
index ff05952cf910..b464d56de0c4 100644
--- a/xml/impl/src/com/intellij/xml/util/documentation/XmlDocumentationProvider.java
+++ b/xml/impl/src/com/intellij/xml/util/documentation/XmlDocumentationProvider.java
@@ -91,7 +91,8 @@ public class XmlDocumentationProvider implements DocumentationProvider {
if (curElement!=null) {
return formatDocFromComment(curElement, ((XmlElementDecl)element).getNameElement().getText());
}
- } else if (element instanceof XmlTag) {
+ }
+ else if (element instanceof XmlTag) {
XmlTag tag = (XmlTag)element;
MyPsiElementProcessor processor = new MyPsiElementProcessor();
String name = tag.getAttributeValue(NAME_ATTR_NAME);
@@ -271,7 +272,7 @@ public class XmlDocumentationProvider implements DocumentationProvider {
return generateDoc(text, name,null, null);
}
- private XmlTag getComplexOrSimpleTypeDefinition(PsiElement element, PsiElement originalElement) {
+ private static XmlTag getComplexOrSimpleTypeDefinition(PsiElement element, PsiElement originalElement) {
XmlElementDescriptor descriptor = element.getUserData(DESCRIPTOR_KEY);
XmlTag contextTag = null;
@@ -421,14 +422,13 @@ public class XmlDocumentationProvider implements DocumentationProvider {
if (object instanceof String && originalElement != null) {
PsiElement result = findDeclWithName((String)object, originalElement);
- PsiElement originalElementParent;
- if (result == null && element instanceof XmlTag && (originalElementParent = originalElement.getParent()) instanceof XmlAttributeValue) {
- PsiElement originalElementGrandParent = originalElementParent.getParent();
- XmlAttributeDescriptor descriptor = originalElementGrandParent instanceof XmlAttribute ?
- ((XmlAttribute)originalElementGrandParent).getDescriptor():null;
-
- if (descriptor != null && descriptor.getDeclaration() instanceof XmlTag) {
- result = findEnumerationValue((String)object, (XmlTag)descriptor.getDeclaration());
+ if (result == null && element instanceof XmlTag) {
+ XmlAttribute attribute = PsiTreeUtil.getParentOfType(originalElement, XmlAttribute.class, false);
+ if (attribute != null) {
+ XmlAttributeDescriptor descriptor = attribute.getDescriptor();
+ if (descriptor != null && descriptor.getDeclaration() instanceof XmlTag) {
+ result = findEnumerationValue((String)object, (XmlTag)descriptor.getDeclaration());
+ }
}
}
return result;