Java Code Examples for com.intellij.openapi.command.UndoConfirmationPolicy#DEFAULT
The following examples show how to use
com.intellij.openapi.command.UndoConfirmationPolicy#DEFAULT .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ActionRequestBuilder.java From PackageTemplates with Apache License 2.0 | 5 votes |
public ActionRequestBuilder() { //defaults request = new ActionRequest(); request.project = null; request.actions = new ArrayList<>(); request.actionLabel = "actionLabel"; request.groupId = null; request.accessPrivileges = AccessPrivileges.NONE; request.confirmationPolicy = UndoConfirmationPolicy.DEFAULT; request.isUndoable = true; }
Example 2
Source File: GlobalVariableQuickfix.java From BashSupport with Apache License 2.0 | 5 votes |
@Override public void invoke(@NotNull Project project, @NotNull final PsiFile file, Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { BashVar variable = (BashVar) startElement; String variableName = variable.getReference().getReferencedName(); UndoConfirmationPolicy mode = ApplicationManager.getApplication().isUnitTestMode() ? UndoConfirmationPolicy.DO_NOT_REQUEST_CONFIRMATION : UndoConfirmationPolicy.DEFAULT; CommandProcessor.getInstance().executeCommand(project, new GlobalVarRegistryAction(project, variableName, register), getText(), null, mode); }
Example 3
Source File: CommandMerger.java From consulo with Apache License 2.0 | 5 votes |
void mergeUndoConfirmationPolicy(UndoConfirmationPolicy undoConfirmationPolicy) { if (myUndoConfirmationPolicy == UndoConfirmationPolicy.DEFAULT) { myUndoConfirmationPolicy = undoConfirmationPolicy; } else if (myUndoConfirmationPolicy == UndoConfirmationPolicy.DO_NOT_REQUEST_CONFIRMATION) { if (undoConfirmationPolicy == UndoConfirmationPolicy.REQUEST_CONFIRMATION) { myUndoConfirmationPolicy = UndoConfirmationPolicy.REQUEST_CONFIRMATION; } } }
Example 4
Source File: CommandMerger.java From consulo with Apache License 2.0 | 5 votes |
private void reset() { myCurrentActions = new ArrayList<>(); myAllAffectedDocuments = new THashSet<>(); myAdditionalAffectedDocuments = new THashSet<>(); myLastGroupId = null; myForcedGlobal = false; myTransparent = false; myCommandName = null; myValid = true; myStateAfter = null; myStateBefore = null; myUndoConfirmationPolicy = UndoConfirmationPolicy.DEFAULT; }
Example 5
Source File: BaseRefactoringProcessor.java From consulo with Apache License 2.0 | 4 votes |
@Nonnull protected UndoConfirmationPolicy getUndoConfirmationPolicy() { return UndoConfirmationPolicy.DEFAULT; }