From 84d77c47cc2aae72a64e32dc226eecc6eeb18d65 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 4 Jun 2012 14:58:15 +0400 Subject: [PATCH] notnull --- .../intellij/codeHighlighting/TextEditorHighlightingPass.java | 4 ++-- .../com/intellij/codeInsight/daemon/impl/CodeFoldingPass.java | 2 +- .../intellij/codeInsight/daemon/impl/ExternalToolPass.java | 2 +- .../codeInsight/daemon/impl/IdentifierHighlighterPass.java | 3 ++- .../src/com/intellij/codeInsight/daemon/impl/IndentsPass.java | 2 +- .../codeInsight/daemon/impl/InjectedCodeFoldingPass.java | 2 +- .../intellij/codeInsight/daemon/impl/PassExecutorService.java | 2 +- .../daemon/impl/ProgressableTextEditorHighlightingPass.java | 4 ++-- .../intellij/codeInsight/daemon/impl/ShowAutoImportPass.java | 2 +- .../intellij/codeInsight/daemon/impl/ShowIntentionsPass.java | 2 +- .../intellij/codeInsight/daemon/impl/SlowLineMarkersPass.java | 2 +- .../framework/detection/impl/FrameworkDetectionManager.java | 2 +- .../changeSignature/ChangeSignaturePassFactory.java | 2 +- .../src/com/intellij/codeHighlighting/HighlightingPass.java | 3 ++- .../com/intellij/testAssistant/TestDataHighlightingPass.java | 2 +- .../codeInspection/local/GroovyPostHighlightingPass.java | 2 +- .../src/com/intellij/uiDesigner/FormHighlightingPass.java | 3 ++- .../designer/inspection/DesignerHighlightingPass.java | 3 ++- .../impl/tagTreeHighlighting/XmlTagTreeHighlightingPass.java | 2 +- 19 files changed, 25 insertions(+), 21 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeHighlighting/TextEditorHighlightingPass.java b/platform/lang-impl/src/com/intellij/codeHighlighting/TextEditorHighlightingPass.java index fcda8e15f6b2..7c7a123b3d5d 100644 --- a/platform/lang-impl/src/com/intellij/codeHighlighting/TextEditorHighlightingPass.java +++ b/platform/lang-impl/src/com/intellij/codeHighlighting/TextEditorHighlightingPass.java @@ -56,7 +56,7 @@ public abstract class TextEditorHighlightingPass implements HighlightingPass { } @Override - public final void collectInformation(ProgressIndicator progress) { + public final void collectInformation(@NotNull ProgressIndicator progress) { if (!isValid()) return; //Document has changed. myDumb = DumbService.getInstance(myProject).isDumb(); doCollectInformation(progress); @@ -103,7 +103,7 @@ public abstract class TextEditorHighlightingPass implements HighlightingPass { doApplyInformationToEditor(); } - public abstract void doCollectInformation(ProgressIndicator progress); + public abstract void doCollectInformation(@NotNull ProgressIndicator progress); public abstract void doApplyInformationToEditor(); public final int getId() { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/CodeFoldingPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/CodeFoldingPass.java index fb45fc8a99ca..444f8828fb4b 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/CodeFoldingPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/CodeFoldingPass.java @@ -41,7 +41,7 @@ class CodeFoldingPass extends TextEditorHighlightingPass implements DumbAware { } @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { final boolean firstTime = isFirstTime(myFile, myEditor, THE_FIRST_TIME); Runnable runnable = CodeFoldingManager.getInstance(myProject).updateFoldRegionsAsync(myEditor, firstTime); synchronized (this) { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ExternalToolPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ExternalToolPass.java index d4e0af3d53bb..d27979e12eb9 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ExternalToolPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ExternalToolPass.java @@ -80,7 +80,7 @@ public class ExternalToolPass extends TextEditorHighlightingPass { } @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { myDocumentChanged = false; final FileViewProvider viewProvider = myFile.getViewProvider(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java index ed30584fb855..2012c5c95773 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java @@ -42,6 +42,7 @@ import com.intellij.psi.search.LocalSearchScope; import com.intellij.psi.search.searches.ReferencesSearch; import com.intellij.util.Processor; import com.intellij.util.containers.ContainerUtil; +import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.Collection; @@ -71,7 +72,7 @@ public class IdentifierHighlighterPass extends TextEditorHighlightingPass { } @Override - public void doCollectInformation(final ProgressIndicator progress) { + public void doCollectInformation(@NotNull final ProgressIndicator progress) { if (!CodeInsightSettings.getInstance().HIGHLIGHT_IDENTIFIER_UNDER_CARET) { return; } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IndentsPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IndentsPass.java index 5ecaffe59ff1..9f1627f4134e 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IndentsPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IndentsPass.java @@ -204,7 +204,7 @@ public class IndentsPass extends TextEditorHighlightingPass implements DumbAware } @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { final Long stamp = myEditor.getUserData(LAST_TIME_INDENTS_BUILT); if (stamp != null && stamp.longValue() == nowStamp()) return; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedCodeFoldingPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedCodeFoldingPass.java index 5656cd52ece6..10128243f6ad 100755 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedCodeFoldingPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedCodeFoldingPass.java @@ -40,7 +40,7 @@ class InjectedCodeFoldingPass extends TextEditorHighlightingPass implements Dumb } @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { boolean firstTime = CodeFoldingPass.isFirstTime(myFile, myEditor, THE_FIRST_TIME_KEY); Runnable runnable = FoldingUpdate.updateInjectedFoldRegions(myEditor, myFile, firstTime); synchronized (this) { diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PassExecutorService.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PassExecutorService.java index 92ff1f1579f8..8a27bba247ab 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PassExecutorService.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PassExecutorService.java @@ -125,7 +125,7 @@ public abstract class PassExecutorService implements Disposable { // run all passes in sequence textEditorHighlightingPass = new TextEditorHighlightingPass(myProject, document, true) { @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { pass.collectInformation(progress); } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ProgressableTextEditorHighlightingPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ProgressableTextEditorHighlightingPass.java index 9bc2df392651..dcb582d517bd 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ProgressableTextEditorHighlightingPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ProgressableTextEditorHighlightingPass.java @@ -53,7 +53,7 @@ public abstract class ProgressableTextEditorHighlightingPass extends TextEditorH } @Override - public final void doCollectInformation(final ProgressIndicator progress) { + public final void doCollectInformation(@NotNull final ProgressIndicator progress) { myFinished = false; collectInformationWithProgress(progress); repaintTrafficIcon(); @@ -130,7 +130,7 @@ public abstract class ProgressableTextEditorHighlightingPass extends TextEditorH } @Override - public void doCollectInformation(final ProgressIndicator progress) { + public void doCollectInformation(@NotNull final ProgressIndicator progress) { } @Override diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowAutoImportPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowAutoImportPass.java index 821887e40166..7b1b03ed7228 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowAutoImportPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowAutoImportPass.java @@ -62,7 +62,7 @@ public class ShowAutoImportPass extends TextEditorHighlightingPass { } @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { } @Override diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java index e90c7b8589b5..f593f86153e8 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java @@ -120,7 +120,7 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass { } @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { if (!ApplicationManager.getApplication().isUnitTestMode() && !myEditor.getContentComponent().hasFocus()) return; TemplateState state = TemplateManagerImpl.getTemplateState(myEditor); if (state != null && !state.isFinished()) return; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SlowLineMarkersPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SlowLineMarkersPass.java index e2951c895e7f..e4cb967c8a2e 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SlowLineMarkersPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/SlowLineMarkersPass.java @@ -53,7 +53,7 @@ public class SlowLineMarkersPass extends TextEditorHighlightingPass implements L } @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { final FileViewProvider viewProvider = myFile.getViewProvider(); final Set relevantLanguages = viewProvider.getLanguages(); List markers = new SmartList(); diff --git a/platform/lang-impl/src/com/intellij/framework/detection/impl/FrameworkDetectionManager.java b/platform/lang-impl/src/com/intellij/framework/detection/impl/FrameworkDetectionManager.java index b4d34918eed4..753f20e571b0 100644 --- a/platform/lang-impl/src/com/intellij/framework/detection/impl/FrameworkDetectionManager.java +++ b/platform/lang-impl/src/com/intellij/framework/detection/impl/FrameworkDetectionManager.java @@ -302,7 +302,7 @@ public class FrameworkDetectionManager extends AbstractProjectComponent implemen } @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { ensureIndexIsUpToDate(myDetectors); } diff --git a/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ChangeSignaturePassFactory.java b/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ChangeSignaturePassFactory.java index 069fa045c2bc..4d0b995831e5 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ChangeSignaturePassFactory.java +++ b/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ChangeSignaturePassFactory.java @@ -74,7 +74,7 @@ public class ChangeSignaturePassFactory extends AbstractProjectComponent impleme } @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { myRange = null; final ChangeSignatureGestureDetector detector = ChangeSignatureGestureDetector.getInstance(myProject); final ChangeInfo changeInfo = detector.getInitialChangeInfo(myFile); diff --git a/platform/platform-api/src/com/intellij/codeHighlighting/HighlightingPass.java b/platform/platform-api/src/com/intellij/codeHighlighting/HighlightingPass.java index 9ad648783ee6..447d4f414b04 100644 --- a/platform/platform-api/src/com/intellij/codeHighlighting/HighlightingPass.java +++ b/platform/platform-api/src/com/intellij/codeHighlighting/HighlightingPass.java @@ -16,6 +16,7 @@ package com.intellij.codeHighlighting; import com.intellij.openapi.progress.ProgressIndicator; +import org.jetbrains.annotations.NotNull; public interface HighlightingPass { HighlightingPass[] EMPTY_ARRAY = new HighlightingPass[0]; @@ -27,7 +28,7 @@ public interface HighlightingPass { * @param progress to check for highlighting process is cancelled. Pass is to check progress.isCanceled() as often as possible and * throw {@link com.intellij.openapi.progress.ProcessCanceledException} if true is returned. */ - void collectInformation(ProgressIndicator progress); + void collectInformation(@NotNull ProgressIndicator progress); /** * Called to apply information collected by {@linkplain #collectInformation(com.intellij.openapi.progress.ProgressIndicator)} to the editor. diff --git a/plugins/IdeaTestAssistant/src/com/intellij/testAssistant/TestDataHighlightingPass.java b/plugins/IdeaTestAssistant/src/com/intellij/testAssistant/TestDataHighlightingPass.java index 04e4a6978641..e3d1fc96ddb3 100644 --- a/plugins/IdeaTestAssistant/src/com/intellij/testAssistant/TestDataHighlightingPass.java +++ b/plugins/IdeaTestAssistant/src/com/intellij/testAssistant/TestDataHighlightingPass.java @@ -47,7 +47,7 @@ public class TestDataHighlightingPass extends TextEditorHighlightingPass { } @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { } @Override diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInspection/local/GroovyPostHighlightingPass.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInspection/local/GroovyPostHighlightingPass.java index 899389f03bf9..57b5ddc97398 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInspection/local/GroovyPostHighlightingPass.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInspection/local/GroovyPostHighlightingPass.java @@ -84,7 +84,7 @@ public class GroovyPostHighlightingPass extends TextEditorHighlightingPass { myEditor = editor; } - public void doCollectInformation(final ProgressIndicator progress) { + public void doCollectInformation(@NotNull final ProgressIndicator progress) { final InspectionProfile profile = InspectionProjectProfileManager.getInstance(myProject).getInspectionProfile(); final boolean deadCodeEnabled = profile.isToolEnabled(HighlightDisplayKey.find(GroovyUnusedDeclarationInspection.SHORT_NAME), myFile); ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myProject).getFileIndex(); diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/FormHighlightingPass.java b/plugins/ui-designer/src/com/intellij/uiDesigner/FormHighlightingPass.java index e3b7c898a49b..dae49482b998 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/FormHighlightingPass.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/FormHighlightingPass.java @@ -20,6 +20,7 @@ import com.intellij.codeHighlighting.HighlightingPass; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.uiDesigner.designSurface.GuiEditor; import com.intellij.uiDesigner.propertyInspector.UIDesignerToolWindowManager; +import org.jetbrains.annotations.NotNull; /** * @author yole @@ -31,7 +32,7 @@ public class FormHighlightingPass implements HighlightingPass { myEditor = editor; } - public void collectInformation(ProgressIndicator progress) { + public void collectInformation(@NotNull ProgressIndicator progress) { ErrorAnalyzer.analyzeErrors(myEditor, myEditor.getRootContainer(), progress); } diff --git a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/inspection/DesignerHighlightingPass.java b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/inspection/DesignerHighlightingPass.java index f74c9db181ae..20ef0504d9e8 100644 --- a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/inspection/DesignerHighlightingPass.java +++ b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/inspection/DesignerHighlightingPass.java @@ -19,6 +19,7 @@ import com.intellij.codeHighlighting.HighlightingPass; import com.intellij.designer.DesignerToolWindowManager; import com.intellij.designer.designSurface.DesignerEditorPanel; import com.intellij.openapi.progress.ProgressIndicator; +import org.jetbrains.annotations.NotNull; /** * @author Alexander Lobas @@ -31,7 +32,7 @@ public final class DesignerHighlightingPass implements HighlightingPass { } @Override - public void collectInformation(ProgressIndicator progress) { + public void collectInformation(@NotNull ProgressIndicator progress) { myDesigner.loadInspections(progress); } diff --git a/xml/impl/src/com/intellij/codeInsight/daemon/impl/tagTreeHighlighting/XmlTagTreeHighlightingPass.java b/xml/impl/src/com/intellij/codeInsight/daemon/impl/tagTreeHighlighting/XmlTagTreeHighlightingPass.java index 9e3aedfa4525..6e7bc131bedd 100644 --- a/xml/impl/src/com/intellij/codeInsight/daemon/impl/tagTreeHighlighting/XmlTagTreeHighlightingPass.java +++ b/xml/impl/src/com/intellij/codeInsight/daemon/impl/tagTreeHighlighting/XmlTagTreeHighlightingPass.java @@ -74,7 +74,7 @@ public class XmlTagTreeHighlightingPass extends TextEditorHighlightingPass { } @Override - public void doCollectInformation(ProgressIndicator progress) { + public void doCollectInformation(@NotNull ProgressIndicator progress) { if (ApplicationManager.getApplication().isUnitTestMode()) { return; }