Bug 263552 - [export] No validation of directories on export wizard
Summary: [export] No validation of directories on export wizard
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2009-02-03 16:58 EST by Curtis Windatt CLA
Modified: 2009-02-06 12:23 EST (History)
1 user (show)

See Also:


Attachments
Patch to validate directory path (28.41 KB, patch)
2009-02-04 18:00 EST, Ankur Sharma CLA
curtis.windatt.public: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2009-02-03 16:58:41 EST
I was trying to use the one click export and install feature and kept getting weird build errors.  I eventually realized that the temp directory I was trying to export to was a windows path (I am currently on linux).

Turns out that you can enter anything you want as the directory to export to (either for normal export or the export/install feature).  We don't want to force the user to choose an existing directory, but we should ensure the path is valid.

I was going to attach a screenshot with the ugly ant error when I chose a crazy destination, but apparently #@!@%#$!@%@#$^!#$^ is a perfectly valid linux path...
Comment 1 Curtis Windatt CLA 2009-02-03 17:02:00 EST
Ankur, care to look at this one?

Remember that wizards are not supposed to have an error message marked when they first open (though the finish button should be disabled).  Once the user edits something then an error message should be put up for whatever is invalid.
Comment 2 Ankur Sharma CLA 2009-02-04 15:07:15 EST
If a wizard has no error message and it opens with a disabled Finish button because the directory path is invalid. The user will have no clue why the Finish button is disable. Until unless, out of curiosity or frustration, the user edits something!
Comment 3 Curtis Windatt CLA 2009-02-04 16:15:00 EST
(In reply to comment #2)
> If a wizard has no error message and it opens with a disabled Finish button
> because the directory path is invalid. The user will have no clue why the
> Finish button is disable. Until unless, out of curiosity or frustration, the
> user edits something!
> 

There are a few options...

1) Ignore the UI guidelines and open the wizard page with an error.
The guidelines are here btw: http://wiki.eclipse.org/User_Interface_Guidelines#Wizards

2) Open the wizard with a message (not an error) with something like "please enter a valid directory" and give focus to the text box.

3) Recognize that the location we are trying to fill in is invalid and leave the directory location blank.

I would probably go with (3) in this case.  Fortunately, it should be exceptionally rare for the wizard to open with an invalid directory (note that the path has to be invalid, it doesn't have to exist).  I had it happen once because I used a workspace in Linux that I had used in Windows previously.

The important part of this bug is to validate the directory path after they have typed something in the box.
Comment 4 Ankur Sharma CLA 2009-02-04 18:00:33 EST
Created attachment 124736 [details]
Patch to validate directory path

The paths are now checked for correctness too. If a default value is invalid, the combo will be made empty.
There was a small bug on Product export page. Even when the directory path was provided the Page description used to display warning message. Fixed that too.

Curtis, please test the patch for Linux once. I don't have access to a Linux box right now.
Comment 5 Curtis Windatt CLA 2009-02-05 16:40:53 EST
Looked at the code and it looks good.  Testing on linux turned out to be somewhat pointless as any string I enter is a valid path (which makes we wonder why ant complained about my windows path).  I will test on Windows or the Mac before committing as I am worried that by clearing the error label before setting it we'll get message flashing.
Comment 6 Curtis Windatt CLA 2009-02-06 12:23:06 EST
Tested on WinXP and it works great.  Applied the patch to head with trivial changes.  Great work Ankur, looking forward to your next patch.
Comment 7 Curtis Windatt CLA 2009-02-06 12:23:48 EST
Fixed.