This is something I’ve noticed in FlashDevelop as well, but when I heard Flash Builder “Burrito” came out and had some neat code-completion features binded to the CTRL+1 key, I had to try it!

One thing where all ActionScripting IDEs have failed to impress me though, is being able to detect which instance object I am “code-completing” on.

For example:

class Dog {
  public function Dog() {
   //...
 } 
}

class Whistle {
  public var dog:Dog;
  public var offender:Person;

  public function Whistle() {
    //...
  }
  public function blow():void {
    var hasFound:Boolean = dog.chase( offender );  //Method not defined (yet!)
  }
}

If you were “speed coding” and heavily relied on auto-completion, such as the “dog.chase” method shown here used in the Whistle class – you wouldn’t want to have to go back to the Dog class file just to create a template method.

Ideally, in a wonderful intuitive world (and from a Developer’s perspective, this looks like it’d be relatively easy for Adobe to implement), these newly created methods should be able to detect which instance the method should be generated on AND NOT just assume to create the method on the working class (Whistle) itself. It simply makes no sense the way it currently works.

All I’m asking, make that CTRL+1 feature a bit smarter please! Look at whats before the method-name:
– Is there a period? No, alright, declare it in this class;
– There is a period? Oh, okay let’s find the Class this method needs to be implemented in;
– Oh there was arguments supplied with that too? Okay, let’s assume these are the argument data-types at all times (just call’em arg0:, arg1:, and so forth);
– Oh the function should return a value (found assignment or jQuery-like chained usage)? Then put the return datatype and create a “return null” for the time being at the end of the method definition;

To result this:

class Dog {
  public function Dog() {
   //...
  }
  
  public function chase( pPerson:Person ):Boolean {
    // TODO: Insert code logic here...
    return null;
  }
}

If anyone else agrees to this feature, please comment / like it and we could push this into the Adobe Wishlist for Flash Builder.