Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 196286 Details for
Bug 345847
[api] create UI for private comments
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch V2
patch345847V2.txt (text/plain), 21.75 KB, created by
Frank Becker
on 2011-05-22 02:42:02 EDT
(
hide
)
Description:
patch V2
Filename:
MIME Type:
Creator:
Frank Becker
Created:
2011-05-22 02:42:02 EDT
Size:
21.75 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.bugzilla.core >Index: src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java,v >retrieving revision 1.28 >diff -u -r1.28 BugzillaAttribute.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java 14 May 2011 19:42:18 -0000 1.28 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java 22 May 2011 06:38:53 -0000 >@@ -64,6 +64,8 @@ > CLASSIFICATION_ID(Messages.BugzillaAttribute_Classification_ID, > "classification_id", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$ > >+ COMMENTID(Messages.BugzillaAttribute_Comment_ID, "commentid", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$ >+ > COMPONENT(Messages.BugzillaAttribute_Component, "component", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$ > > CONFIRM_PRODUCT_CHANGE("confirm_product_change", "confirm_product_change", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$ //$NON-NLS-2$ >@@ -104,6 +106,8 @@ > > IS_PATCH(Messages.BugzillaAttribute_Patch, "ispatch", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$ > >+ IS_PRIVATE(Messages.BugzillaAttribute_Private, "isprivate", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$ >+ > KEYWORDS(Messages.BugzillaAttribute_Keywords, "keywords", IBugzillaConstants.EDITOR_TYPE_KEYWORDS, false, false), //$NON-NLS-1$ > > LONG_DESC(Messages.BugzillaAttribute_Description, "long_desc", TaskAttribute.TYPE_LONG_RICH_TEXT, true, true), //$NON-NLS-1$ >@@ -151,8 +155,6 @@ > > UNKNOWN(Messages.BugzillaAttribute_UNKNOWN, "UNKNOWN", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$ > >- URLBASE(Messages.BugzillaAttribute_URLBASE, "urlbase", TaskAttribute.TYPE_SHORT_TEXT, true, true), //$NON-NLS-1$ >- > VERSION(Messages.BugzillaAttribute_Version, "version", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$ > > INSTALL_VERSION(Messages.BugzillaAttribute_version_of_bugzilla_installed, "install_version", null, true, false), //$NON-NLS-1$ >Index: src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java,v >retrieving revision 1.31 >diff -u -r1.31 BugzillaAttributeMapper.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java 27 Feb 2011 19:07:11 -0000 1.31 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java 22 May 2011 06:38:53 -0000 >@@ -175,6 +175,8 @@ > return BugzillaAttribute.CC.getKey(); > } else if (key.equals(TaskAttribute.COMMENT_TEXT)) { > return BugzillaAttribute.THETEXT.getKey(); >+ } else if (key.equals(TaskAttribute.COMMENT_ISPRIVATE)) { >+ return BugzillaAttribute.IS_PRIVATE.getKey(); > } else if (key.equals(TaskAttribute.DATE_CREATION)) { > return BugzillaAttribute.CREATION_TS.getKey(); > } else if (key.equals(TaskAttribute.DESCRIPTION)) { >Index: src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java,v >retrieving revision 1.30 >diff -u -r1.30 Messages.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java 15 May 2011 21:05:42 -0000 1.30 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java 22 May 2011 06:38:53 -0000 >@@ -61,6 +61,8 @@ > > public static String BugzillaAttribute_Classification_ID; > >+ public static String BugzillaAttribute_Comment_ID; >+ > public static String BugzillaAttribute_Component; > > public static String BugzillaAttribute_Content_Type; >@@ -113,6 +115,8 @@ > > public static String BugzillaAttribute_Priority; > >+ public static String BugzillaAttribute_Private; >+ > public static String BugzillaAttribute_Product; > > public static String BugzillaAttribute_QA_Contact; >@@ -153,8 +157,6 @@ > > public static String BugzillaAttribute_UNKNOWN; > >- public static String BugzillaAttribute_URLBASE; >- > public static String BugzillaAttribute_URL; > > public static String BugzillaAttribute_Query_Timestamp; >Index: src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java,v >retrieving revision 1.64 >diff -u -r1.64 SaxMultiBugReportContentHandler.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java 15 May 2011 18:29:26 -0000 1.64 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java 22 May 2011 06:38:53 -0000 >@@ -124,9 +124,9 @@ > case BUGZILLA: > // Note: here we can get the bugzilla version if necessary > // String version = attributes.getValue("version"); >-// String urlbase = attributes.getValue("urlbase"); >+// urlbase = attributes.getValue("urlbase"); //$NON-NLS-1$ > // String maintainer = attributes.getValue("maintainer"); >- exporter = attributes.getValue("exporter"); >+ exporter = attributes.getValue("exporter"); //$NON-NLS-1$ > break; > case BUG: > if (attributes != null && (attributes.getValue("error") != null)) { //$NON-NLS-1$ >@@ -141,7 +141,8 @@ > token = null; > break; > case LONG_DESC: >- taskComment = new TaskComment(commentNum++); >+ String is_private = attributes.getValue("isprivate"); >+ taskComment = new TaskComment(is_private); > break; > case WHO: > if (taskComment != null) { >@@ -317,7 +318,7 @@ > break; > } > >- // Comment attributes >+ // Comment attributes > case WHO: > if (taskComment != null) { > taskComment.author = parsedText; >@@ -522,6 +523,11 @@ > BugzillaUtil.createAttributeWithKindDefaultIfUsed(parsedText, tag, repositoryTaskData, > IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO, false); > break; >+ case COMMENTID: >+ if (taskComment != null) { >+ taskComment.id = Integer.parseInt(parsedText); >+ } >+ break; > default: > createAttrribute(parsedText, tag); > break; >@@ -667,6 +673,7 @@ > .createPerson(comment.author); > author.setName(comment.authorName); > taskComment.setAuthor(author); >+ taskComment.setIsPrivate(comment.isPrivate.equals("1")); //$NON-NLS-1$ > TaskAttribute attrTimestamp = attribute.createAttribute(BugzillaAttribute.BUG_WHEN.getKey()); > attrTimestamp.setValue(comment.createdTimeStamp); > taskComment.setCreationDate(repositoryTaskData.getAttributeMapper().getDateValue(attrTimestamp)); >@@ -683,6 +690,13 @@ > workTime.setValue(comment.timeWorked); > } > >+ if (comment.id != 0) { >+ TaskAttribute commentID = BugzillaTaskDataHandler.createAttribute(attribute, BugzillaAttribute.COMMENTID); >+ commentID.setValue(Integer.toString(comment.id)); >+ int i = 9; >+ i++; >+ } >+ > parseAttachment(taskComment); > > } >@@ -723,6 +737,8 @@ > @SuppressWarnings("unused") > public int number; > >+ public int id; >+ > public String author; > > public String authorName; >@@ -733,14 +749,10 @@ > > public String timeWorked; > >- @SuppressWarnings("unused") >- public boolean hasAttachment; >- >- @SuppressWarnings("unused") >- public String attachmentId; >+ public String isPrivate; > >- public TaskComment(int num) { >- this.number = num; >+ public TaskComment(String isprivate) { >+ this.isPrivate = isprivate; > } > } > >Index: src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties,v >retrieving revision 1.36 >diff -u -r1.36 messages.properties >--- src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties 15 May 2011 21:05:42 -0000 1.36 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties 22 May 2011 06:38:53 -0000 >@@ -26,6 +26,7 @@ > BugzillaAttribute_CC_List=CC List > BugzillaAttribute_Classification=Classification: > BugzillaAttribute_Classification_ID=Classification ID: >+BugzillaAttribute_Comment_ID=Comment ID: > BugzillaAttribute_Component=Component: > BugzillaAttribute_Content_Type=Content Type > BugzillaAttribute_data=data >@@ -52,6 +53,7 @@ > BugzillaAttribute_Patch=Patch > BugzillaAttribute_Platform=Platform: > BugzillaAttribute_Priority=Priority: >+BugzillaAttribute_Private=Private: > BugzillaAttribute_Product=Product: > BugzillaAttribute_QA_Contact=QA Contact: > BugzillaAttribute_QA_Contact_NAME=QA Contact >@@ -72,7 +74,6 @@ > BugzillaAttribute_thetext=thetext > BugzillaAttribute_type=type > BugzillaAttribute_UNKNOWN=UNKNOWN >-BugzillaAttribute_URLBASE=Url Base: > BugzillaAttribute_URL=URL: > BugzillaAttribute_Query_Timestamp=Query Timestamp: > BugzillaAttribute_used_by_search_engine_bugs=used by search engine >#P org.eclipse.mylyn.tasks.core >Index: src/org/eclipse/mylyn/internal/tasks/core/TaskComment.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskComment.java,v >retrieving revision 1.6 >diff -u -r1.6 TaskComment.java >--- src/org/eclipse/mylyn/internal/tasks/core/TaskComment.java 13 Jan 2009 07:05:10 -0000 1.6 >+++ src/org/eclipse/mylyn/internal/tasks/core/TaskComment.java 22 May 2011 06:38:54 -0000 >@@ -43,6 +43,8 @@ > > private String url; > >+ private Boolean isPrivate; >+ > public TaskComment(TaskRepository taskRepository, ITask task, TaskAttribute taskAttribute) { > Assert.isNotNull(taskRepository); > Assert.isNotNull(task); >@@ -112,4 +114,12 @@ > this.url = url; > } > >+ public Boolean getIsPrivate() { >+ return isPrivate; >+ } >+ >+ public void setIsPrivate(Boolean isPrivate) { >+ this.isPrivate = isPrivate; >+ } >+ > } >Index: src/org/eclipse/mylyn/internal/tasks/core/data/Messages.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/Messages.java,v >retrieving revision 1.3 >diff -u -r1.3 Messages.java >--- src/org/eclipse/mylyn/internal/tasks/core/data/Messages.java 8 Jun 2010 23:10:13 -0000 1.3 >+++ src/org/eclipse/mylyn/internal/tasks/core/data/Messages.java 22 May 2011 06:38:54 -0000 >@@ -58,6 +58,8 @@ > > public static String DefaultTaskSchema_Priority_Label; > >+ public static String DefaultTaskSchema_Private_Label; >+ > public static String DefaultTaskSchema_Product_Label; > > public static String DefaultTaskSchema_Rank_Label; >Index: src/org/eclipse/mylyn/internal/tasks/core/data/messages.properties >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/messages.properties,v >retrieving revision 1.3 >diff -u -r1.3 messages.properties >--- src/org/eclipse/mylyn/internal/tasks/core/data/messages.properties 8 Jun 2010 23:10:13 -0000 1.3 >+++ src/org/eclipse/mylyn/internal/tasks/core/data/messages.properties 22 May 2011 06:38:54 -0000 >@@ -29,6 +29,7 @@ > DefaultTaskSchema_Owner_Label=Owner > DefaultTaskSchema_Patch_Label=Patch > DefaultTaskSchema_Priority_Label=Priority >+DefaultTaskSchema_Private_Label=Private > DefaultTaskSchema_Product_Label=Product > DefaultTaskSchema_Rank_Label=Rank > DefaultTaskSchema_Replace_existing_attachment=Replace existing attachment of the same name >Index: src/org/eclipse/mylyn/tasks/core/ITaskComment.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskComment.java,v >retrieving revision 1.9 >diff -u -r1.9 ITaskComment.java >--- src/org/eclipse/mylyn/tasks/core/ITaskComment.java 24 Jul 2009 12:07:58 -0000 1.9 >+++ src/org/eclipse/mylyn/tasks/core/ITaskComment.java 22 May 2011 06:38:54 -0000 >@@ -100,4 +100,14 @@ > */ > public abstract void setUrl(String url); > >+ /** >+ * @since 3.6 >+ */ >+ public abstract Boolean getIsPrivate(); >+ >+ /** >+ * @since 3.6 >+ */ >+ public abstract void setIsPrivate(Boolean isPrivate); >+ > } >\ No newline at end of file >Index: src/org/eclipse/mylyn/tasks/core/data/DefaultTaskSchema.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/DefaultTaskSchema.java,v >retrieving revision 1.1 >diff -u -r1.1 DefaultTaskSchema.java >--- src/org/eclipse/mylyn/tasks/core/data/DefaultTaskSchema.java 5 Mar 2011 07:14:09 -0000 1.1 >+++ src/org/eclipse/mylyn/tasks/core/data/DefaultTaskSchema.java 22 May 2011 06:38:54 -0000 >@@ -79,6 +79,12 @@ > public final Field COMMENT_HAS_ATTACHMENT = createField(TaskAttribute.COMMENT_HAS_ATTACHMENT, > Messages.DefaultTaskSchema_Attachment_Label, TaskAttribute.TYPE_BOOLEAN, Flag.READ_ONLY); > >+ /** >+ * @since 3.6 >+ */ >+ public final Field COMMENT_ISPRIVATE = createField(TaskAttribute.COMMENT_ISPRIVATE, >+ Messages.DefaultTaskSchema_Private_Label, TaskAttribute.TYPE_BOOLEAN); >+ > public final Field COMMENT_NUMBER = createField(TaskAttribute.COMMENT_NUMBER, > Messages.DefaultTaskSchema_Number_Label, TaskAttribute.TYPE_INTEGER, Flag.READ_ONLY); > >Index: src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java,v >retrieving revision 1.47 >diff -u -r1.47 TaskAttribute.java >--- src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java 2 Feb 2011 06:44:41 -0000 1.47 >+++ src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java 22 May 2011 06:38:54 -0000 >@@ -126,6 +126,11 @@ > public static final String META_READ_ONLY = "task.meta.readOnly"; //$NON-NLS-1$ > > /** >+ * @since 3.6 >+ */ >+ public static final String COMMENT_ISPRIVATE = "task.common.comment.isprivate"; //$NON-NLS-1$ >+ >+ /** > * Key for the meta datum that determines if an attribute is disabled. This is used to indicate that an attribute > * should not be modified, e.g. due to work-flow state but it may still be generally writeable. > * >Index: src/org/eclipse/mylyn/tasks/core/data/TaskCommentMapper.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskCommentMapper.java,v >retrieving revision 1.18 >diff -u -r1.18 TaskCommentMapper.java >--- src/org/eclipse/mylyn/tasks/core/data/TaskCommentMapper.java 5 Mar 2011 07:14:09 -0000 1.18 >+++ src/org/eclipse/mylyn/tasks/core/data/TaskCommentMapper.java 22 May 2011 06:38:54 -0000 >@@ -36,6 +36,8 @@ > > private String url; > >+ private Boolean isPrivate; >+ > public TaskCommentMapper() { > } > >@@ -63,6 +65,13 @@ > return url; > } > >+ /** >+ * @since 3.6 >+ */ >+ public Boolean getIsPrivate() { >+ return isPrivate; >+ } >+ > public void setAuthor(IRepositoryPerson author) { > this.author = author; > } >@@ -87,6 +96,13 @@ > this.url = url; > } > >+ /** >+ * @since 3.6 >+ */ >+ public void setIsPrivate(Boolean isPrivate) { >+ this.isPrivate = isPrivate; >+ } >+ > @SuppressWarnings("deprecation") > public static TaskCommentMapper createFrom(TaskAttribute taskAttribute) { > Assert.isNotNull(taskAttribute); >@@ -121,6 +137,10 @@ > if (child != null) { > comment.setText(mapper.getValue(child)); > } >+ child = taskAttribute.getMappedAttribute(TaskAttribute.COMMENT_ISPRIVATE); >+ if (child != null) { >+ comment.setIsPrivate(mapper.getBooleanValue(child)); >+ } > return comment; > } > >@@ -155,6 +175,11 @@ > mapper.setValue(child, getText()); > taskAttribute.putMetaDatum(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, child.getId()); > } >+ if (getIsPrivate() != null) { >+ TaskAttribute child = DefaultTaskSchema.getField(TaskAttribute.COMMENT_ISPRIVATE).createAttribute( >+ taskAttribute); >+ mapper.setBooleanValue(child, getIsPrivate()); >+ } > } > > public void applyTo(ITaskComment taskComment) { >@@ -174,5 +199,8 @@ > if (getText() != null) { > taskComment.setText(getText()); > } >+ if (getIsPrivate() != null) { >+ taskComment.setIsPrivate(getIsPrivate()); >+ } > } > } >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java,v >retrieving revision 1.39 >diff -u -r1.39 Messages.java >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java 2 Feb 2011 03:57:56 -0000 1.39 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java 22 May 2011 06:38:55 -0000 >@@ -139,6 +139,8 @@ > > public static String TaskEditorCommentPart_Expand_Comments; > >+ public static String TaskEditorCommentPart_Privat_Comment_ToolTip_Text; >+ > public static String TaskEditorDescriptionPart_Description; > > public static String TaskEditorDescriptionPart_Detector; >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java,v >retrieving revision 1.70 >diff -u -r1.70 TaskEditorCommentPart.java >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java 8 Jun 2010 23:10:08 -0000 1.70 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java 22 May 2011 06:38:55 -0000 >@@ -39,11 +39,14 @@ > import org.eclipse.mylyn.tasks.ui.TasksUiImages; > import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor; > import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart; >+import org.eclipse.osgi.util.NLS; > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.MouseAdapter; > import org.eclipse.swt.events.MouseEvent; > import org.eclipse.swt.events.PaintEvent; > import org.eclipse.swt.events.PaintListener; >+import org.eclipse.swt.graphics.Font; >+import org.eclipse.swt.graphics.FontData; > import org.eclipse.swt.graphics.Point; > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; >@@ -51,6 +54,7 @@ > import org.eclipse.swt.widgets.Canvas; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Control; >+import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Menu; > import org.eclipse.ui.actions.ActionContext; > import org.eclipse.ui.forms.IFormColors; >@@ -356,7 +360,6 @@ > titleComposite.setBackground(null); > > ImageHyperlink expandCommentHyperlink = createTitleHyperLink(toolkit, titleComposite, taskComment); >- expandCommentHyperlink.setFont(commentComposite.getFont()); > expandCommentHyperlink.addHyperlinkListener(new HyperlinkAdapter() { > @Override > public void linkActivated(HyperlinkEvent e) { >@@ -399,10 +402,11 @@ > sb.append(taskComment.getNumber()); > sb.append(": "); //$NON-NLS-1$ > } >+ String toolTipText = ""; //$NON-NLS-1$; > if (author != null) { > if (author.getName() != null) { > sb.append(author.getName()); >- formHyperlink.setToolTipText(author.getPersonId()); >+ toolTipText = author.getPersonId(); > } else { > sb.append(author.getPersonId()); > } >@@ -411,6 +415,28 @@ > sb.append(", "); //$NON-NLS-1$ > sb.append(EditorUtil.formatDateTime(taskComment.getCreationDate())); > } >+// We need the CommentID for change the value of private >+// this is only for an test included >+// Maybe we need this for bug# 284026 >+// TaskAttribute commentID = taskComment.getTaskAttribute().getAttribute("commentid"); >+// if (commentID != null) { >+// String value = commentID.getValue(); >+// sb.append(" (ID " + value + ")"); >+// } >+ if (taskComment.getIsPrivate() != null) { >+ if (taskComment.getIsPrivate()) { >+ if (privateFont == null) { >+ Font a = formHyperlink.getFont(); >+ FontData[] fd = a.getFontData(); >+ fd[0].setStyle(SWT.ITALIC | SWT.BOLD); >+ privateFont = new Font(Display.getCurrent(), fd[0]); >+ } >+ formHyperlink.setFont(privateFont); >+ toolTipText = NLS.bind(Messages.TaskEditorCommentPart_Privat_Comment_ToolTip_Text, toolTipText); >+ } >+ } >+ formHyperlink.setToolTipText(toolTipText); >+ > formHyperlink.setText(sb.toString()); > formHyperlink.setEnabled(true); > formHyperlink.setUnderlined(false); >@@ -542,6 +568,8 @@ > > private CommentActionGroup actionGroup; > >+ private Font privateFont; >+ > public TaskEditorCommentPart() { > this.commentGroupStrategy = new CommentGroupStrategy() { > @Override >@@ -664,6 +692,9 @@ > if (actionGroup != null) { > actionGroup.dispose(); > } >+ if (privateFont != null) { >+ privateFont.dispose(); >+ } > } > > private void expandAllComments() { >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties,v >retrieving revision 1.47 >diff -u -r1.47 messages.properties >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties 2 Feb 2011 03:57:56 -0000 1.47 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties 22 May 2011 06:38:55 -0000 >@@ -75,6 +75,7 @@ > TaskEditorCommentPart_Collapse_Comments=Collapse Comments > TaskEditorCommentPart_Comments=Comments > TaskEditorCommentPart_Expand_Comments=Expand Comments >+TaskEditorCommentPart_Privat_Comment_ToolTip_Text=Private Comment from {0} > > TaskEditorDescriptionPart_Description=Description > TaskEditorDescriptionPart_Detector=Detector:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 345847
:
195783
|
195784
| 196286 |
196287
|
196930
|
196955