Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2006-11-28 20:13:44 -0500
committermkersten2006-11-28 20:13:44 -0500
commit829788b40092c8a1a704b33a8cdccb52a8ab844f (patch)
treec58081d5090ade657e29512a0e57efcafc340364 /org.eclipse.mylyn.trac.core/src
parent9ec6d62d0e9a13550cd10c115bd24da815234ac3 (diff)
downloadorg.eclipse.mylyn.tasks-829788b40092c8a1a704b33a8cdccb52a8ab844f.tar.gz
org.eclipse.mylyn.tasks-829788b40092c8a1a704b33a8cdccb52a8ab844f.tar.xz
org.eclipse.mylyn.tasks-829788b40092c8a1a704b33a8cdccb52a8ab844f.zip
NEW - bug 165581: Improve Open Correspond Task action
https://bugs.eclipse.org/bugs/show_bug.cgi?id=165581
Diffstat (limited to 'org.eclipse.mylyn.trac.core/src')
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
index a698601ef..16add1a0a 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
@@ -80,10 +80,24 @@ public class TracRepositoryConnector extends AbstractRepositoryConnector {
if (url == null) {
return null;
}
- int i = url.lastIndexOf(ITracClient.TICKET_URL);
- return (i != -1) ? url.substring(0, i) : null;
+ int index = url.lastIndexOf(ITracClient.TICKET_URL);
+ return index == -1 ? null : url.substring(0, index);
}
+ public String getTaskIdFromTaskUrl(String url) {
+ if (url == null) {
+ return null;
+ }
+ int index = url.lastIndexOf(ITracClient.TICKET_URL);
+ return index == -1 ? null : url.substring(index + ITracClient.TICKET_URL.length());
+ }
+
+ @Override
+ public String getTaskWebUrl(String repositoryUrl, String taskId) {
+ return repositoryUrl + ITracClient.TICKET_URL + taskId;
+ }
+
+
@Override
public List<String> getSupportedVersions() {
if (supportedVersions == null) {

Back to the top