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 195783 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 V1
patch345847V1.txt (text/plain), 11.56 KB, created by
Frank Becker
on 2011-05-16 15:15:20 EDT
(
hide
)
Description:
patch V1
Filename:
MIME Type:
Creator:
Frank Becker
Created:
2011-05-16 15:15:20 EDT
Size:
11.56 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 16 May 2011 19:13:16 -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$ >@@ -91,7 +93,6 @@ > > ESTIMATED_TIME(Messages.BugzillaAttribute_Estimated_Time, > "estimated_time", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$ >- > EXPORTER_NAME(Messages.BugzillaAttribute_Exporter, "exporter", TaskAttribute.TYPE_PERSON, true, true), //$NON-NLS-1$ > > FILENAME(Messages.BugzillaAttribute_filename, "filename", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$ >@@ -104,6 +105,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 +154,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/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 16 May 2011 19:13:16 -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 16 May 2011 19:13:16 -0000 >@@ -73,6 +73,8 @@ > > private String exporter; > >+// private String urlbase; >+ > private TaskAttribute attachmentAttribute; > > private boolean bugParseErrorOccurred; >@@ -124,9 +126,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 +143,8 @@ > token = null; > break; > case LONG_DESC: >- taskComment = new TaskComment(commentNum++); >+ String is_private = attributes.getValue("isprivate"); >+ taskComment = new TaskComment(commentNum++, is_private); > break; > case WHO: > if (taskComment != null) { >@@ -313,6 +316,9 @@ > if (exporter != null) { > createAttrribute(exporter, BugzillaAttribute.EXPORTER_NAME); > } >+// if (urlbase != null) { >+// createAttrribute(urlbase, BugzillaAttribute.URLBASE); >+// } > > break; > } >@@ -522,6 +528,12 @@ > BugzillaUtil.createAttributeWithKindDefaultIfUsed(parsedText, tag, repositoryTaskData, > IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO, false); > break; >+ case COMMENTID: >+ >+ if (taskComment != null) { >+ taskComment.id = parsedText; >+ } >+ break; > default: > createAttrribute(parsedText, tag); > break; >@@ -723,6 +735,8 @@ > @SuppressWarnings("unused") > public int number; > >+ public String id; >+ > public String author; > > public String authorName; >@@ -733,14 +747,11 @@ > > public String timeWorked; > >- @SuppressWarnings("unused") >- public boolean hasAttachment; >- >- @SuppressWarnings("unused") >- public String attachmentId; >+ public String isPrivate; > >- public TaskComment(int num) { >+ public TaskComment(int num, String isprivate) { > this.number = num; >+ 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 16 May 2011 19:13:16 -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.ui >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 16 May 2011 19:13:17 -0000 >@@ -44,6 +44,8 @@ > 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 +53,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; >@@ -287,7 +290,7 @@ > > } > >- private class CommentViewer { >+ protected class CommentViewer { > > private Composite buttonComposite; > >@@ -342,7 +345,7 @@ > return commentComposite; > } > >- private Composite createTitle(final ExpandableComposite commentComposite, final FormToolkit toolkit) { >+ protected Composite createTitle(final ExpandableComposite commentComposite, final FormToolkit toolkit) { > // always visible > Composite titleComposite = toolkit.createComposite(commentComposite); > commentComposite.setTextClient(titleComposite); >@@ -356,7 +359,7 @@ > titleComposite.setBackground(null); > > ImageHyperlink expandCommentHyperlink = createTitleHyperLink(toolkit, titleComposite, taskComment); >- expandCommentHyperlink.setFont(commentComposite.getFont()); >+// expandCommentHyperlink.setFont(commentComposite.getFont()); > expandCommentHyperlink.addHyperlinkListener(new HyperlinkAdapter() { > @Override > public void linkActivated(HyperlinkEvent e) { >@@ -382,7 +385,7 @@ > return buttonComposite; > } > >- private ImageHyperlink createTitleHyperLink(final FormToolkit toolkit, final Composite toolbarComp, >+ protected ImageHyperlink createTitleHyperLink(final FormToolkit toolkit, final Composite toolbarComp, > final ITaskComment taskComment) { > ImageHyperlink formHyperlink = toolkit.createImageHyperlink(toolbarComp, SWT.NONE); > formHyperlink.setBackground(null); >@@ -411,6 +414,27 @@ > 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 >+// TaskAttribute commentID = taskComment.getTaskAttribute().getAttribute("commentid"); >+// if (commentID != null) { >+// String value = commentID.getValue(); >+// sb.append(" (ID " + value + ")"); >+// } >+ TaskAttribute isprivate = taskComment.getTaskAttribute().getAttribute("isprivate"); >+ if (isprivate != null) { >+ String value = isprivate.getValue(); >+ if (value.equals("1")) { >+// formHyperlink.setBackground(new Color(formHyperlink.getDisplay(), 255, 128, 128)); >+ Font a = formHyperlink.getFont(); >+ FontData[] fd = a.getFontData(); >+ fd[0].setStyle(SWT.ITALIC | SWT.BOLD); >+ Font font = new Font(Display.getCurrent(), fd[0]); >+ formHyperlink.setFont(font); >+ int i = 9; >+ } >+ } >+ > formHyperlink.setText(sb.toString()); > formHyperlink.setEnabled(true); > formHyperlink.setUnderlined(false);
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