“Why did you take out refactoring from Flex Builder!?!”

Of all the wishlist posts I’ve seen for Flex Builder, the comment about removing refactoring was perhaps my favorite, if only for the irony. It managed to show up at the perfect time: I was heads down working on the code for reference detection (base technology for refactoring) and I had just broken everything. I was staring at my code, trying to figure out what on earth I could have done and then up pops this e-mail. Honestly, if it were that easy, if all I had to do was flip a bit to make refactoring magically work, I would have been on a beach in Mexico getting a tan. And believe me, I’d love to be on vacation.

The JDT (Eclipse’s Java development tool) and other IDEs like IntelliJ really have changed the game when it comes to expectations in the IDE space. Refactoring used to be one of those dreamt about features that languages like C++ make nearly impossible. Look at Visual Studio, the standard-bearer for C++ development: they still don’t provide refactoring support, rather they let third-parties do it. And now, a 1.0 product (really, Flex Builder 2 was a 1.0 product) is expected to provide functionality that even the biggest IDE’s don’t provide. I love competition and as a developer, I’m glad expectations have reached this point. But as an engineer working on language intelligence for a modern IDE, it’s a bit frustrating. But the future is bright for refactoring support in Builder, very bright.

ActionScript 3.0 is not C++ (thank god), and is much closer to Java in terms of class hierarchy. This means Flex Builder will be able to provide refactoring support in future versions. If all goes well (and so far it’s going very well), basic refactorings will be available in the next release of Flex Builder, code named Moxie. If you were lucky enough to be at 360Flex for either my presentation or Ted Patrick’s keynote, you saw a sneak-peak of this technology already.

Ok, here’s some dirt: I’m working on refactoring. I’m sure you’ve figured this out by now but I thought I would just come out and say it. Here’s what we’re supporting (right now) in Moxie:
-Find all References across files, projects and the workspace
-Mark Occurrences in files
-Rename
-Move type (classes and interfaces)

Of course, none of this is in stone and it could change at anytime. But I’d love to hear what you guys think about this so feel free to comment away!


About this entry