title: setSelectionProvider over two different controls not working
body: <p>I am Trying to create Eclipse Plugin which has a composite with two <code>TreeViewer</code> side by side. On click of each <code>TreeViewer</code> content Eclipse property view should give appropriate information. Now I wanted to set Selection provider for both of this treeviewer hence I used    </p>
  
  <pre class="lang-java prettyprint-override"><code>  setSelectionProvider(treeViewer1)
    setSelectionProvider(treeviewer2)
  </code></pre>
  
  <p>But only the second added treeviewer get set since the first one is overwritten. I am intiating this two treeviewer from class Queue.java. Hence I implemented the interface <code>ISelectionProvider</code> over Queue.java as below:</p>
  
  <pre class="lang-java prettyprint-override"><code>public void addSelectionChangedListener(ISelectionChangedListener listener)
  {
    selectionChangedListeners.add(listener);
  }
  
  public void
      removeSelectionChangedListener(ISelectionChangedListener listener)
  {
    selectionChangedListeners.remove(listener);
  }
  
  private void fireSelectionChanged(final SelectionChangedEvent event)
  {
    Object[] listeners = selectionChangedListeners.getListeners();
    for (int i = 0; i &lt; listeners.length; ++i)
    {
       final ISelectionChangedListener l =
           (ISelectionChangedListener) listeners[i];
       Platform.run(new SafeRunnable()
       {
          public void run()
          {
             l.selectionChanged(event);
          }
  
          @Override
          public void handleException(Throwable e)
          {
             removeSelectionChangedListener(l);
          }
       });
     }
  }
  
     public void setSelection(ISelection selection)
     {
         fireSelectionChanged(new SelectionChangedEvent(this, selection));
      }
  
       public ISelection getSelection()
      {
        ArrayList&lt;Object&gt; list = new ArrayList&lt;Object&gt;();
       Object o = getProperties();
       if (o instanceof IPropertySource)
           list.add(o);
       return new StructuredSelection(list);
     } 
  </code></pre>
  
  <p>Can anyone help me how to resolve this issue. I will be grateful. thanks in advance. Tor.</p>