在 Ubuntu 上安装 Eclipse 插件的简单方法

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3324639/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 14:55:37  来源:igfitidea点击:

Easy way of installing Eclipse plugins on Ubuntu

linuxeclipseubuntuinstallationversions

提问by taher

I'm running Eclipse (versions 3.6 and 3.5) on Ubuntu and I'm having trouble installing Eclipse plugins.

我在 Ubuntu 上运行 Eclipse(版本 3.6 和 3.5),但在安装 Eclipse 插件时遇到问题。

There is an easy way to install eclipse plugins in Eclipse, but this doesn't work for me on Ubuntu! This way only works properly under Windows and Mac OSX.

有一种简单的方法可以在 Eclipse 中安装 Eclipse 插件,但这在 Ubuntu 上对我不起作用!这种方式只能在 Windows 和 Mac OSX 下正常工作。

Just like in the tutorial, I create a folder inside my eclipse SDK folder that is named Links.
In this folder, I create a file eclipse-cpp-helios-linux-gtk.lnkor eclipse-cpp-helios-linux-gtk.linkthat contains this line:

就像在教程中一样,我在 eclipse SDK 文件夹中创建了一个名为Links 的文件夹。
在此文件夹中,我创建了一个文件eclipse-cpp-helios-linux-gtk.lnkeclipse-cpp-helios-linux-gtk.link包含以下行:

path=/home/taher/opt/eclipse/Third-party-eclipse-links/eclipse-cpp-helios-linux-gtk

and save it, but when I start Eclipse doesn't recognize the plugin!

并保存它,但是当我启动 Eclipse 时无法识别该插件!

How can I resolve this problem?

我该如何解决这个问题?

采纳答案by VonC

With Eclipse Galileo (3.5) or Helios (3.6), I would rather recommend an external directory called 'mydropins' (for instance), which you can reference from your eclipse.ini, with the option:

对于 Eclipse Galileo (3.5) 或 Helios (3.6),我宁愿推荐一个名为“mydropins”的外部目录(例如),您可以从您的 中引用它eclipse.ini,并选择:

-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=C:/Prog/Java/eclipse_addons

This is called a shared dropins folder.
See in this SO answer an example of plugin deploymentin this shared dropins folder.

这称为共享 dropins 文件夹
在此SO 答案中查看此共享 dropins 文件夹中的插件部署示例



(Your link refers to the previous provisioning mechanism, pre-p2.
P2 is the new provisioning systemintroduced late in Eclipse3.4, refined (debugged?) in eclipse 3.5 and 3.6.
See the supported dropins formatsto check how you can organize your own personal dropins folder (that you can reuse between several eclipse installations)

(您的链接指的是之前的供应机制,pre-p2。P2
在 Eclipse3.4 后期引入的新供应系统,在 Eclipse 3.5 和 3.6 中改进(调试?)。
查看支持的 dropins 格式以检查如何组织您的自己的个人 dropins 文件夹(您可以在多个 eclipse 安装之间重复使用)



You said you are using:

你说你正在使用:

-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/home/taher/opt/eclipse/Third-party-eclipse-links

That means, under /home/taher/opt/eclipse/Third-party-eclipse-links, you:

这意味着,在 /home/taher/opt/eclipse/Third-party-eclipse-links 下,您:

  • won't have any .linkfile
  • will copy:
  • 不会有任何.link文件
  • 将复制:
    eclipse-cpp-helios-linux-gtk
      eclipse
        features
        plugins

Note: the structure within eclipse-cpp-helios-linux-gtkshould be the one describe above, for p2 to pick it up.

注意:里面的结构eclipse-cpp-helios-linux-gtk应该是上面描述的结构,以便 p2 拾取它。