treeListener = new TreeAdapter () { final Runnable runnable = new Runnable() { public void run() { if (TableTreeEditor.this.tableTree.isDisposed() || editor == null) return; resize(); editor.setVisible(true); } }; public void treeCollapsed(TreeEvent e) { if (editor == null) return; editor.setVisible(false); Display display = TableTreeEditor.this.tableTree.getDisplay(); display.asyncExec(runnable); } public void treeExpanded(TreeEvent e) { if (editor == null) return; editor.setVisible(false); Display display = TableTreeEditor.this.tableTree.getDisplay(); display.asyncExec(runnable); } }; tableTree.addTreeListener(treeListener);
public TableTreeEditor (TableTree tableTree) {	super(tableTree.getTable());	this.tableTree = tableTree;		columnListener = new Listener() {		public void handleEvent(Event e) {			resize ();		}	};}