Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Intellij idea ServiceManager#getService返回空值_Intellij Idea_Intellij Plugin - Fatal编程技术网

Intellij idea ServiceManager#getService返回空值

Intellij idea ServiceManager#getService返回空值,intellij-idea,intellij-plugin,Intellij Idea,Intellij Plugin,我在plugin.xml中声明了一个应用程序服务 <extensions defaultExtensionNs="com.intellij"> <applicationService serviceImplementation="MyService"/> </extensions> 我尝试在DefaultPicoContainer#registerComponent(ComponentAdapter)中放置带条件的断点,但它从未触发。日志中没有错误。

我在
plugin.xml
中声明了一个应用程序服务

<extensions defaultExtensionNs="com.intellij">
    <applicationService serviceImplementation="MyService"/>
</extensions>

我尝试在
DefaultPicoContainer#registerComponent(ComponentAdapter)
中放置带条件的断点,但它从未触发。日志中没有错误。

该插件被忽略,因为在
~\.IdeaIC12\system\plugins sandbox\plugins
中有另一个插件与
plugin.xml
中的
相同


检查
PluginManager上的
IdeaPluginDescriptorImpl[]
以检查插件是否正在加载。

该插件被忽略,因为
~\.IdeaIC12\system\plugins sandbox\plugins
中有另一个插件与
plugin.xml
中的
相同

检查
PluginManager#initializePlugins
上的
IdeaPluginDescriptorImpl[]
以检查插件是否正在加载

public class MyServiceTest extends LightCodeInsightFixtureTestCase {
  public void test() throws Exception {
    MyService service = ServiceManager.getService(MyService.class);
    assertNotNull(service);
  }
}