com.intellij.openapi.components.ServiceManager



API Populatity

3 Client projects

Project: com.intellij

Project JetBrains/intellij-community in file ...pi.src.com.intellij.util.net.HttpConfigurable.java (2007-02-22)
@@ -17,6 +17,7 @@ package com.intellij.util.net;
 
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.ApplicationComponent;
+import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.util.DefaultJDOMExternalizer;
 import com.intellij.openapi.util.InvalidDataException;
 import com.intellij.openapi.util.JDOMExternalizable;
@@ -46,7 +47,7 @@ public class HttpConfigurable implements JDOMExternalizable, ApplicationComponen
   public boolean KEEP_PROXY_PASSWORD = false;
 
   public static HttpConfigurable getInstance() {
-    return ApplicationManager.getApplication().getComponent(HttpConfigurable.class);
+    return ServiceManager.getService(HttpConfigurable.class);
   }
 
   public void readExternal(Element element) throws InvalidDataException {
Project JetBrains/intellij-community in file ...pi.src.com.intellij.ide.SelectInEditorManager.java (2008-09-25)
@@ -15,6 +15,7 @@
  */
 package com.intellij.ide;
 
+import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.vfs.VirtualFile;
 
@@ -24,7 +25,7 @@ import com.intellij.openapi.vfs.VirtualFile;
  */
 public abstract class SelectInEditorManager{
   public static SelectInEditorManager getInstance(Project project) {
-    return project.getComponent(SelectInEditorManager.class);
+    return ServiceManager.getService(project, SelectInEditorManager.class);
   }
 
   /** Do selection in Editor. This selection is removed automatically, then caret position is changed,
Project JetBrains/intellij-community in file ...openapi.wm.impl.ToolWindowHeadlessManagerImpl.java (2007-11-12)
@@ -11,6 +11,7 @@
 package com.intellij.openapi.wm.impl;
 
 import com.intellij.openapi.Disposable;
+import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.actionSystem.AnAction;
 import com.intellij.openapi.actionSystem.DataProvider;
 import com.intellij.openapi.util.ActionCallback;
@@ -166,7 +167,7 @@ public class ToolWindowHeadlessManagerImpl extends ToolWindowManagerEx {
     }
 
     public ContentFactory getFactory() {
-      return ContentFactory.getInstance();
+      return ServiceManager.getService(ContentFactory.class);
     }
   };