TODO and FIXME Tasks for Flex Builder in the Eclipse IDE June 12, 2010Posted by Tournas Dimitrios in Flex.
For Java development the Eclipse IDE comes with a helpful Tasks feature that enumerates all your “TODO” and “FIXME” comments throughout your code. This is a very nice feature for when you want to leave a reminder note in your source file to fix a bug/defect or a reminder note to complete some implementation. The Tasks view window lists all your TODOs and FIXMEs and includes a reference to where each is located in the source. Double-clicking a record in the Tasks view will open the source file and place the cursor on the line in the source where the comment was made.
Unfortunately the Eclipse plug-in fror Adobe FlexBuilder 2 and FlexBuilder 3 did not come with the TODO / FIXME tasks feature implemented in the Flex source editor, so these TODO and FIXME comments in Flex code are not listed in the Eclipse Tasks window. Fortunately Eclipse is an extensible IDE and Dirk Eisman at http://www.richinternet.de/blog/ has provided a plug-in extension that enables this feature.
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.
The preceeding text was written byDirk Eisman on his blog @ http://www.richinternet.de/blog/index.cfm?entry=911D4B57-0F0D-5A73-AF6F4D4D04099757
In Eclipse 3.4 with the FlexBuilder 3.0.2 plug-in, all I did get this working was:
- download the Flex Builder Task Plug-in ZIP file (link below)
- close Eclipse / Flex Builder
- extract the “de.richinternet.flexbuilder.task_1.0.0.jar” file from the “plugins” folder in the ZIP
- copy the extraced “de.richinternet.flexbuilder.task_1.0.0.jar” file to the “plugins” folder in my Eclipse installation folder “C:\Program Files\Adobe\Flex Builder 3\plugins“ .Be careful to paste the plug-in in the correct directory
- open Eclipse / Flex Builder
- in the Flex Development perspective, select “Window” / “Show View” / “Other” from the main menu.
- Under the “General” folder, select the “Tasks” view and then select “OK”.
- add some TODO / FIXME comments to a .MXML file and an .AS file and save the files
That’s it, the tasks started showing up in the Tasks view window.
Thank you Dirk for providing this plug-in extension for Flex Builder, this is a very helpful add-on!