private IPluginModelBase findModel(IAdaptable object) {
   if (object instanceof IJavaProject) object = ((IJavaProject) object).getProject();
   if (object instanceof IProject) return PluginRegistry.findModel((IProject) object);
   if (object instanceof PersistablePluginObject) {
     return PluginRegistry.findModel(((PersistablePluginObject) object).getPluginID());
   }
   return null;
 }