diff --git a/platform/lang-impl/src/com/intellij/ide/todo/ChangeListTodosPanel.java b/platform/lang-impl/src/com/intellij/ide/todo/ChangeListTodosPanel.java index 4daf12991447..e465e70cd3c3 100644 --- a/platform/lang-impl/src/com/intellij/ide/todo/ChangeListTodosPanel.java +++ b/platform/lang-impl/src/com/intellij/ide/todo/ChangeListTodosPanel.java @@ -16,7 +16,6 @@ package com.intellij.ide.todo; -import com.intellij.ide.IdeBundle; import com.intellij.openapi.project.Project; import com.intellij.openapi.vcs.changes.Change; import com.intellij.openapi.vcs.changes.ChangeList; @@ -41,12 +40,12 @@ public abstract class ChangeListTodosPanel extends TodoPanel{ @Override public void defaultListChanged(final ChangeList oldDefaultList, final ChangeList newDefaultList) { rebuildWithAlarm(myAlarm); - AppUIUtil.invokeOnEdt(() -> setDisplayName(IdeBundle.message("changelist.todo.title", newDefaultList.getName()))); + AppUIUtil.invokeOnEdt(() -> setDisplayName(TodoView.getTabNameForChangeList(newDefaultList.getName()))); } @Override public void changeListRenamed(final ChangeList list, final String oldName) { - AppUIUtil.invokeOnEdt(() -> setDisplayName(IdeBundle.message("changelist.todo.title", list.getName()))); + AppUIUtil.invokeOnEdt(() -> setDisplayName(TodoView.getTabNameForChangeList(list.getName()))); } @Override diff --git a/platform/lang-impl/src/com/intellij/ide/todo/TodoView.java b/platform/lang-impl/src/com/intellij/ide/todo/TodoView.java index 5e643a1222c9..63392fe100db 100644 --- a/platform/lang-impl/src/com/intellij/ide/todo/TodoView.java +++ b/platform/lang-impl/src/com/intellij/ide/todo/TodoView.java @@ -1,7 +1,6 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.ide.todo; -import com.intellij.ide.CommonActionsManager; import com.intellij.ide.IdeBundle; import com.intellij.ide.TreeExpander; import com.intellij.openapi.Disposable; @@ -20,6 +19,7 @@ import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.project.DumbService; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Disposer; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vcs.ProjectLevelVcsManager; import com.intellij.openapi.vcs.VcsListener; import com.intellij.openapi.vcs.changes.ChangeListManager; @@ -147,10 +147,8 @@ public class TodoView implements PersistentStateComponent, Dispo Disposer.register(this, currentFileTodos); currentFileTodosContent.setComponent(currentFileTodos); - myChangeListTodosContent = contentFactory - .createContent(null, IdeBundle.message("changelist.todo.title", - ChangeListManager.getInstance(myProject).getDefaultChangeList().getName()), - false); + String tabName = getTabNameForChangeList(ChangeListManager.getInstance(myProject).getDefaultChangeList().getName()); + myChangeListTodosContent = contentFactory.createContent(null, tabName, false); ChangeListTodosPanel changeListTodos = new ChangeListTodosPanel(myProject, state.current, myChangeListTodosContent) { @Override protected TodoTreeBuilder createTreeBuilder(JTree tree, DefaultTreeModel treeModel, Project project) { @@ -237,6 +235,12 @@ public class TodoView implements PersistentStateComponent, Dispo // CommonActionsManager.getInstance().createCollapseAllAction(proxyExpander, toolWindow.getComponent())); } + @NotNull + static String getTabNameForChangeList(@NotNull String changelistName) { + String suffix = "Changelist"; + return StringUtil.endsWithIgnoreCase(changelistName, suffix) ? changelistName : changelistName + " " + suffix; + } + @NotNull protected AllTodosTreeBuilder createAllTodoBuilder(JTree tree, DefaultTreeModel treeModel, Project project) { return new AllTodosTreeBuilder(tree, treeModel, project); diff --git a/platform/platform-resources-en/src/messages/IdeBundle.properties b/platform/platform-resources-en/src/messages/IdeBundle.properties index b77b260198e7..ec10f638f117 100644 --- a/platform/platform-resources-en/src/messages/IdeBundle.properties +++ b/platform/platform-resources-en/src/messages/IdeBundle.properties @@ -1146,7 +1146,6 @@ plugin.manager.incompatible.tooltip=Plugin is incompatible with current {0} inst #new wizard components project.new.wizard.project.identification=project project.new.wizard.module.identification=module -changelist.todo.title={0} Changelist hierarchy.scope.test=Test file.structure.toggle.show.inherited=&Show inherited members