Nasty FDT bug – renaming a project with “refactoring” selected

The FDT plugin for Eclipse is a great piece of software (way way better than other flash plugins for Eclipse such as ASDT and FlexBuilder). I use it for all my AS2 flash development. However it has always had some issues with the location of the intrinsic core ActionScript classes in Flash 8 because they reside in a FP7 or FP8 directory (see forum post here and solution here).

While this solution solves the problem of FDT not recognising intrinsic classes such as Object and String, It doesn’t resolve a very nasty potential bug.

DON’T rename a project if you have selected “Refactoring” – “Flash Explorer File Operations” in the FDT preferences.

FDT preferences

What happens is it refactors all the intrinsic classes in the core library and renames all the classes in the FP7 and FP8 folders as if the folders were package names. E.g. Object becomes FP8.Object, String becomes FP8.String.

This causes FDT all kinds of problems, and Eclipse hangs while trying to refresh the workspace (while consuming 100% CPU).

This has happened to me on several occasions and it took me hours to work out the issue – i tried cleaning out all the cache and project metadata from eclipse, I tried reinstalling the FDT plugin, all with no success. I eventually set up a new workspace and imported a single project and eventually discovered what had happened.

The only solution is to copy over the core classes (C:\Program Files\Macromedia\Flash 8\en\First Run\Classes) with a fresh copy, or go through and re-edit each intrinsic class.

I’ve posted the bug here.

Leave a Reply