private void processReference(SModelReferenceEvent event) { SReference ref = event.getReference(); final SNode sourceNode = ref.getSourceNode(); if (sourceNode.getModel() == null) { return; } final SNodeId nodeId = sourceNode.getNodeId(); final String role = ref.getRole(); runUpdateTask( new _FunctionTypes._void_P0_E0() { public void invoke() { removeChanges( nodeId, SetReferenceChange.class, new _FunctionTypes._return_P1_E0<Boolean, SetReferenceChange>() { public Boolean invoke(SetReferenceChange ch) { return role.equals(ch.getRole()); } }); buildAndAddChanges( new _FunctionTypes._void_P1_E0<ChangeSetBuilder>() { public void invoke(ChangeSetBuilder b) { b.buildForReference(getOldNode(nodeId), sourceNode, role); } }); } }, event.getReference().getSourceNode(), event); }
private void processEvent(SModelReferenceEvent event) { SetSequence.fromSet(myDependenciesToInvalidate) .addElement(event.getReference().getSourceNode()); }