public abstract class WriteCommandAction<T> extends BaseActionRunnable<T>
Modifier and Type | Class and Description |
---|---|
static interface |
WriteCommandAction.Builder |
static class |
WriteCommandAction.Simple<T>
Deprecated.
Use
writeCommandAction(Project) .run() or .compute() instead |
Modifier | Constructor and Description |
---|---|
protected |
WriteCommandAction(Project project,
PsiFile... files)
Deprecated.
Use
writeCommandAction(Project, PsiFile...) .run() instead |
protected |
WriteCommandAction(Project project,
java.lang.String commandName,
PsiFile... files)
Deprecated.
Use
writeCommandAction(Project, PsiFile...) .withName(commandName).run() instead |
protected |
WriteCommandAction(Project project,
java.lang.String commandName,
java.lang.String groupID,
PsiFile... files)
Deprecated.
Use
writeCommandAction(Project, PsiFile...) .withName(commandName).withGroupId(groupID).run() instead |
Modifier and Type | Method and Description |
---|---|
RunResult<T> |
execute()
Deprecated.
Use
#writeCommandAction(Project).run() or compute() instead |
java.lang.String |
getCommandName() |
java.lang.String |
getGroupID() |
Project |
getProject() |
protected UndoConfirmationPolicy |
getUndoConfirmationPolicy()
Deprecated.
Use
writeCommandAction(Project) .withUndoConfirmationPolicy() instead |
protected boolean |
isGlobalUndoAction()
Deprecated.
Use
writeCommandAction(Project) .withGlobalUndo() instead |
void |
performCommand()
Deprecated.
|
static <T> T |
runWriteCommandAction(Project project,
Computable<T> computable) |
static void |
runWriteCommandAction(Project project,
java.lang.Runnable runnable)
If run a write command using this method then "Undo" action always shows "Undefined" text -
DEFAULT_COMMAND_NAME . |
static void |
runWriteCommandAction(Project project,
java.lang.String commandName,
java.lang.String groupID,
java.lang.Runnable runnable,
PsiFile... files) |
static <T,E extends java.lang.Throwable> |
runWriteCommandAction(Project project,
ThrowableComputable<T,E> computable) |
protected boolean |
shouldRecordActionForActiveDocument()
Deprecated.
Use
writeCommandAction(Project) .shouldRecordActionForActiveDocument() instead |
static WriteCommandAction.Builder |
writeCommandAction(Project project) |
static WriteCommandAction.Builder |
writeCommandAction(Project project,
PsiFile... files) |
static WriteCommandAction.Builder |
writeCommandAction(PsiFile first,
PsiFile... others) |
executeSilently, isSilentExecution, run
@Deprecated protected WriteCommandAction(Project project, PsiFile... files)
writeCommandAction(Project, PsiFile...)
.run()
instead@Deprecated protected WriteCommandAction(Project project, java.lang.String commandName, PsiFile... files)
writeCommandAction(Project, PsiFile...)
.withName(commandName).run()
instead@Deprecated protected WriteCommandAction(Project project, java.lang.String commandName, java.lang.String groupID, PsiFile... files)
writeCommandAction(Project, PsiFile...)
.withName(commandName).withGroupId(groupID).run()
insteadpublic static WriteCommandAction.Builder writeCommandAction(Project project)
public static WriteCommandAction.Builder writeCommandAction(PsiFile first, PsiFile... others)
public static WriteCommandAction.Builder writeCommandAction(Project project, PsiFile... files)
public final Project getProject()
public final java.lang.String getCommandName()
public java.lang.String getGroupID()
@Deprecated public RunResult<T> execute()
#writeCommandAction(Project).run()
or compute() insteadexecute
in class BaseActionRunnable<T>
@Deprecated protected boolean isGlobalUndoAction()
writeCommandAction(Project)
.withGlobalUndo() instead@Deprecated protected UndoConfirmationPolicy getUndoConfirmationPolicy()
writeCommandAction(Project)
.withUndoConfirmationPolicy() instead@Deprecated protected boolean shouldRecordActionForActiveDocument()
writeCommandAction(Project)
.shouldRecordActionForActiveDocument() instead@Deprecated public void performCommand() throws java.lang.Throwable
CommandProcessor.executeCommand(Project, Runnable, String, Object)
insteadjava.lang.Throwable
public static void runWriteCommandAction(Project project, java.lang.Runnable runnable)
DEFAULT_COMMAND_NAME
.
Please use runWriteCommandAction(Project, String, String, Runnable, PsiFile...)
instead.public static void runWriteCommandAction(Project project, java.lang.String commandName, java.lang.String groupID, java.lang.Runnable runnable, PsiFile... files)
public static <T> T runWriteCommandAction(Project project, Computable<T> computable)
public static <T,E extends java.lang.Throwable> T runWriteCommandAction(Project project, ThrowableComputable<T,E> computable) throws E extends java.lang.Throwable
E extends java.lang.Throwable