Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 400399

Summary: [Import/Export] Project import wizard does not remember selected folder or archive
Product: [Eclipse Project] Platform Reporter: Christian Georgi <christian.georgi>
Component: UIAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, helmut.haigermoser
Version: 4.3   
Target Milestone: 4.3 M6   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Stores project and archive location persistently
none
Updated patch
none
mylyn/context/zip none

Description Christian Georgi CLA 2013-02-10 11:31:07 EST
I often need to import projects from the same, deeply nested source code location into the workspace.  The "Existing projects into workspace" wizard, however, only stores the selected location only per-session, so that after a restart of Eclipse, I have to browse for the folder again.

The attached patch saves the project or archive location in the workspace preferences.
Comment 1 Christian Georgi CLA 2013-02-10 11:32:13 EST
Created attachment 226809 [details]
Stores project and archive location persistently
Comment 2 Dani Megert CLA 2013-02-11 04:37:29 EST
If we start to remember the location, then we should do it the same as in the other import/export dialogs, where we present the previous values in a combo box.
Comment 3 Paul Webster CLA 2013-02-11 14:53:31 EST
See org.eclipse.ui.internal.wizards.datatransfer.WizardArchiveFileResourceExportPage1.internalSaveWidgetValues() for an example.  Also, we use IDialogSettings instead of preferences to remember previous locations.

PW
Comment 4 Christian Georgi CLA 2013-02-12 18:01:47 EST
I have updated WizardProjectsImportPage accordingly, i.e. replaced the Text fields with Combos and used IDialogSettings instead of preferences.
In order to make use of the existing combo history infrastructure, the page now extends WizardDataTransferPage.  This also removes some code redundancies (see queryOverwrite()).
Comment 5 Christian Georgi CLA 2013-02-12 18:02:33 EST
Created attachment 226971 [details]
Updated patch
Comment 6 Christian Georgi CLA 2013-02-12 18:02:38 EST
Created attachment 226972 [details]
mylyn/context/zip
Comment 8 Dani Megert CLA 2013-02-28 06:27:46 EST
I didn't do a code review, but the functionality works fine.

I updated the copyright notice.
Comment 9 Paul Pazderski CLA 2019-07-10 16:30:36 EDT
*** Bug 365930 has been marked as a duplicate of this bug. ***