Jeff’s Brain Dump

Sometimes the first duty of intelligent men is the restatement of the obvious.

Dump SWT Containments to text

Posted by Jeff August 07, 2006

I was having layout problems and needed to see know the size and dimensions of my widgets, so I whipped this up. Containment hierarchies are shown with indented text, so you get results like this–
Shell ‘MyWindow’ @154,203  size 400,400 GridLayout
   Composite @5,5  size 382,356 GridLayout
      Composite @5,5  size 372,346 GridLayout
         Button ‘Button1′ @5,5  size 362,336

Code is here.
This is probably reinventing the wheel. If you know a better tool (a la DOM inspector), please post a link to it.

,

Bookmark this post: · Del.icio.us · YahooMyWeb · Spurl · Furl · Incoming links

Leave a Reply