Eclipse Problem Markers from Flex Ant Builds

by Gordon. 14 Comments

Two of the most popular ways to build flex projects are:

  1. Use Flex Builder
  2. Use the Flex SDK Ant tasks
In our case, we had been using 1 for development and 2 for production for some time. This gave us the best of both worlds: nice IDE features (e.g. problem markers and jumping to definitions) during development time and also the ability to fine-tune and optimize for production deployment.

Recently, however, due to increasing project complexity (project dependencies anyone?) and flex builder bugs, we have been forced to switch over to using  Flex Ant tasks exclusively. This means configuring our Eclipse projects to have an Ant Builder which executes our ant tasks in place of Flex Builder. The one benefit of this is that it increases the transparency of the build process, with only a single code path for building and saving us the headache of having to define compiler settings and modules in more than once place.

Aside from speed, the one major annoyance of this route is that no problem markers are generated during the build process. Consequently, you have to manually examine the console output. Once you manage to locate the error, you still have to parse the output, extract file names and line numbers, and manually open the files… at least until now!

The Solution: FlexMarkers

This morning I finally got fed up with this process and spent the better half of the day developing an eclipse plugin (my first one), FlexMarkers, which solves this problem. It inspects the console output from the Ant Builder as it is produced and creates problem markers for both errors and warnings. With this plugin you see mxmlc and compc errors in the Eclipse Problems view and can double click on them and go directly to the file and line number where the problem occurred. This essentially duplicates the behavior of Flex Builder, without having to use Flex Builder to build your project.

You can find the update site here: http://hempton.com/eclipse/update

So far, I have only tested it on Eclipse 3.4.2. If you use an Eclipse Ant Builder which executes <mxmlc> or <compc> tasks, definitely give it a try!

  • http://www.valwriting.com Essay Help

    I think you have to manually examine the console output. Once you manage to locate the error, you still have to parse the output, extract file names and line numbers, and manually open the files..

    Thanks and Regards

  • http://www.valwriting.com Essay Help

    I think you have to manually examine the console output. Once you manage to locate the error, you still have to parse the output, extract file names and line numbers, and manually open the files..

    Thanks and Regards

  • guodan
  • John

    Is this plugin still available? I’m just now trying to move my flex projects over to ANT building and was looking for something like this. is there a downloads page for this, or do I need to rebuild it from source (I found the google projects page I think – http://code.google.com/p/flexmarkers/)?

    • http://hempton.com ghempton

      Just noticed this comment and that the update site was down. Should be up now.

  • John

    Is this plugin still available? I'm just now trying to move my flex projects over to ANT building and was looking for something like this. is there a downloads page for this, or do I need to rebuild it from source (I found the google projects page I think – http://code.google.com/p/flexmarkers/)?

    • http://hempton.com ghempton

      Just noticed this comment and that the update site was down. Should be up now.

  • guodan
  • http://www.windowexhaustfandeals.com/attic-ventilation-fans.html solar attic ventilation fans

    Great posts thanks

  • Anonymous

    Very cool. How about posting the source code so we can tweak it or modify it in case a newer version of Eclipse someday breaks this plugin?

  • philcrosby

    Very cool. How about posting the source code so we can tweak it or modify it in case a newer version of Eclipse someday breaks this plugin?

  • Josh

    HI,

    I am using Flash Builder and it told me I needed: Flexmarkers (1.0.3) requires plug-in “org.eclipse.ui.console (3.3.1)”, or later version.

    I couldn’t work out which package this plugin is included in. Thanks!

  • Josh

    HI,

    I am using Flash Builder and it told me I needed:
    Flexmarkers (1.0.3) requires plug-in “org.eclipse.ui.console (3.3.1)”, or later version.

    I couldn't work out which package this plugin is included in.
    Thanks!

  • Taylor Brown

    This is awesome. Thanks for writing and posting the code! I just posted an issue on the Google Code site I’d be curious to get your comments on: http://code.google.com/p/flexmarkers/issues/detail?id=1 With a (hopefully minor?) tweak, we could use this same thing to parse the output from fcsh.