• Home
  • RSS Feed
  • Register
  • Log in

Productive Tools on top of Flex Builder 3
Posted by ShriKant Vashishtha at around evening time: November 16th, 2008

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.

  1. Support for generating getters-setters automatically.
  2. Support of templates for creating constants.
  3. Organize imports. If some type has not been included already, organize-import should do that.
  4. Better refactoring support. Right now refactoring is just limited to renaming and you start missing real sense of refactoring in terms of creating new methods etc.
  5. Sometimes you may want to create your own templates for creating ASDoc instead of doing it from the scratch all the time
  6. Formatting ActionScript/Flex files

I did some research on internet and found some options to resolve these problems.

Eclipse Monkey

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.

FDT ActionScript Editor

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.

  • Bookmark

Filed under Eclipse, Flex |



6 Responses to “Productive Tools on top of Flex Builder 3”



    Chetan Sachdev Says:
    Posted at: November 18, 2008 at 8:52 pm

    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.



    Sebastien Arbogast Says:
    Posted at: November 22, 2008 at 11:11 pm

    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?



    Shrikant Vashishtha Says:
    Posted at: November 23, 2008 at 10:36 am

    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.



    Ankur Says:
    Posted at: February 3, 2009 at 5:45 am

    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”?



    Laurenţiu Lozan Says:
    Posted at: February 4, 2009 at 4:33 pm

    I get the NPE in ActionScript files too. And not the “editors.activeEditor” is null but the “source” property of the active editor is.



    Shrikant Vashishtha Says:
    Posted at: March 3, 2009 at 6:50 am

    @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.



Leave a Reply

Click here to cancel reply.



Archives

  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008

Xebia Sites

  • Xebia Corporate
  • Xebia France
  • Xebia India

Categories

  • Java (233)
  • Agile (100)
  • General (50)
  • Performance (37)
  • Hibernate (35)
  • Podcast (31)
  • Testing (30)
  • Scrum (27)
  • Spring (24)
  • Project Management (22)
  • Architecture (22)
  • SOA (19)
  • Flex (17)
  • Maven (15)
  • Eclipse (14)
  • JPA (13)
  • Quality Assurance (12)
  • Groovy (12)
  • Articles (11)
  • Grails (11)

Tag Cloud

    OutOfMemoryError Xebia offshore offshoring Lean Agile Poppendieck distributed sutherland Closures Eclipse Seam Agile Awareness Workshop fitnesse Semantic Web JavaOne Ajax Groovy Testing Performance plugin Grails Introduction to Agile qcon Scrum IntelliJ Maven Hibernate SOA Java