Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlaine Lewis2015-09-18 20:31:28 -0400
committerSam Davis2015-12-10 13:03:20 -0500
commit03a47c7ebc66e39a2526e453b541b7f5daba5790 (patch)
treee0abc5e117cd980f22b1dc05c7d991edf0b99d74 /org.eclipse.mylyn.reviews.ui/src
parent625b620692d84e60d6645dcc2a1c2efb709cec66 (diff)
downloadorg.eclipse.mylyn.reviews-03a47c7ebc66e39a2526e453b541b7f5daba5790.tar.gz
org.eclipse.mylyn.reviews-03a47c7ebc66e39a2526e453b541b7f5daba5790.tar.xz
org.eclipse.mylyn.reviews-03a47c7ebc66e39a2526e453b541b7f5daba5790.zip
477635: Implemented functionality to capture a mapping between tasks and
any related reviews using the task-id in the summary of a field. Change-Id: If76a2db1304c5f4925981227ee80b602a370097c Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=477635 Signed-off-by: Ratstache <landonbutterworth@gmail.com> Signed-off-by: Blaine Lewis <Blaine1@ualberta.ca>
Diffstat (limited to 'org.eclipse.mylyn.reviews.ui/src')
-rw-r--r--org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/ReviewsUiPlugin.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/ReviewsUiPlugin.java b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/ReviewsUiPlugin.java
index 226a80d1..663854f5 100644
--- a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/ReviewsUiPlugin.java
+++ b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/ReviewsUiPlugin.java
@@ -10,12 +10,19 @@
*********************************************************************/
package org.eclipse.mylyn.internal.reviews.ui;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
+import org.eclipse.mylyn.reviews.internal.core.TaskReviewsMappingsStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.ui.progress.UIJob;
import org.osgi.framework.BundleContext;
/**
* @author Steffen Pingel
*/
+@SuppressWarnings("restriction")
public class ReviewsUiPlugin extends AbstractUIPlugin {
public static final String PLUGIN_ID = "org.eclipse.mylyn.reviews.ui"; //$NON-NLS-1$
@@ -24,6 +31,10 @@ public class ReviewsUiPlugin extends AbstractUIPlugin {
private ActiveReviewManager reviewManager;
+ private TaskReviewsMappingsStore taskReviewsMappingStore;
+
+ private final String INITIALIZE_TASK_REVIEW_MAPPING_STORE_JOB = "initialize task review mapping store job"; //$NON-NLS-1$
+
public ReviewsUiPlugin() {
}
@@ -32,6 +43,19 @@ public class ReviewsUiPlugin extends AbstractUIPlugin {
super.start(context);
plugin = this;
reviewManager = new ActiveReviewManager();
+
+ //We need to schedule initialization otherwise TasksUiPlugin hasn't finished initialization.
+ UIJob job = new UIJob(INITIALIZE_TASK_REVIEW_MAPPING_STORE_JOB) {
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ taskReviewsMappingStore = new TaskReviewsMappingsStore(TasksUiPlugin.getTaskDataManager(),
+ TasksUiPlugin.getRepositoryManager());
+
+ TasksUiPlugin.getTaskList().addChangeListener(taskReviewsMappingStore);
+ return Status.OK_STATUS;
+ }
+ };
+ job.schedule();
}
@Override
@@ -47,4 +71,8 @@ public class ReviewsUiPlugin extends AbstractUIPlugin {
public ActiveReviewManager getReviewManager() {
return reviewManager;
}
+
+ public TaskReviewsMappingsStore getTaskReviewsMappingStore() {
+ return taskReviewsMappingStore;
+ }
}

Back to the top