Earlier this week I discovered a keyboard shortcut that will crash Eclipse on Mac OS X Leopard. There’s a fix for the problem so I wanted to blog the solution for any and all that might stumble across this issue in the future.
To be clear, as far as I can tell the bug only affects Eclipse 3.3 running on Leopard, although you may want to test your Mac environment just to be sure.
The bug shows itself when you use the Open Resource shortcut (CMD+SHIFT+R) or the Open Class (CMD+SHIFT+T) shortcut, once you’ve selected your file or class Eclipse will crash. At first I thought that this was a Flex Builder bug, Adobe even has a bug filed for this exact problem but after more research it turns out that the bug is an SWT issue in Eclipse.
Thankfully Eclipse has already resolved this issue in the 3.3.2 stream build so if this is an issue for you then download the 3.3.2 stream build and update your existing Eclipse installation. I’ve tested Flex Builder 3.0 plugin final on 3.3.2 and it appears to run without issue. If you’re running Flex Builder 3.0 standalone then you’re out of luck, download the plugin.
Eclipse Fast View is a very handy feature that enables docking and undocking of Eclipse views. If you consistently find yourself looking for more room in Eclipse then Fast View is for you. The screencast after the jump demonstrates Fast View in action. Read more…
If your web server refuses to serve-up your shiny new AIR app, the problem just might be the MIME type or lack there of. Mike Chambers posted on this topic awhile back and I bumped into it again yesterday (how quickly we forget!) so I thought I’d blog it for my own sake and yours.
The correct MIME type for AIR apps is:
application/vnd.adobe.air-application-installer-package+zip (sheew that’s a mouthful!)
Consult the documentation of your preffered web server for instructions on setting MIME types.
In this post I’ll explain how to assign an Eclipse editor to a specific file by name.
Why is this necessary? This blog is running on Machblog Beta 2. Machblog obfuscates the the MachII configuration file by adding a .cfm extension to the file, so it ends-up being mach-ii.xml.cfm. This technique is highly effective, simple and widely accepted. Perfect right? Almost, there’s a fly in the ointment and you’ll see it when you attempt to edit the file in Eclipse.
Until today editing an XML file disguised as a CFM file in Eclipse was a little tricky because Eclipse (like most IDE’s) maps the file extension to the editor, so in this case Eclipse tries to use CFEclipse to edit an XML file. The result (since CFEclipse doesn’t do XML) is a plain old editor with no syntax highlighting and no code insight etc. etc.
Now admittedly this is not a huge problem, more of an annoyance really. Enough of one that today I got to thinking there must be a way, and there is.
In the Eclipse file association editor you can map an entire file name to an editor. So in my case I mapped mach-ii.xml.cfm to the Aptana XML Editor. Re-opened the file and whalla it worked! I tried mapping *.xml.cfm but that didn’t work for some reason. Click on the pic above and you’ll get the gist of what I did.
Enjoy!
[Update]
Brian Kotek Posted the following comment on 3/1/07
“You should also just be able to add another editor to the associated editors list for .cfm files, and then when you open the file instead of double clicking it, right click, choose open with, and choose the XML editor.”