public class CoreCommandProcessor extends CommandProcessorEx
Modifier and Type | Field and Description |
---|---|
protected com.intellij.openapi.command.impl.CoreCommandProcessor.CommandDescriptor |
myCurrentCommand |
Constructor and Description |
---|
CoreCommandProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
addAffectedDocuments(Project project,
Document... docs) |
void |
addAffectedFiles(Project project,
VirtualFile... files) |
void |
addCommandListener(CommandListener listener) |
void |
enterModal() |
void |
executeCommand(Project project,
java.lang.Runnable runnable,
java.lang.String name,
java.lang.Object groupId) |
void |
executeCommand(Project project,
java.lang.Runnable runnable,
java.lang.String name,
java.lang.Object groupId,
Document document) |
void |
executeCommand(Project project,
java.lang.Runnable command,
java.lang.String name,
java.lang.Object groupId,
UndoConfirmationPolicy confirmationPolicy) |
void |
executeCommand(Project project,
java.lang.Runnable command,
java.lang.String name,
java.lang.Object groupId,
UndoConfirmationPolicy confirmationPolicy,
boolean shouldRecordCommandForActiveDocument) |
void |
executeCommand(Project project,
java.lang.Runnable command,
java.lang.String name,
java.lang.Object groupId,
UndoConfirmationPolicy confirmationPolicy,
Document document) |
void |
executeCommand(java.lang.Runnable runnable,
java.lang.String name,
java.lang.Object groupId) |
void |
finishCommand(CommandToken command,
java.lang.Throwable throwable) |
protected void |
fireCommandFinished() |
java.lang.Runnable |
getCurrentCommand() |
java.lang.Object |
getCurrentCommandGroupId() |
java.lang.String |
getCurrentCommandName() |
Project |
getCurrentCommandProject() |
boolean |
isUndoTransparentActionInProgress() |
void |
leaveModal() |
void |
markCurrentCommandAsGlobal(Project project) |
void |
removeCommandListener(CommandListener listener) |
void |
runUndoTransparentAction(java.lang.Runnable action)
Defines a scope which contains undoable actions, for which there won't be a separate undo/redo step - they will be undone/redone along
with 'adjacent' command.
|
void |
setCurrentCommandGroupId(java.lang.Object groupId) |
void |
setCurrentCommandName(java.lang.String name) |
CommandToken |
startCommand(Project project,
java.lang.String name,
java.lang.Object groupId,
UndoConfirmationPolicy undoConfirmationPolicy) |
addCommandListener, getInstance
protected com.intellij.openapi.command.impl.CoreCommandProcessor.CommandDescriptor myCurrentCommand
public void executeCommand(java.lang.Runnable runnable, java.lang.String name, java.lang.Object groupId)
executeCommand
in class CommandProcessor
public void executeCommand(Project project, java.lang.Runnable runnable, java.lang.String name, java.lang.Object groupId)
executeCommand
in class CommandProcessor
public void executeCommand(Project project, java.lang.Runnable runnable, java.lang.String name, java.lang.Object groupId, Document document)
executeCommand
in class CommandProcessor
public void executeCommand(Project project, java.lang.Runnable command, java.lang.String name, java.lang.Object groupId, UndoConfirmationPolicy confirmationPolicy)
executeCommand
in class CommandProcessor
public void executeCommand(Project project, java.lang.Runnable command, java.lang.String name, java.lang.Object groupId, UndoConfirmationPolicy confirmationPolicy, Document document)
executeCommand
in class CommandProcessor
public void executeCommand(Project project, java.lang.Runnable command, java.lang.String name, java.lang.Object groupId, UndoConfirmationPolicy confirmationPolicy, boolean shouldRecordCommandForActiveDocument)
executeCommand
in class CommandProcessor
shouldRecordCommandForActiveDocument
- false
if the action is not supposed to be recorded into the currently open document's history.
Examples of such actions: Create New File, Change Project Settings etc.
Default is true
.public CommandToken startCommand(Project project, java.lang.String name, java.lang.Object groupId, UndoConfirmationPolicy undoConfirmationPolicy)
startCommand
in class CommandProcessorEx
public void finishCommand(CommandToken command, java.lang.Throwable throwable)
finishCommand
in class CommandProcessorEx
protected void fireCommandFinished()
public void enterModal()
enterModal
in class CommandProcessorEx
public void leaveModal()
leaveModal
in class CommandProcessorEx
public void setCurrentCommandName(java.lang.String name)
setCurrentCommandName
in class CommandProcessor
public void setCurrentCommandGroupId(java.lang.Object groupId)
setCurrentCommandGroupId
in class CommandProcessor
public java.lang.Runnable getCurrentCommand()
getCurrentCommand
in class CommandProcessor
public java.lang.String getCurrentCommandName()
getCurrentCommandName
in class CommandProcessor
public java.lang.Object getCurrentCommandGroupId()
getCurrentCommandGroupId
in class CommandProcessor
public Project getCurrentCommandProject()
getCurrentCommandProject
in class CommandProcessor
public void addCommandListener(CommandListener listener)
addCommandListener
in class CommandProcessor
public void removeCommandListener(CommandListener listener)
removeCommandListener
in class CommandProcessor
public void runUndoTransparentAction(java.lang.Runnable action)
CommandProcessor
runUndoTransparentAction
in class CommandProcessor
public boolean isUndoTransparentActionInProgress()
isUndoTransparentActionInProgress
in class CommandProcessor
CommandProcessor.runUndoTransparentAction(Runnable)
public void markCurrentCommandAsGlobal(Project project)
markCurrentCommandAsGlobal
in class CommandProcessor
public void addAffectedDocuments(Project project, Document... docs)
addAffectedDocuments
in class CommandProcessor
public void addAffectedFiles(Project project, VirtualFile... files)
addAffectedFiles
in class CommandProcessor