diff --git a/platform/vcs-log/graph-api/src/com/intellij/vcs/log/graph/PermanentGraph.java b/platform/vcs-log/graph-api/src/com/intellij/vcs/log/graph/PermanentGraph.java index 5a8b164cc4b6..9b1088e8ee2f 100644 --- a/platform/vcs-log/graph-api/src/com/intellij/vcs/log/graph/PermanentGraph.java +++ b/platform/vcs-log/graph-api/src/com/intellij/vcs/log/graph/PermanentGraph.java @@ -45,9 +45,9 @@ public interface PermanentGraph { Set getContainingBranches(@NotNull CommitId commit); enum SortType { - Normal("Off", "Sort commits topologically and by date."), - Bek("Standard", "In case of merge show incoming commits first (directly below merge commit)."), - LinearBek("Linear", "In case of merge show incoming commits on top of main branch commits as if they were rebased."); + Normal("Off", "Sort commits topologically and by date"), + Bek("Standard", "In case of merge show incoming commits first (directly below merge commit)"), + LinearBek("Linear", "In case of merge show incoming commits on top of main branch commits as if they were rebased"); @NotNull private final String myPresentation; @NotNull private final String myDescription; diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/IntelliSortChooserPopupAction.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/IntelliSortChooserPopupAction.java index adbf604534f8..2e034c6ac5f5 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/IntelliSortChooserPopupAction.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/IntelliSortChooserPopupAction.java @@ -79,7 +79,7 @@ public class IntelliSortChooserPopupAction extends DumbAwareAction { private final VcsLogUi myUI; public SelectIntelliSortTypeAction(VcsLogUi logUi, PermanentGraph.SortType sortType) { - super(sortType.getName(), sortType.getDescription(), null); + super(sortType.getName(), sortType.getDescription() + ".", null); myUI = logUi; mySortType = sortType; } diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/IntelliSortChooserToggleAction.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/IntelliSortChooserToggleAction.java index 5ecd803961e0..82f5d065a379 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/IntelliSortChooserToggleAction.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/IntelliSortChooserToggleAction.java @@ -27,10 +27,11 @@ import icons.VcsLogIcons; import org.jetbrains.annotations.NotNull; public class IntelliSortChooserToggleAction extends ToggleAction implements DumbAware { + @NotNull private static final String DEFAULT_TEXT = "IntelliSort"; @NotNull private static final String DEFAULT_DESCRIPTION = "Turn IntelliSort On/Off"; public IntelliSortChooserToggleAction() { - super("IntelliSort", DEFAULT_DESCRIPTION, IconUtil.flip(VcsLogIcons.Branch, false)); + super(DEFAULT_TEXT, DEFAULT_DESCRIPTION, IconUtil.flip(VcsLogIcons.Branch, false)); } @Override @@ -54,9 +55,15 @@ public class IntelliSortChooserToggleAction extends ToggleAction implements Dumb e.getPresentation().setEnabled(BekSorter.isBekEnabled() && logUI != null); if (logUI != null) { - e.getPresentation().setDescription("Turn IntelliSort " + (logUI.getBekType() == PermanentGraph.SortType.Normal ? "On" : "Off" + "")); + boolean off = logUI.getBekType() == PermanentGraph.SortType.Normal; + e.getPresentation().setText("IntelliSort is " + (off ? "Off" : "On")); + e.getPresentation().setDescription("Turn IntelliSort " + (off ? "on" : "off") + " (" + + (off + ? PermanentGraph.SortType.Bek.getDescription().toLowerCase() + : PermanentGraph.SortType.Normal.getDescription().toLowerCase()) + ")."); } else { + e.getPresentation().setText(DEFAULT_TEXT); e.getPresentation().setDescription(DEFAULT_DESCRIPTION); } }