mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
javadoc, cleanup
GitOrigin-RevId: a55ff14618f0ab0e4f9744cd1c74d1b764cd18de
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a1bc75e143
commit
217a688b9b
@@ -279,6 +279,11 @@ final class HighlightInfoUpdater implements Disposable {
|
||||
/**
|
||||
* Tool {@code toolId} has generated (maybe empty) {@code newInfos} highlights during visiting PsiElement {@code visitedPsiElement}.
|
||||
* Remove all highlights that this tool had generated earlier during visiting this psi element, and replace them with {@code newInfosGenerated}
|
||||
* Do not read below, it's very private and just for me
|
||||
* @param toolId one of
|
||||
* {@code String}: the tool is a {@link LocalInspectionTool} with its {@link LocalInspectionTool#getShortName()}==toolId
|
||||
* {@code Class<? extends Annotator>}: the tool is an {@link com.intellij.lang.annotation.Annotator} of the corresponding class
|
||||
* {@code Class<? extends HighlightVisitor>}: the tool is a {@link HighlightVisitor} of the corresponding class
|
||||
*/
|
||||
void psiElementVisited(@NotNull Object toolId,
|
||||
@NotNull PsiElement visitedPsiElement,
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.intellij.codeInsight.daemon.impl;
|
||||
|
||||
import com.intellij.codeHighlighting.TextEditorHighlightingPass;
|
||||
import com.intellij.codeInspection.ex.GlobalInspectionContextBase;
|
||||
import com.intellij.injected.editor.DocumentWindow;
|
||||
import com.intellij.lang.injection.InjectedLanguageManager;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
@@ -52,6 +53,9 @@ public abstract class ProgressableTextEditorHighlightingPass extends TextEditorH
|
||||
throw new IllegalArgumentException("File '" + file +"' ("+file.getClass()+") is an injected fragment but expected top-level");
|
||||
}
|
||||
}
|
||||
if (document instanceof DocumentWindow) {
|
||||
throw new IllegalArgumentException("Document '" + document +" is an injected fragment but expected top-level");
|
||||
}
|
||||
if (editor != null) {
|
||||
PsiUtilBase.assertEditorAndProjectConsistent(project, editor);
|
||||
if (editor.getDocument() != document) {
|
||||
|
||||
@@ -13,8 +13,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
* <li>Avoid overriding or implementing this interface.
|
||||
* Things have got more complex since the introduction of asynchronous action update.
|
||||
* If you need to alter the provided data context or create one from a set of data
|
||||
* use {@link CustomizedDataContext} or {@link SimpleDataContext} instead, even in tests.
|
||||
* These classes are async-ready, optionally support {@link com.intellij.openapi.util.UserDataHolder}, and run {@link GetDataRule} rules.</li>
|
||||
* use {@link CustomizedDataContext} or {@link com.intellij.openapi.actionSystem.impl.SimpleDataContext} instead, even in tests.
|
||||
* These classes are async-ready, optionally support {@link com.intellij.openapi.util.UserDataHolder}, and run {@link com.intellij.ide.impl.dataRules.GetDataRule} rules.</li>
|
||||
* <li>Do not to confuse {@link DataProvider} with {@link DataContext}.
|
||||
* A {@link DataContext} is usually provided by the platform with {@link DataProvider}s as its building blocks.
|
||||
* For example, a node in a tree view could be a {@link DataProvider} but not a {@link DataContext}.</li>
|
||||
@@ -42,7 +42,8 @@ public interface DataContext {
|
||||
*/
|
||||
@Nullable Object getData(@NotNull String dataId);
|
||||
|
||||
DataContext EMPTY_CONTEXT = dataId -> null;
|
||||
@NotNull
|
||||
DataContext EMPTY_CONTEXT = __ -> null;
|
||||
|
||||
/**
|
||||
* Returns the value corresponding to the specified data key. Some of the supported
|
||||
|
||||
Reference in New Issue
Block a user