@Override
 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
   super.inputChanged(viewer, oldInput, newInput);
   this.input = newInput;
   if (newInput instanceof EObject) {
     this.type = ((EObject) newInput).eClass();
   }
 }
  protected static EObject[] findRoots(EObject source) {
    if (source.eResource() == null || source.eResource().getResourceSet() == null) {
      return SemanticEMFContentProvider.findRoots(source);
    }

    // We have a full resourceSet : we return its contents
    return getRoots(source.eResource().getResourceSet());
  }
  protected static EObject[] getRoots(ResourceSet root) {
    if (root instanceof ModelSet) {
      ModelSet modelSet = (ModelSet) root;
      // TODO : Find all semantic roots, including Models and Libraries
      // This is related to the ModelSet evolution
      try {
        return new EObject[] {UmlUtils.getUmlModel(modelSet).lookupRoot()};
      } catch (NotFoundException ex) {
        Activator.log.error(ex);
      }
    }

    return SemanticEMFContentProvider.getRoots(root);
  }