New files in Flash Builder and code hinting/coloring

Ok, anyone with more than one day of Flex Builder/Flash Builder experience can ignore this and laugh at me (discretely). I’ve run into this a few times before and as I always tend to forget why I thought maybe a blog entry would help seal it in my memory.

I was working on my cfObjective demo code today (the last demo, I swear, I’m ready to present, honest) and ran into something odd. I had added a few files to my project and the color coding was broken. What was weird is that it was only broken for script blocks. I saw color coding just fine for mxml tags. I’d type mx:Script though and not only not get the automatic C Data block but I also didn’t get any coloring or code completion.

Turns out the reason was simple. When you make a new file in Flex/Flash Builder, you are given a large set of options:

You may laugh - but I find that a bit intimating. I generally know what I want, but I’d rather just select “File” and then start coding. Turns out, when you do that, the IDE isn’t quite sure how to handle it. I guess that’s pretty fair if you think about it.

It finally occurred to me to simply close the file and reopen it. As soon as I did, all the code hinting and coloring worked fine.

This also falls into the “Duh” category, but I was pretty annoyed by the auto-identation Flash Builder used. It just didn’t match my style. It never occurred to me to simply go into the preferences and disable it. In fact, there is an entire section just on Indentation.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Comments