Monday, June 4, 2007

Anti-Alias bug in 3.3 with GEF

I've been fighting a particularly nasty bug in Eclipse 3.3 lately and since I finally found the culprit, I wanted to post it in case other GEF developers encounter it before it's fixed.

Symptoms:

  1. Thumbnail in outline view won't show some edit parts
  2. Connection parts don't show until after editor is reopened in same session
I started having these problems in M7. Since GEF hasn't changed much, I thought the problem had to be somewhere in the Platform. However, this only seemed to affect GEF editors - and I couldn't even find anyone else with the same problem. After analyzing the sample GEF apps (which don't have this problem) and comparing them to mine, I found the problem:

graphics.setAntialias(SWT.ON)

Commenting out this call fixed all the problems I was having. Now my edit parts don't look quite as good, but since I'm counting on being able to use 3.3, I'm just happy there is a workaround. I'm hopeful that this can be fixed by the final Europa release.

2 comments:

Boris Bokowski said...

Please don't forget to file a bug (against GEF, or maybe SWT)!

Adam Cabler said...

Of course. I filed one a while back - should've mentioned it:
Here it is