美文网首页
org.eclipse.core.runtime.ada

org.eclipse.core.runtime.ada

作者: YU_XI | 来源:发表于2017-07-21 16:22 被阅读0次

    适配器扩展点允许插件注册适配器工厂。运行时 XML 表达式语言使用此信息来确定适配器是否存在,而不会导致装入插件。

    通过扩展点注册适配器工厂可以使得启动插件时无需手工注册适配器工厂

    eg:

    point="org.eclipse.core.runtime.adapters"

    adaptableType="org.jivesoftware.smack.Roster"

    class="org.eclipsercp.hyperbola.AdapterFactory">

    type="org.eclipse.ui.model.IWorkbenchAdapter"

    说明:

    class:对应适配器工厂(即实现IAdapterFacotry接口的类)

    adaptableType:将要适配的类,此工厂为其提供适配器的类(通常实现 IAdaptable)的标准名称

    adapter:要适配成什么类(adapter可以有多个),此工厂可以适用于的Java类或接口的标准名称。

    使用此接口,在运行时不需要使用 IAdapterFactory.registerAdapters 来注册使用此扩展点来注册的适配器工厂。

    不再需要使用以下的注册代码:

    Platform.getAdapterManager().register()进行注册。

    相关文章

      网友评论

          本文标题: org.eclipse.core.runtime.ada

          本文链接:https://www.haomeiwen.com/subject/djyekxtx.html