mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
notnull
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 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.
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.openapi.editor.ex;
|
||||
|
||||
import com.intellij.openapi.editor.event.DocumentListener;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
@@ -40,8 +41,7 @@ public interface PrioritizedDocumentListener extends DocumentListener {
|
||||
return getPriority(o1) - getPriority(o2);
|
||||
}
|
||||
|
||||
private int getPriority(Object o) {
|
||||
assert o != null;
|
||||
private int getPriority(@NotNull Object o) {
|
||||
if (o instanceof PrioritizedDocumentListener) return ((PrioritizedDocumentListener)o).getPriority();
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
+2
-4
@@ -58,7 +58,7 @@ public class IdentifierHighlighterPass extends TextEditorHighlightingPass {
|
||||
private final Collection<TextRange> myWriteAccessRanges = Collections.synchronizedList(new ArrayList<TextRange>());
|
||||
private final int myCaretOffset;
|
||||
|
||||
protected IdentifierHighlighterPass(final Project project, final PsiFile file, final Editor editor) {
|
||||
protected IdentifierHighlighterPass(@NotNull Project project, @NotNull PsiFile file, @NotNull Editor editor) {
|
||||
super(project, editor.getDocument(), false);
|
||||
myFile = file;
|
||||
myEditor = editor;
|
||||
@@ -91,9 +91,7 @@ public class IdentifierHighlighterPass extends TextEditorHighlightingPass {
|
||||
if (!PsiDocumentManager.getInstance(myProject).isUncommited(myEditor.getDocument())) {
|
||||
// when document is committed, try to check injected stuff - it's fast
|
||||
Editor injectedEditor = InjectedLanguageUtil.getEditorForInjectedLanguageNoCommit(myEditor, myFile, myCaretOffset);
|
||||
if (injectedEditor != null) {
|
||||
myTarget = TargetElementUtilBase.getInstance().findTargetElement(injectedEditor, flags, injectedEditor.getCaretModel().getOffset());
|
||||
}
|
||||
myTarget = TargetElementUtilBase.getInstance().findTargetElement(injectedEditor, flags, injectedEditor.getCaretModel().getOffset());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user