As I got introduced to Flex world some times back, I started using Flex Builder as an IDE, a product from Adobe on top of Eclipse platform. I assumed that it’ll provide all the basic features available in Eclipse for Java, but I was wrong. Flex Builder is in nascent phase from tooling point of view. Just to refresh your memories, Flex Builder lacks some of the following Eclipse features.
I did some research on internet and found some options to resolve these problems.
Eclipse Monkey currently is a part of Eclipse Dash project. It is proposed to be split from Dash to make it full-fledged project in itself. It’s a very powerful tool. Instead of extending Eclipse platform through creating plugins, you can extend Eclipse functionality through some scripting. Eclipse Monkey uses the Mozilla Rhino Javascript interpreter at its core. You guessed it right, scripting couldn’t have been easier for Eclipse than the way it does with Monkey using Javascript.
Eclipse Monkey can be used to create getters and setters in ActionScript in automated fashion. You may want to take a look on a ~eokyere blog to see how Monkey is used to create getters and setters. As I searched some more available Monkey scripting resources, I found more examples and one of them satisfied my problem no 2 also.
If you have already downloaded and executed Monkey scripts on your Eclipse platform, you may have realized how powerful this Scripting tool is for Eclipse. You can create a lot of scripting based tools to enhance productivity without creating specialized plugin.
For rest of the problems mentioned above, I tried many options but somehow they didn’t provide desired outcome. However one ActionScript based editor FDT comes very close. It supports most of features mentioned in the list and is certainly a better choice from ActionScript editor point of view. However it’s not free and sometimes I wonder why somebody will invest yet another €599 to buy this tool if he already has Flex Builder. Flex Builder is a defacto tool for Flex based development whereas FDT mainly focuses on ActionScript based programming. FDT doesn’t support MXML yet.
No wonder that we come to conclude that Flex Builder has a lot to catch up in terms of enhancing its tooling for Flex developers. However the tools I just mentioned come a bit close in providing the required support.
Tags: Eclipse, Flex
Filed under General | 7 Comments »
You can have a look at FlashDevelop, it is free and provides many functionality. Coolest one which I like is sol file editor to edit content of AMF.
I’m having a hard time getting Monkey scripts to work. When I try to run “generate properties”, I get a NullPointerException on line 13:
var source = editor.source;
Which seems to indicate that editors.activeEditor is null.
Is it supposed to work with Eclipse 3.3.2 and Flex Builder plugin 3.0.2?
Hi Sebastien,
I am using Eclipse 3.3.0 and FlexBuilder plugin 3.0.2 and it works perfectly fine for me. I get this error when I try to generate properties in MXML. Somehow Monkey doesn’t work for MXML files. However for ActionScript files it works perfectly OK.
One mistake I did in the beginning, one needs to select the properties in the editor before running the script. Otherwise it throws NullPinterException at “for (var i = 0, n = result.length; i < n; ++i)” line.
Hi Shrikant,
Nice post. I am getting the same NPE you mentioned in your last comment, even if I highlight the property or the entire line of code.
eg private var _desc : String;
What exactly do you mean by “select the properties in the editor before running the script”?
I get the NPE in ActionScript files too. And not the “editors.activeEditor” is null but the “source” property of the active editor is.
@Ankur
“select the properties in the editor before running the script” means highlight the fields of ActionScript class you want to run the script on and then run the script.
I think it needs to be plainly said that the NPE occurs in files that end in .mxml and but it does work in .as files.
MyFrontPage.mxml => NPE occurs
MyDataProvider.as => Works