[vcs-log] better text for not found / not matched commit

This commit is contained in:
Julia Beliaeva
2018-07-06 16:36:51 +03:00
parent a2c8593389
commit cf1a125d1d
3 changed files with 5 additions and 5 deletions
@@ -226,7 +226,7 @@ public class FileHistoryUi extends AbstractVcsLogUi {
String mainText = "Commit " + commitId.toString() + " does not exist in history for " + myPath.getName();
if (getFilterUi().getFilters().get(VcsLogFilterCollection.BRANCH_FILTER) != null) {
showWarningWithLink(mainText + " in current branch.", "Show all branches and search again.", () -> {
showWarningWithLink(mainText + " in current branch", "View and Show All Branches", () -> {
myUiProperties.set(FileHistoryUiProperties.SHOW_ALL_BRANCHES, true);
invokeOnChange(() -> jumpTo(commitId, rowGetter, SettableFuture.create()));
});
@@ -234,7 +234,7 @@ public class FileHistoryUi extends AbstractVcsLogUi {
else {
VcsLogUiImpl mainLogUi = VcsProjectLog.getInstance(myProject).getMainLogUi();
if (mainLogUi != null) {
showWarningWithLink(mainText + ".", "Search in Log.", () -> {
showWarningWithLink(mainText, "View in Log", () -> {
if (VcsLogContentUtil.selectLogUi(myProject, mainLogUi)) {
if (commitId instanceof Hash) {
mainLogUi.jumpToCommit((Hash)commitId,
@@ -211,7 +211,7 @@ public abstract class AbstractVcsLogUi implements VcsLogUi, Disposable {
@NotNull
protected static <T> String getCommitNotFoundMessage(@NotNull T commitId, boolean exists) {
return exists ? "Commit " + commitId.toString() + " does not match active filters" : "Commit " + commitId.toString() + " not found";
return exists ? "Commit " + commitId.toString() + " doesn't match the filters" : "Commit " + commitId.toString() + " not found";
}
protected void showWarningWithLink(@NotNull String mainText, @NotNull String linkText, @NotNull Runnable onClick) {
@@ -108,7 +108,7 @@ public class VcsLogUiImpl extends AbstractVcsLogUi {
}
List<NamedRunnable> runnables = ContainerUtil.newArrayList();
runnables.add(new NamedRunnable("Reset filters and search again.") {
runnables.add(new NamedRunnable("View and Reset Filters") {
@Override
public void run() {
getFilterUi().setFilter(null);
@@ -117,7 +117,7 @@ public class VcsLogUiImpl extends AbstractVcsLogUi {
}
});
if (VcsLogProjectTabsProperties.MAIN_LOG_ID.equals(getId())) {
runnables.add(new NamedRunnable("Search in new tab.") {
runnables.add(new NamedRunnable("View in New Tab") {
@Override
public void run() {
VcsProjectLog projectLog = VcsProjectLog.getInstance(myProject);