17

Reconnecting Flex Builder Plug-in To Eclipse

Flex IconOne 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…

Update

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 :)

Mike Jones

17 Comments

  1. Nice write up!

    FYI – Looks like the file “com.adobe.flexbuilder.feature.core.osx.link” is called just “com.adobe.flexbuilder.feature.core.link” in Windows.

  2. @Dan, thanks for the heads up on the Windows file name :D. In my haste to post it up I forgot to check the Windows version of the file :p

  3. Mike,

    Excellent post. But — in attempting to follow your directions, I discovered that in my old Eclipse installation (3.3, running on Leopard), there is no org.eclipse.equinox.simpleconfigurator directory. And thus no “bundles.info.”

    The directories and files exist in the 3.4 version I’ve downloaded, but not in the 3.3 version. Yet Flex Builder is running happily inside 3.3, as it has for about a year.

    Any ideas where the bundle info might be hiding?

  4. I’m curious as to why you uninstall FB from your old Eclipse before installing it in the new one?

    Once you have an install of FB, you can add it as a local update site to any new Eclipse install.

    In Software Updates, add a local site pointing to:

    /Applications/Adobe Flex Builder 3 Plug-in/com.adobe.flexbuilder.update.site

    Then just install the plugin using Eclipse’s software update process. This is pretty quick.

    For Eclipse updates, it’s pretty quick to disable the plugin via the Software Updates > Installed Software dialog and then reinstall it as a local site after the update finishes. That’s certainly easier than messing around copying files manually.

  5. @Sean, haha I’d never tried that until you mentioned it :p. Works a treat, I assumed it was to do with updating the plugin itself and not the eclipse installation it was associated with.

    Thanks for that – I’ll add an update to the post :D

  6. @Tom, please see Sean’s comment above. It appears there is a really simple solution to reconnecting the plugin as Sean indicates, so this should work on version 3.3 as well as 3.4 and beyond.

  7. Hi,
    I’m trying to setup my new Eclipse Galileo (3.5) using the Sean’s method but I got this error:
    Cannot complete the install because one or more required items could not be found.
    To: com.adobe.flexbuilder.debug.e32 [3.0.214193]
    From: Adobe Flex Builder Core Feature 3.0.214193 (com.adobe.flexbuilder.feature.core.feature.group 3.0.214193)
    Missing requirement: Flex Debug Plug-in for Eclipse 3.2 3.0.214193 (com.adobe.flexbuilder.debug.e32 3.0.214193) requires ‘bundle org.eclipse.debug.ui [3.2.0,3.3.0)’ but it could not be found

    What’s wrong?
    It seems that the new package
    org.eclipse.debug.ui_3.5.0.v20090603
    isn’t backward compatible with the oldest 3.2.0, 3.3.0
    Thanks in advance

  8. Luigi, if I recall correctly Flex Builder isn’t compatible with Eclipse 3.5, some have got it to run, I’ve not had much success – I get a lot of errors similar to yours.

  9. There is a simpler way to add flexbuilder to existing eclipse, it takes 5 minutes
    from within Eclipse click help -> software updates -> Manage Configuration

    3. Click Add an Extension Location and select (flex_builder_install_location/eclipse.

    restart eclipse

  10. Thank you so much! I was trying to get Flex Builder to run with PDT and all I could find were all-in-one downloads, so this did just the trick. Plus it allowed me to start anew with my Eclipse install… as messy as my last one got it was a nice refresher. Again, thank you for all your digging.

  11. Hi All,
    Can i integrate trail version of Flex Builder3 with eclipse to create a java based web application.
    thanks in advance..
    Sree.

Comments are closed.