public Object getAdapter(Class adapter) {
   if (adapter == XModelObject.class) return getXModelObject();
   Object result = null;
   if (IFile.class.isAssignableFrom(adapter)) {
     result = EclipseResourceUtil.getResource(object);
     if (result != null && !adapter.isAssignableFrom(result.getClass())) result = null;
   } else {
     result = super.getAdapter(adapter);
   }
   return result;
 }
 private static IFile getFileByObject(XModelObject object) {
   return (IFile) EclipseResourceUtil.getResource(object);
 }
 public String getToolTipText() {
   IFile f = (IFile) EclipseResourceUtil.getResource(object);
   if (f != null && f.exists()) return f.getLocation().toString();
   return object.getPresentationString();
 }