Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2008-05-30 02:19:13 +0000
committermkersten2008-05-30 02:19:13 +0000
commit8d8c2d5bb197b6a36ec222d358fa14d4e573bf17 (patch)
tree25b0870127cde36577bd888cd6f00aa660bd7410 /org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal
parent0ae133661c3dba972dc7fff6b9a14076743cd311 (diff)
downloadorg.eclipse.mylyn.tasks-8d8c2d5bb197b6a36ec222d358fa14d4e573bf17.tar.gz
org.eclipse.mylyn.tasks-8d8c2d5bb197b6a36ec222d358fa14d4e573bf17.tar.xz
org.eclipse.mylyn.tasks-8d8c2d5bb197b6a36ec222d358fa14d4e573bf17.zip
NEW - bug 227660: track Mylyn 3.0 API creation and migration
https://bugs.eclipse.org/bugs/show_bug.cgi?id=227660
Diffstat (limited to 'org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal')
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java1
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java51
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorFactory.java2
3 files changed, 52 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
index 340482abb..19b1cb3bf 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
@@ -23,7 +23,6 @@ import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.internal.trac.core.ITracClient;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TaskHyperlink;
-import org.eclipse.mylyn.tasks.ui.WebHyperlink;
/**
* Utility class for detecting Trac hyperlinks.
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java
new file mode 100644
index 000000000..4431531f4
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Mylyn project committers and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.mylyn.internal.trac.ui;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
+
+/**
+ * Encapsulates link from text to a URL.
+ *
+ * @author Steffen Pingel
+ * @since 2.0
+ */
+public class WebHyperlink implements IHyperlink {
+
+ private final IRegion region;
+
+ private final String url;
+
+ public WebHyperlink(IRegion region, String url) {
+ this.region = region;
+ this.url = url;
+ }
+
+ public IRegion getHyperlinkRegion() {
+ return region;
+ }
+
+ public String getTypeLabel() {
+ return null;
+ }
+
+ public String getHyperlinkText() {
+ return "Open URL " + url;
+ }
+
+ public void open() {
+ TasksUiUtil.openTask(url);
+ }
+
+ public String getURLString() {
+ return url;
+ }
+
+}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorFactory.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorFactory.java
index 7ad7b910f..3b8d899bf 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorFactory.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorFactory.java
@@ -10,6 +10,7 @@ package org.eclipse.mylyn.internal.trac.ui.editor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
+import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractTaskEditorFactory;
import org.eclipse.mylyn.internal.tasks.ui.deprecated.RepositoryTaskEditorInput;
import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
@@ -17,7 +18,6 @@ import org.eclipse.mylyn.internal.trac.core.TracTask;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorFactory;
import org.eclipse.mylyn.tasks.ui.editors.BrowserFormPage;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;

Back to the top