IDEA-194533 Change 'Paste from History' dialog

This commit is contained in:
Dmitry Batrak
2018-07-05 18:25:00 +03:00
parent 0a31d9f95e
commit 05076eb02d
2 changed files with 8 additions and 19 deletions
@@ -24,7 +24,6 @@ import com.intellij.openapi.ide.CopyPasteManager;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.OptionAction;
import com.intellij.ui.UIBundle;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -125,7 +124,14 @@ public class MultiplePasteAction extends AnAction implements DumbAware {
public ClipboardContentChooser(Project project) {
super(project, UIBundle.message("choose.content.to.paste.dialog.title"), true, true);
setOKButtonText(UIBundle.message("choose.content.to.paste.dialog.ok.button"));
setOKButtonText(ActionsBundle.actionText(IdeActions.ACTION_EDITOR_PASTE));
setOKButtonMnemonic('P');
}
@NotNull
@Override
protected Action[] createActions() {
return new Action[]{getHelpAction(), getOKAction(), new PasteSimpleAction(), getCancelAction()};
}
@Nullable
@@ -156,22 +162,6 @@ public class MultiplePasteAction extends AnAction implements DumbAware {
CopyPasteManagerEx.getInstanceEx().removeContent(content);
}
@Override
protected void createDefaultActions() {
super.createDefaultActions();
myOKAction = new PasteAction();
}
class PasteAction extends OkAction implements OptionAction {
private final Action[] myActions = new Action[] {new PasteSimpleAction()};
@NotNull
@Override
public Action[] getOptions() {
return myActions;
}
}
class PasteSimpleAction extends DialogWrapperAction {
private PasteSimpleAction() {
super(ActionsBundle.actionText(IdeActions.ACTION_EDITOR_PASTE_SIMPLE));
@@ -133,7 +133,6 @@ cannot.save.files.dialog.revert.changes=&Revert Changes
cannot.save.files.dialog.ignore.changes=&Ignore Changes
status.bar.column.status.text=Column
choose.content.to.paste.dialog.title=Choose Content to Paste
choose.content.to.paste.dialog.ok.button=Paste
downloading.file.try.again.button=Tr&y Again
downloading.file.change.http.proxy.settings=Change HTTP &Proxy Settings...