From e399b113d69727f711ce337a4e95c871c736e935 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 15 Dec 2011 19:46:23 +0100 Subject: [PATCH] live template contributor shouldn't interfere with the 'unimported classes when nothing found' logic --- .../completion/JavaAutoPopupTest.groovy | 15 +++++++++++++++ plugins/groovy/src/META-INF/plugin.xml | 2 +- resources/src/META-INF/IdeaPlugin.xml | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy index d90497451c25..2c4f96beb193 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy +++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy @@ -640,6 +640,21 @@ public interface Test { assert !lookup } + public void testTemplatesWithNonImportedClasses() { + CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.NONE + myFixture.addClass("package foo.bar; public class LayoutStore {}") + try { + myFixture.configureByText 'a.java', 'class Foo {{ foo() }}' + type 'lst' + assert lookup + assert 'lst' in myFixture.lookupElementStrings + assert 'LayoutStore' in myFixture.lookupElementStrings + } + finally { + CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.FIRST_LETTER + } + } + public void testTemplateSelectionByComma() { myFixture.configureByText("a.java", """ class Foo { diff --git a/plugins/groovy/src/META-INF/plugin.xml b/plugins/groovy/src/META-INF/plugin.xml index a51cfa089efb..0bf08464e550 100644 --- a/plugins/groovy/src/META-INF/plugin.xml +++ b/plugins/groovy/src/META-INF/plugin.xml @@ -233,7 +233,7 @@ implementationClass="org.jetbrains.plugins.groovy.codeInsight.GroovyLineMarkerProvider"/> - + + order="first, before javaMemberName, after liveTemplates"/>