Removed obsolete action disabling error highlighting.
This commit is contained in:
@@ -64,11 +64,6 @@
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift J"/>
|
||||
<add-to-group group-id="CodeMenu" anchor="last"/>
|
||||
</action>
|
||||
<action id="ToggleJetErrorReporting" class="org.jetbrains.jet.plugin.actions.ToggleErrorReportingAction"
|
||||
text="Error Reporting Enabled">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift E"/>
|
||||
<add-to-group group-id="CodeMenu" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<group id="EditorGutterKotlinPopupMenu">
|
||||
<action id="ShowKotlinSignatures" class="org.jetbrains.jet.plugin.ktSignature.ShowKotlinSignaturesAction"/>
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.plugin.actions;
|
||||
|
||||
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.ToggleAction;
|
||||
import org.jetbrains.jet.plugin.highlighter.JetPsiChecker;
|
||||
|
||||
public class ToggleErrorReportingAction extends ToggleAction {
|
||||
@Override
|
||||
public boolean isSelected(AnActionEvent e) {
|
||||
return JetPsiChecker.isErrorReportingEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelected(AnActionEvent e, boolean state) {
|
||||
JetPsiChecker.setErrorReportingEnabled(state);
|
||||
DaemonCodeAnalyzer.getInstance(e.getProject()).restart();
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ public class DebugInfoAnnotator implements Annotator {
|
||||
|
||||
@Override
|
||||
public void annotate(@NotNull PsiElement element, @NotNull final AnnotationHolder holder) {
|
||||
if (!isDebugInfoEnabled() || !JetPsiChecker.isErrorReportingEnabled() ||
|
||||
if (!isDebugInfoEnabled() ||
|
||||
!JetPluginUtil.isInSourceContent(element) ||
|
||||
JetPluginUtil.isKtFileInGradleProjectInWrongFolder(element)) {
|
||||
return;
|
||||
|
||||
@@ -51,19 +51,10 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class JetPsiChecker implements Annotator {
|
||||
private static volatile boolean errorReportingEnabled = true;
|
||||
private static boolean namesHighlightingTest;
|
||||
|
||||
private static final Logger LOG = Logger.getInstance(JetPsiChecker.class);
|
||||
|
||||
public static void setErrorReportingEnabled(boolean value) {
|
||||
errorReportingEnabled = value;
|
||||
}
|
||||
|
||||
public static boolean isErrorReportingEnabled() {
|
||||
return errorReportingEnabled;
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
public static void setNamesHighlightingTest(boolean namesHighlightingTest) {
|
||||
JetPsiChecker.namesHighlightingTest = namesHighlightingTest;
|
||||
@@ -115,7 +106,7 @@ public class JetPsiChecker implements Annotator {
|
||||
try {
|
||||
BindingContext bindingContext = AnalyzerFacadeWithCache.analyzeFileWithCache(file).getBindingContext();
|
||||
|
||||
if (errorReportingEnabled && JetPluginUtil.isInSourceContent(element, false)) {
|
||||
if (JetPluginUtil.isInSourceContent(element, false)) {
|
||||
Collection<Diagnostic> diagnostics = Sets.newLinkedHashSet(bindingContext.getDiagnostics());
|
||||
Set<PsiElement> redeclarations = Sets.newHashSet();
|
||||
for (Diagnostic diagnostic : diagnostics) {
|
||||
|
||||
Reference in New Issue
Block a user