}
public abstract class ApplyNonConflictsActionBase extends DumbAwareAction {
- public ApplyNonConflictsActionBase(@Nullable String text, @Nullable String description, @Nullable Icon icon) {
- super(text, description, icon);
- }
-
@Override
public void actionPerformed(AnActionEvent e) {
executeMergeCommand("Apply Non Conflicted Changes", true, null, () -> {
public class ApplyNonConflictsAction extends ApplyNonConflictsActionBase {
public ApplyNonConflictsAction() {
- super(DiffBundle.message("merge.dialog.apply.all.non.conflicting.changes.action.name"), null, AllIcons.Diff.ApplyNotConflicts);
+ ActionUtil.copyFrom(this, "Diff.ApplyNonConflicts");
}
@Override
@NotNull private final Side mySide;
public ApplySideNonConflictsAction(@NotNull Side side) {
- super(side.select(DiffBundle.message("merge.dialog.apply.left.non.conflicting.changes.action.name"),
- DiffBundle.message("merge.dialog.apply.right.non.conflicting.changes.action.name")),
- null,
- side.select(AllIcons.Diff.ApplyNotConflictsLeft, AllIcons.Diff.ApplyNotConflictsRight));
+ ActionUtil.copyFrom(this, side.select("Diff.ApplyNonConflicts.Left", "Diff.ApplyNonConflicts.Right"));
mySide = side;
}
import com.intellij.diff.tools.util.base.ListenerDiffViewerBase;
import com.intellij.diff.util.DiffUtil;
import com.intellij.diff.util.ThreeSide;
-import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
-import com.intellij.openapi.diff.DiffBundle;
+import com.intellij.openapi.actionSystem.ex.ActionUtil;
import com.intellij.openapi.fileEditor.OpenFileDescriptor;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.util.Disposer;
@NotNull protected final ThreeSide mySide2;
public ShowPartialDiffAction(@NotNull PartialDiffMode mode) {
- String text;
- Icon icon;
+ String id;
switch (mode) {
case LEFT_BASE:
mySide1 = ThreeSide.LEFT;
mySide2 = ThreeSide.BASE;
- text = DiffBundle.message("merge.partial.diff.action.name.0.1");
- icon = AllIcons.Diff.LeftDiff;
+ id = "Diff.ComparePartial.Base.Left";
break;
case BASE_RIGHT:
mySide1 = ThreeSide.BASE;
mySide2 = ThreeSide.RIGHT;
- text = DiffBundle.message("merge.partial.diff.action.name.1.2");
- icon = AllIcons.Diff.RightDiff;
+ id = "Diff.ComparePartial.Base.Right";
break;
case LEFT_RIGHT:
mySide1 = ThreeSide.LEFT;
mySide2 = ThreeSide.RIGHT;
- text = DiffBundle.message("merge.partial.diff.action.name");
- icon = AllIcons.Diff.BranchDiff;
+ id = "Diff.ComparePartial.Left.Right";
break;
default:
throw new IllegalArgumentException();
}
- getTemplatePresentation().setText(text);
- getTemplatePresentation().setIcon(icon);
+ ActionUtil.copyFrom(this, id);
}
@Override
import com.intellij.diff.merge.MergeTestBase.SidesState.*
import com.intellij.diff.util.Side
import com.intellij.diff.util.TextDiffType.*
-import com.intellij.openapi.diff.DiffBundle
+import com.intellij.idea.ActionsBundle
class MergeTest : MergeTestBase() {
fun testChangeTypes() {
}
fun testNonConflictsActions() {
- val applyAllTitle = DiffBundle.message("merge.dialog.apply.all.non.conflicting.changes.action.name")
- val applyLeftTitle = DiffBundle.message("merge.dialog.apply.left.non.conflicting.changes.action.name")
- val applyRightTitle = DiffBundle.message("merge.dialog.apply.right.non.conflicting.changes.action.name")
+ val applyAllTitle = ActionsBundle.actionText("Diff.ApplyNonConflicts")
+ val applyLeftTitle = ActionsBundle.actionText("Diff.ApplyNonConflicts.Left")
+ val applyRightTitle = ActionsBundle.actionText("Diff.ApplyNonConflicts.Right")
val text1 =
"1 ======\n" +
*/
package com.intellij.openapi.diff.impl.incrementalMerge.ui;
-import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
+import com.intellij.openapi.actionSystem.ex.ActionUtil;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.command.CommandProcessor;
import com.intellij.openapi.diff.DiffBundle;
@Nullable private final DiffPanelOuterComponent myDiffPanel;
public ApplyNonConflicts(@Nullable DiffPanelOuterComponent diffPanel) {
- super(DiffBundle.message("merge.dialog.apply.all.non.conflicting.changes.action.name"), null, AllIcons.Diff.ApplyNotConflicts);
+ ActionUtil.copyFrom(this, "Diff.ApplyNonConflicts");
myDiffPanel = diffPanel;
}
*/
package com.intellij.openapi.diff.impl.incrementalMerge.ui;
+import com.intellij.idea.ActionsBundle;
import com.intellij.openapi.actionSystem.*;
+import com.intellij.openapi.actionSystem.ex.ActionUtil;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.diff.DiffBundle;
import com.intellij.openapi.diff.DocumentContent;
private String composeName() {
if (myLeftIndex == 0 && myRightIndex == 1) {
- return DiffBundle.message("merge.partial.diff.action.name.0.1");
+ return ActionsBundle.actionText("Diff.ComparePartial.Base.Left");
}
if (myLeftIndex == 1 && myRightIndex == 2) {
- return DiffBundle.message("merge.partial.diff.action.name.1.2");
+ return ActionsBundle.actionText("Diff.ComparePartial.Base.Right");
}
- return DiffBundle.message("merge.partial.diff.action.name");
+ return ActionsBundle.actionText("Diff.ComparePartial.Left.Right");
}
@Nullable
action.Diff.AppendRightSide.text=Append Right Side
action.Diff.IgnoreLeftSide.text=Ignore Left Side
action.Diff.IgnoreRightSide.text=Ignore Right Side
+action.Diff.ApplyNonConflicts.text=Apply All Non-Conflicting Changes
+action.Diff.ApplyNonConflicts.Left.text=Apply Non-Conflicting Changes from the Left Side
+action.Diff.ApplyNonConflicts.Right.text=Apply Non-Conflicting Changes from the Right Side
+action.Diff.ComparePartial.Base.Left.text=Compare Left and Middle Contents
+action.Diff.ComparePartial.Base.Right.text=Compare Middle and Right Contents
+action.Diff.ComparePartial.Left.Right.text=Compare Left and Right Contents
action.FileChooser.ShowHiddens.text=Show Hidden Files and Directories
action.FileChooser.ShowHiddens.description=Show hidden files and directories
merge.dialog.apply.change.action.name=Accept
merge.dialog.append.change.action.name=Apply selected change side
merge.dialog.ignore.change.action.name=Ignore
-merge.dialog.apply.all.non.conflicting.changes.action.name=Apply all non-conflicting changes
-merge.dialog.apply.left.non.conflicting.changes.action.name=Apply non-conflicting changes from left side
-merge.dialog.apply.right.non.conflicting.changes.action.name=Apply non-conflicting changes from right side
merge.dialog.all.conflicts.resolved.message.text=All conflicts resolved
#0 - changes count, 1 - conflicts count
merge.statistics.message={0, choice, 0#No changes|1#One change|2#{0, number} changes}. {1, choice, 0#No conflicts|1#One conflict|2#{0, number} conflicts}
-merge.partial.diff.action.name=Compare left and right panel contents
-merge.partial.diff.action.name.0.1=Compare left and middle panel contents
-merge.partial.diff.action.name.1.2=Compare middle and right panel contents
merge.dialog.exit.without.applying.changes.confirmation.message=Are you sure you want to exit without applying changes?
cancel.visual.merge.dialog.title=Cancel Visual Merge
apply.somehow.status.message.already.applied={0, number} {0, choice, 1#hunk is|2#hunks are} already applied
<action id="Diff.IgnoreRightSide" class="com.intellij.openapi.actionSystem.EmptyAction" icon="AllIcons.Diff.Remove"/>
<separator/>
+ <action id="Diff.ApplyNonConflicts" class="com.intellij.openapi.actionSystem.EmptyAction" icon="AllIcons.Diff.ApplyNotConflicts"/>
+ <action id="Diff.ApplyNonConflicts.Left" class="com.intellij.openapi.actionSystem.EmptyAction" icon="AllIcons.Diff.ApplyNotConflictsLeft"/>
+ <action id="Diff.ApplyNonConflicts.Right" class="com.intellij.openapi.actionSystem.EmptyAction" icon="AllIcons.Diff.ApplyNotConflictsRight"/>
+
+ <action id="Diff.ComparePartial.Base.Left" class="com.intellij.openapi.actionSystem.EmptyAction" icon="AllIcons.Diff.LeftDiff"/>
+ <action id="Diff.ComparePartial.Base.Right" class="com.intellij.openapi.actionSystem.EmptyAction" icon="AllIcons.Diff.RightDiff"/>
+ <action id="Diff.ComparePartial.Left.Right" class="com.intellij.openapi.actionSystem.EmptyAction" icon="AllIcons.Diff.BranchDiff"/>
+ <separator/>
+
<action id="CompareDirs" class="com.intellij.diff.actions.CompareFilesAction" text="Compare Directories" use-shortcut-of="CompareTwoFiles"/>
<separator/>