Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327138 - [Import/Export] WizardExportResourcesPage's Finish button isn't sensitive to Select/Deselect All
Summary: [Import/Export] WizardExportResourcesPage's Finish button isn't sensitive to ...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 trivial (vote)
Target Milestone: 3.6.2   Edit
Assignee: Prakash Rangaraj CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 259581
Blocks:
  Show dependency tree
 
Reported: 2010-10-06 12:57 EDT by Prakash Rangaraj CLA
Modified: 2010-11-23 05:01 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Prakash Rangaraj CLA 2010-10-06 12:57:18 EDT
+++ This bug was initially created as a clone of Bug #259581 +++

Build ID: I20081211-1908

1. Select a file in a project, then select Export > General / Archive File, and press Next : the selected file is checked in the tree viewer and the Finish button is disabled.
2. Enter the name of the output file: Finish button becomes enabled
3. Uncheck the selected file: Finish button becomes disabled and an error is generated (no resources selected to export).
4. Recheck the file to export: Finish button is enabled again. So far so good.
5. Press Deselect All: selected file properly gets unchecked but the Finish button remains enabled and no error is displayed.
6. Press Finish and you get an error: Zip file must have at least one entry.


The reason for the inconsistent state at step 5 is because WizardExportResourcesPage.updateWidgetEnablements() is only called at initialization and when a CheckStateChangedEvent is triggered in the TreeViewer. However, Select All, Deselect All and Filter Types ... buttons do manipulate the tree viewer's state without triggering any CheckStateChangedEvent.

WizardFileSystemResourceImportPage1 properly handles a similar scenario by explicitly calling updateWidgetEnablements() on selection events from both the Select All and Deselect All buttons:

[...]
        listener = new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                setAllSelections(true);
                updateWidgetEnablements();
            }
        };
        selectAllButton.addSelectionListener(listener);
[...]

whereas WizardExportResourcesPage only modifies the tree viewer:

[...]
        listener = new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                resourceGroup.setAllSelections(true);
            }
        };
        selectButton.addSelectionListener(listener);
[...]
Comment 1 Prakash Rangaraj CLA 2010-10-06 12:57:55 EDT
Bug cloned for backporting to 3.6.2
Comment 2 Boris Bokowski CLA 2010-11-22 11:05:50 EST
+1 for 3.6.2
Comment 3 Prakash Rangaraj CLA 2010-11-23 05:01:58 EST
Patch v01 from the original bug, released to R3_6_maintenance branch