final SpecObject object, AttributeDefinition ad,
final EList<String> names) {
AttributeValue av = ReqIF10Util.getAttributeValue(object, ad);
if (!(av instanceof AttributeValueString))
return;
final AttributeValueString value = (AttributeValueString) av;
final EObject target = getElementFromProxy(getProxyUrlFromValue(value
.getTheValue()));
System.out.println("Registering with: " + target.eResource());
target.eResource().eAdapters().add(new AdapterImpl() {
@Override
public void notifyChanged(Notification notification) {
System.out.println("Changed.");
String newContent = TracingUtil.createProxyContent(
(EObject) target, names);
if (!newContent.equals(value.getTheValue())) {
Command cmd = SetCommand
.create(domain,
object,
ReqIF10Package.Literals.SPEC_ELEMENT_WITH_ATTRIBUTES__VALUES,
newContent);