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

Bug 394699

Summary: global search - options menu "sort by name" sticks on name, can never sort the other way
Product: [ECD] Orion Reporter: Susan McCourt <susan>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.5   
Target Milestone: 2.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Susan McCourt CLA 2012-11-20 13:52:02 EST
- I searched on "dijit.Menu"

- on the search page I see results sorted by location and the URL includes the sort=Path asc
https://orion.eclipse.org/search/search.html#?sort=Path asc&rows=40&start=0&q=dijit.Menu+Location:/file*

- choose options->Sort by name

- now the search page sorts by name and the URL has changed.
https://orion.eclipse.org/search/search.html#?sort=NameLower asc&rows=40&start=0&q=dijit.Menu+Location:/file*

- however once I'm sorted by name, I can never get back to Location without typing the URL myself.  The menu no longer works.

As best as I can tell, the searchExplorer model never knows that it has been set to sort by name...
Comment 1 libing wang CLA 2012-11-30 16:06:06 EST
in find&replace in the editor I found similar thing:
1.Do a regEx search on global search
2.Click on a match in the result page
3.It brings you to the editor with the regEx search .
4.Open the option in the find bar

The regEx is not visually checked.
Comment 2 libing wang CLA 2012-11-30 16:12:04 EST
Comments from Susan from ST:

The find/replace menu checkmarks are computed dynamically every time you open menu, whereas before the menu stored the checkmark. 
So....if you had a bug where the model was not right...the menu might still look (before) as if it was right now that I'm querying the model live every time I open the menu, it's more obviously wrong. 
The thing to do is test against orionhub, not just the checkmark, but whether the option is actually working.
what I was seeing was that in orionhub (old menus)....the checkmark might be showing but the option would not work. And with new menus, the menu shows the model state, so the option still does not work, but it's more obvious because the  checkmark won't stick. Does htat make sense?
Comment 3 libing wang CLA 2012-12-04 10:25:19 EST
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=e47aba2bd8f978439bac782abd4e596af8524ce4.

The model state in find&replace in local search is correct but the commands._generateCheckedMenuItem function is not setting the visual checked properly. I am using node.checked = true|false and it worked.

For the global search, the state of sort is not correct but it needs both model and visual fixes. The visual fix is generic as described above.
Comment 4 libing wang CLA 2012-12-04 10:29:58 EST
Susan, I am wondering if node.value @line 927 @commands.js is still useful but I did not remove it.
http://www.w3schools.com/jsref/prop_checkbox_value.asp.