Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-09-23 23:38:56 -0400
committerSteffen Pingel2012-09-23 23:38:56 -0400
commit3f5048053279a0b69ec70deba5a3e4a06a4ee467 (patch)
treecc6f47a061d59821f2a556431f295eed21060796 /org.eclipse.mylyn.tasks.activity.core
parent60c1f836e5271b7a2eaa8b64f2bc4b3c2dd824e3 (diff)
downloadorg.eclipse.mylyn.tasks-3f5048053279a0b69ec70deba5a3e4a06a4ee467.tar.gz
org.eclipse.mylyn.tasks-3f5048053279a0b69ec70deba5a3e4a06a4ee467.tar.xz
org.eclipse.mylyn.tasks-3f5048053279a0b69ec70deba5a3e4a06a4ee467.zip
389674: [activity] editor comes up with broken activity section when
creating new tasks Change-Id: If5492d95d51bc518890f10974aee2aa64aab6b0e Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389674
Diffstat (limited to 'org.eclipse.mylyn.tasks.activity.core')
-rw-r--r--org.eclipse.mylyn.tasks.activity.core/src/org/eclipse/mylyn/internal/tasks/activity/core/TaskActivityProvider.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.tasks.activity.core/src/org/eclipse/mylyn/internal/tasks/activity/core/TaskActivityProvider.java b/org.eclipse.mylyn.tasks.activity.core/src/org/eclipse/mylyn/internal/tasks/activity/core/TaskActivityProvider.java
index 3c97d4a75..20cf16bc5 100644
--- a/org.eclipse.mylyn.tasks.activity.core/src/org/eclipse/mylyn/internal/tasks/activity/core/TaskActivityProvider.java
+++ b/org.eclipse.mylyn.tasks.activity.core/src/org/eclipse/mylyn/internal/tasks/activity/core/TaskActivityProvider.java
@@ -25,6 +25,7 @@ import org.eclipse.mylyn.tasks.activity.core.TaskActivityScope;
import org.eclipse.mylyn.tasks.activity.core.spi.ActivityProvider;
import org.eclipse.mylyn.tasks.activity.core.spi.IActivitySession;
import org.eclipse.mylyn.tasks.core.ITask;
+import org.eclipse.osgi.util.NLS;
/**
* @author Steffen Pingel
@@ -46,14 +47,16 @@ public class TaskActivityProvider extends ActivityProvider {
public void query(ActivityScope scope, IProgressMonitor monitor) throws CoreException {
if (scope instanceof TaskActivityScope) {
ITask scopeTask = ((TaskActivityScope) scope).getTask();
-
- GetAssociatedTasks collector = new GetAssociatedTasks(session);
- IndexReference reference = new IndexReference();
- try {
- TaskListIndex taskListIndex = reference.index();
- taskListIndex.find(scopeTask.getTaskKey(), collector, 50);
- } finally {
- reference.dispose();
+ String url = scopeTask.getUrl();
+ if (url != null) {
+ GetAssociatedTasks collector = new GetAssociatedTasks(session);
+ IndexReference reference = new IndexReference();
+ try {
+ TaskListIndex taskListIndex = reference.index();
+ taskListIndex.find(NLS.bind("content:\"{0}\"", url), collector, 50); //$NON-NLS-1$
+ } finally {
+ reference.dispose();
+ }
}
}
}

Back to the top