This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 122326

Summary: Manually changing name of a referenced element breaks the reference
Product: xml Reporter: tonybeckham <tonybeckham>
Component: Schema ToolsAssignee: Samaresh Panda <samaresh>
Status: NEW ---    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description tonybeckham 2007-11-19 19:21:41 UTC
Problem:
If you have element A and it references element B, changing the name of B via: refactoring, inline in DV, or by the
properties window in Any view the reference in element A is changed as well keeping everything as expected.  However, if
you manually change the name of B in source view, the reference to B in A is not changed so the reference is broken.  I
think that when changing to another view after such manual editing all instances of the change should be propagated so
there is no broken reference.

Steps:
1. Create a new schema
2. In schema view add a new element call it A
3. Add a new element again call it B
4. Right click A and select Add element reference and choose B
5. rename B to "Brenamed" by refactor rename, or by properties window: all instances of B are changed to Brenamed
nothing broken.  You can do the same in DV by inline editing the name of B, or properties window.
6. In source view change the name of "Brenamed" to "B2" in properties window, all is good
7. If you rename B2 the change is not updated in element A.
Comment 1 tonybeckham 2007-11-19 19:48:46 UTC
First noticed in NetBeans IDE 6.0 RC2 (Build 200711190000) but probably has been around forever.