mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix warnings
GitOrigin-RevId: f6416c9263b26d60bf223a46127dac4d6af5951d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6adc9a28d7
commit
4ad78ae9b9
+1
-1
@@ -432,7 +432,7 @@ final class HighlightInfoUpdater {
|
||||
* We associate each HighlightInfo with the PSI element for which the inspection builder has produced that info.
|
||||
* Unfortunately, there are some crazy inspections that produce infos in their {@link LocalInspectionTool#inspectionFinished(LocalInspectionToolSession, ProblemsHolder)} method instead.
|
||||
* Which is very slow, because that highlight info won't be displayed until the entire file is visited.
|
||||
* For these infos the associated PSI element is assumed to be this {@link #FAKE_ELEMENT}
|
||||
* For these infos the associated PSI element is assumed to be this {@code FAKE_ELEMENT}
|
||||
*/
|
||||
static final PsiElement FAKE_ELEMENT = new PsiElement() {
|
||||
@Override
|
||||
|
||||
+1
-8
@@ -433,9 +433,6 @@ public final class LocalInspectionsPass extends ProgressableTextEditorHighlighti
|
||||
|
||||
if (!isTests && !toolWrapper.isApplicable(projectTypes)) continue;
|
||||
|
||||
if (toolWrapper instanceof LocalInspectionToolWrapper local && !isAcceptableLocalTool(local)) {
|
||||
continue;
|
||||
}
|
||||
HighlightDisplayKey key = toolWrapper.getDisplayKey();
|
||||
if (!profile.isToolEnabled(key, getFile())) continue;
|
||||
if (HighlightDisplayLevel.DO_NOT_SHOW.equals(profile.getErrorLevel(key, getFile()))) continue;
|
||||
@@ -445,7 +442,7 @@ public final class LocalInspectionsPass extends ProgressableTextEditorHighlighti
|
||||
}
|
||||
else {
|
||||
wrapper = ((GlobalInspectionToolWrapper)toolWrapper).getSharedLocalInspectionToolWrapper();
|
||||
if (wrapper == null || !isAcceptableLocalTool(wrapper)) continue;
|
||||
if (wrapper == null) continue;
|
||||
}
|
||||
String language = wrapper.getLanguage();
|
||||
if (language != null && Language.findLanguageByID(language) == null) {
|
||||
@@ -464,10 +461,6 @@ public final class LocalInspectionsPass extends ProgressableTextEditorHighlighti
|
||||
return enabled;
|
||||
}
|
||||
|
||||
protected boolean isAcceptableLocalTool(@NotNull LocalInspectionToolWrapper wrapper) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<HighlightInfo> getInfos() {
|
||||
return Collections.unmodifiableList(myInfos);
|
||||
|
||||
+2
-6
@@ -127,12 +127,8 @@ public final class MarkdownPsiElementFactory {
|
||||
if (columnsCount < 1) {
|
||||
throw new IllegalArgumentException("Passed separator text should be valid and contain at least one column.\n Text passed: [" + text + "]");
|
||||
}
|
||||
final var builder = new StringBuilder();
|
||||
builder.append("|");
|
||||
builder.append(" |".repeat(columnsCount));
|
||||
builder.append('\n');
|
||||
builder.append(text);
|
||||
final var file = createFile(project, builder.toString());
|
||||
String markdownFile = "|" + " |".repeat(columnsCount) + '\n' + text;
|
||||
final var file = createFile(project, markdownFile);
|
||||
final var table = PsiTreeUtil.getParentOfType(file.findElementAt(0), MarkdownTable.class);
|
||||
if (table == null) {
|
||||
final var psi = DebugUtil.psiToString(file, true, true);
|
||||
|
||||
Reference in New Issue
Block a user