svn: Update integrate-related actions - update toolbar, fix titles

This commit is contained in:
Konstantin Kolosovsky
2018-11-21 17:09:46 +03:00
parent 2087394efb
commit 2fd10f4fbc
7 changed files with 21 additions and 35 deletions
-3
View File
@@ -22,9 +22,6 @@ public final class SvnIcons {
public static final Icon Conflictp = load("/icons/conflictp.png"); // 16x16
public static final Icon Conflictt = load("/icons/conflictt.png"); // 16x16
public static final Icon Conflicttp = load("/icons/conflicttp.png"); // 16x16
public static final Icon FilterIntegrated = load("/icons/FilterIntegrated.png"); // 16x16
public static final Icon FilterNotIntegrated = load("/icons/FilterNotIntegrated.png"); // 16x16
public static final Icon FilterOthers = load("/icons/FilterOthers.png"); // 16x16
public static final Icon Integrated = load("/icons/Integrated.png"); // 16x16
public static final Icon IntegrationStatusUnknown = load("/icons/IntegrationStatusUnknown.png"); // 16x16
public static final Icon MarkAsMerged = load("/icons/MarkAsMerged.png"); // 16x16
Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

@@ -556,7 +556,7 @@ action.change.wcopy.format.task.title=Convert working copy format
action.change.wcopy.format.task.progress.text=Converting working copy at {0} format from {1} to {2}
action.change.wcopy.format.after.change.settings=Selected working copy format ({0}) is older than upgrade mode selected in Project Settings ({1}).\
\nChange Project Settings upgrade mode to {0}?
committed.changes.action.enable.merge.highlighting=Highlight integrated
committed.changes.action.enable.merge.highlighting=Highlight Integrated
committed.changes.action.enable.merge.highlighting.description.text=Option is available for SVN repositories and working copies with 1.5 version only
committed.changes.action.merge.highlighting.select.root=from:
committed.changes.action.merge.highlighting.select.branch=to:
@@ -599,13 +599,13 @@ tab.repository.merge.panel.root.panel.branch=Branch:
tab.repository.merge.panel.root.panel.url=Url:
tab.repository.merge.panel.root.panel.local=Local Path:
tab.repository.merge.panel.root.panel.select.local=Select path to the target working copy
tab.repository.merge.panel.filter.plus=Filter out integrated
tab.repository.merge.panel.filter.minus=Filter out not integrated
tab.repository.merge.panel.filter.others=Filter out others
tab.repository.merge.panel.filter.plus=Filter Out Integrated
tab.repository.merge.panel.filter.minus=Filter Out Not Integrated
tab.repository.merge.panel.filter.others=Filter Out Others
browse.changes.settings.stop.on.copy=&Stop On Copy
action.mark.list.as.merged.text=Mark As Merged
action.mark.list.as.merged.text=Mark as Merged
action.mark.list.as.merged.description=Mark selected revision as merged, but do not actually merge
action.mark.list.as.not.merged.text=Mark As Not Merged
action.mark.list.as.not.merged.text=Mark as Not Merged
action.mark.list.as.not.merged.description=Mark selected revision as not merged, but do not change anything besides svn:mergeinfo
label.depth.text=&Depth:
label.depth.description=Replaces old "recursive" option. "Recursive"=false is equivalent to "immediates", "recursive"=true is equivalent to "infinity"
@@ -60,11 +60,9 @@ public class RootsAndBranches implements CommittedChangeListDecorator {
private boolean myHighlightingOn;
private JPanel myPanelWrapper;
private final MergePanelFiltering myStrategy;
private final CommonFilter myFilterMerged =
new CommonFilter(message("tab.repository.merge.panel.filter.plus"), SvnIcons.FilterIntegrated);
private final CommonFilter myFilterNotMerged =
new CommonFilter(message("tab.repository.merge.panel.filter.minus"), SvnIcons.FilterNotIntegrated);
private final CommonFilter myFilterAlien = new CommonFilter(message("tab.repository.merge.panel.filter.others"), SvnIcons.FilterOthers);
private final CommonFilter myFilterMerged = new CommonFilter(message("tab.repository.merge.panel.filter.plus"));
private final CommonFilter myFilterNotMerged = new CommonFilter(message("tab.repository.merge.panel.filter.minus"));
private final CommonFilter myFilterAlien = new CommonFilter(message("tab.repository.merge.panel.filter.others"));
private final IntegrateChangeListsAction myIntegrateAction;
private final IntegrateChangeListsAction myUndoIntegrateChangeListsAction;
private JComponent myToolbarComponent;
@@ -291,15 +289,16 @@ public class RootsAndBranches implements CommittedChangeListDecorator {
}
private DefaultActionGroup createActions() {
DefaultActionGroup presentationGroup = new DefaultActionGroup(new HighlightFrom(), myFilterMerged, myFilterNotMerged, myFilterAlien);
presentationGroup.setPopup(true);
presentationGroup.getTemplatePresentation().setIcon(AllIcons.Actions.Show);
final DefaultActionGroup svnGroup = new DefaultActionGroup();
svnGroup.add(new HighlightFrom());
svnGroup.add(presentationGroup);
svnGroup.add(myIntegrateAction);
svnGroup.add(myUndoIntegrateChangeListsAction);
svnGroup.add(new MarkAsMerged(true));
svnGroup.add(new MarkAsMerged(false));
svnGroup.add(myFilterMerged);
svnGroup.add(myFilterNotMerged);
svnGroup.add(myFilterAlien);
svnGroup.add(new MyRefresh());
return svnGroup;
}
@@ -404,7 +403,7 @@ public class RootsAndBranches implements CommittedChangeListDecorator {
private class HighlightFrom extends DumbAwareToggleAction {
private HighlightFrom() {
super(message("committed.changes.action.enable.merge.highlighting"),
message("committed.changes.action.enable.merge.highlighting.description.text"), SvnIcons.ShowIntegratedFrom);
message("committed.changes.action.enable.merge.highlighting.description.text"), null);
}
@Override
@@ -426,8 +425,8 @@ public class RootsAndBranches implements CommittedChangeListDecorator {
private class CommonFilter extends DumbAwareToggleAction {
boolean mySelected;
protected CommonFilter(final String text, final Icon icon) {
super(text, null, icon);
protected CommonFilter(final String text) {
super(text);
}
@Override
@@ -2,17 +2,14 @@
package org.jetbrains.idea.svn.history;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.Presentation;
import com.intellij.openapi.project.DumbAwareToggleAction;
import com.intellij.openapi.vcs.changes.committed.ChangeListFilteringStrategy;
import com.intellij.openapi.vcs.changes.committed.DecoratorManager;
import icons.SvnIcons;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.idea.svn.SvnBundle;
/**
* @author Konstantin Kolosovsky.
*/
import static org.jetbrains.idea.svn.SvnBundle.message;
public class ShowHideMergePanelAction extends DumbAwareToggleAction {
private final DecoratorManager myManager;
@@ -20,19 +17,12 @@ public class ShowHideMergePanelAction extends DumbAwareToggleAction {
private boolean myIsSelected;
public ShowHideMergePanelAction(final DecoratorManager manager, final ChangeListFilteringStrategy strategy) {
super("Show Integrate Panel", message("committed.changes.action.enable.merge.highlighting.description.text"),
SvnIcons.ShowIntegratedFrom);
myManager = manager;
myStrategy = strategy;
}
@Override
public void update(@NotNull final AnActionEvent e) {
super.update(e);
final Presentation presentation = e.getPresentation();
presentation.setIcon(SvnIcons.ShowIntegratedFrom);
presentation.setText(SvnBundle.message("committed.changes.action.enable.merge.highlighting"));
presentation.setDescription(SvnBundle.message("committed.changes.action.enable.merge.highlighting.description.text"));
}
@Override
public boolean isSelected(@NotNull final AnActionEvent e) {
return myIsSelected;