I'm new to how to work with actions and views as related to writing
Eclipse plugins using SWT and JFace.
What I am attempting to do is have a tree that creates/updates a view
when a leaf is selected.
I've been experimenting with code and I've gotten a view to show up on
the first click of a leaf, but it doesn't update the data on subsequent
clicks of other leaves.
I'm experienced in Java, but totally new to GUI work. Any help would
be greatly appreciated. Thanks!
Roedy Green - 21 Sep 2005 04:05 GMT
>I've been experimenting with code and I've gotten a view to show up on
>the first click of a leaf, but it doesn't update the data on subsequent
>clicks of other leaves.
the key is you have to keep firing events to let Swing know which
nodes need to be repainted. It is up to you to track that.
TreeModel.fireTreeNodesChanged(...);

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
Casey Hawthorne - 21 Sep 2005 07:20 GMT
Sounds a bit like a cross-cutting concern, you might want to look at
AspectJ.
--
Regards,
Casey