From 00f7ea1e4bd8b12d2691cafa07f63efd721ccee6 Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Wed, 30 Oct 2013 00:36:56 +0100 Subject: [PATCH] Find: Comments only: Groovy javadoc comments are skipped (IDEA-115578) --- java/java-tests/testSrc/com/intellij/find/FindManagerTest.java | 2 ++ .../plugins/groovy/highlighter/GroovyEditorHighlighter.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java b/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java index 562e1dd80f24..a7c477a52541 100644 --- a/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java +++ b/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java @@ -476,6 +476,8 @@ public class FindManagerTest extends DaemonAnalyzerTestCase { findModel.setRegularExpressions(true); FindManagerTestUtils.runFindForwardAndBackward(findManager, findModel, text); + + FindManagerTestUtils.runFindForwardAndBackward(findManager, findModel, text, "groovy"); } public void testFindInCommentsProperlyWorksWithOffsets() throws Exception{ diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/highlighter/GroovyEditorHighlighter.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/highlighter/GroovyEditorHighlighter.java index c0a235eb0211..b850bf683da8 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/highlighter/GroovyEditorHighlighter.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/highlighter/GroovyEditorHighlighter.java @@ -16,6 +16,7 @@ package org.jetbrains.plugins.groovy.highlighter; +import com.intellij.lexer.LayeredLexer; import com.intellij.openapi.editor.colors.EditorColorsScheme; import com.intellij.openapi.editor.ex.util.LayerDescriptor; import com.intellij.openapi.editor.ex.util.LayeredLexerEditorHighlighter; @@ -30,7 +31,7 @@ public class GroovyEditorHighlighter extends LayeredLexerEditorHighlighter { public GroovyEditorHighlighter(EditorColorsScheme scheme) { super(new GroovySyntaxHighlighter(), scheme); - registerGroovydocHighlighter(); + if (!Boolean.TRUE.equals(LayeredLexer.ourDisableLayersFlag.get())) registerGroovydocHighlighter(); } private void registerGroovydocHighlighter() {