如何最好地维护Eclipse RCP插件目标?

时间:2022-01-30 19:02:01

I have a plugin for an RCP app that uses BIRT. I have a target for building my app which contains only the plugins/features that are required. I recently updated the BIRT plugin versions in my IDE, which created an incompatibility in the design files with previous versions of BIRT. I have the old version of BIRT in my target and need to update to the newer plugins.

我有一个使用BIRT的RCP应用程序的插件。我有一个构建我的应用程序的目标,其中只包含所需的插件/功能。我最近在我的IDE中更新了BIRT插件版本,这在先前版本的BIRT中创建了设计文件的不兼容性。我的目标中有旧版本的BIRT,需要更新到更新的插件。

In the past I have manually updated plugin jars in the target, but BIRT is a complicated platform with dependencies out the wazoo. Is there any utility or way of organizing my target differently that will make this easier to control in the future?

在过去,我手动更新了目标中的插件jar,但是BIRT是一个复杂的平台,依赖于wazoo。是否有任何实用程序或方法以不同的方式组织我的目标,以便将来更容易控制?

2 个解决方案

#1


I would recommend to keep all components separately and not copy them into a single folder. You can use Target Definition editor (see File / New / Other... / Target Definition). So, after downloading all the pieces, you can unpack them locally and assemble your Target Platform using Target Definition editor.

我建议单独保留所有组件,不要将它们复制到一个文件夹中。您可以使用目标定义编辑器(请参阅文件/新建/其他... /目标定义)。因此,在下载完所有部件后,您可以在本地解压缩它们并使用目标定义编辑器组装目标平台。

You can also do the same using Window / Preferences / Plugin Development / Target Platform preference page. There you can select previously created target definition or specify base Eclipse install and then use "Add..." button to add additional components from local folders or remote sites.

您也可以使用Window / Preferences / Plugin Development / Target Platform首选项页面执行相同的操作。在那里,您可以选择以前创建的目标定义或指定基本Eclipse安装,然后使用“添加...”按钮从本地文件夹或远程站点添加其他组件。

Also, as far as I know the PDE team is currently working on expanding Target platform support in Eclipse 3.5. I think they are planning to allow to select Target Definition per-launch configuration and per-project.

另外,据我所知,PDE团队目前正致力于在Eclipse 3.5中扩展Target平台支持。我认为他们计划允许为每个启动配置和每个项目选择目标定义。

#2


Im not sure if i understand you right, so please let me know if not.

我不确定我是否理解你,如果没有,请告诉我。

When i use third party libraries, i create a plugin for every single one.

当我使用第三方库时,我为每一个库创建一个插件。

Example:

xstream library:

  • Import the jars (also the source code)
  • 导入jar(也是源代码)

  • Add the jars to the MANIFEST Bundle-ClassPath
  • 将jar添加到MANIFEST Bundle-ClassPath

  • Add all xtream packages to the MANIFEST Export-Package
  • 将所有xtream包添加到MANIFEST Export-Package

When a plugin needs the code of the xstream library it has to depend on the xtream plugin. Because the packages are public, every plugin can use the source code of it.

当插件需要xstream库的代码时,它必须依赖于xtream插件。因为包是公共的,所以每个插件都可以使用它的源代码。

When a new version of xtream is comming, you only have to update the jars and not the dependend plugins. Sometimes you have to update the export packages of the third party plugin.

当新版本的xtream出现时,您只需要更新jar而不是dependend插件。有时您必须更新第三方插件的导出包。

All depended plugins you dont have to change.

所有依赖的插件你都没有必要改变。

#1


I would recommend to keep all components separately and not copy them into a single folder. You can use Target Definition editor (see File / New / Other... / Target Definition). So, after downloading all the pieces, you can unpack them locally and assemble your Target Platform using Target Definition editor.

我建议单独保留所有组件,不要将它们复制到一个文件夹中。您可以使用目标定义编辑器(请参阅文件/新建/其他... /目标定义)。因此,在下载完所有部件后,您可以在本地解压缩它们并使用目标定义编辑器组装目标平台。

You can also do the same using Window / Preferences / Plugin Development / Target Platform preference page. There you can select previously created target definition or specify base Eclipse install and then use "Add..." button to add additional components from local folders or remote sites.

您也可以使用Window / Preferences / Plugin Development / Target Platform首选项页面执行相同的操作。在那里,您可以选择以前创建的目标定义或指定基本Eclipse安装,然后使用“添加...”按钮从本地文件夹或远程站点添加其他组件。

Also, as far as I know the PDE team is currently working on expanding Target platform support in Eclipse 3.5. I think they are planning to allow to select Target Definition per-launch configuration and per-project.

另外,据我所知,PDE团队目前正致力于在Eclipse 3.5中扩展Target平台支持。我认为他们计划允许为每个启动配置和每个项目选择目标定义。

#2


Im not sure if i understand you right, so please let me know if not.

我不确定我是否理解你,如果没有,请告诉我。

When i use third party libraries, i create a plugin for every single one.

当我使用第三方库时,我为每一个库创建一个插件。

Example:

xstream library:

  • Import the jars (also the source code)
  • 导入jar(也是源代码)

  • Add the jars to the MANIFEST Bundle-ClassPath
  • 将jar添加到MANIFEST Bundle-ClassPath

  • Add all xtream packages to the MANIFEST Export-Package
  • 将所有xtream包添加到MANIFEST Export-Package

When a plugin needs the code of the xstream library it has to depend on the xtream plugin. Because the packages are public, every plugin can use the source code of it.

当插件需要xstream库的代码时,它必须依赖于xtream插件。因为包是公共的,所以每个插件都可以使用它的源代码。

When a new version of xtream is comming, you only have to update the jars and not the dependend plugins. Sometimes you have to update the export packages of the third party plugin.

当新版本的xtream出现时,您只需要更新jar而不是dependend插件。有时您必须更新第三方插件的导出包。

All depended plugins you dont have to change.

所有依赖的插件你都没有必要改变。