Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2011-06-28 15:36:43 -0400
committerfbecker2011-06-28 15:36:43 -0400
commit376fdb0529c800d47923c5251aa7a330916125e9 (patch)
tree892ea1484e4c9fac5c82ddf76cd9636df023c474
parenteb7d9097f0e64a56b16de58000763fffb9499ca8 (diff)
downloadorg.eclipse.mylyn.tasks-376fdb0529c800d47923c5251aa7a330916125e9.tar.gz
org.eclipse.mylyn.tasks-376fdb0529c800d47923c5251aa7a330916125e9.tar.xz
org.eclipse.mylyn.tasks-376fdb0529c800d47923c5251aa7a330916125e9.zip
ASSIGNED - bug 349771: create UI for support adding private comments
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349771
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
index 7b2e6fece..42acc3194 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
@@ -98,6 +98,7 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
protected Set<TaskEditorPartDescriptor> createPartDescriptors() {
Set<TaskEditorPartDescriptor> descriptors = super.createPartDescriptors();
boolean hasPartComments = false;
+ boolean hasPartNewComment = false;
// remove unnecessary default editor parts
for (TaskEditorPartDescriptor taskEditorPartDescriptor : descriptors) {
if (taskEditorPartDescriptor.getId().equals(ID_PART_PEOPLE)) {
@@ -115,7 +116,7 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
for (TaskEditorPartDescriptor taskEditorPartDescriptor : descriptors) {
if (taskEditorPartDescriptor.getId().equals(ID_PART_NEW_COMMENT)) {
descriptors.remove(taskEditorPartDescriptor);
- hasPartComments = true;
+ hasPartNewComment = true;
break;
}
}
@@ -162,14 +163,15 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
// ignore
}
- // Add the updated Bugzilla new comment part
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_NEW_COMMENT) {
- @Override
- public AbstractTaskEditorPart createPart() {
- return new BugzillaTaskEditorNewCommentPart();
- }
- }.setPath(PATH_COMMENTS));
-
+ if (hasPartNewComment) {
+ // Add the updated Bugzilla new comment part
+ descriptors.add(new TaskEditorPartDescriptor(ID_PART_NEW_COMMENT) {
+ @Override
+ public AbstractTaskEditorPart createPart() {
+ return new BugzillaTaskEditorNewCommentPart();
+ }
+ }.setPath(PATH_COMMENTS));
+ }
// Add the updated Bugzilla people part
descriptors.add(new TaskEditorPartDescriptor(ID_PART_PEOPLE) {
@Override

Back to the top