Eclipse扩展和声明服务 [英] Eclipse Extensions and Declarative Services

查看:159
本文介绍了Eclipse扩展和声明服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Eclipse架构中的扩展/服务方法,我有些困惑。
开发人员可以使用两个选项:


  1. 使用Eclipse插件扩展 - http://www.eclipse.org/articles/Article-Plug-in-architecture/plugin_architecture.html

  2. 使用声明性服务 - http://www.eclipse.org/等分/束/

当你使用一个超过另一个,有什么优点和缺点
各种方法?还有哪些是首选方法?

解决方案

有一个很好的比较(从2007年,我想)在EclipseZone: a href =http://www.eclipsezone.com/articles/extensions-vs-services/ =nofollow noreferrer> Eclipse扩展和OSGi服务的比较。



我将遵循目标平台的惯例。因此,如果您正在为Eclipse 3.4编写一个插件,比方说,创建一个Eclipse 3.4插件(将使用一个 MANIFEST.MF 作为依赖关系和一个 plugin.xml 扩展/扩展点 - 您链接到的文章适用于Eclipse 2.x)。您可以检查插件目录的内容来确认。


I'm a little confused on the approach to extensions/services in the Eclipse architecture. There are two options available to a developer:

  1. The use of Eclipse plugin extensions - http://www.eclipse.org/articles/Article-Plug-in-architecture/plugin_architecture.html
  2. The use of declarative services - http://www.eclipse.org/equinox/bundles/

When you would use one over the other and what are the advantages and the disadvantages of each approach? Also going forward which is the preferred approach?

解决方案

There's a pretty good comparison (from 2007, I think) on EclipseZone: A Comparison of Eclipse Extensions and OSGi Services.

I would follow the conventions of your target platform. So, if you're writing a plugin for Eclipse 3.4, say, create an Eclipse 3.4 plugin (which will use a MANIFEST.MF for dependencies and a plugin.xml for extensions/extension points - the article you link to is for Eclipse 2.x). You can examine the contents of the plugins directory to confirm this.

这篇关于Eclipse扩展和声明服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