ConstructorPlus - Eclipse code template

Don't know about you, but I get tired of adding new event listeners and handlers for ADDED_STAGE and REMOVED_FROM_STAGE events. Sure I can copy and paste from a previous class but often I've added additional lines of code in the handlers that are specific to that class. So if you're working with Eclipse and FDT, here's a little code template I've put together and called ConstructorPlus. It will add a constructor with event listeners and handlers for both the ADDED_STAGE and REMOVED_FROM_STAGE events.

To import the file, in Eclipse go to Window > Preferences > FDT > Editor > Templates. Click Import... select the file and hit Apply. Now when you create a new class, just use Content Assist (Ctrl+Space) select ConstructorPlus and voila! Enjoy.

More templates to come... 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

相关文章

Comments

December 6. 2008 23:48

Get those guys to tell you about my AbstractMovieClip class... it takes care of all of this for you.

Michael

Comments are closed