Mercurial: components -> services

This commit is contained in:
Dmitry Jemerov
2010-06-16 20:14:38 +04:00
parent 750ba459be
commit cbf6d0b880
2 changed files with 9 additions and 14 deletions
+7 -13
View File
@@ -27,6 +27,13 @@
<checkoutProvider implementation="org.zmlx.hg4idea.provider.HgCheckoutProvider"/>
<errorHandler implementation="com.intellij.diagnostic.ITNReporter"/>
<applicationConfigurable implementation="org.zmlx.hg4idea.HgIdeConfigurable"/>
<applicationService serviceInterface="org.zmlx.hg4idea.HgGlobalSettings"
serviceImplementation="org.zmlx.hg4idea.HgGlobalSettings"/>
<projectService serviceInterface="org.zmlx.hg4idea.HgProjectSettings"
serviceImplementation="org.zmlx.hg4idea.HgProjectSettings"/>
<projectService serviceInterface="org.zmlx.hg4idea.command.HgCommandService"
serviceImplementation="org.zmlx.hg4idea.command.HgCommandService"/>
</extensions>
<actions>
@@ -65,19 +72,6 @@
</group>
</actions>
<application-components>
<component>
<implementation-class>org.zmlx.hg4idea.HgGlobalSettings</implementation-class>
</component>
</application-components>
<project-components>
<component>
<implementation-class>org.zmlx.hg4idea.command.HgCommandService</implementation-class>
</component>
<component>
<implementation-class>org.zmlx.hg4idea.HgProjectSettings</implementation-class>
</component>
</project-components>
<resource-bundle>org.zmlx.hg4idea.HgVcsMessages</resource-bundle>
<change-notes>
@@ -14,6 +14,7 @@ package org.zmlx.hg4idea.command;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ModalityState;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
@@ -57,7 +58,7 @@ public final class HgCommandService {
}
public static HgCommandService getInstance(Project project) {
return project.getComponent(HgCommandService.class);
return ServiceManager.getService(project, HgCommandService.class);
}
HgCommandResult execute(VirtualFile repo, String operation, List<String> arguments) {