| Summary: | Scripts with no name do not get ordered correctly in the Scripts node | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Michael Rennie <Michael_Rennie> | ||||||||||||
| Component: | Debug | Assignee: | Michael Rennie <Michael_Rennie> | ||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | Simon Kaegi <simon_kaegi> | ||||||||||||
| Severity: | normal | ||||||||||||||
| Priority: | P3 | CC: | thatnitind | ||||||||||||
| Version: | 3.2 | Flags: | simon_kaegi:
review+
|
||||||||||||
| Target Milestone: | 3.2.1 | ||||||||||||||
| Hardware: | All | ||||||||||||||
| OS: | All | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
Nitin, Simon, any thoughts on naming for scripts in this case? Steps to test: 1. open Firefox 2. with the experimental Crossfire bundle installed launch the Crossfire Listening connector 3. in Firefox connect back to Eclipse with Crossfire 4. load www.google.ca Expected everything loads as expected all script ordered nicely Happens everything loads as expected and you see a blank named script loaded with the URL http://www.google.ca/ that is out of order Created attachment 173007 [details]
better patch
This is a better patch.
1. It makes IScripts' comparable
2. Name resolution takes the last segment of the URI if present, the second last segment if no last segment, or the scheme specific part if the segment count equals 0.
3. will sub-sort based on the toString() of the URI if the resolved name equals another script.
Created attachment 173010 [details]
screen shot
this screen shot shows the improved sorting + script name resolution
Created attachment 173042 [details]
even better
This patch changes the display of the scripts slightly to not be <name> (<uri>) but instead just makes it <uri>. This feels cleaner, because now the sorting groups scripts with similar URIs, which feels more like how Firebug, etc. groups scripts.
The patch also adds a utility method to handle script URIs from a <script></script> block without blowing up.
Created attachment 173043 [details]
updated screen shot
Yep, agree this is clean. released to HEAD and 3.2.1 |
Created attachment 172960 [details] proposed fix code from HEAD If we load a script with no name (a <script></script> block for example) it will not appear ordered correctly in the Scripts node in the debug view because it has no last segment in its URI. We should account for this by given it a default name like "top-level" or the like.