| Summary: | Do not add "show in source" node action when same model element as parent | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Konstantin Komissarchik <konstantin> |
| Component: | Sapphire | Assignee: | Konstantin Komissarchik <konstantin> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ling.hao |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Konstantin Komissarchik
Fixed both of the problems. The "show in source" action now appears only if the node's model element is not the same as parent's model element. This is simpler to understand that the old approach. The action is then enabled if the model element is currently associated with a DOM node. The action's enablement state is actively managed as model element's properties are changed and the DOM element comes and goes. Marking as fixed. Found one minor issue: 1. Integer -> Simple -> enter any number 2. Show in source 3. In source view delete the entire <integer></integer> block 4. Go back to view, right click on Integer node, and "Show in source" is still enabled. When selected, it switches to the source view and the entire source is selected. The issue described in Comment #3 doesn't reproduce as described. I was able to finally reproduce it, but you have to replace step 3 with the following: 3. Delete just <simple></simple> block or clear Simple property. The show in source action on Integer node should still be enabled. 4. Now delete <integer></integer> block. The show in source action remains enabled. This appears to be related to be an issue in XML change listening. I have opened Bug 333524 to track the problem described in Comment #3 and Comment #4. That issue sufficiently separate from the original problem described in this bug, that I am re-resolving this one as fixed. Verified. |