0

我为一个插件(A)创建了一个扩展点。另一个插件(B)被设置为第一个插件的 ep 的扩展。

当试图在一个 eclipse 中使用扩展点时,eclipse 告诉我,它无法找到这个扩展点的可配置元素。找到扩展点本身。

我怀疑插件 B 根本没有启动。我怎样才能检查这个?

这是调用扩展点的代码:

IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
        IExtensionPoint[] extensionPoints = extensionRegistry.getExtensionPoints("A.extensionpoints");
        //Prints both defined EP's
        for (IExtensionPoint iExtensionPoint : extensionPoints) {
            System.err.println(iExtensionPoint.getUniqueIdentifier());
            System.err.println(iExtensionPoint.getExtensions().length); 
        }
        IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint("A.extensionpoints.HavingProblemsWith");
        System.err.println(extensionPoint.getLabel());//Prints the Label
        System.err.println(extensionPoint.getConfigurationElements().length);// => 0
4

1 回答 1

1

Fire up eclipse with the -console option. Then you have tools to view the status of the plugins and to start them, if you want so. It may give you some ideas on why the plugin hasn't been started.

于 2012-12-06T15:12:57.637 回答