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 187342 Details for
Bug 199283
[api] make attachments actionable from associated comment in task editor
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]
reverted changes
clipboard.txt (text/plain), 8.08 KB, created by
Steffen Pingel
on 2011-01-21 18:03:20 EST
(
hide
)
Description:
reverted changes
Filename:
MIME Type:
Creator:
Steffen Pingel
Created:
2011-01-21 18:03:20 EST
Size:
8.08 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.bugzilla.ui >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java,v >retrieving revision 1.59 >diff -u -r1.59 BugzillaConnectorUi.java >--- src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java 21 Jan 2011 20:45:25 -0000 1.59 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java 21 Jan 2011 23:02:00 -0000 >@@ -19,7 +19,6 @@ > import java.util.regex.Matcher; > import java.util.regex.Pattern; > >-import org.eclipse.core.runtime.Platform; > import org.eclipse.jface.resource.ImageDescriptor; > import org.eclipse.jface.text.Region; > import org.eclipse.jface.text.hyperlink.IHyperlink; >@@ -34,6 +33,7 @@ > import org.eclipse.mylyn.internal.bugzilla.ui.TaskAttachmentTableEditorHyperlink; > import org.eclipse.mylyn.internal.bugzilla.ui.search.BugzillaSearchPage; > import org.eclipse.mylyn.internal.bugzilla.ui.wizard.NewBugzillaTaskWizard; >+import org.eclipse.mylyn.internal.provisional.commons.ui.PlatformUiUtil; > import org.eclipse.mylyn.tasks.core.IRepositoryQuery; > import org.eclipse.mylyn.tasks.core.ITask; > import org.eclipse.mylyn.tasks.core.ITaskComment; >@@ -47,8 +47,6 @@ > import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositoryQueryPage; > import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage; > import org.eclipse.mylyn.tasks.ui.wizards.RepositoryQueryWizard; >-import org.osgi.framework.Bundle; >-import org.osgi.framework.Version; > > /** > * @author Mik Kersten >@@ -69,20 +67,10 @@ > > private static final Pattern PATTERN_ATTACHMENT = Pattern.compile(REGEXP_ATTACHMENT, Pattern.CASE_INSENSITIVE); > >- /* >- * because of bug# 322293 (NPE when select Hyperlink from MultipleHyperlinkPresenter List) >- * for MacOS we enable this only if running on Eclipse >= "3.7.0.v201101192000" >- * >- */ > private final boolean doAttachmentTableEditorHyperlink; > > public BugzillaConnectorUi() { >- super(); >- Bundle bundle = Platform.getBundle("org.eclipse.platform"); //$NON-NLS-1$ >- String versionString = bundle.getHeaders().get("Bundle-Version"); //$NON-NLS-1$ >- >- Version version = new Version(versionString); >- doAttachmentTableEditorHyperlink = version.compareTo(new Version("3.7.0.v201101192000")) >= 0; //$NON-NLS-1$ >+ doAttachmentTableEditorHyperlink = PlatformUiUtil.supportsMultipleHyperlinkPresenter(); > } > > @Override >#P org.eclipse.mylyn.commons.ui >Index: src/org/eclipse/mylyn/internal/provisional/commons/ui/PlatformUiUtil.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.commons/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/internal/provisional/commons/ui/PlatformUiUtil.java,v >retrieving revision 1.1 >diff -u -r1.1 PlatformUiUtil.java >--- src/org/eclipse/mylyn/internal/provisional/commons/ui/PlatformUiUtil.java 22 Aug 2010 07:36:59 -0000 1.1 >+++ src/org/eclipse/mylyn/internal/provisional/commons/ui/PlatformUiUtil.java 21 Jan 2011 23:02:00 -0000 >@@ -16,6 +16,8 @@ > import org.eclipse.core.runtime.Platform; > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.StyledText; >+import org.osgi.framework.Bundle; >+import org.osgi.framework.Version; > > /** > * @author Steffen Pingel >@@ -118,4 +120,18 @@ > return 32; > } > >+ /** >+ * Because of bug# 322293 (NPE when select Hyperlink from MultipleHyperlinkPresenter List) for MacOS we enable this >+ * only if running on Eclipse >= "3.7.0.v201101192000" >+ */ >+ public static boolean supportsMultipleHyperlinkPresenter() { >+ if (isMac()) { >+ Bundle bundle = Platform.getBundle("org.eclipse.platform"); //$NON-NLS-1$ >+ String versionString = (String) bundle.getHeaders().get("Bundle-Version"); //$NON-NLS-1$ >+ Version version = new Version(versionString); >+ return version.compareTo(new Version("3.7.0.v201101192000")) >= 0; //$NON-NLS-1$ >+ } >+ return true; >+ } >+ > } >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java,v >retrieving revision 1.12 >diff -u -r1.12 TaskEditorOutlineNode.java >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java 21 Jan 2011 20:45:26 -0000 1.12 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java 21 Jan 2011 23:02:01 -0000 >@@ -31,7 +31,6 @@ > import org.eclipse.mylyn.tasks.core.data.TaskAttribute; > import org.eclipse.mylyn.tasks.core.data.TaskData; > import org.eclipse.mylyn.tasks.core.data.TaskRelation; >-import org.eclipse.mylyn.tasks.core.data.TaskRelation.Direction; > import org.eclipse.mylyn.tasks.ui.TasksUi; > import org.eclipse.osgi.util.NLS; > >@@ -145,12 +144,6 @@ > label = NLS.bind(Messages.TaskEditorOutlineNode_TaskRelation_Label, > new Object[] { taskRelation.getTaskId(), Messages.TaskEditorOutlineNode_unknown_Label }); > } >- >- if (taskRelation.getDirection().compareTo(Direction.INWARD) == 0) { >- label = label + Messages.TaskEditorOutlineNode_ParentRelation; >- } else { >- label = label + Messages.TaskEditorOutlineNode_ChildRelation; >- } > TaskEditorOutlineNode childNode = new TaskEditorOutlineNode(label); > > childNode.setTaskRelation(taskRelation); >Index: src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java,v >retrieving revision 1.164 >diff -u -r1.164 AbstractTaskEditorPage.java >--- src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java 21 Jan 2011 20:45:26 -0000 1.164 >+++ src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java 21 Jan 2011 23:02:01 -0000 >@@ -1732,46 +1732,7 @@ > > @Override > public boolean selectReveal(Object object) { >- if (object instanceof String) { >- String objString = (String) object; >- if (objString != null && objString.startsWith(TaskAttribute.PREFIX_ATTACHMENT)) { >- AbstractTaskEditorPart actionPart = this.getPart(AbstractTaskEditorPage.ID_PART_ATTACHMENTS); >- if (actionPart != null && actionPart.getControl() instanceof ExpandableComposite) { >- CommonFormUtil.setExpanded((ExpandableComposite) actionPart.getControl(), true); >- if (actionPart.getControl() instanceof Section) { >- Control client = actionPart.getControl(); >- if (client instanceof Composite) { >- for (Control control : ((Composite) client).getChildren()) { >- if (control instanceof Composite) { >- for (Control control1 : ((Composite) control).getChildren()) { >- if (control1 instanceof org.eclipse.swt.widgets.Table) { >- org.eclipse.swt.widgets.Table attachmentTable = ((org.eclipse.swt.widgets.Table) control1); >- TableItem[] attachments = attachmentTable.getItems(); >- int index = 0; >- for (TableItem attachment : attachments) { >- Object data = attachment.getData(); >- if (data instanceof ITaskAttachment) { >- ITaskAttachment attachmentData = ((ITaskAttachment) data); >- if (attachmentData.getTaskAttribute().getId().equals(objString)) { >- attachmentTable.deselectAll(); >- attachmentTable.select(index); >- IManagedForm mform = actionPart.getManagedForm(); >- ScrolledForm form = mform.getForm(); >- EditorUtil.focusOn(form, attachmentTable); >- return true; >- } >- } >- index++; >- } >- } >- } >- } >- } >- } >- } >- } >- } >- } else if (object instanceof TaskEditorOutlineNode) { >+ if (object instanceof TaskEditorOutlineNode) { > TaskEditorOutlineNode node = (TaskEditorOutlineNode) object; > TaskAttribute attribute = node.getData(); > if (attribute != null) {
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 199283
:
163181
|
163182
|
173583
|
173584
|
176402
|
176403
|
176404
|
176405
|
187141
|
187142
|
187327
|
187328
| 187342 |
187361