Cross-Platform Single-Instance IDE Setup - eclipse

I like to carry software around with me on a USB flash drive. I also like to work in both Windows and Linux. Finally, I like to develop software using powerful tools.
Bringing these three things together, I want to be able to carry an IDE around with me. My favorite choice is Eclipse.
So, I tried to get an Eclipse install working on a thumb drive. Not surprisingly, it's just fine if I pack in a JDK. But Eclipse without plugins just doesn't do it for me. After installing my plugins of choice, I had a hefty 300ish MBs of data.
Then I realized that I'd only installed for Linux. And that I was going to have to duplicate everything to get a Windows install. That's not good.
I've searched the web. I found a guide on creating .link files which looks like a hack from the early 80s. I found documentation on the new Eclipse p2 provisioning which I couldn't even understand. I checked Pulse, and they don't support Helios yet.
I remember in old Eclipse days you could just install a plugin to an alternate directory, and share that dir across different Eclipse installs. Today, I couldn't manage to find anything of the sort.
I did manage to get Netbeans up and working properly in a cross-platform manner in around 30 minutes. But I prefer Eclipse.
Could anyone give me a hand? What I'm looking for is:
One install of the platform-independent portions of the Eclipse internals
One install of each plugin I desire
The ability to run this unified Eclipse from both Linux and Windows
I know I'll need a JVM for each platform. I know I'll also need an SWT lib and launcher for each OS. That's fine.

You need to have separate Eclipse installations for each platform and a shared plugins directory for both installations. There are many questions on the subject on StackOverflow. For example, see this comprehensive answer.
Start with the standard Eclipse packages. Complete your shared dropins setup. Once you are up and running, you get probably move plugins from each standard installation to the shared dropins directory to save space (for example, JDT).

Related

How can I automate installing eclipse with the same plugins and settings on multiple computers?

I want to find a way to quickly install eclipse with the same plugins and settings on several different Windows 7 computers. How could I go about doing this?
There are no easy solutions, but the process itself is clearly automateable. One solution would be the use of the p2 director application. You have to download a single director installation - one is available from the Buckminster download page, but from any Eclipse installation you can access this director application and use it to download all required software.
An alternative is the Oomph project, where you can define a model that describes what features do you want to install (among other things, such as default properties, source code to checkout), and it manages the download and installation automatically; and can also update the installation as well. One of my collegues like Oomph very much, but to tell the truth, my personal experience was that it was a bit raw (a few month ago).

Deleting every eclipse plugin in Galileo

My eclipse runs horribly slow because I have thousands of plugins installed on it. I spoke with another friend who uses eclipse but he has none. I feel like none of these are necessary and I didn't even install so many. I have thousands of plugins and I tried reinstaling eclipse but I need to find a way to remove every single eclipse plugin.
Attempting to delete a plugin manually takes up to 5 minutes per plugin, so it could take me months or years before actually deleting all of these by hand.
Is there a feature in eclipse to delete all the plugins? Also I'm using WINDOWS XP
First, you need to understand that virtually everything in Eclipse is a plugin. Eclipse has a very small core runtime (Equinox) that loads all features from plugins. You can't just "delete every plugin" as doing so would leave you with nothing.
Also, just because a plugin is installed does not mean that it is always loaded or taking up resources. Eclipse uses a "lazy loading" architecture that will only load a plugin when some feature that it provides is actually invoked. Some plugins are probably written poorly in such a way that they are loaded too aggressively, but that would be the rare exception. So, in general, having lots of plugins is not a problem for performance.
If you do have a plugin that you want to remove, you can not just delete it from the plugins folder - as you've seen that will screw up your Eclipse installation. Don't do that.
One way to manage the features that you have installed, including installing ones that are able to be uninstalled, is to open the About dialog, then click the Installation Details button. There you'll be presented with a list of features that have been installed; you can select a feature and if it's possible to uninstall it the Uninstall... button will be enabled.
Often it's one bad third-party plugin/feature (not something from eclipse.org) that causes an Eclipse installation to have problems; try to find what it might be by process of elimination (uninstall all third-party plugins that you might have installed since your Eclipse was fresh).
Finally, as a last resort, it is trivial to remove Eclipse completely (just delete it from your file system) and re-install it fresh.
Having said all that, performance problems are usually due to an underpowered machine. What kind of processort do you have? How much RAM does your system have available after Windows boots up? Have you specified memory settings in eclipse.ini?

Move Plugins between different Eclipse versions

