Adapt to split of EGit core Activator into OSGi dynamic services

Depends-On: Id5c7440213ae25a573e84720db7dfcc83a8f5d0a
Change-Id: I613d52679fa0b69be89e218a1c9aa9cd514fdfa9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/pr/PullRequestUtils.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/pr/PullRequestUtils.java
index 2302ecd..3bc00c0 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/pr/PullRequestUtils.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/pr/PullRequestUtils.java
@@ -16,8 +16,8 @@
 import java.io.IOException;
 import java.net.URISyntaxException;
 
-import org.eclipse.egit.core.Activator;
 import org.eclipse.egit.core.RepositoryCache;
+import org.eclipse.egit.core.RepositoryUtil;
 import org.eclipse.egit.github.core.PullRequest;
 import org.eclipse.egit.github.core.PullRequestMarker;
 import org.eclipse.egit.github.core.User;
@@ -72,8 +72,8 @@
 				.getRepo();
 		String id = remoteRepo.getOwner().getLogin() + '/'
 				+ remoteRepo.getName() + Constants.DOT_GIT;
-		RepositoryCache cache = Activator.getDefault().getRepositoryCache();
-		for (String path : Activator.getDefault().getRepositoryUtil()
+		RepositoryCache cache = RepositoryCache.getInstance();
+		for (String path : RepositoryUtil.getInstance()
 				.getConfiguredRepositories())
 			try {
 				Repository repo = cache.lookupRepository(new File(path));
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositoryImportWizard.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositoryImportWizard.java
index 0405b9a..c3a7b89 100755
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositoryImportWizard.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositoryImportWizard.java
@@ -23,7 +23,6 @@
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.SubProgressMonitor;
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.egit.core.Activator;
 import org.eclipse.egit.core.RepositoryUtil;
 import org.eclipse.egit.core.op.CloneOperation;
 import org.eclipse.egit.core.settings.GitSettings;
@@ -109,8 +108,7 @@
 				monitor.beginTask(name, repositories.length * 3);
 				GitHubClient client = GitHub
 						.configureClient(new GitHubClient());
-				RepositoryUtil repositoryUtil = Activator.getDefault()
-						.getRepositoryUtil();
+				RepositoryUtil repositoryUtil = RepositoryUtil.getInstance();
 				RepositoryService service = new RepositoryService(client);
 				for (SearchRepository repo : repositories)
 					try {
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/CloneGistHandler.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/CloneGistHandler.java
index d521af0..7d94f7d 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/CloneGistHandler.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/CloneGistHandler.java
@@ -68,7 +68,7 @@
 	}
 
 	private static RepositoryUtil getRepoUtil() {
-		return org.eclipse.egit.core.Activator.getDefault().getRepositoryUtil();
+		return RepositoryUtil.getInstance();
 	}
 
 	/**