Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Folk2014-12-23 18:54:02 -0500
committerGerrit Code Review @ Eclipse.org2015-01-23 13:09:21 -0500
commit55c5b148d5487ab9728f65eded04bf1b4210eaa4 (patch)
tree967e94971731d4b8bff9b8ad7c99c27778fe93e3 /org.eclipse.mylyn.reviews.ui/src
parent45462fb49ff763dc604eccfb22b79dec75070726 (diff)
downloadorg.eclipse.mylyn.reviews-55c5b148d5487ab9728f65eded04bf1b4210eaa4.tar.gz
org.eclipse.mylyn.reviews-55c5b148d5487ab9728f65eded04bf1b4210eaa4.tar.xz
org.eclipse.mylyn.reviews-55c5b148d5487ab9728f65eded04bf1b4210eaa4.zip
384771: when opening a file that is already open, activate existing
compare editor instead of opening another one Change-Id: I2ff7492b85623ed74c2f07c87a48944a16bce760 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=384771 Signed-off-by: Nicholas Folk <Nicholas.folk@tasktop.com>
Diffstat (limited to 'org.eclipse.mylyn.reviews.ui/src')
-rw-r--r--org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/FileItemCompareEditorInput.java8
-rw-r--r--org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewItemCompareEditorInput.java3
2 files changed, 9 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/FileItemCompareEditorInput.java b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/FileItemCompareEditorInput.java
index c08820cd..3981dae4 100644
--- a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/FileItemCompareEditorInput.java
+++ b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/FileItemCompareEditorInput.java
@@ -33,8 +33,8 @@ public class FileItemCompareEditorInput extends ReviewItemCompareEditorInput {
public FileItemCompareEditorInput(CompareConfiguration configuration, IFileItem file, ReviewBehavior behavior) {
super(configuration, behavior);
this.file = file;
- setTitle(NLS.bind(Messages.FileItemCompareEditorInput_Compare_X_Y_and_Z, new Object[] { file.getName(), file.getBase().getDescription(),
- file.getTarget().getDescription() }));
+ setTitle(NLS.bind(Messages.FileItemCompareEditorInput_Compare_X_Y_and_Z, new Object[] { file.getName(),
+ file.getBase().getDescription(), file.getTarget().getDescription() }));
}
@Override
@@ -43,4 +43,8 @@ public class FileItemCompareEditorInput extends ReviewItemCompareEditorInput {
getCompareConfiguration().setLabelProvider(node, node.getLabelProvider());
return node;
}
+
+ public String getFileItemId() {
+ return file.getId();
+ }
} \ No newline at end of file
diff --git a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewItemCompareEditorInput.java b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewItemCompareEditorInput.java
index 6d302e6c..cf0c7382 100644
--- a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewItemCompareEditorInput.java
+++ b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/compare/ReviewItemCompareEditorInput.java
@@ -140,4 +140,7 @@ public abstract class ReviewItemCompareEditorInput extends CompareEditorInput {
}
}
+ public String getItemTaskId() {
+ return behavior.getTask().getTaskId();
+ }
} \ No newline at end of file

Back to the top