I need to install several plugins to an eclipse that is running on a remote 64bit Linux machine.
I tried copying the neccesary plugins to the plugins and feature folder on the remote machine but it did not seem to work.
The approach I wanted to try out now was setting up a new Eclipse installation with all plugins and replacing the whole eclipse folder.
But as I am doing this I realized that I have to use a 32 bit Linux and Eclipse. Is it possible to install 32bit Eclipse and just move the plugins and features to the remote machine?
Do I need to consider other things?
Can you recommend any other approach that would help me?
UPDATE:
The problem is that I cannot just start eclipse on the remote machine. I can access it via ssh but not run eclipse and install plugins via the wizards.
I also have no 64bit linux to prepare a complete eclipse that I can simply copy.
So what I meant is that I have to prepare either an eclipse installation or maybe just plugin folder and move that from my 32bit architecture to the 64bit one.
I can download the current eclipse folder but I cannot run it. When I try to start it with ubuntu nothing happens. I believe it is because its a 64bit version and I got 32 bit architecture.
Don't do this. Not only are there are a number of plugins with native-compiled fragments (different for 32-bit vs 64-bit), but in recent versions, Eclipse will not even register features and plugins that are simply dropped in. You should install plugins explicitly unless you are moving the entire installation between machines with compatible architectures.
You can't run a 64bit binary on a 32bit system without some kind of virtualization software that does a complete CPU emulation. VMWare, VirtualPC, etc... don't do this. They virtualize the system, but not the CPU.
The other way around: a 32bit binary on a 64bit cpu, is generally possible, if the OS (and processor) supports such things.
I think this is feasible.
The architecture should not be the problem. Unless the plugins contain DLLs or .so libraries invoked through JNI but there are very few examples (swt is one example but there are very few of them).
As a matter of fact, the reason why you have OS/arch/GUI specific versions of eclipse is not the java code but the native launcher (eclipse.exe on windows and SWT), all the rest can go bck and forth from one machine to the other, regardless of the arch, the os or the wondows manager.
However, dropping jars in the plugin directory of eclipse is not the recommended way of installing plugins any more (since 3.3 ?). It might work but there is no guarantee.
To install the missing plugins you should download them from eclipse itself (help => install new software...). If you tell us the specific plugins you have problem with, we might be able to help you more precisely.
The best way to go forward is to list all the plugins on the source machine (either from eclipse (help => about) and look at names having specific hints at arch/os/gui. All these cannot be copied over. All the rest should be safe.
As I said, beware of swt. Subclipse has a JNI dependent configuration if you decide to use JavaHL. And there are also "false" plugins such as xmlSpy etc who are noting more than JNI adapters but these are not mainstream.

Multiple installations of Eclipse on Mac OSX

I use Eclipse for everything. Python, Django, GWT, Android... But when you install all the plugins, Eclipse becomes very slow.
Is there a way that I can set it up so that there are two or more icons for Eclipse in the Applications directory, each for specific task?
Thanks
Developing in Eclipse for the past few years, I've found it's just easier to have several copies of the Eclipse directory, one for each kind of development I do (Android, java app, Grails). It's sometimes cumbersome installing new versions of Eclipse or new versions of the common plugins (Subclipse, etc), but it does make Eclipse start-up MUCH faster.
Simply create another install directory for Eclipse, with another shortcut to it, and only install the plugins you need for that dev environment. I use a different workspace for each one, though I'm not sure that's necessary, as long as you're using the same version of Eclipse for each install.

How do you manage your Eclipse installation?

How do you manage your Eclipse installation, i.e. the basic installation, plug-ins and workspace settings with regard to consistent updates (including major ones, 3.5 => 3.6) and usage on two or more computers (desktop + notebook).
My current setup is to basically managing the installation on several installations in parallel, i.e. manually add new plug-ins I installed on one to the other, and when I haven't used one in a long time to copy the whole directory from one location to the other.
For updates I usually run it about once a month to get the latest versions, major updates I do manually by downloading the basic distribution and re-installing all the plug-ins in the matching version for the new major Eclipse version.
However, this approach has some drawbacks:
time intensive
update inconsistencies (Update sites change location, update doesn't work because of some version inconsistency between plug-ins that requires a lot of manual fixing, etc) (this has gotten better with 3.5 but still bugs me)
no "global" update site, I manually have to manage several locations
I tried alternatives like Yoxos for configuration management but there plug-ins were missing and / or not that well tested together as I expected.
I took a look at Idea as an IDE, the one thing I really loved was the update management: centralized and 90% of the functionality I'd be using are provided as a core that is tested and updated as one.
Thus the question: How do you manage your Eclipse installations and deal with updates?
From my experience with other Eclipse users they have at least the same problem with updates, but I haven't heard of a solution yet.
I've heard good things from other developers about Google's Workspace Mechanic.
That's what they use inside Google to manage Eclipse environments across teams.
It was open sourced in May 2010, and you may find more information in the blog post.
Note that the Workspace Mechanic does not yet manage plug-in installations (see discussion thread): it remembers "plugin preferences", but installing the plug-in themselves is not yet supported.
I also met such inconvenience. I always need install similar development tools(such as Mylyn, SVN, CDT, Clearcase) in different eclipse instances on different hosts(Windows, Linux).
Update:
Eclipse has officially offered a feature to help migrating what you have installed since Eclipse Indigo.
And it also supports install existing plug-ins from another instance.
My strategy is as follows:
When a new Eclipse version comes out, I install it fresh and set up a fresh workspace. Then, I install all the minimal plugins I need manually, such as Subversion and M2Eclipse. Also, I export the preferences (e.g. code formatting) to an external file and reimport it in the new Eclipse installation.
I always import existing projects into the workspace. I can use my workspaces (or better, my SVN working copy) from multiple Eclipse versions if necessary.
I only occassionally install additional Eclipse plugins and try to move all other toolchain parts into the build environment (e.g. Hudson with several slaves, automated builds and release scripts, Sonar for code-quality reports etc.)
I try to minimize the complexity of the development setup on my local developer machine.
I only have one installations but I have multiple workspaces.
I synchronize the workspace setting by copying the content of <workspace_dir>/.metadata/.plugins/org.eclipse.core.runtime/.settings directory.
I also use the bookmarks to centralized to save the update-sites relevant for my work. This can act as a global update site. To import/export some bookmarks, go in Preferences -> Install/Update -> Available software sites. When a new Eclipse version comes out (once a year), I only have to install the plugins using the bookmarks.