From d5e8ba9e13fc231d03704edfc99c089483e2bb91 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Tue, 30 Apr 2019 19:38:29 +0300 Subject: [PATCH] cleanup, notnull GitOrigin-RevId: 49aac0bc73f23d5170ab106f1904b94f0cb70bf4 --- .../ExternalAnnotationsManagerImpl.java | 8 ++-- .../BaseExternalAnnotationsManager.java | 8 ++-- .../DelegateWithDefaultParamValueTest.java | 2 +- .../EnableOptimizeImportsOnTheFlyTest.java | 2 +- .../LightQuickFixAvailabilityTestCase.java | 2 +- ...StreamApiMigrationInspectionTestSuite.java | 2 +- .../InlineSameParameterValueTest.java | 2 +- .../daemon/quickFix/ActionHint.java | 9 ++-- .../quickFix/LightQuickFixTestCase.java | 10 ++--- .../src/com/intellij/psi/impl/DebugUtil.java | 42 ++++++++++++------- .../intellij/history/LocalHistoryAction.java | 6 +-- .../util/ui/OptionsMessageDialog.java | 1 + .../openapi/command/impl/UndoManagerImpl.java | 2 +- .../src/messages/ProjectBundle.properties | 2 +- .../FetchExternalResourcesFixTest.java | 2 +- .../IgnoreExternalResourcesFixTest.java | 2 +- ...ManuallySetupExternalResourcesFixTest.java | 2 +- 17 files changed, 60 insertions(+), 44 deletions(-) diff --git a/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsManagerImpl.java b/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsManagerImpl.java index 3ee2f6c2c721..fd24379d8221 100644 --- a/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsManagerImpl.java +++ b/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsManagerImpl.java @@ -161,7 +161,7 @@ public class ExternalAnnotationsManagerImpl extends ReadableExternalAnnotationsM * Tries to add external annotations into given root if possible. * Notifies about each addition result separately. */ - public void annotateExternally(@NotNull VirtualFile root, @NotNull List annotations) { + public void annotateExternally(@NotNull VirtualFile root, @NotNull List annotations) { Project project = myPsiManager.getProject(); Map, List> annotationsByFiles = annotations.stream() @@ -347,7 +347,8 @@ public class ExternalAnnotationsManagerImpl extends ReadableExternalAnnotationsM PsiElement addedElement; if (anchor != null) { addedElement = rootTag.addAfter(newItemTag, anchor); - } else { + } + else { addedElement = rootTag.addSubTag(newItemTag, true); } @@ -429,7 +430,7 @@ public class ExternalAnnotationsManagerImpl extends ReadableExternalAnnotationsM } @Nullable - private static XmlFile findXmlFileInRoot(@Nullable List xmlFiles, @NotNull VirtualFile root) { + private static XmlFile findXmlFileInRoot(@Nullable List xmlFiles, @NotNull VirtualFile root) { if (xmlFiles != null) { for (XmlFile xmlFile : xmlFiles) { VirtualFile vf = xmlFile.getVirtualFile(); @@ -939,6 +940,7 @@ public class ExternalAnnotationsManagerImpl extends ReadableExternalAnnotationsM CodeStyleSettingsManager.getSettings(myProject).getCustomSettings(JavaCodeStyleSettings.class).USE_EXTERNAL_ANNOTATIONS = value; } + @NotNull @Override protected JComponent createNorthPanel() { final JPanel northPanel = (JPanel)super.createNorthPanel(); diff --git a/java/java-psi-impl/src/com/intellij/codeInsight/BaseExternalAnnotationsManager.java b/java/java-psi-impl/src/com/intellij/codeInsight/BaseExternalAnnotationsManager.java index 0018f44c257d..b037435a0d8a 100644 --- a/java/java-psi-impl/src/com/intellij/codeInsight/BaseExternalAnnotationsManager.java +++ b/java/java-psi-impl/src/com/intellij/codeInsight/BaseExternalAnnotationsManager.java @@ -64,7 +64,7 @@ public abstract class BaseExternalAnnotationsManager extends ExternalAnnotations */ @Nullable protected static String getExternalName(@NotNull PsiModifierListOwner listOwner) { - return getExternalName(listOwner, false); + return PsiFormatUtil.getExternalName(listOwner, false, Integer.MAX_VALUE); } /** @@ -176,7 +176,7 @@ public abstract class BaseExternalAnnotationsManager extends ExternalAnnotations @NotNull private List collectExternalAnnotations(@NotNull Object cacheKey, - @NotNull Supplier> dataSupplier) { + @NotNull Supplier> dataSupplier) { if (!hasAnyAnnotationsRoots()) return Collections.emptyList(); List cached; while (true) { @@ -248,7 +248,7 @@ public abstract class BaseExternalAnnotationsManager extends ExternalAnnotations } @NotNull - private List doCollect(@NotNull String externalName, @NotNull List annotationsFiles, boolean onlyWritable) { + private List doCollect(@NotNull String externalName, @NotNull List annotationsFiles, boolean onlyWritable) { SmartList result = new SmartList<>(); for (PsiFile file : annotationsFiles) { if (!file.isValid()) continue; @@ -470,7 +470,7 @@ public abstract class BaseExternalAnnotationsManager extends ExternalAnnotations } @Override - public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { + public void startElement(String uri, String localName, String qName, Attributes attributes) { if ("item".equals(qName)) { myExternalName = attributes.getValue("name"); } diff --git a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/DelegateWithDefaultParamValueTest.java b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/DelegateWithDefaultParamValueTest.java index 1ad8f0e49689..f92119fd0f0a 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/DelegateWithDefaultParamValueTest.java +++ b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/DelegateWithDefaultParamValueTest.java @@ -12,7 +12,7 @@ import org.jetbrains.annotations.NotNull; */ public class DelegateWithDefaultParamValueTest extends LightQuickFixParameterizedTestCase { @Override - protected void doAction(@NotNull ActionHint actionHint, String testFullPath, String testName) + protected void doAction(@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) throws Exception { TemplateManagerImpl.setTemplateTesting(getTestRootDisposable()); super.doAction(actionHint, testFullPath, testName); diff --git a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/EnableOptimizeImportsOnTheFlyTest.java b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/EnableOptimizeImportsOnTheFlyTest.java index 2265a3a0c198..1a5d5d2d50cc 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/EnableOptimizeImportsOnTheFlyTest.java +++ b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/EnableOptimizeImportsOnTheFlyTest.java @@ -32,7 +32,7 @@ public class EnableOptimizeImportsOnTheFlyTest extends LightQuickFixParameterize } @Override - protected void doAction(@NotNull final ActionHint actionHint, final String testFullPath, final String testName) { + protected void doAction(@NotNull final ActionHint actionHint, @NotNull final String testFullPath, @NotNull final String testName) { CodeInsightWorkspaceSettings.getInstance(ourProject).setOptimizeImportsOnTheFly(false, getTestRootDisposable()); IntentionAction action = findActionAndCheck(actionHint, testFullPath); if (action != null) { diff --git a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/LightQuickFixAvailabilityTestCase.java b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/LightQuickFixAvailabilityTestCase.java index 3daffdbe9051..6fecdcc9b6d6 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/LightQuickFixAvailabilityTestCase.java +++ b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/LightQuickFixAvailabilityTestCase.java @@ -25,7 +25,7 @@ import org.jetbrains.annotations.NotNull; */ public abstract class LightQuickFixAvailabilityTestCase extends LightQuickFixParameterizedTestCase { @Override - protected void doAction(@NotNull final ActionHint actionHint, final String testFullPath, final String testName) { + protected void doAction(@NotNull final ActionHint actionHint, @NotNull final String testFullPath, @NotNull final String testName) { findActionAndCheck(actionHint, testFullPath); } } diff --git a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/StreamApiMigrationInspectionTestSuite.java b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/StreamApiMigrationInspectionTestSuite.java index 499660360b7f..6c75eca440de 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/StreamApiMigrationInspectionTestSuite.java +++ b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/quickFix/StreamApiMigrationInspectionTestSuite.java @@ -69,7 +69,7 @@ public class StreamApiMigrationInspectionTestSuite { } @Override - protected void doAction(@NotNull ActionHint actionHint, String testFullPath, String testName) throws Exception { + protected void doAction(@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) throws Exception { ((IntentionManagerImpl)IntentionManager.getInstance()) .withDisabledIntentions(() -> super.doAction(actionHint, testFullPath, testName)); } diff --git a/java/java-tests/testSrc/com/intellij/java/codeInspection/InlineSameParameterValueTest.java b/java/java-tests/testSrc/com/intellij/java/codeInspection/InlineSameParameterValueTest.java index deeec8a16864..78e6c52fde16 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInspection/InlineSameParameterValueTest.java +++ b/java/java-tests/testSrc/com/intellij/java/codeInspection/InlineSameParameterValueTest.java @@ -39,7 +39,7 @@ public class InlineSameParameterValueTest extends LightQuickFixParameterizedTest } @Override - protected void doAction(@NotNull final ActionHint actionHint, final String testFullPath, final String testName) { + protected void doAction(@NotNull final ActionHint actionHint, @NotNull final String testFullPath, @NotNull final String testName) { final LocalQuickFix fix = (LocalQuickFix)new SameParameterValueInspection().getQuickFix(actionHint.getExpectedText()); assert fix != null; final int offset = getEditor().getCaretModel().getOffset(); diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/ActionHint.java b/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/ActionHint.java index 3e9889883242..6f2b3887a11a 100644 --- a/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/ActionHint.java +++ b/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/ActionHint.java @@ -42,12 +42,13 @@ import static org.junit.Assert.fail; * @author Tagir Valeev */ public class ActionHint { + @NotNull private final String myExpectedText; private final boolean myShouldPresent; private final ProblemHighlightType myHighlightType; private final boolean myExactMatch; - private ActionHint(String expectedText, boolean shouldPresent, ProblemHighlightType severity, boolean exactMatch) { + private ActionHint(@NotNull String expectedText, boolean shouldPresent, ProblemHighlightType severity, boolean exactMatch) { myExpectedText = expectedText; myShouldPresent = shouldPresent; myHighlightType = severity; @@ -63,6 +64,7 @@ public class ActionHint { * @return an expected action text. May throw an {@link IllegalStateException} if this ActionHint expects something else * (e.g. quick-fix of specific type, etc.) */ + @NotNull public String getExpectedText() { return myExpectedText; } @@ -86,7 +88,7 @@ public class ActionHint { * @throws AssertionError if no action is found, but it should present, or if action is found, but it should not present. */ @Nullable - public IntentionAction findAndCheck(Collection actions, Supplier infoSupplier) { + public IntentionAction findAndCheck(@NotNull Collection actions, @NotNull Supplier infoSupplier) { IntentionAction result = actions.stream().filter(t -> { String text = t.getText(); return myExactMatch ? text.equals(myExpectedText) : text.startsWith(myExpectedText); @@ -117,6 +119,7 @@ public class ActionHint { return result; } + @NotNull private String exceptionHeader() { return "Action with " + (myExactMatch ? "text" : "prefix") + " '" + myExpectedText + "'"; } @@ -141,7 +144,7 @@ public class ActionHint { * * @param file PsiFile associated with contents (used to determine the language) * @param contents file contents - * @param exactMatch if false then action hint matches prefix like in {@link CodeInsightTestFixture#filterAvailableIntentions(java.lang.String)} + * @param exactMatch if false then action hint matches prefix like in {@link CodeInsightTestFixture#filterAvailableIntentions(String)} * @return ActionHint object * @throws AssertionError if action hint is absent or has invalid format */ diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java b/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java index ee89d3990afd..0ab0b9c5ab53 100644 --- a/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java +++ b/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java @@ -81,9 +81,9 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase } public static void doAction(@NotNull ActionHint actionHint, - String testFullPath, - String testName, - QuickFixTestCase quickFix) throws Exception { + @NotNull String testFullPath, + @NotNull String testName, + @NotNull QuickFixTestCase quickFix) throws Exception { IntentionAction action = actionHint.findAndCheck(quickFix.getAvailableActions(), () -> getTestInfo(testFullPath, quickFix)); if (action != null) { @@ -108,7 +108,7 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase } } - private static String getTestInfo(String testFullPath, QuickFixTestCase quickFix) { + private static String getTestInfo(@NotNull String testFullPath, @NotNull QuickFixTestCase quickFix) { String infos = StreamEx.of(quickFix.doHighlighting()) .filter(info -> info.getSeverity() != HighlightInfoType.SYMBOL_TYPE_SEVERITY) .map(info -> { @@ -131,7 +131,7 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase "Infos: " + infos; } - protected void doAction(@NotNull ActionHint actionHint, final String testFullPath, final String testName) + protected void doAction(@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) throws Exception { doAction(actionHint, testFullPath, testName, myWrapper); } diff --git a/platform/core-impl/src/com/intellij/psi/impl/DebugUtil.java b/platform/core-impl/src/com/intellij/psi/impl/DebugUtil.java index f8c069df8d9b..39bc6594cc0a 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/DebugUtil.java +++ b/platform/core-impl/src/com/intellij/psi/impl/DebugUtil.java @@ -47,24 +47,28 @@ public class DebugUtil { } public static final boolean CHECK_INSIDE_ATOMIC_ACTION_ENABLED = DO_EXPENSIVE_CHECKS; + @NotNull public static String psiTreeToString(@NotNull final PsiElement element, final boolean skipWhitespaces) { final ASTNode node = SourceTreeToPsiMap.psiElementToTree(element); assert node != null : element; return treeToString(node, skipWhitespaces); } + @NotNull public static String treeToString(@NotNull final ASTNode root, final boolean skipWhitespaces) { StringBuilder buffer = new StringBuilder(); treeToBuffer(buffer, root, 0, skipWhitespaces, false, false, true); return buffer.toString(); } + @NotNull public static String nodeTreeToString(@NotNull final ASTNode root, final boolean skipWhitespaces) { StringBuilder buffer = new StringBuilder(); treeToBuffer(buffer, root, 0, skipWhitespaces, false, false, false); return buffer.toString(); } + @NotNull public static String treeToString(@NotNull ASTNode root, boolean skipWhitespaces, boolean showRanges) { StringBuilder buffer = new StringBuilder(); treeToBuffer(buffer, root, 0, skipWhitespaces, showRanges, false, true); @@ -175,6 +179,7 @@ public class DebugUtil { } } + @NotNull public static String lightTreeToString(@NotNull final FlyweightCapableTreeStructure tree, final boolean skipWhitespaces) { final StringBuilder buffer = new StringBuilder(); @@ -229,13 +234,14 @@ public class DebugUtil { } } - public static String stubTreeToString(final Stub root) { + @NotNull + public static String stubTreeToString(@NotNull Stub root) { StringBuilder builder = new StringBuilder(); stubTreeToBuffer(root, builder, 0); return builder.toString(); } - public static void stubTreeToBuffer(final Stub node, final Appendable buffer, final int indent) { + public static void stubTreeToBuffer(@NotNull Stub node, @NotNull Appendable buffer, final int indent) { StringUtil.repeatSymbol(buffer, ' ', indent); try { final ObjectStubSerializer stubType = node.getStubType(); @@ -254,7 +260,7 @@ public class DebugUtil { } } - private static void treeToBufferWithUserData(Appendable buffer, TreeElement root, int indent, boolean skipWhiteSpaces) { + private static void treeToBufferWithUserData(@NotNull Appendable buffer, @NotNull TreeElement root, int indent, boolean skipWhiteSpaces) { if (skipWhiteSpaces && root.getElementType() == TokenType.WHITE_SPACE) return; StringUtil.repeatSymbol(buffer, ' ', indent); @@ -288,7 +294,7 @@ public class DebugUtil { } } - private static void treeToBufferWithUserData(Appendable buffer, PsiElement root, int indent, boolean skipWhiteSpaces) { + private static void treeToBufferWithUserData(@NotNull Appendable buffer, @NotNull PsiElement root, int indent, boolean skipWhiteSpaces) { if (skipWhiteSpaces && root instanceof PsiWhiteSpace) return; StringUtil.repeatSymbol(buffer, ' ', indent); @@ -330,7 +336,7 @@ public class DebugUtil { } } - private static void checkSubtree(CompositeElement root) { + private static void checkSubtree(@NotNull CompositeElement root) { if (root.rawFirstChild() == null) { if (root.rawLastChild() != null) { throw new IncorrectTreeStructureException(root, "firstChild == null, but lastChild != null"); @@ -382,15 +388,18 @@ public class DebugUtil { LOG.assertTrue(fromCharTab == toCharTab); } + @NotNull public static String psiToString(@NotNull PsiElement element, final boolean skipWhitespaces) { return psiToString(element, skipWhitespaces, false); } + @NotNull public static String psiToString(@NotNull final PsiElement root, final boolean skipWhiteSpaces, final boolean showRanges) { return psiToString(root, skipWhiteSpaces, showRanges, null); } - public static String psiToString(@NotNull final PsiElement root, final boolean skipWhiteSpaces, final boolean showRanges, PairConsumer> extra) { + @NotNull + public static String psiToString(@NotNull final PsiElement root, final boolean skipWhiteSpaces, final boolean showRanges, @Nullable PairConsumer> extra) { StringBuilder buffer = new StringBuilder(); psiToBuffer(buffer, root, skipWhiteSpaces, showRanges, extra); return buffer.toString(); @@ -416,11 +425,11 @@ public class DebugUtil { return buffer.toString(); } - private static void psiToBuffer(final Appendable buffer, - final PsiElement root, + private static void psiToBuffer(@NotNull Appendable buffer, + @NotNull PsiElement root, final boolean skipWhiteSpaces, final boolean showRanges, - PairConsumer> extra) { + @Nullable PairConsumer> extra) { final ASTNode node = root.getNode(); if (node == null) { psiToBuffer(buffer, root, 0, skipWhiteSpaces, showRanges, showRanges, extra); @@ -445,7 +454,7 @@ public class DebugUtil { final boolean skipWhiteSpaces, boolean showRanges, final boolean showChildrenRanges, - PairConsumer> extra) { + @Nullable PairConsumer> extra) { if (skipWhiteSpaces && root instanceof PsiWhiteSpace) return; StringUtil.repeatSymbol(buffer, ' ', indent); @@ -474,13 +483,15 @@ public class DebugUtil { } } - public static String fixWhiteSpaces(String text) { + @NotNull + public static String fixWhiteSpaces(@NotNull String text) { text = StringUtil.replace(text, "\n", "\\n"); text = StringUtil.replace(text, "\r", "\\r"); text = StringUtil.replace(text, "\t", "\\t"); return text; } + @NotNull public static String currentStackTrace() { return ExceptionUtil.currentStackTrace(); } @@ -556,6 +567,7 @@ public class DebugUtil { finishPsiModification(); } } + public static T performPsiModification(String trace, @NotNull ThrowableComputable runnable) throws E { startPsiModification(trace); try { @@ -659,19 +671,21 @@ public class DebugUtil { return "unknown inconsistency in " + fileDiagnostics; } - public static String graphToString(InboundSemiGraph graph) { + @NotNull + public static String graphToString(@NotNull InboundSemiGraph graph) { StringBuilder buffer = new StringBuilder(); printNodes(graph.getNodes().iterator(), node -> graph.getIn(node), 0, new HashSet<>(), buffer); return buffer.toString(); } - public static String graphToString(OutboundSemiGraph graph) { + @NotNull + public static String graphToString(@NotNull OutboundSemiGraph graph) { StringBuilder buffer = new StringBuilder(); printNodes(graph.getNodes().iterator(), node -> graph.getOut(node), 0, new HashSet<>(), buffer); return buffer.toString(); } - private static void printNodes(Iterator nodes, Function> getter, int indent, Set visited, StringBuilder buffer) { + private static void printNodes(@NotNull Iterator nodes, @NotNull Function> getter, int indent, @NotNull Set visited, @NotNull StringBuilder buffer) { while (nodes.hasNext()) { T node = nodes.next(); StringUtil.repeatSymbol(buffer, ' ', indent); diff --git a/platform/lvcs-api/src/com/intellij/history/LocalHistoryAction.java b/platform/lvcs-api/src/com/intellij/history/LocalHistoryAction.java index e177210b9815..0a054c4dbce7 100644 --- a/platform/lvcs-api/src/com/intellij/history/LocalHistoryAction.java +++ b/platform/lvcs-api/src/com/intellij/history/LocalHistoryAction.java @@ -3,11 +3,7 @@ package com.intellij.history; public interface LocalHistoryAction { - LocalHistoryAction NULL = new LocalHistoryAction() { - @Override - public void finish() { - } - }; + LocalHistoryAction NULL = () -> { }; void finish(); } diff --git a/platform/platform-api/src/com/intellij/util/ui/OptionsMessageDialog.java b/platform/platform-api/src/com/intellij/util/ui/OptionsMessageDialog.java index 6c8b9c930074..4a7d1c189979 100644 --- a/platform/platform-api/src/com/intellij/util/ui/OptionsMessageDialog.java +++ b/platform/platform-api/src/com/intellij/util/ui/OptionsMessageDialog.java @@ -63,6 +63,7 @@ public abstract class OptionsMessageDialog extends OptionsDialog{ } @Override + @NotNull protected JComponent createNorthPanel() { JPanel panel = new JPanel(new BorderLayout(15, 0)); if (myIcon != null) { diff --git a/platform/platform-impl/src/com/intellij/openapi/command/impl/UndoManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/command/impl/UndoManagerImpl.java index ef426103b6c7..10a42c8ae1bc 100644 --- a/platform/platform-impl/src/com/intellij/openapi/command/impl/UndoManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/command/impl/UndoManagerImpl.java @@ -590,7 +590,7 @@ public class UndoManagerImpl extends UndoManager implements Disposable { @TestOnly private void flushMergers() { - assert myProject == null || !myProject.isDisposed(); + assert myProject == null || !myProject.isDisposed() : myProject; // Run dummy command in order to flush all mergers... CommandProcessor.getInstance().executeCommand(myProject, EmptyRunnable.getInstance(), CommonBundle.message("drop.undo.history.command.name"), null); } diff --git a/platform/projectModel-impl/src/messages/ProjectBundle.properties b/platform/projectModel-impl/src/messages/ProjectBundle.properties index ac1957b06bbc..6a3d55c9c12e 100644 --- a/platform/projectModel-impl/src/messages/ProjectBundle.properties +++ b/platform/projectModel-impl/src/messages/ProjectBundle.properties @@ -378,7 +378,7 @@ project.roots.replace.library.entry.message=Do you really want to replace old li project.roots.replace.library.entry.title=Library Already Added project.roots.classpath.format.label=Dependencies storage format: project.roots.classpath.format.default.descr=IntelliJ IDEA (.iml) -external.annotations.root.chooser.title=Select external annotations root for {0} +external.annotations.root.chooser.title=Select External Annotations Root for {0} external.annotations.root.chooser.description=External annotations would be saved in appropriate folder external.annotation.prompt=External annotation prompt external.annotations.suggestion.message=If you do not want annotations in your code you may use external storage.
\ diff --git a/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/FetchExternalResourcesFixTest.java b/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/FetchExternalResourcesFixTest.java index fae729ce9c23..4d5a1bc59f67 100644 --- a/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/FetchExternalResourcesFixTest.java +++ b/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/FetchExternalResourcesFixTest.java @@ -30,7 +30,7 @@ public class FetchExternalResourcesFixTest extends LightQuickFixParameterizedTes // just check for action availability @Override - protected void doAction(@NotNull ActionHint actionHint, String testFullPath, String testName) { + protected void doAction(@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { IntentionAction action = findActionAndCheck(actionHint, testFullPath); if (action != null && testName.equals("5.xml")) { final String uri = FetchExtResourceAction.findUri(myFile, myEditor.getCaretModel().getOffset()); diff --git a/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/IgnoreExternalResourcesFixTest.java b/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/IgnoreExternalResourcesFixTest.java index 0d82cfcbd220..6fef9f44782f 100644 --- a/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/IgnoreExternalResourcesFixTest.java +++ b/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/IgnoreExternalResourcesFixTest.java @@ -28,7 +28,7 @@ public class IgnoreExternalResourcesFixTest extends LightQuickFixParameterizedTe // just check for action availability @Override - protected void doAction(@NotNull ActionHint actionHint, String testFullPath, String testName) { + protected void doAction(@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { findActionAndCheck(actionHint, testFullPath); } diff --git a/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/ManuallySetupExternalResourcesFixTest.java b/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/ManuallySetupExternalResourcesFixTest.java index 5479fc62d3ed..cab66b9f6408 100644 --- a/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/ManuallySetupExternalResourcesFixTest.java +++ b/xml/tests/src/com/intellij/codeInsight/daemon/quickFix/ManuallySetupExternalResourcesFixTest.java @@ -28,7 +28,7 @@ public class ManuallySetupExternalResourcesFixTest extends LightQuickFixParamete // just check for action availability @Override - protected void doAction(@NotNull ActionHint actionHint, String testFullPath, String testName) { + protected void doAction(@NotNull ActionHint actionHint, @NotNull String testFullPath, @NotNull String testName) { findActionAndCheck(actionHint, testFullPath); }