mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Project parameter to runWriteCommandAction
This commit is contained in:
+1
-1
@@ -204,7 +204,7 @@ public class ClassNameCompletionTest extends LightFixtureCompletionTestCase {
|
||||
}
|
||||
|
||||
private void cleanupVfs() {
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
public void run() {
|
||||
FileDocumentManager.getInstance().saveAllDocuments();
|
||||
for (VirtualFile file : myFixture.getTempDirFixture().getFile("").getChildren()) {
|
||||
|
||||
@@ -225,7 +225,7 @@ public class HighlightStressTest extends LightDaemonAnalyzerTestCase {
|
||||
if (v>100) break;
|
||||
}
|
||||
final String text = imports + "\n class X {{\n" + usages + "}}";
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
getEditor().getDocument().setText(text);
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ImportHelperTest extends DaemonAnalyzerTestCase {
|
||||
getProject(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
+1
-1
@@ -270,7 +270,7 @@ public class LightAdvHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
enableInspectionTool(deadCodeInspection);
|
||||
|
||||
doTest(true, false);
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PsiDirectory directory = myFile.getParent();
|
||||
|
||||
@@ -54,7 +54,7 @@ import java.lang.reflect.Modifier;
|
||||
myFixture.type(' ')
|
||||
assert myFixture.doHighlighting().size() > 0
|
||||
|
||||
WriteCommandAction.runWriteCommandAction {
|
||||
WriteCommandAction.runWriteCommandAction project, {
|
||||
myFixture.editor.document.insertString(myFixture.editor.caretModel.offset, caption)
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class UnusedSymbolLocalTest extends DaemonAnalyzerTestCase {
|
||||
assertEquals(0, collection.size());
|
||||
|
||||
final int offset = myEditor.getCaretModel().getOffset();
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
document.insertString(offset, "//");
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ public class OrderEntryTest extends DaemonAnalyzerTestCase {
|
||||
if (!actionShouldBeAvailable) {
|
||||
fail("Action '" + text + "' is available in test " + testFullPath);
|
||||
}
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
action.invoke(getProject(), getEditor(), getFile());
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public class VariableAccessFromInnerClass18Test extends LightQuickFixTestCase {
|
||||
@Override
|
||||
protected void beforeActionStarted(String testName, String contents) {
|
||||
for (int i=0;i<10;i++) {
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
myEditor.getDocument().insertString(myEditor.getCaretModel().getOffset(), "//");
|
||||
|
||||
+1
-1
@@ -757,7 +757,7 @@ class Test {
|
||||
try {
|
||||
def offset = myFixture.editor.caretModel.offset
|
||||
def column = myFixture.editor.caretModel.logicalPosition.column
|
||||
com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction {
|
||||
com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction project, {
|
||||
myFixture.editor.document.insertString(offset, toPaste)
|
||||
PasteHandler.indentBlock(project, myFixture.editor, offset, offset + toPaste.length(), column)
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class LiveTemplateTest extends LightCodeInsightFixtureTestCase {
|
||||
CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.FIRST_LETTER
|
||||
CodeInsightSettings.instance.SELECT_AUTOPOPUP_SUGGESTIONS_BY_CHARS = false
|
||||
if (state != null) {
|
||||
WriteCommandAction.runWriteCommandAction {
|
||||
WriteCommandAction.runWriteCommandAction project, {
|
||||
state.gotoEnd()
|
||||
};
|
||||
}
|
||||
@@ -424,7 +424,7 @@ class Foo {
|
||||
}
|
||||
|
||||
private writeCommand(Runnable runnable) {
|
||||
WriteCommandAction.runWriteCommandAction(runnable)
|
||||
WriteCommandAction.runWriteCommandAction(null, runnable)
|
||||
}
|
||||
|
||||
public void testSearchByDescriptionWhenTemplatesListed() {
|
||||
|
||||
@@ -207,7 +207,7 @@ public class IndexTest extends IdeaTestCase {
|
||||
final GlobalSearchScope scope = GlobalSearchScope.allScope(getProject());
|
||||
final JavaPsiFacade facade = JavaPsiFacade.getInstance(getProject());
|
||||
assertNotNull(facade.findClass("Foo", scope));
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PsiFile psiFile = PsiManager.getInstance(getProject()).findFile(vFile);
|
||||
@@ -236,7 +236,7 @@ public class IndexTest extends IdeaTestCase {
|
||||
final GlobalSearchScope scope = GlobalSearchScope.allScope(getProject());
|
||||
final JavaPsiFacade facade = JavaPsiFacade.getInstance(getProject());
|
||||
assertNull(facade.findClass("Foo", scope));
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PsiFile psiFile = PsiManager.getInstance(getProject()).findFile(vFile);
|
||||
|
||||
@@ -42,7 +42,7 @@ import java.util.Arrays;
|
||||
public class ProjectLibrariesTest extends IdeaTestCase {
|
||||
public void test() {
|
||||
final LibraryTable libraryTable = ProjectLibraryTable.getInstance(myProject);
|
||||
Library lib = WriteCommandAction.runWriteCommandAction(new Computable<Library>() {
|
||||
Library lib = WriteCommandAction.runWriteCommandAction(null, new Computable<Library>() {
|
||||
@Override
|
||||
public Library compute() {
|
||||
return libraryTable.createLibrary("LIB");
|
||||
@@ -52,7 +52,7 @@ public class ProjectLibrariesTest extends IdeaTestCase {
|
||||
final JavaPsiFacade manager = getJavaFacade();
|
||||
assertNull(manager.findClass("pack.MyClass", GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(myModule)));
|
||||
final File file = new File(PathManagerEx.getTestDataPath() + "/psi/repositoryUse/cls");
|
||||
final VirtualFile root = WriteCommandAction.runWriteCommandAction(new Computable<VirtualFile>() {
|
||||
final VirtualFile root = WriteCommandAction.runWriteCommandAction(null, new Computable<VirtualFile>() {
|
||||
@Override
|
||||
public VirtualFile compute() {
|
||||
return LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file);
|
||||
@@ -73,7 +73,7 @@ public class ProjectLibrariesTest extends IdeaTestCase {
|
||||
|
||||
public void test1() {
|
||||
final LibraryTable libraryTable = ProjectLibraryTable.getInstance(myProject);
|
||||
Library lib = WriteCommandAction.runWriteCommandAction(new Computable<Library>() {
|
||||
Library lib = WriteCommandAction.runWriteCommandAction(null, new Computable<Library>() {
|
||||
@Override
|
||||
public Library compute() {
|
||||
return libraryTable.createLibrary("LIB");
|
||||
@@ -86,7 +86,7 @@ public class ProjectLibrariesTest extends IdeaTestCase {
|
||||
final ModifiableRootModel rootModel2 = ModuleRootManager.getInstance(myModule).getModifiableModel();
|
||||
assertNotNull(rootModel2.findLibraryOrderEntry(lib));
|
||||
final File file = new File(PathManagerEx.getTestDataPath() + "/psi/repositoryUse/cls");
|
||||
final VirtualFile root = WriteCommandAction.runWriteCommandAction(new Computable<VirtualFile>() {
|
||||
final VirtualFile root = WriteCommandAction.runWriteCommandAction(null, new Computable<VirtualFile>() {
|
||||
@Override
|
||||
public VirtualFile compute() {
|
||||
return LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file);
|
||||
|
||||
@@ -68,7 +68,7 @@ public class ProjectViewUpdatingTest extends BaseProjectViewTestCase {
|
||||
final PsiClass[] classes = JavaDirectoryService.getInstance()
|
||||
.getPackage(getContentDirectory().findSubdirectory("src").findSubdirectory("com").findSubdirectory("package1")).getClasses();
|
||||
sortClassesByName(classes);
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
public void run() {
|
||||
classes[0].delete();
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.intellij.projectView;
|
||||
import com.intellij.JavaTestUtil;
|
||||
import com.intellij.ide.structureView.newStructureView.StructureViewComponent;
|
||||
import com.intellij.ide.util.InheritedMembersNodeProvider;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.command.CommandProcessor;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
@@ -150,7 +149,7 @@ public class StructureViewUpdatingTest extends TestSourceBasedTestCase {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
@@ -55,7 +55,7 @@ public class AddRemoveInTypeParameterListTest extends LightIdeaTestCase{
|
||||
PsiReferenceParameterList list = ref.getParameterList();
|
||||
final PsiTypeElement[] parms = list.getTypeParameterElements();
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
parms[0].delete();
|
||||
|
||||
@@ -99,7 +99,7 @@ public class ArrayIndexOutOfBoundsTest extends PsiTestCase {
|
||||
public void run() {
|
||||
final PsiPackage aPackage = JavaPsiFacade.getInstance(myPsiManager.getProject()).findPackage("anotherBla");
|
||||
assertNotNull("Package anotherBla not found", aPackage);
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
aPackage.getDirectories()[0].delete();
|
||||
|
||||
@@ -32,7 +32,7 @@ class AstLeaksTest extends LightCodeInsightFixtureTestCase {
|
||||
assert file.findElementAt(0) instanceof PsiKeyword
|
||||
LeakHunter.checkLeak(file, JavaFileElement)
|
||||
|
||||
WriteCommandAction.runWriteCommandAction {
|
||||
WriteCommandAction.runWriteCommandAction project, {
|
||||
file.viewProvider.document.insertString(0, ' ')
|
||||
PsiDocumentManager.getInstance(project).commitAllDocuments()
|
||||
assert file.findElementAt(0) instanceof PsiWhiteSpace
|
||||
|
||||
@@ -62,7 +62,7 @@ public class ConstantValuesTest extends PsiTestCase{
|
||||
final PsiJavaFile file = (PsiJavaFile)myClass.getContainingFile();
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(
|
||||
new Runnable() {
|
||||
null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
@@ -52,7 +52,7 @@ public class JavaSOEOnReparsePerformanceTest extends LightDaemonAnalyzerTestCase
|
||||
final int pos = getEditor().getDocument().getText().indexOf("\"\"");
|
||||
|
||||
// replace small expression with huge binary one
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
getEditor().getDocument().replaceString(pos, pos + 2, myHugeExpr);
|
||||
|
||||
@@ -116,7 +116,7 @@ public class MiscPsiTest extends LightCodeInsightFixtureTestCase {
|
||||
final PsiClass aClass = getJavaFacade().getElementFactory().createClassFromText("public int i, j;", null);
|
||||
|
||||
final PsiField aField = aClass.getFields()[0];
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
public void run() {
|
||||
aField.delete();
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ModifyAnnotationsTest extends PsiTestCase {
|
||||
CommandProcessor.getInstance().executeCommand(myProject, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class OptimizeImportsTest extends PsiTestCase{
|
||||
getProject(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
String fileName = getTestName(false) + extension;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
package com.intellij.psi;
|
||||
|
||||
import com.intellij.codeInsight.daemon.impl.DaemonProgressIndicator;
|
||||
import com.intellij.codeInsight.daemon.impl.HighlightInfoFilter;
|
||||
import com.intellij.codeInsight.daemon.impl.analysis.HighlightInfoHolder;
|
||||
import com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
@@ -148,7 +147,7 @@ public class PsiConcurrencyStressTest extends PsiTestCase {
|
||||
mark("-");
|
||||
final PsiMethod[] psiMethods = getPsiClass().getMethods();
|
||||
if (psiMethods.length > 0) {
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
psiMethods[random.nextInt(psiMethods.length)].delete();
|
||||
|
||||
@@ -118,7 +118,7 @@ public class PsiDocumentManagerImplTest extends PlatformTestCase {
|
||||
final Document document = getPsiDocumentManager().getDocument(file);
|
||||
|
||||
final TextBlock block = TextBlock.get(file);
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
block.performAtomically(new Runnable() {
|
||||
@@ -137,7 +137,7 @@ public class PsiDocumentManagerImplTest extends PlatformTestCase {
|
||||
public void testGetUncommittedDocuments_documentNotRegistered() throws Exception {
|
||||
final Document document = new MockDocument();
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
getPsiDocumentManager().documentChanged(new DocumentEventImpl(document, 0, "", "", document.getModificationStamp(), false));
|
||||
@@ -153,7 +153,7 @@ public class PsiDocumentManagerImplTest extends PlatformTestCase {
|
||||
|
||||
final Document document = getPsiDocumentManager().getDocument(file);
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
getPsiDocumentManager().documentChanged(new DocumentEventImpl(document, 0, "", "", document.getModificationStamp(), false));
|
||||
@@ -170,7 +170,7 @@ public class PsiDocumentManagerImplTest extends PlatformTestCase {
|
||||
|
||||
final Document document = getPsiDocumentManager().getDocument(file);
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
getPsiDocumentManager().documentChanged(new DocumentEventImpl(document, 0, "", "", document.getModificationStamp(), false));
|
||||
@@ -205,7 +205,7 @@ public class PsiDocumentManagerImplTest extends PlatformTestCase {
|
||||
assertEquals(0, alienDocManager.getUncommittedDocuments().length);
|
||||
assertEquals(0, getPsiDocumentManager().getUncommittedDocuments().length);
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
getPsiDocumentManager()
|
||||
@@ -251,7 +251,7 @@ public class PsiDocumentManagerImplTest extends PlatformTestCase {
|
||||
waitAndPump(semaphore, 30000);
|
||||
assertTrue(getPsiDocumentManager().isCommitted(document));
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
document.insertString(0, "class X {}");
|
||||
@@ -277,7 +277,7 @@ public class PsiDocumentManagerImplTest extends PlatformTestCase {
|
||||
}
|
||||
};
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
document.insertString(0, "/**/");
|
||||
@@ -296,7 +296,7 @@ public class PsiDocumentManagerImplTest extends PlatformTestCase {
|
||||
assertEquals(1, count.get());
|
||||
|
||||
count.set(0);
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
document.insertString(0, "/**/");
|
||||
@@ -347,7 +347,7 @@ public class PsiDocumentManagerImplTest extends PlatformTestCase {
|
||||
assertEquals(0, alienDocManager.getUncommittedDocuments().length);
|
||||
assertEquals(0, getPsiDocumentManager().getUncommittedDocuments().length);
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
document.setText("xxx");
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.intellij.psi;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.roots.ModuleRootModificationUtil;
|
||||
@@ -33,7 +32,7 @@ import java.io.File;
|
||||
public class SCR17094Test extends PsiTestCase {
|
||||
protected void setUpClasses(final String s) throws Exception {
|
||||
final String testRoot = PathManagerEx.getTestDataPath() + "/psi/repositoryUse/scr17094";
|
||||
VirtualFile classesRoot = WriteCommandAction.runWriteCommandAction(new Computable<VirtualFile>() {
|
||||
VirtualFile classesRoot = WriteCommandAction.runWriteCommandAction(null, new Computable<VirtualFile>() {
|
||||
@Override
|
||||
public VirtualFile compute() {
|
||||
String path = testRoot + "/" + s;
|
||||
|
||||
@@ -1153,7 +1153,7 @@ public class JavaFormatterTest extends AbstractJavaFormatterTest {
|
||||
CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
@@ -51,7 +51,7 @@ public class SCR14423Test extends PsiTestCase {
|
||||
root.mkdir();
|
||||
myFilesToDelete.add(root);
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class BindToElementTest extends CodeInsightTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
VirtualFile root = WriteCommandAction.runWriteCommandAction(new Computable<VirtualFile>() {
|
||||
VirtualFile root = WriteCommandAction.runWriteCommandAction(null, new Computable<VirtualFile>() {
|
||||
@Override
|
||||
public VirtualFile compute() {
|
||||
return LocalFileSystem.getInstance().refreshAndFindFileByIoFile(
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import com.intellij.testFramework.LightCodeInsightTestCase;
|
||||
public class ExtendsBoundListTest extends LightCodeInsightTestCase {
|
||||
public void testRemoveBoundFromFront() throws Exception {
|
||||
final PsiTypeParameter typeParameter = getTypeParameter();
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
typeParameter.getExtendsList().getReferenceElements()[0].delete();
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public class JavadocParamTagsTest extends LightIdeaTestCase {
|
||||
final PsiDocComment docComment = method.getDocComment();
|
||||
assertNotNull(docComment);
|
||||
final PsiDocTag[] tags = docComment.getTags();
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
tags[0].delete();
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class ReferenceParameterListTest extends PsiTestCase {
|
||||
null);
|
||||
|
||||
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ public class ShortenClassReferencesTest extends LightCodeInsightFixtureTestCase
|
||||
CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
JavaCodeStyleManager.getInstance(getProject()).shortenClassReferences(myFixture.getFile());
|
||||
|
||||
@@ -71,7 +71,7 @@ public class CopyClassTest extends CodeInsightTestCase {
|
||||
private PsiElement performAction(final String oldName, final String copyName) throws IncorrectOperationException {
|
||||
final PsiClass oldClass = JavaPsiFacade.getInstance(myProject).findClass(oldName, ProjectScope.getAllScope(myProject));
|
||||
|
||||
return WriteCommandAction.runWriteCommandAction(new Computable<PsiElement>(){
|
||||
return WriteCommandAction.runWriteCommandAction(null, new Computable<PsiElement>(){
|
||||
@Override
|
||||
public PsiElement compute() {
|
||||
return CopyClassesHandler.doCopyClasses(
|
||||
|
||||
@@ -87,7 +87,7 @@ public class MovePackageAsDirectoryTest extends MultiFileTestCase {
|
||||
protected void preprocessSrcDir(PsiDirectory srcDirectory) {
|
||||
final PsiFile empty = srcDirectory.findFile(EMPTY_TXT);
|
||||
assert empty != null;
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
public void run() {
|
||||
empty.delete();
|
||||
}
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ public class InlineLibraryMethodTest extends RefactoringTestCase {
|
||||
PsiClass fileClass = getJavaFacade().findClass("mycompany.File");
|
||||
assertNotNull(fileClass);
|
||||
final PsiFile file = fileClass.getContainingFile();
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
((VirtualFileSystemEntry)file.getVirtualFile()).setWritable(false);
|
||||
|
||||
@@ -192,7 +192,7 @@ public class MultiModuleEditingTest extends ModuleTestCase {
|
||||
}
|
||||
|
||||
private VirtualFile getVirtualFileInTestData(final String relativeVfsPath) {
|
||||
return WriteCommandAction.runWriteCommandAction(new Computable<VirtualFile>() {
|
||||
return WriteCommandAction.runWriteCommandAction(null, new Computable<VirtualFile>() {
|
||||
@Override
|
||||
public VirtualFile compute() {
|
||||
final String path =
|
||||
|
||||
@@ -133,7 +133,7 @@ public class SliceBackwardTest extends SliceTestCase {
|
||||
}
|
||||
|
||||
private static void extract(final Document document, final Map<String, RangeMarker> sliceUsageName2Offset, final String name) {
|
||||
WriteCommandAction.runWriteCommandAction(new Runnable() {
|
||||
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (int i = 1; i < 9; i++) {
|
||||
|
||||
Reference in New Issue
Block a user