diff options
author | Tor Norbye <tnorbye@google.com> | 2013-08-23 08:59:39 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2013-08-23 09:01:04 -0700 |
commit | 926bc53d2e5f6a9f66c98baa1624ad809edb1456 (patch) | |
tree | d33f240d802ad99c2222c8a7f30ebf83f9c3de33 /java/java-impl/src/com/intellij | |
parent | ce0245dfc4d045479a910a98a0f8655e1ed1419a (diff) | |
download | idea-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 'java/java-impl/src/com/intellij')
9 files changed, 62 insertions, 27 deletions
diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/JavaClassNameInsertHandler.java b/java/java-impl/src/com/intellij/codeInsight/completion/JavaClassNameInsertHandler.java index 067a4258b148..d80b6b590c98 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/JavaClassNameInsertHandler.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/JavaClassNameInsertHandler.java @@ -24,7 +24,9 @@ import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; import com.intellij.pom.java.LanguageLevel; import com.intellij.psi.*; +import com.intellij.psi.codeStyle.CodeStyleSettingsManager; import com.intellij.psi.filters.FilterPositionUtil; +import com.intellij.psi.javadoc.PsiDocComment; import com.intellij.psi.javadoc.PsiDocTag; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.util.PsiUtil; @@ -39,8 +41,6 @@ class JavaClassNameInsertHandler implements InsertHandler<JavaPsiClassReferenceE @Override public void handleInsert(final InsertionContext context, final JavaPsiClassReferenceElement item) { - final char c = context.getCompletionChar(); - int offset = context.getTailOffset() - 1; final PsiFile file = context.getFile(); if (PsiTreeUtil.findElementOfClassAtOffset(file, offset, PsiImportStatementBase.class, false) != null) { @@ -57,6 +57,7 @@ class JavaClassNameInsertHandler implements InsertHandler<JavaPsiClassReferenceE final Project project = context.getProject(); final Editor editor = context.getEditor(); + final char c = context.getCompletionChar(); if (c == '#') { context.setLaterRunnable(new Runnable() { @Override @@ -68,6 +69,12 @@ class JavaClassNameInsertHandler implements InsertHandler<JavaPsiClassReferenceE AutoPopupController.getInstance(context.getProject()).autoPopupMemberLookup(context.getEditor(), null); } + if (PsiTreeUtil.getParentOfType(position, PsiDocComment.class, false) != null && + CodeStyleSettingsManager.getSettings(project).USE_FQ_CLASS_NAMES_IN_JAVADOC) { + AllClassesGetter.INSERT_FQN.handleInsert(context, item); + return; + } + if (position != null) { PsiElement parent = position.getParent(); if (parent instanceof PsiJavaCodeReferenceElement) { diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionUtil.java b/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionUtil.java index 6dc59284748f..bf94078ff1c1 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionUtil.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -842,8 +842,11 @@ public class JavaCompletionUtil { final PsiDocumentManager manager = PsiDocumentManager.getInstance(file.getProject()); manager.commitDocument(manager.getDocument(file)); final PsiReference ref = file.findReferenceAt(offset); - if (ref instanceof PsiJavaCodeReferenceElement) { - JavaCodeStyleManager.getInstance(file.getProject()).shortenClassReferences((PsiJavaCodeReferenceElement)ref); + if (ref != null) { + PsiElement element = ref.getElement(); + if (element != null) { + JavaCodeStyleManager.getInstance(file.getProject()).shortenClassReferences(element); + } } } diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/JavaDocCompletionContributor.java b/java/java-impl/src/com/intellij/codeInsight/completion/JavaDocCompletionContributor.java index 2259d2bcf23c..5684bf8b0765 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/JavaDocCompletionContributor.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/JavaDocCompletionContributor.java @@ -68,7 +68,7 @@ public class JavaDocCompletionContributor extends CompletionContributor { public JavaDocCompletionContributor() { extend(CompletionType.BASIC, PsiJavaPatterns.psiElement(JavaDocTokenType.DOC_TAG_NAME), new TagChooser()); - extend(CompletionType.BASIC, PsiJavaPatterns.psiElement().inside(PsiDocTagValue.class), new CompletionProvider<CompletionParameters>() { + extend(CompletionType.BASIC, PsiJavaPatterns.psiElement().inside(PsiDocComment.class), new CompletionProvider<CompletionParameters>() { @Override protected void addCompletions(@NotNull final CompletionParameters parameters, final ProcessingContext context, @NotNull final CompletionResultSet result) { final PsiElement position = parameters.getPosition(); @@ -85,12 +85,7 @@ public class JavaDocCompletionContributor extends CompletionContributor { for (final CompletionElement _item : processor.getResults()) { final Object element = _item.getElement(); - LookupItem item = element instanceof PsiMethod ? new JavaMethodCallElement((PsiMethod)element) { - @Override - public void handleInsert(InsertionContext context) { - new MethodSignatureInsertHandler().handleInsert(context, this); - } - } : (LookupItem)LookupItemUtil.objectToLookupItem(element); + LookupItem item = createLookupItem(element); if (onlyConstants) { Object o = item.getObject(); if (!(o instanceof PsiField)) continue; @@ -109,6 +104,24 @@ public class JavaDocCompletionContributor extends CompletionContributor { JavaCompletionContributor.addAllClasses(parameters, result, new InheritorsHolder(position, result)); } } + + private LookupItem createLookupItem(final Object element) { + if (element instanceof PsiMethod) { + return new JavaMethodCallElement((PsiMethod)element) { + @Override + public void handleInsert(InsertionContext context) { + new MethodSignatureInsertHandler().handleInsert(context, this); + } + }; + } + if (element instanceof PsiClass) { + JavaPsiClassReferenceElement classElement = new JavaPsiClassReferenceElement((PsiClass)element); + classElement.setInsertHandler(JavaClassNameInsertHandler.JAVA_CLASS_INSERT_HANDLER); + return classElement; + } + + return (LookupItem)LookupItemUtil.objectToLookupItem(element); + } }); } diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java index 636b0331eee1..612d4704ec10 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java @@ -81,6 +81,7 @@ public class HighlightMethodUtil { String accessModifier = PsiUtil.getAccessModifier(accessLevel); for (MethodSignatureBackedByPsiMethod superMethodSignature : superMethodSignatures) { PsiMethod superMethod = superMethodSignature.getMethod(); + if (method.hasModifierProperty(PsiModifier.ABSTRACT) && !MethodSignatureUtil.isSuperMethod(superMethod, method)) continue; if (!PsiUtil.isAccessible(containingFile.getProject(), superMethod, method, null)) continue; HighlightInfo info = isWeaker(method, modifierList, accessModifier, accessLevel, superMethod, includeRealPositionInfo); if (info != null) return info; @@ -294,9 +295,10 @@ public class HighlightMethodUtil { List<PsiClassType> checkedExceptions, PsiSubstitutor substitutorForDerivedClass) { PsiMethod superMethod = superSignature.getMethod(); PsiSubstitutor substitutorForMethod = MethodSignatureUtil.getSuperMethodSignatureSubstitutor(methodSignature, superSignature); - if (substitutorForMethod == null) return -1; for (int i = 0; i < checkedExceptions.size(); i++) { - PsiType exception = substitutorForDerivedClass.substitute(substitutorForMethod.substitute(checkedExceptions.get(i))); + final PsiClassType checkedEx = checkedExceptions.get(i); + final PsiType substituted = substitutorForMethod != null ? substitutorForMethod.substitute(checkedEx) : TypeConversionUtil.erasure(checkedEx); + PsiType exception = substitutorForDerivedClass.substitute(substituted); if (!isMethodThrows(superMethod, substitutorForMethod, exception, substitutorForDerivedClass)) { return i; } @@ -304,10 +306,10 @@ public class HighlightMethodUtil { return -1; } - private static boolean isMethodThrows(PsiMethod method, PsiSubstitutor substitutorForMethod, PsiType exception, PsiSubstitutor substitutorForDerivedClass) { + private static boolean isMethodThrows(PsiMethod method, @Nullable PsiSubstitutor substitutorForMethod, PsiType exception, PsiSubstitutor substitutorForDerivedClass) { PsiClassType[] thrownExceptions = method.getThrowsList().getReferencedTypes(); for (PsiClassType thrownException1 : thrownExceptions) { - PsiType thrownException = substitutorForMethod.substitute(thrownException1); + PsiType thrownException = substitutorForMethod != null ? substitutorForMethod.substitute(thrownException1) : TypeConversionUtil.erasure(thrownException1); thrownException = substitutorForDerivedClass.substitute(thrownException); if (TypeConversionUtil.isAssignable(thrownException, exception)) return true; } diff --git a/java/java-impl/src/com/intellij/codeInsight/generation/JavaOverrideImplementMemberChooser.java b/java/java-impl/src/com/intellij/codeInsight/generation/JavaOverrideImplementMemberChooser.java index 3708b5ee2214..f304a06ec96c 100644 --- a/java/java-impl/src/com/intellij/codeInsight/generation/JavaOverrideImplementMemberChooser.java +++ b/java/java-impl/src/com/intellij/codeInsight/generation/JavaOverrideImplementMemberChooser.java @@ -23,8 +23,10 @@ import org.jetbrains.annotations.Nullable; import javax.swing.*; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.LinkedHashSet; /** * @author Dmitry Batkovich @@ -54,7 +56,9 @@ public class JavaOverrideImplementMemberChooser extends MemberChooser<PsiMethodM if (candidates.isEmpty() && secondary.isEmpty()) return null; final PsiMethodMember[] onlyPrimary = convertToMethodMembers(candidates); - final PsiMethodMember[] all = ArrayUtil.mergeArrays(onlyPrimary, convertToMethodMembers(secondary)); + final LinkedHashSet<CandidateInfo> allCandidates = new LinkedHashSet<CandidateInfo>(candidates); + allCandidates.addAll(secondary); + final PsiMethodMember[] all = convertToMethodMembers(allCandidates); final NotNullLazyValue<PsiMethodWithOverridingPercentMember[]> lazyElementsWithPercent = new NotNullLazyValue<PsiMethodWithOverridingPercentMember[]>() { @NotNull @@ -76,7 +80,11 @@ public class JavaOverrideImplementMemberChooser extends MemberChooser<PsiMethodM javaOverrideImplementMemberChooser.setCopyJavadocVisible(true); if (toImplement) { - javaOverrideImplementMemberChooser.selectElements(onlyPrimary); + if (onlyPrimary.length == 0) { + javaOverrideImplementMemberChooser.selectElements(new ClassMember[] {all[0]}); + } else { + javaOverrideImplementMemberChooser.selectElements(onlyPrimary); + } } if (ApplicationManager.getApplication().isUnitTestMode()) { diff --git a/java/java-impl/src/com/intellij/compilerOutputIndex/api/indexer/CompilerOutputBaseIndex.java b/java/java-impl/src/com/intellij/compilerOutputIndex/api/indexer/CompilerOutputBaseIndex.java index a37368b03d86..d5377b8fbff9 100644 --- a/java/java-impl/src/com/intellij/compilerOutputIndex/api/indexer/CompilerOutputBaseIndex.java +++ b/java/java-impl/src/com/intellij/compilerOutputIndex/api/indexer/CompilerOutputBaseIndex.java @@ -92,7 +92,7 @@ public abstract class CompilerOutputBaseIndex<K, V> { } } catch (IOException e) { - LOG.error("couldn't initialize index"); + LOG.error("couldn't initialize index", e); throw new RuntimeException(e); } myIndex = index; diff --git a/java/java-impl/src/com/intellij/compilerOutputIndex/api/indexer/CompilerOutputIndexer.java b/java/java-impl/src/com/intellij/compilerOutputIndex/api/indexer/CompilerOutputIndexer.java index e8c5ebc9a771..16275b2108de 100644 --- a/java/java-impl/src/com/intellij/compilerOutputIndex/api/indexer/CompilerOutputIndexer.java +++ b/java/java-impl/src/com/intellij/compilerOutputIndex/api/indexer/CompilerOutputIndexer.java @@ -54,7 +54,7 @@ public class CompilerOutputIndexer extends AbstractProjectComponent { private final Lock myLock = new ReentrantLock(); private final AtomicBoolean myInProgress = new AtomicBoolean(false); - private AtomicBoolean myEnabled = new AtomicBoolean(false); + private volatile boolean myEnabled = false; public static CompilerOutputIndexer getInstance(final Project project) { return project.getComponent(CompilerOutputIndexer.class); @@ -65,7 +65,7 @@ public class CompilerOutputIndexer extends AbstractProjectComponent { } public boolean isEnabled() { - return myEnabled.get(); + return myEnabled; } private ID<String, Long> getFileTimestampsIndexId() { @@ -77,15 +77,16 @@ public class CompilerOutputIndexer extends AbstractProjectComponent { Registry.get(REGISTRY_KEY).addListener(new RegistryValueListener.Adapter() { @Override public void afterValueChanged(final RegistryValue value) { - myEnabled.set(value.asBoolean()); - if (myEnabled.get()) { + final boolean asBoolean = value.asBoolean(); + myEnabled = asBoolean; + if (asBoolean) { doEnable(); } } }, myProject); - myEnabled = new AtomicBoolean(Registry.is(REGISTRY_KEY) || ApplicationManager.getApplication().isUnitTestMode()); - if (myEnabled.get()) { + myEnabled = Registry.is(REGISTRY_KEY); + if (myEnabled) { doEnable(); } } @@ -113,7 +114,7 @@ public class CompilerOutputIndexer extends AbstractProjectComponent { CompilerManager.getInstance(myProject).addCompilationStatusListener(new CompilationStatusAdapter() { @Override public void fileGenerated(final String outputRoot, final String relativePath) { - if (myEnabled.get() && StringUtil.endsWith(relativePath, CompilerOutputFilesUtil.CLASS_FILES_SUFFIX)) { + if (StringUtil.endsWith(relativePath, CompilerOutputFilesUtil.CLASS_FILES_SUFFIX) && myEnabled) { try { doIndexing(new File(outputRoot, relativePath), null); } diff --git a/java/java-impl/src/com/intellij/psi/impl/JavaCodeBlockModificationListener.java b/java/java-impl/src/com/intellij/psi/impl/JavaCodeBlockModificationListener.java index ac8de81cf0f0..18be9cd12246 100644 --- a/java/java-impl/src/com/intellij/psi/impl/JavaCodeBlockModificationListener.java +++ b/java/java-impl/src/com/intellij/psi/impl/JavaCodeBlockModificationListener.java @@ -50,7 +50,7 @@ public class JavaCodeBlockModificationListener implements PsiTreeChangePreproces case CHILDREN_CHANGED: // general childrenChanged() event after each change - if (!event.isGenericChildrenChange()) { + if (!event.isGenericChange()) { processChange(event.getParent(), event.getParent(), null); } break; diff --git a/java/java-impl/src/com/intellij/refactoring/extractclass/usageInfo/RemoveField.java b/java/java-impl/src/com/intellij/refactoring/extractclass/usageInfo/RemoveField.java index f77b9bdc43ad..4216b6d8d01d 100644 --- a/java/java-impl/src/com/intellij/refactoring/extractclass/usageInfo/RemoveField.java +++ b/java/java-impl/src/com/intellij/refactoring/extractclass/usageInfo/RemoveField.java @@ -28,6 +28,7 @@ public class RemoveField extends FixableUsageInfo { } public void fixUsage() throws IncorrectOperationException { + field.normalizeDeclaration(); field.delete(); } } |