将Eclipse插件从一个功能迁移到另一个功能的好方法是什么? [英] What's a good way to move an Eclipse Plug-in from one Feature to another?

查看:89
本文介绍了将Eclipse插件从一个功能迁移到另一个功能的好方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我们有一个具有2个Eclipse功能的更新站点(每个都有它自己的插件):

  • 主要功能
  • 可选功能(取决于主要功能)

在新版本中,我想将可选功能"的插件折叠到主要功能"中.我不想再显示可选功能".

如果按照我说的那样做,这对新安装来说很好,但是对于更新来说,这是有问题的,因为依赖于插件确切版本的旧功能会留下来并引起冲突./p>

我可以将可选功能"保留为主功能中的一个附加功能,但在那种情况下,仍然会有可选Feature.feature.group"工件需要该功能的旧版本.

我现在回到正题,必须在更新站点中将可选功能"重新添加为根功能,并将其显示给用户只是为了在那里找到"* .feature.group".以后可以安全地卸载它,我可以在名称和描述中指出这一点,但是整个过程有些混乱,对于用户来说可能不容易理解.如果安装Eclipse Marketplace,效果可能会更糟.


安装隐藏(主要包含在其中)的虚拟功能时出现的简化示例错误:

 您的原始请求已被修改.已经安装了主要功能",因此将执行更新.由于依赖性冲突,无法完成安装.正在安装的软件:主要功能2(main.feature.feature.group 2)当前安装的软件:可选功能1(optional.feature.feature.group 1)一次只能安装以下之一:可选功能插件1(可选1)可选功能插件2(可选2)无法满足依赖关系:发件人:可选功能1(optional.feature.feature.group 1)收件人:可选[1]无法满足依赖关系:发件人:主要功能2(main.feature.feature.group 2)收件人:可选[1] 

解决方案

为什么不将可选功能更改为虚拟功能(即没有插件的功能).还应在虚拟功能的说明中明确指出已弃用该功能.

Lets assume we have an update site with 2 Eclipse features (each has it's own plug-in):

  • Main Feature
  • Optional Feature (depends on the main one)

In the new version, I want to fold the plug-ins of the Optional Feature into the Main Feature. I don't want to show the Optional Feature any more.

If I do the move just like I said, this is fine for new installs, but for updates it is problematic because the old feature that depends on an exact version of it's plug-in will stick around and cause a conflict.

I could keep the Optional Feature as an included feature of the Main Feature, but in that case there will still be an "Optional Feature.feature.group" artifact that will require the old version of the feature.

I am now back to square one, having to add the Optional Feature back as a root feature in the update site and showing it to the user just to get that "*.feature.group" there. It can be safely uninstalled later and I can indicate that in the name and description, but the whole process is somewhat messy and probably not easy to understand for users. It would probably work even worse with Eclipse Marketplace installs.


A simplified example error I get when installing the hidden (included in the main one) dummy feature :

Your original request has been modified.
  "Main Feature" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
  Software being installed: Main Feature 2 (main.feature.feature.group 2)
  Software currently installed: Optional Feature 1 (optional.feature.feature.group 1)
  Only one of the following can be installed at once: 
    Optional Feature Plug-in 1 (optional 1)
    Optional Feature Plug-in 2 (optional 2)
  Cannot satisfy dependency:
    From: Optional Feature 1 (optional.feature.feature.group 1)
    To: optional [1]
  Cannot satisfy dependency:
    From: Main Feature 2 (main.feature.feature.group 2)
    To: optional [1]

解决方案

Why don't you change the optional feature into a dummy feature (i.e. a feature with no plugins). Also make it clear in the description of the dummy feature that it has been deprecated.

这篇关于将Eclipse插件从一个功能迁移到另一个功能的好方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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