While in general I’m a pretty laid back kind of guy. Some things just plain annoy me – my wife keeps telling me it’s my ‘OCD’, not that I have OCD, but I am quite anal about how certain things should work or be used. So you can imagine how annoying it was for me to have custom Flash Builder workspaces, but not be able to remove the default one it creates in the Documents folder on my Mac, (I don’t like any applications dumping configuration information in my Documents folder – it’s for DOCUMENTS GODDAMMIT :p. Yes Microsoft, I’m looking at you too.).
So back to the case in point. The reason the default Flash Builder directory can’t be removed is because Adobe saw fit to put linked configuration settings in this folder that Flash Builder uses; as you can see below.
Now if you find it both annoying and a trifle odd, like I did, that this information wasn’t placed in the Application Support folder, or the Library folder at the very least. And would like to permanently remove them from your Documents folder then read on. Before we continue I just want to point out that this is obviously a solution for OS X, but should work for Windows (if Adobe have done the same thing of creating a default workspace within your user space and added the cascaded configuration to it, although the paths will be different of course :p).
Editing Flash Builder Configurations
The first thing you’ll need to do is edit the configuration files that Flash Builder loads up each time it is opened. I say configuration files, actually there is only one configuration files but it is duplicated within another folder in the Flash Builder application directory – hence editing 2 files.
You’ll find these inside the Flash Builder application folder (Applications/Adobe Flash Builder 4.6/). The files you’ll need to alter are marked in the image to the right.
Before we start hacking around in Flash Builder’s application directory you need to do some house keeping. The first thing to do is MAKE A COPY OF BOTH CONFIG.INI FILES ON YOUR DESKTOP. I know, a bit over aggressive, but if you muck the next steps up you’ll end up with a broken copy of Flash Builder – You have been warned!
Secondly, you’ll need to create a new directory within your home directory that’ll contain the configuration information that is currently in the ~/Documents/Adobe Flash Builder 4.6/ directory, in a folder called cascaded. As an example I have a directory called Development in the root of my home directory and within there I have various sub-folders for Resources, Repos, Workspaces etc. So I have placed my cascaded folder a sub-folder in there. You don’t have to copy me, but put it somewhere meaningful :)
Final point, make sure you create the folder within your home folder, not in some funky application level or hidden system folder as Flash Builder runs as you and if you need to SUDO, or authenticate to access, or create the folder you’ve just placed the configuration information in, Flash Builder won’t run. With all that out of the way, let’s get updating our Flash Builder configuration.
Select and open one of them (it doesn’t matter which as they are identical), and follow the steps below:
Below is a copy of my config.ini file so you can see where I’ve made my edits (I’ve put comments around lines that need changing):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser #Fri Jul 30 17:13:05 PDT 2010 org.eclipse.update.reconcile=false eclipse.p2.profile=epp.package.java #### Change This #### email@example.com/Development/Resources/Flex/Linkages/FB4.6 #### #### osgi.framework=file\:plugins/org.eclipse.osgi_3.7.0.v20110613.jar equinox.use.ds=true eclipse.buildId=I20100608-0911 osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.200.v20110502-1955.jar@1\:start org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info eclipse.product=com.adobe.flexbuilder.standalone.producte36 osgi.framework.extensions= osgi.bundles.defaultStartLevel=4 eclipse.application=com.adobe.flexbuilder.standalone.FlashBuilderApplication firstname.lastname@example.org/../../../p2/ #### Change This #### email@example.com/Development/Resources/Flex/Linkages/FB4.6/cascaded/335153/configuration #### #### osgi.shared.configuration.area=file\:configuration osgi.configuration.cascaded=true?
When you save the files you’ll more than likely need to authenticate the save – this is because you’re editing a file that’s not owned by you – it’s not a problem, just type your password in and click OK to apply the changes. Now that’s all sorted fire up Flash Builder.
The Acid Test
Now that both config.ini files have been updated you need to move the contents of the Adobe Flash Builder 4.6 folder (i.e the folder called cascaded), to the new directory you added in your config.ini file. If you have projects stored in this folder too, you’ll need to move them to a new location (this process is out of scope for this article but a quick Google will provide the relevant answer should you need them). Once you have moved all of the content out of the ~/Documents/Adobe Flash Builder 4.6 folder you are safe to delete it.
Now if you have your Documents directory open when Flash Builder starts up you may notice a strange thing. Flash Builder will more than likely re-create the folder you just deleted. However this time it will be empty.
If it recreates the cascaded folder then you’ve missed something out when updating the config.ini files, so go back and check them again.
There are a couple of reasons why it has recreated that folder again. First up is that you still have it set as your default workspace. If so create a new one, switch to it and restart Flash Builder. The second, more likely reason, is that you still have a reference to it in your Flash Builder preferences. This entry is created the first time Flash Builder runs as it is the default workspace
Delete this entry from Flash Builder Preferences, quit Flash Builder. Delete the directory in your Documents folder again and restart Flash Builder. This time it should behave as expected and no folder will be created.
Perfect, the world is at one again :D