views:

276

answers:

4

I own a plugin for eclipse, but I want to use it at work. Is there a way to make eclipse use plugin files without it affecting other people using the same central version of Eclipse? Maybe some custom preferences?

Thanks.

EDIT: Started a bounty. Please specify a step-by-step solution to this, as I'm not very experienced with the inner-workings of eclipse.

+1  A: 

Yes, it is. There are several ways, which mostly depends on the version you are using of Eclipse. But you can always install your own Eclipse locally. It is always possible to use a own set of plug-in loaded form a separate directory. Which platform are you on? Which version of Eclipse are you using?

As for Eclipse programming I use The Java Developer's Guide to Eclipse (2nd edition (which still covers all current v3.# very good)). It has a nice description on how multiple configurations can be used.

See part I - Chapter 'Managing Your Eclipse Environment'; section 'Managing Your Configuration' (page 191-195).

Be careful as the Eclipse functionality regarding 'Install new Software', is one of the peaces that has been most changed between the different 3.# version (at least for what I noticed).

Verhagen
I work under Linux. As for versions, etc., I will reply when I get to work tomorrow.
Amir Rachum
Also, regarding the central version - does it make more sense to you because it's under linux? We use different Linux machines using VNC.
Amir Rachum
@Amir yes, it also wonders me why you share a central eclipse version? What is the logic behind this set up?
Verhagen
@Amir, are you using network boot or so? We developers use also Linux, but everyone has it locale machine with locale installed Linux and also all applications. We onyl have a centralized home directory. Just to have easy log-on. Our development work is on a separate partition localy! So building etc. is quick.Mmm, VNC ? It gets even more confusing.... :)
Verhagen
@Verhagen I have a personal Windows machine, but we have different Linux machines which we VNC into and develop on them. When I check where the alias eclipse leads me to - it's to a directory accessible from all the machines, i.e., a network folder.
Amir Rachum
@Amir: Would it not be faster to use XWindows (XMinq) http://www.straightrunning.com/XmingNotes/ from you windows machine to get into the Linux machine, instead of vnc?Have you started Eclipse through a command line, with the option as described in the JD2E book (see answere above)?
Verhagen
@Verhagen I read it but I'm not sure how to add a plugin to the alternative configuration. How do I do that?
Amir Rachum
@Amir Start Eclipse, with the option. Then when you add another plug-in, it will use that specific configuration directory, as storage location, during the installation. At least that is what I expect it will do. TIP: My experience is, that sometimes you need to be logged in as root, to make installing of plug-in really happening. It depends on how Eclipse was installed / started. If installed under root (like on unix should be done). Then installing from a normal user a plug-in is not always successful. Although this differs from '3.3', '3.4' and '3.5'.
Verhagen
@Amir As some version support (automaticly) installing of user specific plug-ins in the users home directory (under '~/.eclipse/org.eclipse.platform_3.5.0_#########'). This again does not always work, maybe this has to do with for which version of Eclipse the plug-in was developed?
Verhagen
@Verhagen The instructions I have for installing the plugin is to extract plugin/features folders into my eclipse install. I did that in the config folder and nothing changed. This worked on my personal Windows XP machine at home.
Amir Rachum
how is the central Eclipse installed? Root? probably? What if you try to install a new plugin? Does it allow so? Could you maybe try to do so (create smaal plugin to test this). If it can be done (on a eclipse you started from your own user account. The plug-in should go somewhere in the '~/.eclipse/org.eclipse.platform_3.5.0_#########' of you unix account.
Verhagen
Didn't work for me yet, but IMHO this was the closest answer and I think Verhagen deserves the rep for the effort. Thanks!
Amir Rachum
+2  A: 

Depends on the version of Eclipse.

I find it very very strange that you are all sharing the same instance of Eclipse from the network rather than having a local installation.

If that is indeed the case, the dirtiest bypass is to have your plugin sources in the workspace, create an Eclipse plugin development project, have your plugin enabled in that runtime project, and then use the runtime eclipse instance rather than the original as your primary.

Uri
A: 

i'd go for the simplest choice:

  1. install another Eclipse, but the same version.

  2. install all features that the shared Eclipse has (you may use the same update sites as the shared one, and update).
    verify that your project opens correctly.

  3. install your own plugin.
    again, verify that your project opens correctly.

  4. verify that your project opens correctly with the shared instance.

IMHO, any config hack will get into trouble some day.

Asaf
+1  A: 

It's not strange at all to have such a setup (eg we had this at our university, and the disk space for each user was not large enough to install your own version of Eclipse there.)

An easy way to achieve this is the dropins folder (I assume you're using Eclipse 3.5 Galileo):

  1. Create a dropins folder (eg on Linux/Mac: "~/dropins", on Windows: "C:\dropins")
  2. Start Eclipse with the following command line parameter:

-Dorg.eclipse.equinox.p2.reconciler.dropins.directory="C:\dropins"

Now just start it from the command line like this (cd to your eclipse installation first, then):

On Linux/Mac:

./eclipse -Dorg.eclipse.equinox.p2.reconciler.dropins.directory="~/dropins"

On Windows:

eclipse.exe -Dorg.eclipse.equinox.p2.reconciler.dropins.directory="C:\dropins"

On Windows, you can also do this by right-clicking the Eclipse icon, and add the command line parameter in the dialog.

Chris Lercher