display problem of TreeMapper [message #1336557] |
Tue, 06 May 2014 08:55  |
Eclipse User |
|
|
|
Hi,
I use the latest TreeMapper widget, but found the mappings is not displayed after I setInput(leftProvider, rightProvider, mappings) (the mappings is not null), which force me to expand all the treeitems manually to make the mappings show.
I debugged the source code of treeMapper and found that the treeMapper use the testFindItem method to find mapping elements, but this methods always return null. So, how to solve this problem?
Thanks,
Robin
|
|
|
|
Re: display problem of TreeMapper [message #1380133 is a reply to message #1376833] |
Sat, 24 May 2014 21:34  |
Eclipse User |
|
|
|
Hi Wim,
I do have a "solution". I modify the setInput() method in TreeMapper.java and insert two statements encolosed in braces.
if (mappings != null) {
this.mappings = mappings;
//add by zhou-jg
{//TODO needs fine tuned for performance
leftTreeViewer.expandAll();
rightTreeViewer.expandAll();
}
...
The added statements assure all treeitems have been initiated, so that the testFindItem will return coresponding items instead of null. This works for most of circumstances, but it still does not work occasionally and needs a refresh or repaint (by manually dragging the border of any viewers). So, I still need a more elegant approach.
Best regards.
Jingang Zhou
|
|
|
Powered by
FUDForum. Page generated in 0.03000 seconds