From 99a8ab6b0115a5350e0064ea81998c8bcf9361e8 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Wed, 28 Mar 2012 19:31:45 +0400 Subject: [PATCH] Made debug info visible only when IDEA is in internal mode. --- .../jet/plugin/highlighter/DebugInfoAnnotator.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/idea/src/org/jetbrains/jet/plugin/highlighter/DebugInfoAnnotator.java b/idea/src/org/jetbrains/jet/plugin/highlighter/DebugInfoAnnotator.java index 55760aed896..135ee272c60 100644 --- a/idea/src/org/jetbrains/jet/plugin/highlighter/DebugInfoAnnotator.java +++ b/idea/src/org/jetbrains/jet/plugin/highlighter/DebugInfoAnnotator.java @@ -51,19 +51,13 @@ public class DebugInfoAnnotator implements Annotator { public static final TokenSet EXCLUDED = TokenSet.create(COLON, AS_KEYWORD, AS_SAFE, IS_KEYWORD, NOT_IS, OROR, ANDAND, EQ, EQEQEQ, EXCLEQEQEQ, ELVIS, EXCLEXCL); - private static volatile boolean debugInfoEnabled = true; - - public static void setDebugInfoEnabled(boolean value) { - debugInfoEnabled = value; - } - public static boolean isDebugInfoEnabled() { - return debugInfoEnabled; + return ApplicationManager.getApplication().isInternal(); } @Override public void annotate(@NotNull PsiElement element, @NotNull final AnnotationHolder holder) { - if (!debugInfoEnabled || !JetPsiChecker.isErrorReportingEnabled()) { + if (!isDebugInfoEnabled() || !JetPsiChecker.isErrorReportingEnabled()) { return; }