Tuesday, April 26, 2011

content assist issue in Flash Builder eclipse plugin

I had some rough time trying to get standalone flash builder version 4 to work with Java code and Tomcat. After hours of scratching my head, I gave up. It just shouldn't be this hard. But if you are adventurous enough to give it a try, here is a great tutorial you may want to read first: http://flashworks.wordpress.com/2011/03/25/java-flex-blazeds-project-solving-issues-with-flash-builder-4-stand-alone/

So my next logical step is to install flash builder plugin to an eclipse installation. I know eclipse pretty well so the java/maven/wtp/tomcat parts went smooth without any drama. Flash builder plugin installed fine. And I was able to import flex projects and tweak the class path to make it build. The only thing missing in this setup is content assist, where I don't get code complete, API suggestions, or open declaration (F3) etc.

After two days of suffering without content assist and numerous googling, I finally found this great discussion which gave me a pointer to get it fixed. :)

The culprit: Flash Builder doesn't work well with m2eclipse. Importing flex project as maven project confused the crap out of flash builder.
So what I end up doing is to start with clean project checkout, then in eclipse, create a new flex project with the same name as the checked out project, uncheck the "default project location" and point it to where the project is checked out. then tweak the src folder and build path to make the new project look just like "we imported it from the SCM checkout". After that content assist works like a charm.

Monday, March 14, 2011

NavigableMap in JDK6

JDK6 introduced NavigableMap and retro-fitted TreeMap to implement this interface. I was a bit confused at first about ceilingKey vs higherKey and floorKey vs lowerKey. It turns out that floor and ceiling operations can return equal entries, while higher and lower operations must be strictly less than or greater than.

Nice features. I can definitely find some uses for them. :)