| Summary: | refactor rename context menu item does not follow selection very well in source editor | ||
|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Amy Wu <for.work.things> |
| Component: | wst.xsd | Assignee: | wst.xsd-triaged <wst.xsd-triaged> |
| Status: | CLOSED FIXED | QA Contact: | Valentin Baciu <valentinbaciu> |
| Severity: | normal | ||
| Priority: | P3 | CC: | gindik, valentinbaciu |
| Version: | 2.0.1 | ||
| Target Milestone: | 3.2 M6 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Amy Wu
*** Bug 247056 has been marked as a duplicate of this bug. *** Still a problem with 3.1. Here's some more info. The Refactor action delegate is contributed as a viewerContribution and expects to be called with the current (DOM) selection to update its children's enabled/disabled state. I have noticed that the source editor (and potentially even the text editor) does not send selection change events when the user simply clicks around on the text. In one scenario the cursor is moved from inside an attribute's value to another's in a different element, with no text selected. Instead of selection changed events, the editor sends post selection change events, and our refactor action delegate is not listening to those (the source viewer is not adding it to the post selection listeners list). The selection change event is fired if I select some text and then move away to another attribute or element. Basically any real change in the text selection seems to trigger the correct selection change event, and properly enable/disable our action (I had to make a minor change in our code to convert from an attribute to its parent element). This is unlike the Java editor where the user can simply click on a method name and refactor/rename it, without having to select the entire name, or any part of the name for that matter. It seems we need a little help from the source editor to get this working properly. Until such time, please use the graphical view. It seems we've fixed this indirectly when implementing bug 253264. This works fine with WTP 3.2 M6 and newer. Closing. |