Friday, July 21, 2006
TODO/FIXME extension for Flex Builder 2
I finally found some time to finish work on an extension plugin for Flex Builder 2 which adds TODO/FIXME Task support similar to Eclipse's Java Development Tool JDT. This is the nice thing about Flex Builder 2: it's based on Eclipse so you're able to contribute to the product by adding your own extensions.
How it works: the plugin parses every MXML/AS file when opened and searches comments (both MXML and AS comments) for TODO and FIXME tokens (this search is case insensitive, so it also finds todo). The same action takes place after a file has been saved. If a token is found, a new Task gets generated with its message set to the comment and displayed in the Task View (To open Task View choose Window-->Other Views...-->Basic-->Tasks in Flex Builder 2 standalone and Window-->Show View-->Other-->Basic-->Tasks when running Flex Builder 2 as a plugin in Eclipse). Note: to really delete a Task you have to delete the comment - deleting a Task from the Task View does not kill the comment, so after you save the file the Task will reappear.
Installation: unzip the ZIP file and move the content of the plugins folder to the plugins folder of Flex Builder 2 / Eclipse. Then, close Flex Builder 2 / Eclipse and restart. The ZIP also contains a Test.mxml file which can be used to test the functionality.
Currently, the plugin only processes single-line comments but it ignores whitespaces between the start of a comment line and the TODO/FIXME token. I'm open for comments and enhancement requests, so please post them here.
Download Flex Builder 2 Task Plugin 1.0.0
Last but not least: Kudos to Stephen Milligan and Mike Morearty - they gave me some great hints on how to build this plugin. Thanks guys!
Dirk.
Comments
It doesn't work here. I: - closed Eclipse - dropped jar into plugins folder - rebooted Eclipse - opened the Task view - put a TODO in the file - saved the file - closed the file - reopened the file
...all to no avail. Any suggestions?
Posted By JesterXL / Posted At 7/21/06 3:19 PM
Nice work! I'm very visual, so I've been adding ridiculous amounts of #'s, &'s, %'s, and @'s in order to have visual cues of my todo stuff. Thanks!
For me, it successfully adds the indication mark, but it doesn't act as a go-to-line button.
Posted By James Lyon / Posted At 7/21/06 3:31 PM
James, what version are you using: Flex Builder standalone or the plugin version inside Eclipse?
I'm using the plugin version and clicking on a Task in the Task View jumps to the correct line here (if the file is already opened, if not the file gets opened but the line is not marked. I have to click on the Task again to jump to the marked line).
Dirk.
Posted By Dirk / Posted At 7/21/06 3:38 PM
Dirk -
Excellent work, this is most useful and works great for me. Thanks!
Posted By Jeff Tapper / Posted At 7/21/06 3:40 PM
After doing the -clean option you suggested, she now works. Thanks Dirk!
Posted By JesterXL / Posted At 7/21/06 3:41 PM
Great news Jesse! I just prepared for having all flexcoders members starting complaining that it does not work :)
Dirk.
Posted By Dirk / Posted At 7/21/06 3:46 PM
Works well for me. I've been waiting for something like this to appear. Nice job!
I'd vote for multiline comments, as well as having it open the file AND bring you to the right line, if possible. Both would be nice additions.
Would also be nice to have a custom area in Preferences to set search terms (TODO, FIXME, etc) and what they correspond to, like the inherent Eclipse Java one.
Easy for me to say... it's magic to me you got THIS working so well.
Posted By Todd / Posted At 7/21/06 7:10 PM
I'm using standalone. Clicking the tasks does bring me to the line number; What I'm accustomed to is clicking the colored mark next to the scrollbar (blue in this case) and having the document jump to the line number. But, I can work with using the Task panel to jump to lines :)
Posted By James Lyon / Posted At 7/21/06 8:03 PM
@Todd: multiline comments is on my TODO list (pun intended), preferences will also be added later.
@James: that's strange. I just tried it with standalone on a different machine and clicking on the blue indicators on the right side (I guess you mean those?) does make the document jump to the right line.
Dirk.
Posted By Dirk / Posted At 7/21/06 8:09 PM
Great job! Going to install it tomorrow! Now who is going to write the (painfully missing) Templates PlugIn?!
Posted By sascha/hdrs / Posted At 7/21/06 8:36 PM
Dirk, you're right. I guess FB just needed a restart.
Again, this is really helpful. Thanks!
Posted By James Lyon / Posted At 7/21/06 11:17 PM
Thanks a lot. It works great. It's actually helpfull ! Steph
Posted By Steph / Posted At 7/24/06 10:23 AM
Hmmm... not working for me (on 2 different machines).
Machine 1) Eclipse / MyEclipse / FB2 Plugin Machine 2) Eclipse / FB2 Plugin
I've tried both MXML and AS comments, restarted my eclipse instances, and cleaned my projects to no avail...
Short of restarting my computer...?
Brendan
Posted By Brendan Meutzner / Posted At 7/24/06 11:52 PM
That's awesome. I came across this when looking for TODO/FIXME support with Eclipse/MTASC cause I still code a fair bit of AS2.0.
Oh well, mental notes it is.
Posted By Mark Lapasa / Posted At 8/4/06 11:34 PM
It does not pick up the TODO in the comments below:
/** * Constructor * TODO asdf2 */ public function MyClass() { super(); }
Posted By Renaun Erickson / Posted At 8/9/06 11:00 PM
Any chance we could see the code.
I have been really inteested in seeing how an extension gets built for Eclipse.
All the tutorials that I have found are over my head for the time I have.
This seems like something simple and we could learn a lot from.
If not, do you have any refs that could get some one that DOES know java up to speed to build an extension that interacts with Flex builder on a simple level like this one does?
Peace, Mike
Posted By Michael Schmalle / Posted At 8/16/06 11:09 PM
Posted By Stacy Young / Posted At 8/21/06 6:04 PM
Hi Drik
I just download and did the instructions you said in your post, but also, Works fine, the only problem is I use the Flex Builder 2 Stand Alone with CFEclipse installed, it just work only with .cfm files, but I tried a lot with Actionscript and MXML and doesn't work. Did everything, include the JesseXL after reading his comment.
Can you point me out on this?
I put the plugin in the plugin directory, just clean up the project then tried to add some //fixme: and //todo: in uppercase and really doesnt work.
mail me if you have some idea on what could be.
Regards.
Posted By Igor Costa / Posted At 10/27/06 5:50 PM
awesome plug in! works beautifully
Posted By Dan / Posted At 5/14/07 3:07 AM
Just installed it into FB3 Moxie and it seems to be working - thanks!!
Posted By RickDT / Posted At 8/15/07 5:41 PM
As to Templates - does the Snippits feature of CFEclipse cover the same base for you ?
Posted By Tom Chiverton / Posted At 9/12/07 5:33 PM
@Tom: not sure :) Could you please elaborate?
Posted By DIrk / Posted At 9/13/07 8:03 AM
@Dirk: Install CFE, open the snippits panel. There are various special strings (like '$${a prompt}'} that you can put in it's templates to make them ask the user questions, for instance.
Posted By Tom Chiverton / Posted At 9/13/07 10:08 AM
This is great plugin but unfortunatelly it stopped working in Flex Builder 3 Beta 2.
Posted By Radek / Posted At 10/12/07 5:13 PM
@Radek: thanks for the info, I'll investigate!
Posted By Dirk / Posted At 10/12/07 8:28 PM
@Radek: I tested it with Flex Builder 3 Beta 2 running as a plugin in Eclipse 3.3 and it worked just fine. Try it again when starting Eclipse / FB with the -clean command line option and see if that helps.
Dirk.
Posted By Dirk / Posted At 10/12/07 9:41 PM
Hey, nice work with this.
I've installed on Flex Builder 3 beta 2 and it seems to work fine (I can see blue marks on the right, and the icons on the left).
But should there be a Tasks panel I can open up somehow with a list of all items in it?
Cheers.
Posted By 3stripe / Posted At 10/16/07 7:22 PM
D'oh, I worked it out... Window-->Other Views...-->Basic-->Tasks
Posted By 3stripe / Posted At 10/16/07 7:26 PM
@Dirk: Yes - cleanup has helped. Sorry ;)
Posted By Radek / Posted At 10/17/07 11:51 AM
Hi,
I have a flex application, and I need to compile it to run with Flash Player 7.
Someone can tell me if it's possible to do, if it's possible, how can I do that.
Regards.
Posted By Marcelo / Posted At 10/18/07 9:48 PM
@Marcelo: Not withstanding being the wrong place to ask, no, Flex requires Player v9 now at 98%+ penetration.
Posted By Tom Chiverton / Posted At 10/24/07 2:03 PM
Works a treat on FB 3.0 too. Been waiting for this for ages. Thanks!
Posted By Tink / Posted At 12/11/07 3:30 AM
A habit I've had for a long time is to use @TODO but this plugin doesn't pick those up, any chance you could ignore any characters before the TODO/FIXME?
Posted By David Spurr / Posted At 12/17/07 11:22 AM
A habit I've had for a long time is to use @TODO but this plugin doesn't pick those up, any chance you could ignore any characters before the TODO/FIXME?
Posted By David Spurr / Posted At 12/17/07 11:23 AM
First off, great plugin. I was lost till I found this making the move from JDT to FB.
My suggestion for an enhancement is to offer an optional tree structure in the Tasks view where Resources act as the root nodes. With a lot of items, it would be easier to manage if we could collapse/expand items by resource.
Posted By Kai / Posted At 2/20/08 7:52 PM
Hi there, great plugin. I wonder if I would be able to have a copy of the source for this plugin. I am developing a bug tracking and project management tool in Flex for my work and would like to use your plugin to talk to my database and update todo tasks.
Cheers Rob
Posted By Rob Stanfield / Posted At 3/6/08 2:16 AM
Hi there, great plugin. I wonder if I would be able to have a copy of the source for this plugin. I am developing a bug tracking and project management tool in Flex for my work and would like to use your plugin to talk to my database and update todo tasks.
Cheers Rob
Posted By Rob Stanfield / Posted At 3/6/08 2:17 AM
this is a very cool plugin ... I got no suggestions .. better keep it simple
Posted By Ahmad / Posted At 4/1/08 6:32 PM
Excellent plugin, thank you for this.
Posted By Jari Huuskonen / Posted At 4/29/08 8:37 AM
Works with Flex 3 Professional. The Tasks filter list added "Flex Builder 2 Task" to item types.
I does not appear to work with actionscript files. Can you add .as files to the item types?
Brad
Posted By Brad Carvey / Posted At 5/7/08 10:20 PM
Great extension, thanks! It works fine with Flex Builder 3.2.
Posted By a_[w] / Posted At 2/4/09 2:41 PM
Posted By daniel / Posted At 3/13/09 5:19 PM
Thanks! Been looking around for something like this for Flex Builder 3.
Posted By Ben Graver / Posted At 4/18/09 5:31 PM
Also seems to work in Flash Builder 4 Beta.
Posted By Larry Maccherone / Posted At 6/9/09 1:54 AM
Hi, Works great since 2 years with FB2 & 3, but I'd need sources to prevent some NullPointerException in some methods, Is that possible without decompiling the code ? with eclipse jar dependecies ? I got problems recompiling it with Eclipse 3.4 Thanks anyway, I love this plugin.
Posted By DLR / Posted At 7/21/09 6:26 PM
Hi, it doesn't seem to work anymore since I switched to Eclipse 3.5 and Flash Builder 4 beta. Is it Eclipse or FB4? Any chance of an update? I would find it hard to go on without your TODO plugin.
Posted By Frank / Posted At 7/26/09 9:33 AM
Hi Dirk,
Very useful gadget indeed! Good work!
I was wandering ... is there a way for me to add cusom tokens? JTD has such a facility and it's very useful for me.
Cheers,
Atanas.
Posted By Naso / Posted At 8/19/09 4:41 AM
Thanks a lot for this, I've been looking for some time now for this. It works a treat in Flex Builder 3.0.2 Standalone. Great
Posted By Ovidiu Diac / Posted At 11/19/09 5:58 PM
Just wanted to let people know this works with Flash Builder 4 Beta 2...
... but I had to issue the following command in Terminal on Mac OS X to get it up and running: "/Applications/Adobe Flash Builder Beta 2/FlashBuilder.app/Contents/MacOS/FlashBuilder" -clean
Hope that helps!
Posted By Gabriel / Posted At 3/4/10 1:04 AM
Thank you this plugin works in Flash Builder 4. I use stand alone FB4 (not like plugin for Eclipse)
Posted By Vladialv Korobov / Posted At 6/22/10 2:48 PM
Very nice. 1.0.0 works with the Eclipse plugin for Flash Builder 4 (production release). It appears that Adobe has declined to include the functionality natively (at least for the moment): https://bugs.adobe.com/jira/browse/FB-17231
Much appreciated.
Posted By Owen Eustice / Posted At 7/15/10 1:44 PM
Very nice ... just two things: - customizable tags (config file would be ok) - possible to save the "completed" selection? Thanks
Posted By Markus / Posted At 8/20/10 11:48 PM