summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Parker2013-01-07 15:46:08 (EST)
committer Gerrit Code Review @ Eclipse.org2013-01-21 17:10:40 (EST)
commit4616ffbe300970c0a574fbbffc381bfb95308b2d (patch)
treea66087dbe76467143c7d8cc7ae69070fd1524bc1
parent3486524baa0bc3b834568c0e1f7a101d426eae82 (diff)
downloadorg.eclipse.mylyn.reviews-4616ffbe300970c0a574fbbffc381bfb95308b2d.zip
org.eclipse.mylyn.reviews-4616ffbe300970c0a574fbbffc381bfb95308b2d.tar.gz
org.eclipse.mylyn.reviews-4616ffbe300970c0a574fbbffc381bfb95308b2d.tar.bz2
397620: [editor] Improve ordering of sectionsrefs/changes/08/9508/2
Change-Id: I10a7cbb2f09575a3c619923d90aab76ae2fed96d Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=397620
-rw-r--r--org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/GerritTaskEditorPage.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/GerritTaskEditorPage.java b/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/GerritTaskEditorPage.java
index 4c34170..c93fa4c 100644
--- a/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/GerritTaskEditorPage.java
+++ b/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/GerritTaskEditorPage.java
@@ -60,6 +60,8 @@ public class GerritTaskEditorPage extends AbstractTaskEditorPage {
@Override
protected Set<TaskEditorPartDescriptor> createPartDescriptors() {
Set<TaskEditorPartDescriptor> descriptors = super.createPartDescriptors();
+ TaskEditorPartDescriptor commentsDescriptor = null;
+ TaskEditorPartDescriptor newCommentsDescriptor = null;
for (Iterator<TaskEditorPartDescriptor> it = descriptors.iterator(); it.hasNext();) {
TaskEditorPartDescriptor descriptor = it.next();
if (PATH_ACTIONS.equals(descriptor.getPath())) {
@@ -68,6 +70,14 @@ public class GerritTaskEditorPage extends AbstractTaskEditorPage {
if (PATH_PEOPLE.equals(descriptor.getPath())) {
it.remove();
}
+ if (ID_PART_COMMENTS.equals(descriptor.getId())) {
+ it.remove();
+ commentsDescriptor = descriptor;
+ }
+ if (ID_PART_NEW_COMMENT.equals(descriptor.getId())) {
+ it.remove();
+ newCommentsDescriptor = descriptor;
+ }
}
descriptors.add(new TaskEditorPartDescriptor(ReviewSection.class.getName()) {
@Override
@@ -81,6 +91,12 @@ public class GerritTaskEditorPage extends AbstractTaskEditorPage {
return new PatchSetSection();
}
});
+ if (commentsDescriptor != null) {
+ descriptors.add(commentsDescriptor);
+ }
+ if (newCommentsDescriptor != null) {
+ descriptors.add(newCommentsDescriptor);
+ }
return descriptors;
}