Revision 5340
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/downloadworkspace/DownloadWorkingcopyImpl.java | ||
---|---|---|
38 | 38 |
import org.gvsig.fmap.dal.store.h2.H2SpatialUtils; |
39 | 39 |
import org.gvsig.tools.ToolsLocator; |
40 | 40 |
import org.gvsig.tools.dispose.DisposeUtils; |
41 |
import org.gvsig.tools.folders.FoldersManager; |
|
41 | 42 |
import org.gvsig.tools.i18n.I18nManager; |
42 | 43 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
43 | 44 |
import org.gvsig.tools.swing.api.ToolsSwingManager; |
... | ... | |
72 | 73 |
|
73 | 74 |
private static final Logger LOGGER = LoggerFactory.getLogger(DownloadWorkingcopyImpl.class); |
74 | 75 |
|
76 |
private static final String LAST_USED_FOLDER_FOR_DOWNLOAD_WC = "LAST_USED_FOLDER_FOR_DOWNLOAD_WC"; |
|
77 |
|
|
75 | 78 |
private static class AvailableWorkingcopiesTableModel extends AbstractTableModel { |
76 | 79 |
|
77 | 80 |
private List<VCSGisPreparedWorkingCopyInformation> data; |
... | ... | |
154 | 157 |
|
155 | 158 |
private void initComponents() { |
156 | 159 |
ToolsSwingManager toolsSwingManager = ToolsSwingLocator.getToolsSwingManager(); |
160 |
FoldersManager foldersManager = ToolsLocator.getFoldersManager(); |
|
157 | 161 |
|
158 | 162 |
toolsSwingManager.translate(this.lblDownloadFoder); |
159 | 163 |
toolsSwingManager.translate(this.lblURLRepository); |
... | ... | |
173 | 177 |
this.downloadFolderPicker.addChangeListener((ChangeEvent e) -> { |
174 | 178 |
doChangeDownloadFolder(); |
175 | 179 |
}); |
180 |
this.downloadFolderPicker.set(foldersManager.getLastPath(LAST_USED_FOLDER_FOR_DOWNLOAD_WC)); |
|
176 | 181 |
|
177 | 182 |
this.urlrepositoryController = toolsSwingManager.createTextFieldWithHistoryAndBookmarkController( |
178 | 183 |
BOOKMARKSANDHISTORY_REPOSITORY_URL, |
... | ... | |
459 | 464 |
URIBuilder builder = new URIBuilder(); |
460 | 465 |
builder.setScheme(url.getProtocol()); |
461 | 466 |
builder.setHost(url.getHost()); |
467 |
builder.setPort(url.getPort()); |
|
462 | 468 |
builder.setPath(url.getPath() + "/" + s); |
463 | 469 |
URI uri = builder.build(); |
464 | 470 |
return uri.toURL(); |
... | ... | |
471 | 477 |
public int download(boolean quietly) { |
472 | 478 |
ThreadSafeDialogsManager dialogs = ToolsSwingLocator.getThreadSafeDialogsManager(); |
473 | 479 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
480 |
FoldersManager foldersManager = ToolsLocator.getFoldersManager(); |
|
474 | 481 |
|
475 | 482 |
File targetZip_file = this.getTargetZipFile(); |
476 | 483 |
URI targetZip_uri = this.getTargetZipURI(); |
... | ... | |
534 | 541 |
status.message("_Extracting_local_working_copy"); |
535 | 542 |
sleep(1); |
536 | 543 |
this.unzip(targetZip_uri, targetZip_file.getParentFile(), status); |
544 |
|
|
545 |
foldersManager.setLastPath(LAST_USED_FOLDER_FOR_DOWNLOAD_WC, targetZip_file.getParentFile()); |
|
546 |
|
|
537 | 547 |
} catch (Exception ex) { |
538 | 548 |
LOGGER.warn("Can't unzip doanloaded working copy (zipfile='" |
539 | 549 |
+ Objects.toString(targetZip_file) + "', zipuri='" |
Also available in: Unified diff