Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2007-02-15 19:18:28 -0500
committerrelves2007-02-15 19:18:28 -0500
commitc97bd583c047f1e1cb0c439dea0d2cd2c0c581d8 (patch)
tree5dc4f7c40064efa28dafa5563782ef432f334c46
parent1a2c95cad8365dc16508b034b3514764adf20060 (diff)
downloadorg.eclipse.mylyn.tasks-c97bd583c047f1e1cb0c439dea0d2cd2c0c581d8.tar.gz
org.eclipse.mylyn.tasks-c97bd583c047f1e1cb0c439dea0d2cd2c0c581d8.tar.xz
org.eclipse.mylyn.tasks-c97bd583c047f1e1cb0c439dea0d2cd2c0c581d8.zip
NEW - bug 174059: Bug editor does not highlight changed attributes
https://bugs.eclipse.org/bugs/show_bug.cgi?id=174059
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
index a3dde93fd..803e0aa63 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
@@ -201,6 +201,8 @@ public class TasksUiUtil {
repositoryTask.setTaskData(TasksUiPlugin.getDefault().getTaskDataManager()
.getRepositoryTaskData(repositoryTask.getHandleIdentifier()));
}
+ // Open editor synchronously so that editor first opens
+ // THEN marked read followed by sync.
TasksUiUtil.openEditor(task, false, false);
TasksUiPlugin.getSynchronizationManager().setTaskRead(repositoryTask, true);
TasksUiPlugin.getSynchronizationManager().synchronize(connector, repositoryTask, false, null);
@@ -212,7 +214,7 @@ public class TasksUiUtil {
// Mark read here too so that hits get
// marked as read upon opening
// TODO: if synch job failed, don't mark
- // read
+ // read
TasksUiUtil.openEditor(task, false);
TasksUiPlugin.getSynchronizationManager().setTaskRead(repositoryTask, true);
}
@@ -275,8 +277,14 @@ public class TasksUiUtil {
} else {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- openEditor(editorInput, TaskListPreferenceConstants.TASK_EDITOR_ID, page);
+ final IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ public void run() {
+ openEditor(editorInput, TaskListPreferenceConstants.TASK_EDITOR_ID, page);
+ }
+ });
+ }
} else {
MylarStatusHandler.log("Unable to open editor for " + task.getSummary(), TasksUiUtil.class);
}

Back to the top