diff options
author | fbecker | 2011-06-28 17:37:28 +0000 |
---|---|---|
committer | fbecker | 2011-06-28 17:37:28 +0000 |
commit | 9528f3e2ea3d54880ef90f2bdaac0d5a31a3c81a (patch) | |
tree | 884df5eb32068db10c530944193d7b5171d46205 | |
parent | aac00d562a72560c75fc6a38460106bb9bdaefe8 (diff) | |
download | org.eclipse.mylyn.incubator-9528f3e2ea3d54880ef90f2bdaac0d5a31a3c81a.tar.gz org.eclipse.mylyn.incubator-9528f3e2ea3d54880ef90f2bdaac0d5a31a3c81a.tar.xz org.eclipse.mylyn.incubator-9528f3e2ea3d54880ef90f2bdaac0d5a31a3c81a.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.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPage.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPage.java b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPage.java index 8e4ee582..37e83c1e 100644 --- a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPage.java +++ b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPage.java @@ -132,18 +132,22 @@ public class ExtensibleBugzillaTaskEditorPage extends BugzillaTaskEditorPage { @Override protected Set<TaskEditorPartDescriptor> createPartDescriptors() { Set<TaskEditorPartDescriptor> descriptors = super.createPartDescriptors(); + boolean hasPartNewComment = false; for (TaskEditorPartDescriptor taskEditorPartDescriptor : descriptors) { if (taskEditorPartDescriptor.getId().equals(ID_PART_NEW_COMMENT)) { descriptors.remove(taskEditorPartDescriptor); + hasPartNewComment = true; break; } } - descriptors.add(new TaskEditorPartDescriptor(ID_PART_NEW_COMMENT) { - @Override - public AbstractTaskEditorPart createPart() { - return new ExtensibleTaskEditorNewCommentPart(); - } - }.setPath(PATH_COMMENTS)); + if (hasPartNewComment) { + descriptors.add(new TaskEditorPartDescriptor(ID_PART_NEW_COMMENT) { + @Override + public AbstractTaskEditorPart createPart() { + return new ExtensibleTaskEditorNewCommentPart(); + } + }.setPath(PATH_COMMENTS)); + } return descriptors; } |