From 9e3c2feda5e5535b4ee4f7583a54dca562b4b2ef Mon Sep 17 00:00:00 2001 From: Robert Munteanu Date: Thu, 9 Jun 2011 00:30:27 +0300 Subject: TaskReferenceFactory: use constants instead of hardcoded strings Change-Id: I42cf155ccf8690c6998d1550f68223a0d848c557 --- .../eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java index aaeabc07fa..a03536ace5 100644 --- a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java +++ b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java @@ -24,6 +24,8 @@ import org.eclipse.core.runtime.Status; import org.eclipse.egit.core.Activator; import org.eclipse.egit.internal.mylyn.ui.EGitMylynUI; import org.eclipse.egit.ui.internal.synchronize.model.GitModelCommit; +import org.eclipse.jgit.lib.ConfigConstants; +import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevWalk; @@ -137,7 +139,8 @@ public class TaskReferenceFactory implements IAdapterFactory { private static String getRepoUrl(Repository repo) { String configuredUrl = repo.getConfig().getString(BUGTRACK_SECTION, null, BUGTRACK_URL); - String originUrl = repo.getConfig().getString("remote", "origin", "url"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + String originUrl = repo.getConfig().getString(ConfigConstants.CONFIG_REMOTE_SECTION, + Constants.DEFAULT_REMOTE_NAME, ConfigConstants.CONFIG_KEY_URL); return configuredUrl != null ? configuredUrl : originUrl; } -- cgit v1.2.3