| Summary: | Editor flags "dirty" state change on outline click | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Simon Kaegi <simon_kaegi> |
| Component: | Client | Assignee: | Mark Macdonald <mamacdon> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | mamacdon, Silenio_Quarti |
| Version: | 0.4 | Flags: | Silenio_Quarti:
review+
|
| Target Milestone: | 0.4 RC2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 371696 | ||
|
Description
Simon Kaegi
There's a helper in setup.js that figures out if a given URI represents a different resource from the one you're editing. While it was supposed to take a URI, in fact it only worked correctly when passed a fragment with no '#'. This made it fail when called by the selection service (which the outliner uses). I changed it to expect the '#'. [1]. Fix is on branch bug371683: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=bug371683 Tested these cases, in both dirty and clean editors: (a) Navigate to outline items (b) Open the same resource using the Find Files dialog (c) Open a different resource using the Find Files dialog (d) Open a different resource by editing the address bar. and verified: - Not prompted when navigating outline - Not prompted when leaving a clean editor - Not prompted when selecting the same resource from "Find Files" dialog - Prompted when leaving a dirty editor (there's a separate bug here regarding the repeated prompt, see 371696) Changes are good. There is problem with this patch. The call to setSelections() in hashChanged() needs to prepend "#" to dojo.hash(). Otherwise adding a line number parameter to the hash in the address bar does not work. Note that the patch from bug#371696 is doing that. Updated the branch to fix the issue Silenio found. The updated changes can released. |