Revision 36713
branches/v2_0_0_prep/extensions/extGeoDB/src/org/gvsig/geodb/vectorialdb/wizard/WizardDB.java | ||
---|---|---|
161 | 161 |
public void initWizard() { |
162 | 162 |
} |
163 | 163 |
|
164 |
public void execute() { |
|
164 |
@Override |
|
165 |
public void execute() { |
|
166 |
executeWizard(); |
|
167 |
} |
|
168 |
|
|
169 |
@Override |
|
170 |
public Object executeWizard() { |
|
165 | 171 |
TablesListItem[] tables = getSelectedTables(); |
166 | 172 |
|
167 | 173 |
DataManager man = DALLocator.getDataManager(); |
... | ... | |
174 | 180 |
ApplicationManager appGvSIGMan = ApplicationLocator.getManager(); |
175 | 181 |
PrepareContext context = this.getPrepareDataStoreContext(); |
176 | 182 |
DBStoreParameters storeParams; |
183 |
List<TableDocument> tabledocs = |
|
184 |
new ArrayList<TableDocument>(tables.length); |
|
177 | 185 |
for (TablesListItem table : tables) { |
178 | 186 |
storeParams = getParameterForTable(table); |
179 | 187 |
|
... | ... | |
193 | 201 |
store = (FeatureStore) man.openStore(storeParams.getDataStoreName(), storeParams); |
194 | 202 |
} catch (Exception e) { |
195 | 203 |
NotificationManager.addError(e); |
196 |
return;
|
|
204 |
return null;
|
|
197 | 205 |
} |
198 | 206 |
|
199 | 207 |
try { |
... | ... | |
202 | 210 |
} catch (Exception e) { |
203 | 211 |
NotificationManager.addError(e); |
204 | 212 |
store.dispose(); |
205 |
return;
|
|
213 |
return null;
|
|
206 | 214 |
} |
207 | 215 |
|
208 | 216 |
document = (TableDocument) ProjectManager.getInstance().createDocument(TableManager.TYPENAME, docName); |
209 | 217 |
document.setStore(store); |
210 |
project.add(document);
|
|
211 |
|
|
218 |
// project.add(document);
|
|
219 |
tabledocs.add(document); |
|
212 | 220 |
} |
213 |
|
|
221 |
return tabledocs; |
|
214 | 222 |
} |
215 | 223 |
|
216 | 224 |
protected DBStoreParameters getParameterForTable(TablesListItem table) { |
Also available in: Unified diff