diff options
author | Steffen Pingel | 2012-02-10 00:22:03 +0000 |
---|---|---|
committer | Steffen Pingel | 2012-02-10 00:22:03 +0000 |
commit | 9f99269112887b9003a6938eb5b59c1eb44f969b (patch) | |
tree | d4c79d7b3802222c162697e1e53ce71caf811230 /org.eclipse.mylyn.bugzilla.ui/src | |
parent | 173c07207e39b2cbbe5af0077b5588be52b09c6c (diff) | |
download | org.eclipse.mylyn.tasks-9f99269112887b9003a6938eb5b59c1eb44f969b.tar.gz org.eclipse.mylyn.tasks-9f99269112887b9003a6938eb5b59c1eb44f969b.tar.xz org.eclipse.mylyn.tasks-9f99269112887b9003a6938eb5b59c1eb44f969b.zip |
ASSIGNED - bug 349620: improve UI for private comments
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349620
Change-Id: I00b570970980919ae15c6026db859cc1c4ea89fa
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui/src')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorCommentPart.java | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorCommentPart.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorCommentPart.java index 48355b9f2..367148551 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorCommentPart.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorCommentPart.java @@ -51,24 +51,21 @@ public class BugzillaTaskEditorCommentPart extends TaskEditorCommentPart { isprivate = taskComment.getTaskAttribute().createMappedAttribute(TaskAttribute.COMMENT_ISPRIVATE); } isprivate.setValue(taskComment.getIsPrivate() ? "1" : "0"); //$NON-NLS-1$ //$NON-NLS-2$ - TaskAttribute commentID = taskComment.getTaskAttribute().getMappedAttribute(TaskAttribute.COMMENT_ID); - if (commentID != null) { - String value = commentID.getValue(); - TaskAttribute definedIsPrivate = taskComment.getTaskAttribute().getAttribute( + String value = taskComment.getTaskAttribute().getValue(); + TaskAttribute definedIsPrivate = taskComment.getTaskAttribute().getAttribute( + IBugzillaConstants.BUGZILLA_PREFIX_DEFINED_ISPRIVATE + value); + if (definedIsPrivate == null) { + definedIsPrivate = taskComment.getTaskAttribute().createAttribute( IBugzillaConstants.BUGZILLA_PREFIX_DEFINED_ISPRIVATE + value); - if (definedIsPrivate == null) { - definedIsPrivate = taskComment.getTaskAttribute().createAttribute( - IBugzillaConstants.BUGZILLA_PREFIX_DEFINED_ISPRIVATE + value); - } - TaskAttribute isPrivate = taskComment.getTaskAttribute().getAttribute( + } + TaskAttribute isPrivate = taskComment.getTaskAttribute().getAttribute( + IBugzillaConstants.BUGZILLA_PREFIX_ISPRIVATE + value); + if (isPrivate == null) { + isPrivate = taskComment.getTaskAttribute().createAttribute( IBugzillaConstants.BUGZILLA_PREFIX_ISPRIVATE + value); - if (isPrivate == null) { - isPrivate = taskComment.getTaskAttribute().createAttribute( - IBugzillaConstants.BUGZILLA_PREFIX_ISPRIVATE + value); - } - definedIsPrivate.setValue("1"); //$NON-NLS-1$ - isPrivate.setValue(taskComment.getIsPrivate() ? "1" : "0"); //$NON-NLS-1$ //$NON-NLS-2$ } + definedIsPrivate.setValue("1"); //$NON-NLS-1$ + isPrivate.setValue(taskComment.getIsPrivate() ? "1" : "0"); //$NON-NLS-1$ //$NON-NLS-2$ getModel().attributeChanged(taskComment.getTaskAttribute()); updateActionState(); } |