Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 345847 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java (-3 / +4 lines)
Lines 64-69 Link Here
64
	CLASSIFICATION_ID(Messages.BugzillaAttribute_Classification_ID,
64
	CLASSIFICATION_ID(Messages.BugzillaAttribute_Classification_ID,
65
			"classification_id", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
65
			"classification_id", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
66
66
67
	COMMENTID(Messages.BugzillaAttribute_Comment_ID, "commentid", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
68
67
	COMPONENT(Messages.BugzillaAttribute_Component, "component", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
69
	COMPONENT(Messages.BugzillaAttribute_Component, "component", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
68
70
69
	CONFIRM_PRODUCT_CHANGE("confirm_product_change", "confirm_product_change", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$ //$NON-NLS-2$
71
	CONFIRM_PRODUCT_CHANGE("confirm_product_change", "confirm_product_change", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$ //$NON-NLS-2$
Lines 91-97 Link Here
91
93
92
	ESTIMATED_TIME(Messages.BugzillaAttribute_Estimated_Time,
94
	ESTIMATED_TIME(Messages.BugzillaAttribute_Estimated_Time,
93
			"estimated_time", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
95
			"estimated_time", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
94
95
	EXPORTER_NAME(Messages.BugzillaAttribute_Exporter, "exporter", TaskAttribute.TYPE_PERSON, true, true), //$NON-NLS-1$
96
	EXPORTER_NAME(Messages.BugzillaAttribute_Exporter, "exporter", TaskAttribute.TYPE_PERSON, true, true), //$NON-NLS-1$
96
97
97
	FILENAME(Messages.BugzillaAttribute_filename, "filename", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
98
	FILENAME(Messages.BugzillaAttribute_filename, "filename", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
Lines 104-109 Link Here
104
105
105
	IS_PATCH(Messages.BugzillaAttribute_Patch, "ispatch", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
106
	IS_PATCH(Messages.BugzillaAttribute_Patch, "ispatch", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
106
107
108
	IS_PRIVATE(Messages.BugzillaAttribute_Private, "isprivate", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
109
107
	KEYWORDS(Messages.BugzillaAttribute_Keywords, "keywords", IBugzillaConstants.EDITOR_TYPE_KEYWORDS, false, false), //$NON-NLS-1$
110
	KEYWORDS(Messages.BugzillaAttribute_Keywords, "keywords", IBugzillaConstants.EDITOR_TYPE_KEYWORDS, false, false), //$NON-NLS-1$
108
111
109
	LONG_DESC(Messages.BugzillaAttribute_Description, "long_desc", TaskAttribute.TYPE_LONG_RICH_TEXT, true, true), //$NON-NLS-1$
112
	LONG_DESC(Messages.BugzillaAttribute_Description, "long_desc", TaskAttribute.TYPE_LONG_RICH_TEXT, true, true), //$NON-NLS-1$
Lines 151-158 Link Here
151
154
152
	UNKNOWN(Messages.BugzillaAttribute_UNKNOWN, "UNKNOWN", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
155
	UNKNOWN(Messages.BugzillaAttribute_UNKNOWN, "UNKNOWN", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
153
156
154
	URLBASE(Messages.BugzillaAttribute_URLBASE, "urlbase", TaskAttribute.TYPE_SHORT_TEXT, true, true), //$NON-NLS-1$
155
156
	VERSION(Messages.BugzillaAttribute_Version, "version", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
157
	VERSION(Messages.BugzillaAttribute_Version, "version", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
157
158
158
	INSTALL_VERSION(Messages.BugzillaAttribute_version_of_bugzilla_installed, "install_version", null, true, false), //$NON-NLS-1$
159
	INSTALL_VERSION(Messages.BugzillaAttribute_version_of_bugzilla_installed, "install_version", null, true, false), //$NON-NLS-1$
(-)src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java (-2 / +4 lines)
Lines 61-66 Link Here
61
61
62
	public static String BugzillaAttribute_Classification_ID;
62
	public static String BugzillaAttribute_Classification_ID;
63
63
64
	public static String BugzillaAttribute_Comment_ID;
65
64
	public static String BugzillaAttribute_Component;
66
	public static String BugzillaAttribute_Component;
65
67
66
	public static String BugzillaAttribute_Content_Type;
68
	public static String BugzillaAttribute_Content_Type;
Lines 113-118 Link Here
113
115
114
	public static String BugzillaAttribute_Priority;
116
	public static String BugzillaAttribute_Priority;
115
117
118
	public static String BugzillaAttribute_Private;
119
116
	public static String BugzillaAttribute_Product;
120
	public static String BugzillaAttribute_Product;
117
121
118
	public static String BugzillaAttribute_QA_Contact;
122
	public static String BugzillaAttribute_QA_Contact;
Lines 153-160 Link Here
153
157
154
	public static String BugzillaAttribute_UNKNOWN;
158
	public static String BugzillaAttribute_UNKNOWN;
155
159
156
	public static String BugzillaAttribute_URLBASE;
157
158
	public static String BugzillaAttribute_URL;
160
	public static String BugzillaAttribute_URL;
159
161
160
	public static String BugzillaAttribute_Query_Timestamp;
162
	public static String BugzillaAttribute_Query_Timestamp;
(-)src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java (-9 / +20 lines)
Lines 73-78 Link Here
73
73
74
	private String exporter;
74
	private String exporter;
75
75
76
//	private String urlbase;
77
76
	private TaskAttribute attachmentAttribute;
78
	private TaskAttribute attachmentAttribute;
77
79
78
	private boolean bugParseErrorOccurred;
80
	private boolean bugParseErrorOccurred;
Lines 124-132 Link Here
124
		case BUGZILLA:
126
		case BUGZILLA:
125
			// Note: here we can get the bugzilla version if necessary
127
			// Note: here we can get the bugzilla version if necessary
126
//			String version = attributes.getValue("version");
128
//			String version = attributes.getValue("version");
127
//			String urlbase = attributes.getValue("urlbase");
129
//			urlbase = attributes.getValue("urlbase"); //$NON-NLS-1$
128
//			String maintainer = attributes.getValue("maintainer");
130
//			String maintainer = attributes.getValue("maintainer");
129
			exporter = attributes.getValue("exporter");
131
			exporter = attributes.getValue("exporter"); //$NON-NLS-1$
130
			break;
132
			break;
131
		case BUG:
133
		case BUG:
132
			if (attributes != null && (attributes.getValue("error") != null)) { //$NON-NLS-1$
134
			if (attributes != null && (attributes.getValue("error") != null)) { //$NON-NLS-1$
Lines 141-147 Link Here
141
			token = null;
143
			token = null;
142
			break;
144
			break;
143
		case LONG_DESC:
145
		case LONG_DESC:
144
			taskComment = new TaskComment(commentNum++);
146
			String is_private = attributes.getValue("isprivate");
147
			taskComment = new TaskComment(commentNum++, is_private);
145
			break;
148
			break;
146
		case WHO:
149
		case WHO:
147
			if (taskComment != null) {
150
			if (taskComment != null) {
Lines 313-318 Link Here
313
			if (exporter != null) {
316
			if (exporter != null) {
314
				createAttrribute(exporter, BugzillaAttribute.EXPORTER_NAME);
317
				createAttrribute(exporter, BugzillaAttribute.EXPORTER_NAME);
315
			}
318
			}
319
//			if (urlbase != null) {
320
//				createAttrribute(urlbase, BugzillaAttribute.URLBASE);
321
//			}
316
322
317
			break;
323
			break;
318
		}
324
		}
Lines 522-527 Link Here
522
			BugzillaUtil.createAttributeWithKindDefaultIfUsed(parsedText, tag, repositoryTaskData,
528
			BugzillaUtil.createAttributeWithKindDefaultIfUsed(parsedText, tag, repositoryTaskData,
523
					IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO, false);
529
					IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO, false);
524
			break;
530
			break;
531
		case COMMENTID:
532
533
			if (taskComment != null) {
534
				taskComment.id = parsedText;
535
			}
536
			break;
525
		default:
537
		default:
526
			createAttrribute(parsedText, tag);
538
			createAttrribute(parsedText, tag);
527
			break;
539
			break;
Lines 723-728 Link Here
723
		@SuppressWarnings("unused")
735
		@SuppressWarnings("unused")
724
		public int number;
736
		public int number;
725
737
738
		public String id;
739
726
		public String author;
740
		public String author;
727
741
728
		public String authorName;
742
		public String authorName;
Lines 733-746 Link Here
733
747
734
		public String timeWorked;
748
		public String timeWorked;
735
749
736
		@SuppressWarnings("unused")
750
		public String isPrivate;
737
		public boolean hasAttachment;
738
739
		@SuppressWarnings("unused")
740
		public String attachmentId;
741
751
742
		public TaskComment(int num) {
752
		public TaskComment(int num, String isprivate) {
743
			this.number = num;
753
			this.number = num;
754
			this.isPrivate = isprivate;
744
		}
755
		}
745
	}
756
	}
746
757
(-)src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties (-1 / +2 lines)
Lines 26-31 Link Here
26
BugzillaAttribute_CC_List=CC List
26
BugzillaAttribute_CC_List=CC List
27
BugzillaAttribute_Classification=Classification:
27
BugzillaAttribute_Classification=Classification:
28
BugzillaAttribute_Classification_ID=Classification ID:
28
BugzillaAttribute_Classification_ID=Classification ID:
29
BugzillaAttribute_Comment_ID=Comment ID:
29
BugzillaAttribute_Component=Component:
30
BugzillaAttribute_Component=Component:
30
BugzillaAttribute_Content_Type=Content Type
31
BugzillaAttribute_Content_Type=Content Type
31
BugzillaAttribute_data=data
32
BugzillaAttribute_data=data
Lines 52-57 Link Here
52
BugzillaAttribute_Patch=Patch
53
BugzillaAttribute_Patch=Patch
53
BugzillaAttribute_Platform=Platform:
54
BugzillaAttribute_Platform=Platform:
54
BugzillaAttribute_Priority=Priority:
55
BugzillaAttribute_Priority=Priority:
56
BugzillaAttribute_Private=Private:
55
BugzillaAttribute_Product=Product:
57
BugzillaAttribute_Product=Product:
56
BugzillaAttribute_QA_Contact=QA Contact:
58
BugzillaAttribute_QA_Contact=QA Contact:
57
BugzillaAttribute_QA_Contact_NAME=QA Contact
59
BugzillaAttribute_QA_Contact_NAME=QA Contact
Lines 72-78 Link Here
72
BugzillaAttribute_thetext=thetext
74
BugzillaAttribute_thetext=thetext
73
BugzillaAttribute_type=type
75
BugzillaAttribute_type=type
74
BugzillaAttribute_UNKNOWN=UNKNOWN
76
BugzillaAttribute_UNKNOWN=UNKNOWN
75
BugzillaAttribute_URLBASE=Url Base:
76
BugzillaAttribute_URL=URL:
77
BugzillaAttribute_URL=URL:
77
BugzillaAttribute_Query_Timestamp=Query Timestamp:
78
BugzillaAttribute_Query_Timestamp=Query Timestamp:
78
BugzillaAttribute_used_by_search_engine_bugs=used by search engine
79
BugzillaAttribute_used_by_search_engine_bugs=used by search engine
(-)src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java (-4 / +28 lines)
Lines 44-49 Link Here
44
import org.eclipse.swt.events.MouseEvent;
44
import org.eclipse.swt.events.MouseEvent;
45
import org.eclipse.swt.events.PaintEvent;
45
import org.eclipse.swt.events.PaintEvent;
46
import org.eclipse.swt.events.PaintListener;
46
import org.eclipse.swt.events.PaintListener;
47
import org.eclipse.swt.graphics.Font;
48
import org.eclipse.swt.graphics.FontData;
47
import org.eclipse.swt.graphics.Point;
49
import org.eclipse.swt.graphics.Point;
48
import org.eclipse.swt.layout.GridData;
50
import org.eclipse.swt.layout.GridData;
49
import org.eclipse.swt.layout.GridLayout;
51
import org.eclipse.swt.layout.GridLayout;
Lines 51-56 Link Here
51
import org.eclipse.swt.widgets.Canvas;
53
import org.eclipse.swt.widgets.Canvas;
52
import org.eclipse.swt.widgets.Composite;
54
import org.eclipse.swt.widgets.Composite;
53
import org.eclipse.swt.widgets.Control;
55
import org.eclipse.swt.widgets.Control;
56
import org.eclipse.swt.widgets.Display;
54
import org.eclipse.swt.widgets.Menu;
57
import org.eclipse.swt.widgets.Menu;
55
import org.eclipse.ui.actions.ActionContext;
58
import org.eclipse.ui.actions.ActionContext;
56
import org.eclipse.ui.forms.IFormColors;
59
import org.eclipse.ui.forms.IFormColors;
Lines 287-293 Link Here
287
290
288
	}
291
	}
289
292
290
	private class CommentViewer {
293
	protected class CommentViewer {
291
294
292
		private Composite buttonComposite;
295
		private Composite buttonComposite;
293
296
Lines 342-348 Link Here
342
			return commentComposite;
345
			return commentComposite;
343
		}
346
		}
344
347
345
		private Composite createTitle(final ExpandableComposite commentComposite, final FormToolkit toolkit) {
348
		protected Composite createTitle(final ExpandableComposite commentComposite, final FormToolkit toolkit) {
346
			// always visible
349
			// always visible
347
			Composite titleComposite = toolkit.createComposite(commentComposite);
350
			Composite titleComposite = toolkit.createComposite(commentComposite);
348
			commentComposite.setTextClient(titleComposite);
351
			commentComposite.setTextClient(titleComposite);
Lines 356-362 Link Here
356
			titleComposite.setBackground(null);
359
			titleComposite.setBackground(null);
357
360
358
			ImageHyperlink expandCommentHyperlink = createTitleHyperLink(toolkit, titleComposite, taskComment);
361
			ImageHyperlink expandCommentHyperlink = createTitleHyperLink(toolkit, titleComposite, taskComment);
359
			expandCommentHyperlink.setFont(commentComposite.getFont());
362
//			expandCommentHyperlink.setFont(commentComposite.getFont());
360
			expandCommentHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
363
			expandCommentHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
361
				@Override
364
				@Override
362
				public void linkActivated(HyperlinkEvent e) {
365
				public void linkActivated(HyperlinkEvent e) {
Lines 382-388 Link Here
382
			return buttonComposite;
385
			return buttonComposite;
383
		}
386
		}
384
387
385
		private ImageHyperlink createTitleHyperLink(final FormToolkit toolkit, final Composite toolbarComp,
388
		protected ImageHyperlink createTitleHyperLink(final FormToolkit toolkit, final Composite toolbarComp,
386
				final ITaskComment taskComment) {
389
				final ITaskComment taskComment) {
387
			ImageHyperlink formHyperlink = toolkit.createImageHyperlink(toolbarComp, SWT.NONE);
390
			ImageHyperlink formHyperlink = toolkit.createImageHyperlink(toolbarComp, SWT.NONE);
388
			formHyperlink.setBackground(null);
391
			formHyperlink.setBackground(null);
Lines 411-416 Link Here
411
				sb.append(", "); //$NON-NLS-1$
414
				sb.append(", "); //$NON-NLS-1$
412
				sb.append(EditorUtil.formatDateTime(taskComment.getCreationDate()));
415
				sb.append(EditorUtil.formatDateTime(taskComment.getCreationDate()));
413
			}
416
			}
417
//			We need the CommentID for change the value of private
418
//			this is only for an test included
419
//			TaskAttribute commentID = taskComment.getTaskAttribute().getAttribute("commentid");
420
//			if (commentID != null) {
421
//				String value = commentID.getValue();
422
//				sb.append(" (ID " + value + ")");
423
//			}
424
			TaskAttribute isprivate = taskComment.getTaskAttribute().getAttribute("isprivate");
425
			if (isprivate != null) {
426
				String value = isprivate.getValue();
427
				if (value.equals("1")) {
428
//					formHyperlink.setBackground(new Color(formHyperlink.getDisplay(), 255, 128, 128));
429
					Font a = formHyperlink.getFont();
430
					FontData[] fd = a.getFontData();
431
					fd[0].setStyle(SWT.ITALIC | SWT.BOLD);
432
					Font font = new Font(Display.getCurrent(), fd[0]);
433
					formHyperlink.setFont(font);
434
					int i = 9;
435
				}
436
			}
437
414
			formHyperlink.setText(sb.toString());
438
			formHyperlink.setText(sb.toString());
415
			formHyperlink.setEnabled(true);
439
			formHyperlink.setEnabled(true);
416
			formHyperlink.setUnderlined(false);
440
			formHyperlink.setUnderlined(false);

Return to bug 345847