having reference jface treeviewer
, how can list of columns, e.g. treeviewercolumn
objects? like:
treeviewer treeviewer = (treeviewer)viewer; treeviewercolumn[] treeviewercolumns = treeviewer.getcolumns();
is me or there isn't obvious way this?
what i'm trying add editing support items in project explorer. have reference project explorer's tree viewer, need obtain treeviewercolumn
, do:
column.seteditingsupport(...);
a reference treeviewercolumn
stored in data of treecolumn
. following should give list of treeviewercolumns
:
list<treeviewercolumn> treeviewercolumns = new arraylist<treeviewercolumn>(); treecolumn[] columns = treeviewer.gettree().getcolumns(); (treecolumn column : columns) { object data = column.getdata(policy.jface + ".columnviewer"); if (data instanceof tableviewercolumn) { treeviewercolumn tvc = (treeviewercolumn) data; treeviewercolumns.add(tvc); } }
Comments
Post a Comment