Community
Participate
Working Groups
Build Identifier: I20110613-1736 If e.g a quickfix modifies the name of an object, references to that object within the document are corrupted. As a local patch, I solved that issue by modifying DefaultTextEditComposer. recordObjectModification(EObject obj) as follows (note the change of the signature): protected void recordObjectModification(Notification notification) { EObject obj = (EObject) notification.getNotifier(); if (obj.eResource() == null || obj.eResource() != resource) { getModifiedObjects().remove(obj); } else { getModifiedObjects().add(obj); if("name".equals( ((EStructuralFeature) notification.getFeature()).getName())){ final Collection<Setting> refs = UsageCrossReferencer.find(obj, resource); for (Setting setting : refs) { getModifiedObjects().add(setting.getEObject()); } } } } Reproducible: Always
Please use the rename refactoring if you want to change the identifying attribute of an EObject. Otherwise external references will be broken. The TextEditComposer will record the modifications as is since it is a low level component. To give you just an example: if we change the behavior as suggested, it would not be possible to create a semantic quickfix that solves a name clash.
Closing all bugs that were set to RESOLVED before Neon.0