mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-42378 Live template expansion: existing identifier is converted to lower case
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import java.io.File;
|
||||
|
||||
class Foo {
|
||||
{
|
||||
File file = new File("some.txt");
|
||||
System.out.println("file = " + File.<caret>);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import java.io.File;
|
||||
|
||||
class Foo {
|
||||
{
|
||||
File file = new File("some.txt");
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ package com.intellij.codeInsight.template;
|
||||
|
||||
|
||||
import com.intellij.JavaTestUtil
|
||||
import com.intellij.codeInsight.CodeInsightSettings
|
||||
import com.intellij.codeInsight.lookup.LookupManager
|
||||
import com.intellij.codeInsight.lookup.impl.LookupImpl
|
||||
import com.intellij.codeInsight.lookup.impl.LookupManagerImpl
|
||||
@@ -39,6 +40,7 @@ public class LiveTemplateTest extends LightCodeInsightFixtureTestCase {
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.FIRST_LETTER
|
||||
((TemplateManagerImpl)TemplateManager.getInstance(getProject())).setTemplateTesting(false);
|
||||
if (state != null) {
|
||||
state.gotoEnd();
|
||||
@@ -177,6 +179,17 @@ public class LiveTemplateTest extends LightCodeInsightFixtureTestCase {
|
||||
assert LookupManager.getActiveLookup(editor).currentItem.lookupString == 'entry'
|
||||
}
|
||||
|
||||
public void testClassNameDotInTemplate() {
|
||||
CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.NONE
|
||||
configure();
|
||||
startTemplate("soutv", "output")
|
||||
myFixture.type('File')
|
||||
assert myFixture.lookupElementStrings == ['file']
|
||||
myFixture.type('.')
|
||||
checkResult()
|
||||
assert !state.finished
|
||||
}
|
||||
|
||||
private TemplateState getState() {
|
||||
TemplateManagerImpl.getTemplateState(getEditor())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user