Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlaine Lewis2015-11-27 14:54:10 -0500
committerSam Davis2015-12-10 13:04:29 -0500
commit7ec7690d253aeafe01625501da8c054cbabbae33 (patch)
treec4417544052d1a1398c7d862f17754cdef6343c9 /org.eclipse.mylyn.reviews.ui/src
parent03a47c7ebc66e39a2526e453b541b7f5daba5790 (diff)
downloadorg.eclipse.mylyn.reviews-7ec7690d253aeafe01625501da8c054cbabbae33.tar.gz
org.eclipse.mylyn.reviews-7ec7690d253aeafe01625501da8c054cbabbae33.tar.xz
org.eclipse.mylyn.reviews-7ec7690d253aeafe01625501da8c054cbabbae33.zip
482534: [UCOSP] store task review mapping using attribute on review
ITasks Change-Id: I621893f4cfac6a59a03c61ed2599c21cf2f4b4c8 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=482534 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/Messages.java2
-rw-r--r--org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/ReviewsUiPlugin.java19
-rw-r--r--org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/messages.properties1
3 files changed, 17 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/Messages.java b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/Messages.java
index d257c435..4d686211 100644
--- a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/Messages.java
+++ b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/Messages.java
@@ -64,6 +64,8 @@ public class Messages extends NLS {
public static String ReviewsLabelProvider_X_Revision_Y;
+ public static String ReviewsUiPlugin_Updating_task_review_mapping;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
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 663854f5..bc552422 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
@@ -13,6 +13,7 @@ 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.core.runtime.jobs.Job;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.reviews.internal.core.TaskReviewsMappingsStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -33,8 +34,6 @@ public class ReviewsUiPlugin extends AbstractUIPlugin {
private TaskReviewsMappingsStore taskReviewsMappingStore;
- private final String INITIALIZE_TASK_REVIEW_MAPPING_STORE_JOB = "initialize task review mapping store job"; //$NON-NLS-1$
-
public ReviewsUiPlugin() {
}
@@ -45,13 +44,23 @@ public class ReviewsUiPlugin extends AbstractUIPlugin {
reviewManager = new ActiveReviewManager();
//We need to schedule initialization otherwise TasksUiPlugin hasn't finished initialization.
- UIJob job = new UIJob(INITIALIZE_TASK_REVIEW_MAPPING_STORE_JOB) {
+ UIJob job = new UIJob(Messages.ReviewsUiPlugin_Updating_task_review_mapping) {
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
- taskReviewsMappingStore = new TaskReviewsMappingsStore(TasksUiPlugin.getTaskDataManager(),
+ taskReviewsMappingStore = new TaskReviewsMappingsStore(TasksUiPlugin.getTaskList(),
TasksUiPlugin.getRepositoryManager());
-
+ TaskReviewsMappingsStore.setInstance(taskReviewsMappingStore);
TasksUiPlugin.getTaskList().addChangeListener(taskReviewsMappingStore);
+ Job job = new Job(Messages.ReviewsUiPlugin_Updating_task_review_mapping) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ taskReviewsMappingStore.readFromTaskList();
+ return Status.OK_STATUS;
+ }
+ };
+ job.setSystem(true);
+ job.setUser(false);
+ job.schedule();
return Status.OK_STATUS;
}
};
diff --git a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/messages.properties b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/messages.properties
index 8bee8b6e..a60b8d40 100644
--- a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/messages.properties
+++ b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/messages.properties
@@ -31,3 +31,4 @@ ReviewsLabelProvider_X_dot_dot_dot={0}...
ReviewsLabelProvider_X_drafts=\ \ [{0} drafts]
ReviewsLabelProvider_X_renamed_from_Y_Z={0}\n renamed from: {1} {2}
ReviewsLabelProvider_X_Revision_Y={0} Revision: {1}
+ReviewsUiPlugin_Updating_task_review_mapping=Updating task review mapping

Back to the top