diff options
author | mkersten | 2009-02-18 01:43:26 +0000 |
---|---|---|
committer | mkersten | 2009-02-18 01:43:26 +0000 |
commit | f046cd282cd0d10e39c2a956e3f3a312a12f8ece (patch) | |
tree | f5a34ecebfc88e7c226c33707c00f1b70d71551b /org.eclipse.mylyn.tasks.ui | |
parent | d39af6dd1540682d5016fe6274abe2cc71337f22 (diff) | |
download | org.eclipse.mylyn.tasks-f046cd282cd0d10e39c2a956e3f3a312a12f8ece.tar.gz org.eclipse.mylyn.tasks-f046cd282cd0d10e39c2a956e3f3a312a12f8ece.tar.xz org.eclipse.mylyn.tasks-f046cd282cd0d10e39c2a956e3f3a312a12f8ece.zip |
RESOLVED - bug 263126: In focused mode incoming changes should not change the expansion state of queries
https://bugs.eclipse.org/bugs/show_bug.cgi?id=263126
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
5 files changed, 17 insertions, 18 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/plugin.properties b/org.eclipse.mylyn.tasks.ui/plugin.properties index 252f26c67..517016e75 100644 --- a/org.eclipse.mylyn.tasks.ui/plugin.properties +++ b/org.eclipse.mylyn.tasks.ui/plugin.properties @@ -135,7 +135,7 @@ TaskSearchPage.label = Task Search ProjectTaskRepositoryPage.name = Task Repository commands.category.repositories.name = Task Repositories -command.addTaskRepository.name = Add Task Repository +command.addTaskRepository.name = Add Task Repository... command.addTaskRepository.commandParameter.name = Repository Type TaskHyperlinkDetector.name = Tasks diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java index d216b73ab..dc0c40cc7 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java @@ -68,6 +68,8 @@ public interface ITasksUiPreferenceConstants { public static final String TEMPLATES_DELETED_DELIM = "|"; //$NON-NLS-1$ + public static final String AUTO_EXPAND_TASK_LIST = "org.eclipse.mylyn.tasks.ui.auto.expand"; //$NON-NLS-1$ + /** * Local subtasks are now enabled by default. * diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java index c3ea3016c..a52c7694e 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java @@ -137,8 +137,6 @@ public class TasksUiPlugin extends AbstractUIPlugin { private static Map<String, AbstractRepositoryConnectorUi> repositoryConnectorUiMap = new HashMap<String, AbstractRepositoryConnectorUi>(); - //private TaskListSaveManager taskListSaveManager; - private TaskListNotificationManager taskListNotificationManager; private TaskListBackupManager taskListBackupManager; @@ -866,6 +864,8 @@ public class TasksUiPlugin extends AbstractUIPlugin { store.setDefault(ITasksUiPreferenceConstants.WEEK_START_DAY, Calendar.getInstance().getFirstDayOfWeek()); //store.setDefault(TasksUiPreferenceConstants.PLANNING_STARTHOUR, 9); store.setDefault(ITasksUiPreferenceConstants.PLANNING_ENDHOUR, 18); + + store.setDefault(ITasksUiPreferenceConstants.AUTO_EXPAND_TASK_LIST, true); } public static TaskActivityManager getTaskActivityManager() { diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/messages.properties index 12e358f9b..a2ac6421d 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/messages.properties +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/messages.properties @@ -7,7 +7,7 @@ ActivateTaskHistoryDropDownAction_Activate_Previous_Task=Activate Previous Task AddRepositoryAction_Add_new_query=Add new query AddRepositoryAction_Add_a_query_to_the_Task_List=Would you like to add a query to the Task List for this repository? -AddRepositoryAction_Add_Task_Repository=Add Task Repository +AddRepositoryAction_Add_Task_Repository=Add Task Repository... AddRepositoryAction_Do_not_show_again=Do not show again ClearOutgoingAction_Clear_outgoing=Clear outgoing diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java index ab60dd07b..3bef3d545 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java @@ -284,7 +284,7 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I } protected void updateExpansionState(Object item) { - if (TaskListView.this.isFocusedMode()) { + if (TaskListView.this.isFocusedMode() && isAutoExpandMode()) { TaskListView.this.getViewer().expandToLevel(item, 3); } } @@ -1252,7 +1252,6 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I } }); -// manager.add(new Separator()); manager.add(linkWithEditorAction); manager.add(new Separator()); manager.add(openPreferencesAction); @@ -1260,9 +1259,7 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I private void fillLocalToolBar(IToolBarManager manager) { manager.add(new Separator(ID_SEPARATOR_NEW)); -// manager.add(new Separator(ID_SEPARATOR_NAVIGATION)); manager.add(presentationDropDownSelectionAction); -// manager.add(previousTaskAction); manager.add(new Separator()); manager.add(collapseAll); manager.add(new GroupMarker(ID_SEPARATOR_CONTEXT)); @@ -1527,7 +1524,7 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I } public void refresh(boolean expandIfFocused) { - if (expandIfFocused && isFocusedMode()) { + if (expandIfFocused && isFocusedMode() && isAutoExpandMode()) { try { getViewer().getControl().setRedraw(false); refreshJob.refreshNow(); @@ -1542,12 +1539,6 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I public void refresh() { refreshJob.refreshNow(); -// if (expand) { -// getViewer().expandAll(); -// } -// getViewer().refresh(); -// refresh(null); -// selectedAndFocusTask(TasksUiPlugin.getTaskList().getActiveTask()); } public TaskListToolTip getToolTip() { @@ -1759,15 +1750,21 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I return focusedMode; } + private boolean isAutoExpandMode() { + return TasksUiPlugin.getDefault().getPreferenceStore().getBoolean( + ITasksUiPreferenceConstants.AUTO_EXPAND_TASK_LIST); + } + public void setFocusedMode(boolean focusedMode) { if (this.focusedMode == focusedMode) { return; } this.focusedMode = focusedMode; IToolBarManager manager = getViewSite().getActionBars().getToolBarManager(); - if (focusedMode) { + + if (focusedMode && isAutoExpandMode()) { manager.remove(CollapseAllAction.ID); - } else { + } else if (manager.find(CollapseAllAction.ID) == null) { manager.prependToGroup(ID_SEPARATOR_CONTEXT, collapseAll); } manager.update(false); @@ -1798,7 +1795,7 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I } getViewer().refresh(); - if (isFocusedMode()) { + if (isFocusedMode() && isAutoExpandMode()) { getViewer().expandAll(); } } finally { |