mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
clear read-only status outside write action in Surround With
This commit is contained in:
@@ -18,7 +18,6 @@ package com.jetbrains.python;
|
||||
import com.intellij.codeInsight.generation.surroundWith.SurroundWithHandler;
|
||||
import com.intellij.lang.folding.CustomFoldingSurroundDescriptor;
|
||||
import com.intellij.lang.surroundWith.Surrounder;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.jetbrains.python.fixtures.PyTestCase;
|
||||
@@ -87,12 +86,7 @@ public class PySurroundWithTest extends PyTestCase {
|
||||
private void doTest(final Surrounder surrounder) throws Exception {
|
||||
String baseName = "/surround/" + getTestName(false);
|
||||
myFixture.configureByFile(baseName + ".py");
|
||||
new WriteCommandAction.Simple(myFixture.getProject()) {
|
||||
@Override
|
||||
protected void run() throws Throwable {
|
||||
SurroundWithHandler.invoke(myFixture.getProject(), myFixture.getEditor(), myFixture.getFile(), surrounder);
|
||||
}
|
||||
}.execute();
|
||||
SurroundWithHandler.invoke(myFixture.getProject(), myFixture.getEditor(), myFixture.getFile(), surrounder);
|
||||
myFixture.checkResultByFile(baseName + "_after.py", true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user