use of com.intellij.codeInsight.editorActions.smartEnter.SmartEnterProcessor in project intellij-community by JetBrains.
the class PySmartEnterTest method doTest.
public void doTest() {
myFixture.configureByFile("codeInsight/smartEnter/" + getTestName(true) + ".py");
final List<SmartEnterProcessor> processors = getSmartProcessors(PythonLanguage.getInstance());
new WriteCommandAction(myFixture.getProject()) {
@Override
protected void run(@NotNull Result result) throws Throwable {
final Editor editor = myFixture.getEditor();
for (SmartEnterProcessor processor : processors) {
processor.process(myFixture.getProject(), editor, myFixture.getFile());
}
}
}.execute();
myFixture.checkResultByFile("codeInsight/smartEnter/" + getTestName(true) + "_after.py", true);
}
use of com.intellij.codeInsight.editorActions.smartEnter.SmartEnterProcessor in project intellij-community by JetBrains.
the class JsonSmartEnterTest method doTest.
public void doTest() {
myFixture.configureByFile("smartEnter/" + getTestName(false) + ".json");
final List<SmartEnterProcessor> processors = SmartEnterProcessors.INSTANCE.forKey(JsonLanguage.INSTANCE);
new WriteCommandAction(myFixture.getProject()) {
@Override
protected void run(@NotNull Result result) throws Throwable {
final Editor editor = myFixture.getEditor();
for (SmartEnterProcessor processor : processors) {
processor.process(myFixture.getProject(), editor, myFixture.getFile());
}
}
}.execute();
myFixture.checkResultByFile("smartEnter/" + getTestName(false) + "_after.json", true);
}
use of com.intellij.codeInsight.editorActions.smartEnter.SmartEnterProcessor in project intellij-community by JetBrains.
the class CodeInsightTestUtil method doSmartEnterTest.
public static void doSmartEnterTest(@NotNull final CodeInsightTestFixture fixture, @NotNull final String before, @NotNull final String after) {
fixture.configureByFile(before);
final List<SmartEnterProcessor> processors = SmartEnterProcessors.INSTANCE.forKey(fixture.getFile().getLanguage());
new WriteCommandAction(fixture.getProject()) {
@Override
protected void run(@NotNull Result result) throws Throwable {
final Editor editor = fixture.getEditor();
for (SmartEnterProcessor processor : processors) {
processor.process(getProject(), editor, fixture.getFile());
}
}
}.execute();
fixture.checkResultByFile(after, false);
}
Aggregations