/**
  * Return the model provider for this content provider.
  *
  * @return the model provider for this content provider
  */
 protected final ModelProvider getModelProvider() {
   try {
     return ModelProvider.getModelProviderDescriptor(getModelProviderId()).getModelProvider();
   } catch (CoreException e) {
     // TODO: this is a bit harsh. can we do something less destructive
     throw new IllegalStateException();
   }
 }
  private void processAffected(SModelReference mref, Collection<NodePath> nodePaths) {
    ReloadableModel model = myModelProvider.lookupModel(mref);
    if (model == null) return;

    for (NodePath nodePath : nodePaths) {
      if (nodePath.isEmpty()) {
        model.reloadAll();
      } else {
        SNodeId nodeId = nodePath.leaf();
        model.reload(nodeId);
      }
    }
  }