Esempio n. 1
0
 @Override
 public <T> T getAdapter(Class<T> adapter) {
   if (adapter == DBNProject.class) {
     return adapter.cast(this);
   }
   return super.getAdapter(adapter);
 }
 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;
 }