/*
* Destroy unreferenced projections
*/
for (UIProjection projectionUI : projectionsToRemove) {
UITermination terminationUI = projectionUI.getTermination();
projectionUI.destroy();
if (!isFirstUpdate) {
terminationUI.showPopupMessage("REMOVED Projection to "
+ terminationUI.getNodeParent().getName() + "." + terminationUI.getName());
}
}
/*
* Construct projections
*/
for (Projection projection : projectionsToAdd) {
Origin origin = projection.getOrigin();
Termination term = projection.getTermination();
UINeoNode nodeOrigin = getUINode(origin.getNode());
UINeoNode nodeTerm = getUINode(term.getNode());
if (nodeOrigin != null && nodeTerm != null) {
UIOrigin originUI = nodeOrigin.showOrigin(origin.getName());
UITermination termUI = nodeTerm.showTermination(term.getName());
originUI.connectTo(termUI, false);
if (!isFirstUpdate) {
termUI.showPopupMessage("NEW Projection to " + termUI.getName() + "."
+ getName());
}
} else {
if (nodeOrigin == null) {
Util.Assert(false, "Could not find a Origin attached to a projection: "