mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
[highlighting] disable F2 navigation for considerations (IDEA-293871)
GitOrigin-RevId: 5499b1f877a78a6a2733b14d4c8cd6559e6cff0f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8c42b07371
commit
d16716c06b
@@ -0,0 +1,7 @@
|
||||
class a {
|
||||
|
||||
public static void main(String[] <text_attr descr="Reassigned parameter">ar<caret>gs</text_attr>) {
|
||||
<text_attr descr="Reassigned parameter">args</text_attr> = null;
|
||||
System.out.println(<text_attr descr="Reassigned parameter">args</text_attr>);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.java.codeInsight.daemon;
|
||||
|
||||
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings;
|
||||
import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase;
|
||||
import com.intellij.codeInsight.daemon.impl.GotoNextErrorHandler;
|
||||
import com.intellij.codeInsight.daemon.impl.HighlightInfo;
|
||||
import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.ReassignedVariableInspection;
|
||||
@@ -420,6 +422,22 @@ public class LightAdvHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest(true);
|
||||
}
|
||||
|
||||
public void testNavigateByReassignVariables() {
|
||||
doTest(true, true);
|
||||
DaemonCodeAnalyzerSettings settings = DaemonCodeAnalyzerSettings.getInstance();
|
||||
boolean old = settings.isNextErrorActionGoesToErrorsFirst();
|
||||
settings.setNextErrorActionGoesToErrorsFirst(true);
|
||||
try {
|
||||
int offset = getEditor().getCaretModel().getOffset();
|
||||
new GotoNextErrorHandler(true).invoke(getProject(), getEditor(), getFile());
|
||||
|
||||
assertEquals(offset, getEditor().getCaretModel().getOffset());
|
||||
}
|
||||
finally {
|
||||
settings.setNextErrorActionGoesToErrorsFirst(old);
|
||||
}
|
||||
}
|
||||
|
||||
public void testUninitializedVarComplexTernary() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public final class HighlightSeverity implements Comparable<HighlightSeverity> {
|
||||
public static final HighlightSeverity TEXT_ATTRIBUTES =
|
||||
new HighlightSeverity(
|
||||
"TEXT ATTRIBUTES",
|
||||
10,
|
||||
11,
|
||||
InspectionsBundle.messagePointer("text.attributes.severity"),
|
||||
InspectionsBundle.messagePointer("text.attributes.severity.capitalized"),
|
||||
InspectionsBundle.messagePointer("text.attributes.severity.count.message"));
|
||||
|
||||
@@ -32,7 +32,7 @@ public final class SeverityRegistrar implements Comparator<HighlightSeverity>, M
|
||||
/**
|
||||
* Always first {@link HighlightDisplayLevel#DO_NOT_SHOW} must be skipped during navigation, editing settings, etc.
|
||||
*/
|
||||
static final int SHOWN_SEVERITIES_OFFSET = 1;
|
||||
static final int SHOWN_SEVERITIES_OFFSET = 2;
|
||||
|
||||
private static final Logger LOG = Logger.getInstance(SeverityRegistrar.class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user