use of com.intellij.codeInsight.template.impl.actions.ListTemplatesAction in project intellij-community by JetBrains.
the class JsonLiveTemplateTest method testCustomTemplateExpansion.
public void testCustomTemplateExpansion() {
final String templateContent = "{\n" + " \"foo\": \"$1$\"\n" + "}";
createJsonTemplate("foo", "foo", templateContent);
myFixture.configureByText(JsonFileType.INSTANCE, "foo<caret>");
final Editor editor = myFixture.getEditor();
new ListTemplatesAction().actionPerformedImpl(getProject(), editor);
final LookupImpl lookup = (LookupImpl) LookupManager.getActiveLookup(editor);
assertNotNull(lookup);
lookup.finishLookup(Lookup.NORMAL_SELECT_CHAR);
myFixture.checkResult(templateContent.replaceAll("\\$.*?\\$", ""));
}
use of com.intellij.codeInsight.template.impl.actions.ListTemplatesAction in project intellij-plugins by JetBrains.
the class OgnlLiveTemplatesTest method expandLiveTemplate.
private void expandLiveTemplate() {
new ListTemplatesAction().actionPerformedImpl(myFixture.getProject(), myFixture.getEditor());
LookupImpl lookup = (LookupImpl) LookupManager.getActiveLookup(myFixture.getEditor());
assertNotNull(lookup);
lookup.finishLookup(Lookup.NORMAL_SELECT_CHAR);
}
Aggregations