This commit is contained in:
Alexey Kudravtsev
2012-06-04 15:01:09 +04:00
parent 2395ed7e08
commit 84d77c47cc
19 changed files with 25 additions and 21 deletions
@@ -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() {
@@ -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) {
@@ -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();
@@ -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;
}
@@ -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;
@@ -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) {
@@ -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);
}
@@ -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
@@ -62,7 +62,7 @@ public class ShowAutoImportPass extends TextEditorHighlightingPass {
}
@Override
public void doCollectInformation(ProgressIndicator progress) {
public void doCollectInformation(@NotNull ProgressIndicator progress) {
}
@Override
@@ -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;
@@ -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<Language> relevantLanguages = viewProvider.getLanguages();
List<LineMarkerInfo> markers = new SmartList<LineMarkerInfo>();
@@ -302,7 +302,7 @@ public class FrameworkDetectionManager extends AbstractProjectComponent implemen
}
@Override
public void doCollectInformation(ProgressIndicator progress) {
public void doCollectInformation(@NotNull ProgressIndicator progress) {
ensureIndexIsUpToDate(myDetectors);
}
@@ -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);
@@ -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 <code>true</code> 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.
@@ -47,7 +47,7 @@ public class TestDataHighlightingPass extends TextEditorHighlightingPass {
}
@Override
public void doCollectInformation(ProgressIndicator progress) {
public void doCollectInformation(@NotNull ProgressIndicator progress) {
}
@Override
@@ -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();
@@ -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);
}
@@ -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);
}
@@ -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;
}