The Object Teams Blog

Adding team spirit to your objects.

Object Teams 2.1 Milestone 7 (finally) brings hot code replacement

with 2 comments

As part of the Juno Milestone 7 also Object Teams has delivered its Milestone 7.

As the main new feature in this milestone hot code replacement finally works when debugging OT/J or OT/Equinox applications.

What took us so long to make it work?

  • Well, hot code replacement didn’t work out of the box because our load-time weaver only worked the first time each class was loaded. When trying to redefine a class in the VM the weaver was not called and thus class signatures could differ between the first loaded class and the redefined version. The VM would then reject the redefinition due to that signature change.
  • Secondly, we didn’t address this issue earlier, because I suspected this would be pretty tricky to implement. When I finally started to work on it, reality proved me wrong: the fix was actually pretty simple 🙂

In fact the part that makes it work even in an Equinox setting is so generic that I proposed to migrate the implementation into either Equinox or PDE/Debug, let’s see if there is interest.

Now when you debug any Object Teams application, your code changes can be updated live in the running debug target – no matter if you are changing teams, roles or base classes. Together with our already great debugging support, this makes debugging Object Teams programs still faster.

More new features can be found in the New&Noteworthy (accumulated since the Indigo release).

Advertisements

Written by Stephan Herrmann

May 12, 2012 at 22:10

Posted in Eclipse, Object Teams, OTDT, OTEquinox

Tagged with , ,

2 Responses

Subscribe to comments with RSS.

  1. Hi Stephan,
    will OTDT work in the same environemtn with AJDT installed (ScalaIDE, groovy, grails combo)?

    Is there some progress in this area?

    Ivica Loncar

    May 13, 2012 at 13:36

  2. Hi Ivica,

    Indeed, I made some progress regarding compatibility.
    Please see the bug [1] for details.

    There are still a few loose ends, but I don’t know which of these would actually be relevant in practice. Please raise new bugs if anything blocks you from using AJDT and OTDT together.

    Of the combo you mention only groovy is definitely incompatible with the OTDT since both projects deliver a fork of org.eclipse.jdt.core. For OT/J this strategy is essential as we are indeed extending Java and thus need to extend JDT/Core in ways not supported by extension points.
    A while ago I heard the groovy folks say that they had pondered migrating from their fork to a weaving based solution. But later they concluded that they didn’t feel the need to do so. Not sure if raising your voice could make them change their minds.

    Please let me know if you want to try again but need some fixes backported. I’m not fully up-to-date wrt to AJDT’s compatibility with the upcoming Eclipse Juno release.

    For the future, a modernization of equinox.weaving is planned, which should be a joint effort from AspectJ, Object Teams and Equinox. This should further improve compatibility.

    best,
    Stephan

    [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=351085#c25

    stephan

    May 13, 2012 at 14:31


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: