use of com.intellij.openapi.diff.impl.settings.DiffMergeSettingsAction in project intellij-community by JetBrains.
the class DiffPanelImpl method createToolbar.
private DiffRequest.ToolbarAddons createToolbar() {
return new DiffRequest.ToolbarAddons() {
public void customize(DiffToolbar toolbar) {
ActionManager actionManager = ActionManager.getInstance();
toolbar.addAction(actionManager.getAction("DiffPanel.Toolbar"));
toolbar.addSeparator();
toolbar.addAction(new ToggleAutoScrollAction());
toolbar.addSeparator();
toolbar.addAction(actionManager.getAction("ContextHelp"));
toolbar.addAction(getEditSourceAction());
toolbar.addSeparator();
toolbar.addAction(new DiffMergeSettingsAction(Arrays.asList(getEditor1(), getEditor2()), ServiceManager.getService(myProject, DiffToolSettings.class)));
}
@NotNull
private AnAction getEditSourceAction() {
AnAction editSourceAction = new EditSourceAction();
editSourceAction.getTemplatePresentation().setIcon(AllIcons.Actions.EditSource);
editSourceAction.getTemplatePresentation().setText(ActionsBundle.actionText("EditSource"));
editSourceAction.getTemplatePresentation().setDescription(ActionsBundle.actionText("EditSource"));
editSourceAction.registerCustomShortcutSet(CommonShortcuts.getEditSource(), myPanel, DiffPanelImpl.this);
return editSourceAction;
}
};
}
use of com.intellij.openapi.diff.impl.settings.DiffMergeSettingsAction in project intellij-community by JetBrains.
the class MergePanel2 method createToolbar.
@NotNull
private DiffRequest.ToolbarAddons createToolbar() {
return new DiffRequest.ToolbarAddons() {
public void customize(DiffToolbar toolbar) {
toolbar.addAction(PreviousDiffAction.find());
toolbar.addAction(NextDiffAction.find());
toolbar.addSeparator();
toolbar.addAction(new OpenPartialDiffAction(0, 1, AllIcons.Diff.LeftDiff));
toolbar.addAction(new OpenPartialDiffAction(1, 2, AllIcons.Diff.RightDiff));
toolbar.addAction(new OpenPartialDiffAction(0, 2, AllIcons.Diff.BranchDiff));
toolbar.addSeparator();
toolbar.addAction(new ApplyNonConflicts(myPanel));
toolbar.addSeparator();
toolbar.addAction(new ToggleAutoScrollAction());
Project project = myData.getProject();
if (project != null) {
toolbar.addSeparator();
toolbar.addAction(new DiffMergeSettingsAction(getEditors(), ServiceManager.getService(project, MergeToolSettings.class)));
}
}
};
}
Aggregations