deprecate ServiceManager.getService()

Change-Id: Ide790135ddc2a0c79244f57e28e3e715b07d7b55
diff --git a/src/com/google/devrel/cluestick/studioclient/FindSampleUsageAction.java b/src/com/google/devrel/cluestick/studioclient/FindSampleUsageAction.java
index d4bf19d..d20a908 100644
--- a/src/com/google/devrel/cluestick/studioclient/FindSampleUsageAction.java
+++ b/src/com/google/devrel/cluestick/studioclient/FindSampleUsageAction.java
@@ -27,7 +27,6 @@
 import com.intellij.ide.plugins.PluginManagerCore;
 import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.editor.Editor;
 import com.intellij.openapi.extensions.PluginId;
@@ -86,8 +85,7 @@
       public void run(@NotNull ProgressIndicator indicator) {
         List<Result> results;
         try {
-          results = ServiceManager.getService(CluestickSearch.class).performSearch(
-              symbol, userAgent);
+          results = ApplicationManager.getApplication().getService(CluestickSearch.class).performSearch(symbol, userAgent);
         } catch (IOException ex) {
           LOG.warn("Couldn't perform Cluestick search", ex);
           showMessage(editor, String.format("Samples are currently unavailable for: %s", symbol));
diff --git a/src/com/google/devrel/cluestick/studioclient/SearchResultsView.java b/src/com/google/devrel/cluestick/studioclient/SearchResultsView.java
index 4c671ee..fe65f55 100644
--- a/src/com/google/devrel/cluestick/studioclient/SearchResultsView.java
+++ b/src/com/google/devrel/cluestick/studioclient/SearchResultsView.java
@@ -28,7 +28,7 @@
 import com.intellij.openapi.actionSystem.AnAction;
 import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.actionSystem.DefaultActionGroup;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.project.DumbAware;
 import com.intellij.openapi.project.Project;
@@ -80,7 +80,7 @@
 
   public SearchResultsView(@NotNull final Project project, @NotNull final Symbol symbol,
       @NotNull final List<Result> results) {
-    eventLog = new EventLog(ServiceManager.getService(CluestickSearch.class));
+    eventLog = new EventLog(ApplicationManager.getApplication().getService(CluestickSearch.class));
 
     setLayout(new BorderLayout());