Mercurial > hg > ltpda
comparison 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 |
comparison
equal
deleted
inserted
replaced
29:54f14716c721 | 30:317b5f447f3e |
---|---|
8 % | 8 % |
9 function cb_retrieve(varargin) | 9 function cb_retrieve(varargin) |
10 | 10 |
11 wb = getappdata(0, 'WorkspaceBrowser'); | 11 wb = getappdata(0, 'WorkspaceBrowser'); |
12 | 12 |
13 % Get a connection from the repository manager | 13 % Get a connection from the database connection manager |
14 rm = LTPDARepositoryManager; | 14 conn = LTPDADatabaseConnectionManager().connect(); |
15 conn = rm.manager.selectConnection([]); | |
16 | 15 |
17 if ~isempty(conn) && conn.isConnected | 16 warning('off', 'MATLAB:JavaEDTAutoDelegation'); |
18 try | 17 qb = mpipeline.repository.RepositoryRetrieveDialog([], true); |
19 % Get submission info from the user | 18 qb.setVisible(true); |
19 warning('on', 'MATLAB:JavaEDTAutoDelegation'); | |
20 | 20 |
21 warning('off', 'MATLAB:JavaEDTAutoDelegation'); | 21 if ~qb.isCancelled |
22 qb = mpipeline.repository.RepositoryRetrieveDialog([], true); | 22 workspaceBrowser.retrieveObjectsFromDialog(qb, conn); |
23 qb.setVisible(true); | |
24 warning('on', 'MATLAB:JavaEDTAutoDelegation'); | |
25 | |
26 if ~qb.isCancelled | |
27 | |
28 workspaceBrowser.retrieveObjectsFromDialog(qb, conn); | |
29 | |
30 end | |
31 | |
32 catch err | |
33 fprintf(2, [err.message, '\n']); | |
34 end | |
35 end | 23 end |
36 | 24 |
37 end | 25 end |
38 | 26 |