title: TreeViewer to GridTreeViewer: bridge between existing ITreeContentProviders and "lazy" ObservableListTreeContentProvider
body: <h1>TL;DR</h1>
  
  <p>Based on <em>Thomas Schindl</em>'s article <a href="https://tomsondev.bestsolution.at/2011/10/07/jface-viewer-and-eclipse-databinding-with-10-000-objects/" rel="noreferrer">JFace-Viewer and Eclipse Databinding with > 10.000 Objects</a> (which suggests a very good idea), I'd like to convert a regular <code>TreeViewer</code> + multiple <code>ITreeContentProvider</code> implementations to <a href="https://eclipse.org/nebula/widgets/grid/grid.php" rel="noreferrer">Nebula's <code>GridTreeViewer</code></a> which uses <code>ObservableListTreeContentProvider</code>, a <code>VisibleRangeChangedListener</code> and <a href="http://www.vogella.com/tutorials/EclipseDataBinding/article.html" rel="noreferrer">Eclipse Data Binding</a> to <strong>make it "lazy" (lazier) and load data on-demand</strong>.  </p>
  
  <p>How should I rewrite my existing regular <code>ITreeContentProvider</code> implementations to use the same hierarchies with an <code>ObservableListTreeContentProvider</code>? 
   Can I maybe make a "bridge" between the old and the new solution?
  Using <code>DelegatingListProperty</code> somehow like <a href="http://notes-lawan.rhcloud.com/posts/JFaceViewerDataBinding" rel="noreferrer">this</a>? Any other ideas?<br>
  I found some too simple examples, but I don't really get the concept of using Data Binding in such a complex hierarchical tree format.</p>
  
  <p>Example trees &amp; content providers:</p>
  
  <p>Content provider 1.:</p>
  
  <pre><code>|- A1
     |-- B1
         |-- MyMessage1
  |- A2
     |-- B2
         |-- MyMessage2
  </code></pre>
  
  <p>Content provider 2.:</p>
  
  <pre><code>|- C1
     |-- D1
         |-- MyMessage1
  |- C2
     |-- D2
         |-- MyMessage2
  </code></pre>
  
  <h1>Longer explanation</h1>
  
  <p>I have a view where I display <strong>huge amount of objects</strong> in a hierarchical <strong>tree</strong> format using a custom <strong><code>TreeViewer</code></strong> with classic <code>ITreeContentProvider</code> and <code>LabelProvider</code>+<code>ITableLabelProvider</code> implementations. There is also a menu where the user can choose in which format they want to see this hierarchy displayed. When the user chooses another display format, the only thing that happens is that another <code>ITreeContentProvider</code> implementation gets set to the viewer and I refresh the viewer programmatically.<br>
  It works, but due to the huge number of elements (in some cases, 100-200k rows, please don't ask the reasons, it just has to work), displaying the items can be <strong>slow</strong>, the UI sometimes freezes, because there are so many listeners on the TreeItems, the view refresh takes a lot of time, etc...</p>
  
  <p>So I'd like to use some kind of a <strong>lazy solution</strong> while having the model elements already loaded in memory.<br>
  I've already tried <a href="http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet047VirtualLazyTreeViewer.java#n1" rel="noreferrer"><code>SWT.VIRTUAL</code> and <code>ILazyTreeContentProvider</code></a>, but it performed badly (even if using <code>viewer.setUseHashlookup(true)</code>) and was problematic (when scrolling, it took a lot of time for the TreeItems to load, had its <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=340488" rel="noreferrer">bugs</a>, problems with sorting, filtering, etc.).  </p>
  
  <p>Now I read Thomas Schindl's blog article: <a href="https://tomsondev.bestsolution.at/2011/10/07/jface-viewer-and-eclipse-databinding-with-10-000-objects/" rel="noreferrer">JFace-Viewer and Eclipse Databinding with > 10.000 Objects</a>. I'd like to try this using <a href="https://eclipse.org/nebula/widgets/grid/grid.php" rel="noreferrer">Eclipse Nebula Grid</a>'s  <strong><code>GridTreeViewer</code></strong> and + <strong><code>ObservableListTreeContentProvider</code></strong> (which is also an <code>ITreeContentProvider</code> implementation) and a <code>VisibleRangeChangedListener</code> and "lazy" label provider (like in the article).
  Can I somehow use my existing <code>ITreeContentProvider</code> implementations and build up a "bridge" between this and a new <code>ObservableListTreeContentProvider</code>?</p>
  
  <hr>
  
  <p>BTW I checked <a href="https://eclipse.org/nattable/" rel="noreferrer">Nebula NatTable</a>, but I found it VERY hard to migrate the existing content providers to this new solution, its API and its approach is totally different (hierarchy going from child to parent, not the opposite way), and the documentation related to <a href="https://eclipse.org/nattable/documentation.php?page=tree" rel="noreferrer">Trees</a> is still empty.</p>