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

Bug 275252

Summary: [ui] Selecting a disabled site in the autocomplete no longer enables the site
Product: [Eclipse Project] Equinox Reporter: Susan McCourt <susan>
Component: p2Assignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: henrik.lindberg
Version: 3.5Flags: john.arthorne: review+
Target Milestone: 3.5 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Susan McCourt CLA 2009-05-06 23:57:13 EDT
- disable all sites
- install new software...
- type part of a site name that is disabled and select it in the autocomplete

The combo is filled in with the name and an error indicator appears saying:
The location SomeName - http://some.location.com is not recognized.

- need to fix the bug
- for whatever case this error message would be appropriate, it would be more readable to say:

The site "SomeName - http://some.location.com" is not recognized.
Comment 1 Henrik Lindberg CLA 2009-05-07 05:39:40 EDT
What does it mean - "site not recognized" ? 
I think it is kind of a strange error message... Why isn't it "recognized" - is it wearing a false moustache perhaps? :)

Comment 2 Susan McCourt CLA 2009-05-08 10:29:13 EDT
This bug manifests when the disabled repo is named.   The method that composes the "Name - Location" string for the combo is inadvertantly being used to form a URI for a disabled repo.
Comment 3 Susan McCourt CLA 2009-05-08 10:32:11 EDT
(In reply to comment #1)
> What does it mean - "site not recognized" ? 
> I think it is kind of a strange error message... Why isn't it "recognized" - is
> it wearing a false moustache perhaps? :)
> 

;-)

how about
"SomeName - http://some.location.com" is hauntingly familiar but I think it's lost a little weight or perhaps gotten a haircut.

After fixing this bug, this error will still manifest when a typed-in string doesn't form a valid URI.  So I'll change it to something like:

"foo" is not a valid software site location.

Comment 4 Susan McCourt CLA 2009-05-11 14:50:26 EDT
Created attachment 135197 [details]
patch

This patch keeps a map between disabled site proposal strings and the actual URI.  When the combo string matches a disabled repo proposal, the location is retrieved from the map rather than trying to validate the proposal string.
Comment 5 Susan McCourt CLA 2009-05-11 14:52:39 EDT
John, can you please review?  
This bug has been there since disabled site completions were added.  When I tested the feature, I must have used only disabled sites that had no name (which happens to be the case for the disabled Galileo references that have not been loaded)...

This patch ensures that a disabled site string suggested by autocomplete maps back to the original disabled URI rather than trying to validate the string.

I also changed the wording of the "invalid location" message per Henrik's remarks.
Comment 6 John Arthorne CLA 2009-05-11 17:48:26 EDT
Looks good. Released to HEAD.