mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Removed obsolete markerId
This commit is contained in:
+1
-1
@@ -129,7 +129,7 @@ public class ChangeMethodSignatureFromUsageFix implements IntentionAction {
|
||||
processor.testRun();
|
||||
}
|
||||
else {
|
||||
processor.run(null);
|
||||
processor.run();
|
||||
}
|
||||
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
|
||||
@@ -80,7 +80,7 @@ public class MethodParameterFix implements IntentionAction {
|
||||
processor.testRun();
|
||||
}
|
||||
else {
|
||||
processor.run(null);
|
||||
processor.run();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public class MethodReturnFix implements IntentionAction {
|
||||
processor.testRun();
|
||||
}
|
||||
else {
|
||||
processor.run(null);
|
||||
processor.run();
|
||||
}
|
||||
if (method.getContainingFile() != file) {
|
||||
QuickFixAction.spoilDocument(project, file);
|
||||
|
||||
@@ -69,7 +69,7 @@ public class MoveToPackageFix implements IntentionAction {
|
||||
new PsiElement[]{((PsiJavaFile) myFile).getClasses()[0]},
|
||||
new SingleSourceRootMoveDestination(PackageWrapper.create(directory.getPackage()), directory), false,
|
||||
false,
|
||||
null).run(null);
|
||||
null).run();
|
||||
}
|
||||
catch (IncorrectOperationException e) {
|
||||
LOG.error(e);
|
||||
|
||||
@@ -59,7 +59,7 @@ public class RemoveUnusedParameterFix implements IntentionAction {
|
||||
processor.testRun();
|
||||
}
|
||||
else {
|
||||
processor.run(null);
|
||||
processor.run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class RenamePublicClassFix implements IntentionAction {
|
||||
VirtualFile vFile = file.getVirtualFile();
|
||||
String newName = vFile.getNameWithoutExtension();
|
||||
RenameProcessor processor = new RenameProcessor(project, myClass, newName, false, false);
|
||||
processor.run((Object)null);
|
||||
processor.run();
|
||||
}
|
||||
|
||||
public boolean startInWriteAction() {
|
||||
|
||||
@@ -66,7 +66,7 @@ public class SuperMethodReturnFix implements IntentionAction {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
processor.testRun();
|
||||
} else {
|
||||
processor.run(null);
|
||||
processor.run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -199,6 +199,6 @@ public class UnusedParametersInspection extends FilteringInspectionTool {
|
||||
psiMethod.getReturnType(),
|
||||
parameterInfos);
|
||||
|
||||
csp.run(null);
|
||||
csp.run();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ public class UnusedReturnValue extends DescriptorProviderInspection {
|
||||
PsiType.VOID,
|
||||
infos);
|
||||
|
||||
csp.run(null);
|
||||
csp.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class DeleteHandler {
|
||||
public void run() {
|
||||
dialog.close(DeleteDialog.CANCEL_EXIT_CODE);
|
||||
}
|
||||
}, elements, dialog.isSearchInComments(), dialog.isSearchInNonJava(), true).run(null);
|
||||
}, elements, dialog.isSearchInComments(), dialog.isSearchInNonJava(), true).run();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -5,15 +5,15 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.command.CommandProcessor;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.localVcs.impl.LvcsIntegration;
|
||||
import com.intellij.openapi.localVcs.LvcsAction;
|
||||
import com.intellij.openapi.localVcs.impl.LvcsIntegration;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.EmptyRunnable;
|
||||
import com.intellij.openapi.util.Factory;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.wm.WindowManager;
|
||||
import com.intellij.openapi.vfs.ReadonlyStatusHandler;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.wm.WindowManager;
|
||||
import com.intellij.psi.PsiDocumentManager;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
@@ -21,7 +21,6 @@ import com.intellij.refactoring.listeners.RefactoringListenerManager;
|
||||
import com.intellij.refactoring.listeners.impl.RefactoringListenerManagerImpl;
|
||||
import com.intellij.refactoring.listeners.impl.RefactoringTransaction;
|
||||
import com.intellij.refactoring.ui.ConflictsDialog;
|
||||
import com.intellij.refactoring.util.RefactoringChangeMarker;
|
||||
import com.intellij.refactoring.util.RefactoringUtil;
|
||||
import com.intellij.usageView.FindUsagesCommand;
|
||||
import com.intellij.usageView.UsageInfo;
|
||||
@@ -40,7 +39,6 @@ public abstract class BaseRefactoringProcessor {
|
||||
public static final Runnable EMPTY_CALLBACK = EmptyRunnable.getInstance();
|
||||
protected final Project myProject;
|
||||
|
||||
private Object myMarkerId;
|
||||
private RefactoringTransaction myTransaction;
|
||||
private boolean myIsPreviewUsages;
|
||||
protected Runnable myPrepareSuccessfulSwingThreadCallback = EMPTY_CALLBACK;
|
||||
@@ -120,8 +118,7 @@ public abstract class BaseRefactoringProcessor {
|
||||
|
||||
protected abstract String getCommandName();
|
||||
|
||||
public void run(Object markerId) {
|
||||
myMarkerId = markerId;
|
||||
public void run() {
|
||||
|
||||
final UsageInfo[][] usages = new UsageInfo[1][];
|
||||
|
||||
@@ -297,11 +294,7 @@ public abstract class BaseRefactoringProcessor {
|
||||
|
||||
try {
|
||||
final UsageInfo[] _usages = usages;
|
||||
ApplicationManager.getApplication().runWriteAction(new RefactoringChangeMarker() {
|
||||
public Object getId() {
|
||||
return myMarkerId;
|
||||
}
|
||||
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
public void run() {
|
||||
PsiDocumentManager.getInstance(myProject).commitAllDocuments();
|
||||
RefactoringListenerManagerImpl listenerManager =
|
||||
|
||||
@@ -166,6 +166,6 @@ public abstract class RefactoringDialog extends DialogWrapper {
|
||||
};
|
||||
processor.setPrepareSuccessfulSwingThreadCallback(prepareSuccessfulCallback);
|
||||
processor.setPreviewUsages(isPreviewUsages());
|
||||
processor.run(null);
|
||||
processor.run();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public abstract class RefactoringImpl<T extends BaseRefactoringProcessor> implem
|
||||
}
|
||||
|
||||
public void run() {
|
||||
myProcessor.run(null);
|
||||
myProcessor.run();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public class EncapsulateFieldsProcessor extends BaseRefactoringProcessor {
|
||||
return "Encapsulating fields in " + UsageViewUtil.getDescriptiveName(myClass);
|
||||
}
|
||||
|
||||
public void run(Object markerId) {
|
||||
public void run() {
|
||||
myFields = myDialog.getSelectedFields();
|
||||
if (myFields.length == 0){
|
||||
String message = "No fields selected";
|
||||
@@ -67,7 +67,7 @@ public class EncapsulateFieldsProcessor extends BaseRefactoringProcessor {
|
||||
}
|
||||
myClass = myFields[0].getContainingClass();
|
||||
|
||||
super.run(markerId);
|
||||
super.run();
|
||||
}
|
||||
|
||||
protected boolean preprocessUsages(UsageInfo[][] usages) {
|
||||
|
||||
@@ -41,7 +41,7 @@ public class ExtractClassUtil {
|
||||
RefactoringSettings.getInstance().EXTRACT_INTERFACE_PREVIEW_USAGES = dialog.isPreviewUsages();
|
||||
TurnRefsToSuperProcessor processor =
|
||||
new TurnRefsToSuperProcessor(project, (PsiClass) classElement, (PsiClass) interfaceElement, true);
|
||||
processor.run(null);
|
||||
processor.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ public class IntroduceParameterHandler extends IntroduceHandlerBase implements R
|
||||
myParameterInitializer, myExpressionToSearchFor,
|
||||
myLocalVar, isDeleteLocalVariable,
|
||||
parameterName, replaceAllOccurences,
|
||||
IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_NONE, false, null).run(null);
|
||||
IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_NONE, false, null).run();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@ public class MigrationManager {
|
||||
MigrationMap migrationMap = migrationDialog.getMigrationMap();
|
||||
if (migrationMap == null) return;
|
||||
|
||||
new MigrationProcessor(myProject, migrationMap).run(null);
|
||||
new MigrationProcessor(myProject, migrationMap).run();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -86,7 +86,7 @@ public class MoveFilesOrDirectoriesUtil {
|
||||
public void run() {
|
||||
moveDialog.close(DialogWrapper.CANCEL_EXIT_CODE);
|
||||
}
|
||||
}).run(null);
|
||||
}).run();
|
||||
}
|
||||
catch (IncorrectOperationException e) {
|
||||
String helpId = HelpID.getMoveHelpID(elements[0]);
|
||||
|
||||
@@ -368,7 +368,7 @@ public class MoveInnerProcessor extends BaseRefactoringProcessor {
|
||||
setup(innerClass, className, passOuterClass, parameterName, previewUsages,
|
||||
dialog.isSearchInComments(), dialog.isSearchInNonJavaFiles());
|
||||
|
||||
run((Object)null);
|
||||
run();
|
||||
}
|
||||
|
||||
public void setup(final PsiClass innerClass,
|
||||
|
||||
@@ -264,14 +264,14 @@ public class MoveMembersProcessor extends BaseRefactoringProcessor {
|
||||
return showConflicts(conflicts, usages);
|
||||
}
|
||||
|
||||
public void run(Object markerId) {
|
||||
public void run() {
|
||||
if (myMembersToMove.size() == 0){
|
||||
String message = "No members selected";
|
||||
RefactoringMessageUtil.showErrorMessage(MoveMembersImpl.REFACTORING_NAME, message, HelpID.MOVE_MEMBERS, myProject);
|
||||
return;
|
||||
}
|
||||
if (canRefactor()) {
|
||||
super.run(markerId);
|
||||
super.run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ public class RenameProcessor extends BaseRefactoringProcessor {
|
||||
return myElement instanceof PsiVariable;
|
||||
}
|
||||
|
||||
public void run(Object markerId) {
|
||||
public void run() {
|
||||
String message = null;
|
||||
prepareRenaming();
|
||||
try {
|
||||
@@ -114,7 +114,7 @@ public class RenameProcessor extends BaseRefactoringProcessor {
|
||||
return;
|
||||
}
|
||||
|
||||
super.run(markerId);
|
||||
super.run();
|
||||
}
|
||||
|
||||
public void prepareRenaming() {
|
||||
|
||||
@@ -77,7 +77,7 @@ public class SafeDeleteHandler implements RefactoringActionHandler {
|
||||
public void run() {
|
||||
dialog.close(SafeDeleteDialog.CANCEL_EXIT_CODE);
|
||||
}
|
||||
}, elementsToDelete, dialog.isSearchInComments(), dialog.isSearchInNonJava(), true).run(null);
|
||||
}, elementsToDelete, dialog.isSearchInComments(), dialog.isSearchInNonJava(), true).run();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -118,6 +118,6 @@ public final class BindingProperty extends Property {
|
||||
PsiDocumentManager.getInstance(myGuiEditor.getProject()).commitAllDocuments();
|
||||
|
||||
final RenameProcessor processor = new RenameProcessor(project, oldField, newBinding, true, true);
|
||||
processor.run((Object)null);
|
||||
processor.run();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user