|
Lines 19-25
Link Here
|
| 19 |
import java.util.regex.Matcher; |
19 |
import java.util.regex.Matcher; |
| 20 |
import java.util.regex.Pattern; |
20 |
import java.util.regex.Pattern; |
| 21 |
|
21 |
|
| 22 |
import org.eclipse.core.runtime.Platform; |
|
|
| 23 |
import org.eclipse.jface.resource.ImageDescriptor; |
22 |
import org.eclipse.jface.resource.ImageDescriptor; |
| 24 |
import org.eclipse.jface.text.Region; |
23 |
import org.eclipse.jface.text.Region; |
| 25 |
import org.eclipse.jface.text.hyperlink.IHyperlink; |
24 |
import org.eclipse.jface.text.hyperlink.IHyperlink; |
|
Lines 34-39
Link Here
|
| 34 |
import org.eclipse.mylyn.internal.bugzilla.ui.TaskAttachmentTableEditorHyperlink; |
33 |
import org.eclipse.mylyn.internal.bugzilla.ui.TaskAttachmentTableEditorHyperlink; |
| 35 |
import org.eclipse.mylyn.internal.bugzilla.ui.search.BugzillaSearchPage; |
34 |
import org.eclipse.mylyn.internal.bugzilla.ui.search.BugzillaSearchPage; |
| 36 |
import org.eclipse.mylyn.internal.bugzilla.ui.wizard.NewBugzillaTaskWizard; |
35 |
import org.eclipse.mylyn.internal.bugzilla.ui.wizard.NewBugzillaTaskWizard; |
|
|
36 |
import org.eclipse.mylyn.internal.provisional.commons.ui.PlatformUiUtil; |
| 37 |
import org.eclipse.mylyn.tasks.core.IRepositoryQuery; |
37 |
import org.eclipse.mylyn.tasks.core.IRepositoryQuery; |
| 38 |
import org.eclipse.mylyn.tasks.core.ITask; |
38 |
import org.eclipse.mylyn.tasks.core.ITask; |
| 39 |
import org.eclipse.mylyn.tasks.core.ITaskComment; |
39 |
import org.eclipse.mylyn.tasks.core.ITaskComment; |
|
Lines 47-54
Link Here
|
| 47 |
import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositoryQueryPage; |
47 |
import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositoryQueryPage; |
| 48 |
import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage; |
48 |
import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage; |
| 49 |
import org.eclipse.mylyn.tasks.ui.wizards.RepositoryQueryWizard; |
49 |
import org.eclipse.mylyn.tasks.ui.wizards.RepositoryQueryWizard; |
| 50 |
import org.osgi.framework.Bundle; |
|
|
| 51 |
import org.osgi.framework.Version; |
| 52 |
|
50 |
|
| 53 |
/** |
51 |
/** |
| 54 |
* @author Mik Kersten |
52 |
* @author Mik Kersten |
|
Lines 69-88
Link Here
|
| 69 |
|
67 |
|
| 70 |
private static final Pattern PATTERN_ATTACHMENT = Pattern.compile(REGEXP_ATTACHMENT, Pattern.CASE_INSENSITIVE); |
68 |
private static final Pattern PATTERN_ATTACHMENT = Pattern.compile(REGEXP_ATTACHMENT, Pattern.CASE_INSENSITIVE); |
| 71 |
|
69 |
|
| 72 |
/* |
|
|
| 73 |
* because of bug# 322293 (NPE when select Hyperlink from MultipleHyperlinkPresenter List) |
| 74 |
* for MacOS we enable this only if running on Eclipse >= "3.7.0.v201101192000" |
| 75 |
* |
| 76 |
*/ |
| 77 |
private final boolean doAttachmentTableEditorHyperlink; |
70 |
private final boolean doAttachmentTableEditorHyperlink; |
| 78 |
|
71 |
|
| 79 |
public BugzillaConnectorUi() { |
72 |
public BugzillaConnectorUi() { |
| 80 |
super(); |
73 |
doAttachmentTableEditorHyperlink = PlatformUiUtil.supportsMultipleHyperlinkPresenter(); |
| 81 |
Bundle bundle = Platform.getBundle("org.eclipse.platform"); //$NON-NLS-1$ |
|
|
| 82 |
String versionString = bundle.getHeaders().get("Bundle-Version"); //$NON-NLS-1$ |
| 83 |
|
| 84 |
Version version = new Version(versionString); |
| 85 |
doAttachmentTableEditorHyperlink = version.compareTo(new Version("3.7.0.v201101192000")) >= 0; //$NON-NLS-1$ |
| 86 |
} |
74 |
} |
| 87 |
|
75 |
|
| 88 |
@Override |
76 |
@Override |