mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
GitOrigin-RevId: 1217e2adf8ae698ebbc2e6365d8181f298efca27
This commit is contained in:
committed by
intellij-monorepo-bot
parent
55c5001ac7
commit
60104b28d2
+7
-9
@@ -49,7 +49,7 @@ public class GotoNextErrorHandler implements CodeInsightActionHandler {
|
||||
@Override
|
||||
public void invoke(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile psiFile) {
|
||||
int caretOffset = editor.getCaretModel().getOffset();
|
||||
gotoNextError(project, editor, psiFile, caretOffset);
|
||||
gotoNextError(project, psiFile, editor, caretOffset);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -57,7 +57,7 @@ public class GotoNextErrorHandler implements CodeInsightActionHandler {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void gotoNextError(Project project, Editor editor, PsiFile psiFile, int caretOffset) {
|
||||
private void gotoNextError(@NotNull Project project, @NotNull PsiFile psiFile, @NotNull Editor editor, int caretOffset) {
|
||||
SeverityRegistrar severityRegistrar = SeverityRegistrar.getSeverityRegistrar(project);
|
||||
DaemonCodeAnalyzerSettings settings = DaemonCodeAnalyzerSettings.getInstance();
|
||||
int maxSeverity = settings.isNextErrorActionGoesToErrorsFirst() ? severityRegistrar.getSeveritiesCount() - 1
|
||||
@@ -109,7 +109,7 @@ public class GotoNextErrorHandler implements CodeInsightActionHandler {
|
||||
return infoToGo[0][0];
|
||||
}
|
||||
|
||||
private HighlightInfo getBetterInfoThan(HighlightInfo infoToGo, int caretOffset, int startOffset, HighlightInfo info) {
|
||||
private HighlightInfo getBetterInfoThan(HighlightInfo infoToGo, int caretOffset, int startOffset, @NotNull HighlightInfo info) {
|
||||
if (isBetterThan(infoToGo, caretOffset, startOffset)) {
|
||||
infoToGo = info;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public class GotoNextErrorHandler implements CodeInsightActionHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private void showMessageWhenNoHighlights(Project project, PsiFile psiFile, Editor editor, int caretOffset) {
|
||||
private void showMessageWhenNoHighlights(@NotNull Project project, @NotNull PsiFile psiFile, @NotNull Editor editor, int caretOffset) {
|
||||
DaemonCodeAnalyzerImpl codeHighlighter = (DaemonCodeAnalyzerImpl)DaemonCodeAnalyzer.getInstance(project);
|
||||
HintManagerImpl hintManager = HintManagerImpl.getInstanceImpl();
|
||||
if (codeHighlighter.isErrorAnalyzingFinished(psiFile)) {
|
||||
@@ -142,16 +142,14 @@ public class GotoNextErrorHandler implements CodeInsightActionHandler {
|
||||
|
||||
Disposable hintDisposable = Disposer.newDisposable("GotoNextErrorHandler.showMessageWhenNoHighlights");
|
||||
Disposer.register(project, hintDisposable);
|
||||
hint.addHintListener((eventObject) -> {
|
||||
Disposer.dispose(hintDisposable);
|
||||
});
|
||||
hint.addHintListener(__ -> Disposer.dispose(hintDisposable));
|
||||
|
||||
MessageBusConnection busConnection = project.getMessageBus().connect(hintDisposable);
|
||||
busConnection.subscribe(DaemonCodeAnalyzer.DAEMON_EVENT_TOPIC, new DaemonCodeAnalyzer.DaemonListener() {
|
||||
@Override
|
||||
public void daemonFinished() {
|
||||
hint.hide();
|
||||
gotoNextError(project, editor, psiFile, caretOffset);
|
||||
gotoNextError(project, psiFile, editor, caretOffset);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -195,7 +193,7 @@ public class GotoNextErrorHandler implements CodeInsightActionHandler {
|
||||
if (highlighter != null) ProblemsView.selectHighlighterIfVisible(project, highlighter);
|
||||
}
|
||||
|
||||
private static int getNavigationPositionFor(HighlightInfo info, Document document) {
|
||||
private static int getNavigationPositionFor(@NotNull HighlightInfo info, @NotNull Document document) {
|
||||
int start = info.getActualStartOffset();
|
||||
int textLength = document.getTextLength();
|
||||
if (start >= textLength) return textLength;
|
||||
|
||||
+2
-3
@@ -2,6 +2,7 @@
|
||||
package com.intellij.idea.extensions;
|
||||
|
||||
import com.intellij.testFramework.SkipSlowTestLocally;
|
||||
import com.intellij.testFramework.TestFrameworkUtil;
|
||||
import org.junit.jupiter.api.extension.ConditionEvaluationResult;
|
||||
import org.junit.jupiter.api.extension.ExecutionCondition;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||
@@ -10,11 +11,9 @@ import org.junit.platform.commons.support.AnnotationSupport;
|
||||
public class SkipSlowExecutionCondition implements ExecutionCondition {
|
||||
private static final ConditionEvaluationResult ENABLED = ConditionEvaluationResult.enabled("Enabled locally");
|
||||
private static final ConditionEvaluationResult DISABLED = ConditionEvaluationResult.disabled("Slow tests are disabled locally");
|
||||
private static final boolean SKIP_SLOW_TESTS = System.getProperty("skip.slow.tests.locally") != null;
|
||||
|
||||
@Override
|
||||
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) {
|
||||
if (!SKIP_SLOW_TESTS) return ENABLED;
|
||||
return AnnotationSupport.findAnnotation(context.getTestClass(), SkipSlowTestLocally.class).isPresent() ? DISABLED : ENABLED;
|
||||
return TestFrameworkUtil.SKIP_SLOW && AnnotationSupport.findAnnotation(context.getTestClass(), SkipSlowTestLocally.class).isPresent() ? DISABLED : ENABLED;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user