One thing that has always bugged me is that it isn’t particularly clear how you reconnect Flex Builder (the plugin) to a new fresh installation of eclipse, when eclipse “goes bad”.
Sure, you can uninstall Flex Builder and reinstall it after you’ve updated eclipse. To my mind that is just too time consuming; so with that in mind I set about having a hunt within my eclipse folder to try and work out what I need to add / change in a fresh eclipse install to re-link the Flex Builder plugin.
If you want to see how I got on read on…
Thanks to Sean Corfield there is a quicker way to update a new installation. All you need to do is add the Flex Builder Plugin update site that is located in your Flex Builder plugin installation folder. For example mine is /Applications/Adobe Flex Builder 3 Plug-in/com.adobe.flexbuilder.update.site.
I had seen this folder in the directory, but assumed it was used to update the plugin not the eclipse installation that was utilizing it. Doh! :p Thanks again Sean :)
Feel free to read on though if you want to know how to do it manually :p
The first thing you’ll have probably noticed is that when you install Flex Builder as a plugin of eclipse, is that a new .jar file (startup_fb.jar) is placed within the root of your eclipse folder. Personally I don’t really have much idea what this .jar does, but given the fact it’s called startup_fb it’s pretty likely it’s used to start the Flex Builder initialization first time or every time eclipse is run.
The next addition that Flex Builder makes to your eclipse install is that it places a file that links to the Flex Builder plugin installation folder in a folder called links. The file itself is called com.adobe.flexbuilder.feature.core.osx.link on OS X and com.adobe.flexbuilder.feature.core.link on Windows, but it is just a plain text file – as it happens mine points to /Applications/Adobe Flex Builder 3 Plug-in (as I’m on a Mac).
Now here is where the digging comes in. If you just copy these two files in to your fresh eclipse install nothing will happen. Not a sausage, nada. So first call of action was to look through the various folders in the eclipse installation to see if there are any com.adobe.xxx packages within them. Surprisingly there aren’t.
So after a bit of logical thinking I started to hunt through the main configuration file for eclipse. It was here that I finally got a break-thru. It appears that there is a folder called org.eclipse.equinox.simpleconfigurator that contains a file called bundle.info and it is in here that I finally found what I was looking for. As you can see from the image below, this file holds the bundle references to amongst other things all of the Flex Builder files.
With this final pieces of the jigsaw in place I was finally able to reconnect Flex Builder to a fresh installation of eclipse, and if you want to be able to do it as well here are the actual steps.
- Install a fresh copy of eclipse, but don’t delete the old version yet. (I called mine eclipse-new, you can rename it at the end)
- Copy start_fb.jar to the root of your new eclipse installation
- Copy the Flex Builder link file com.adobe.flexbuilder.feature.core.osx.link if you’re on OS X, or com.adobe.flexbuilder.feature.core.link if you’re on Windows, to the ‘links’ folder in the root of your new eclipse installation (If you are using Ganymede – 3.4 or greater you’ll need to create this folder)
- Open up the bundles.info file located in you old eclipse installation/configuration/org.eclipse.equinox.simpleconfigurator in a text editor
- Copy all of the Flex Builder related entries – use the file reference as a guide as not all of the packages have Flex in the name
- Now open up the same file, but in your new installation and paste those entries at the top and save it
- Start up your new clean eclipse install and bask in your 1337 s1<i||z :p
- If all went to plan you can now close eclipse, delete the old version and rename the new one – job done.
That’s pretty much it. If this seems a bit overly complex, don’t worry – I’m putting the final touches to a screencast that you can use to walk you through this process should you ever need to do it :)