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);
}
}