diff m-toolbox/classes/@workspaceBrowser/cb_retrieve.m @ 30:317b5f447f3e database-connection-manager

Update workspaceBrowser
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line diff
--- a/m-toolbox/classes/@workspaceBrowser/cb_retrieve.m	Mon Dec 05 16:20:06 2011 +0100
+++ b/m-toolbox/classes/@workspaceBrowser/cb_retrieve.m	Mon Dec 05 16:20:06 2011 +0100
@@ -10,28 +10,16 @@
   
   wb = getappdata(0, 'WorkspaceBrowser');
   
-  % Get a connection from the repository manager
-  rm = LTPDARepositoryManager;
-  conn = rm.manager.selectConnection([]);
+  % Get a connection from the database connection manager
+  conn = LTPDADatabaseConnectionManager().connect();
   
-  if ~isempty(conn) && conn.isConnected
-    try
-      % Get submission info from the user
+  warning('off', 'MATLAB:JavaEDTAutoDelegation');
+  qb = mpipeline.repository.RepositoryRetrieveDialog([], true);
+  qb.setVisible(true);
+  warning('on', 'MATLAB:JavaEDTAutoDelegation');
       
-      warning('off', 'MATLAB:JavaEDTAutoDelegation');
-      qb = mpipeline.repository.RepositoryRetrieveDialog([], true);
-      qb.setVisible(true);
-      warning('on', 'MATLAB:JavaEDTAutoDelegation');
-      
-      if ~qb.isCancelled
-        
-        workspaceBrowser.retrieveObjectsFromDialog(qb, conn);
-        
-      end
-      
-    catch err
-      fprintf(2, [err.message, '\n']);
-    end
+  if ~qb.isCancelled        
+    workspaceBrowser.retrieveObjectsFromDialog(qb, conn);
   end
   
 end