且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Eclipse 3.5+:从用户主目录中的自动创建的.eclipse目录加载插件

更新时间:2022-10-17 20:12:38

这听起来像一个p2错误。您可以打开错误报告吗?


I have downloaded the latest Eclipse (3.6) for my Linux machine and extracted tar.gz to the /opt/eclipse directory as root. I started Eclipse as a normal user and successfully installed some plug-ins through Eclipse. The plug-ins are visible under "Installed software" from Eclipse, but they doesn't seem to be working - no new perspectives that should be there, no features, nothing. Then I looked inside my home folder and found the following directory:

.eclipse/org.eclipse.platform_3.5.0_1473617060

That directory structure looks similar to the one in the /opt/eclipse (where Eclipse is installed) and has 4 directories inside ("dropins", "configuration", "plugins", "features") and one file ("artifacts.xml"). The "plugins" folder really containts all the plug-ins I have installed.

I have already read the following topic: Installing Eclipse (3.4+) plugins in a directory other than ECLIPSE_HOME/plugins and tried to put .link file in "opt/eclipse/dropins" and/or "opt/eclipse/links" directory pointing to the configuration directory in my home directory, but that doesn't seem to be working.

So these are the steps to reproduce the problem, in short:

  1. Run Eclipse as some user which has no write permissions to installation dir
  2. Install plug-ins through Eclipse and restart it (as the same user)
  3. Eclipse now shows that those plug-ins are installed. The plugins are indeed located somewhere in the home directory of the user who installed them (~/.eclipse/.../plugins).

Problem: plug-ins are somehow ignored. I know that I can quick-fix the problem by copying the plugins manually to the installation directory (as a root) each time I install a plug-in as a non-root (or always install plug-ins as root), but I am interested in the way how can I configure Eclipse to read the user's own configuration file and plugins which have been automatically generated by Eclipse in the first place.

Any ideas how can I force Eclipse to actually use the plug-ins installed by Eclipse?

This sounds like a p2 bug. Can you open a bug report?