Eclipse RCP - ILazyTreeContentProvider implementation is unexpectedly eager

前端 未结 1 1767
梦谈多话
梦谈多话 2021-01-02 20:38

I am developing an Eclipse RCP application, and am trying to use a ILazyTreeContentProvider implementation in order to show only the visible items at a certain

相关标签:
1条回答
  • 2021-01-02 20:49

    I have compared my example with this one And I've found only one difference that made all the difference:

    v.setUseHashlookup(true); //v is the TreeViewer
    

    What the method states in its doc:

    Configures whether this structured viewer uses an internal hash table to speeds up the mapping between elements and SWT items. This must be called before the viewer is given an input (via setInput).

    Now the content provider is actually lazy. Only paints the visible items, not ALL of them.

    0 讨论(0)
提交回复
热议问题