// you’re reading...

Eclipse

fixing flex builder 2 bugs, part 1 of many

So the Flex Builder 2 team has been in serious bugfix mode for a few weeks now, and it’s always interesting. Writing a tool for a language that’s in development (ActionScript 3) and a framework that’s being re-written (MXML) while building on top of a platform(Eclipse) that we don’t own can be challenging.

My last bug of the day was an Eclipse issue. It turns out that the Outline View in Zorn(code name for Flex Builder) keeps updating even if the view has been closed. This isn’t a huge issue, but the Outline View isn’t cheap to update and we obviously shouldn’t update it when not needed.

So, Eclipse provides a skeleton framework for Outline View support but leaves the updating, populating and really all the outline functionality to third parties. One thing the base Outline class does provide is a dispose method, called when the Outline View is closed (or so I thought). In Zorn, this is when we disconnect all of our outline updating code.

When I wrote the outliner implementation for Zorn, I assumed dispose was called when the editor was closed and when the Outline View was closed. This works great when an editor is closed but not so well when the Outline View is closed. As it turns out, when Eclipse closes a view the view isn’t actually disposed, it’s just hidden. So dispose was never being hit, and the Outline View kept updating itself in the background.

I fixed it, but I have to say, I spent some time(ok, a lot of time) swearing at the Eclipse code. I take full responsibility for the bug, but I feel like the Eclipse framework let me down a little. I expected dispose to be called when the view was closed. And if that’s not what happens, then I expect the framework to provide an isHidden method or something similar.

That being said, Eclipse is a great framework. So great in fact, that I make assumptions sometimes when I shouldn’t. Developing an application on top of Eclipse has been a great experience. One day, I’m sure the Flex framework will be as good as the Eclipse framework. We’ll get there…the Eclipse team just has a head start.

Discussion

Comments are disallowed for this post.

  1. Keep up the good work David!

    Posted by Sam Robbins | March 2, 2006, 6:22 am
  2. pssf.. you’re too hard on yourself. Flex 2 Beta is pimp!

    Posted by JesterXL | March 2, 2006, 7:06 pm
  3. You’re developing a good product. As we’ve found, developing on top of and/or in coordination with Eclipse is a challenge, but that would probably be the case in any environment. Cheers!

    Jens, Genuitec, LLC & MyEclipse Evangelist
    MyEclipse: an Eclipse product extension supporting UML, AJAX, Web, J2EE, JSP, XML, Struts, JSF, HTML, Spring, Hibernate and application server integration needs.

    Posted by Jens E | May 23, 2006, 11:34 am