Bug 577857 - WizardProjectsImportPage does not correctly set fields when switching to import archieve
Summary: WizardProjectsImportPage does not correctly set fields when switching to impo...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.22   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.24 M1   Edit
Assignee: Alois Zoitl CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-12-16 17:14 EST by Alois Zoitl CLA
Modified: 2022-03-30 04:01 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alois Zoitl CLA 2021-12-16 17:14:52 EST
When switching the WizardProjectsImportPage to the import from archive mode the first two checkboxes in the Options area (i.e., Search for nested projects and Copy projects into workspace) are selected and deactivated. However the functionality behind these two checkboxes is not activated correctly. Therefore when importing a project from the archive where in the archive is a project with the same name as you already have in workspace the content of the two projects gets merged. However if you first manually turn on the options in the select root directory mode and then switch to import from archive mode the correct checks are performed and any projects in the archive with the same name as a project are greyed out and marked as they can not be imported. 

I would expect the latter behavior on both cases. 

I looked into the code and when activating the import from archive mode only the check boxes are selected but not the according fields of the import wizard set. I debugged that and it seems that the selection listener for the two checkboxes is not called when invoking setSelection on the checbox. 

For me the solution would be to in addition set the fields to have the correct behavior. Will submit a page right afterwards.
Comment 1 Eclipse Genie CLA 2021-12-16 17:18:44 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/188937
Comment 2 Lars Vogel CLA 2021-12-17 02:05:13 EST
Thanks Alois. Can you please create also a bug for SWT with a small snippet which demonstrates the issue?
Comment 3 Alois Zoitl CLA 2021-12-17 02:34:24 EST
(In reply to Lars Vogel from comment #2)
> Thanks Alois. Can you please create also a bug for SWT with a small snippet
> which demonstrates the issue?

Sure. Just did it with Bug #577860. But as pointed out not sure if SWT bug or not. Not having the selection listener called has also advantages.
Comment 5 Lars Vogel CLA 2022-03-29 04:24:46 EDT
Thanks, Alois
Comment 6 Lars Vogel CLA 2022-03-30 04:01:05 EDT
Alois, please verify in the latest I-build from https://download.eclipse.org/eclipse/downloads/