title: How to integrate a custom ISelectionProvider with Eclipse enabledWhen expressions?
body: <p>I have a custom graphical EditorPart in a Eclipse RCP application. </p>
  
  <p>It sets a custom ISelectionProvider in the createPartControl(..) method:</p>
  
  <pre><code>@Override
  public void createPartControl(Composite parent) {
      // [snip] 
      getSite().setSelectionProvider((ISelectionProvider)model.getSelection());
  }
  </code></pre>
  
  <p>I have two ViewParts listening to selection changes via the ISelectionService. They get notified when the selection in the EditorPart changes. So far so good.</p>
  
  <p>Now I've added a handler using the following XML:</p>
  
  <blockquote>
  <pre><code>&lt;handlerclass="my.custom.Handler" commandId="org.eclipse.ui.edit.delete"&gt;
      &lt;enabledWhen&gt;
          &lt;count value="+"/&gt;
      &lt;/enabledWhen&gt;
  &lt;/handler&gt;
  </code></pre>
  </blockquote>
  
  <p>If the selection in the EditPart contains > 0 elements, this should enable the handler my.custom.Handler, but it doesn't. </p>
  
  <p>It is, however enabled if the selection provided by built-in selection providers changes to > 0 element (i.e. those provided by JFace viewers).</p>
  
  <p>Any hint how to integrate a custom implementation of ISelectionProvider with the expression framework used in the handler declaration?</p>