use of org.whole.lang.model.IEntity in project whole by wholeplatform.
the class ConnectionReconnectCommand method undo.
public void undo() {
IEntity connection = getConnection();
connect(oldNode, oldNodeFeature, connection);
connection.wSet(getConnectionFeature(isSourceCommand() ? "source" : "target"), oldNode);
disconnect(newNode, newNodeFeature, connection);
}
use of org.whole.lang.model.IEntity in project whole by wholeplatform.
the class ConnectionReconnectCommand method execute.
public void execute() {
oldNodeFeature = getConnectionConnectedFeature(oldNode);
IEntity connection = getConnection();
connect(newNode, newNodeFeature, connection);
connection.wSet(getConnectionFeature(isSourceCommand() ? "source" : "target"), newNode);
disconnect(oldNode, oldNodeFeature, connection);
}
use of org.whole.lang.model.IEntity in project whole by wholeplatform.
the class DeleteGuideCommand method undo.
public void undo() {
parent.addGuide(guide);
Iterator iter = oldParts.keySet().iterator();
while (iter.hasNext()) {
IEntity part = (IEntity) iter.next();
guide.attachPart(part, ((Integer) oldParts.get(part)).intValue());
}
}
use of org.whole.lang.model.IEntity in project whole by wholeplatform.
the class ConnectionCreateCommand method execute.
public void execute() {
IEntity connection = getConnection();
// FIXME get transitions from presentation aspect
IEntity transitionParent = EntityUtils.getCompoundRoot(source).wGet(1);
connect(source, sourceFeature, connection);
// FIXME should use presentation aspects
connection.wSet(getConnectionFeature("source"), source);
connection.wSet(getConnectionFeature("target"), target);
connect(target, targetFeature, connection);
transitionParent.wAdd(connection);
}
use of org.whole.lang.model.IEntity in project whole by wholeplatform.
the class AbstractCompositePart method getModelChildren.
protected List<IEntity> getModelChildren() {
IEntity entity = getModelEntity();
int size = entity.wSize();
if (size == 0)
return Collections.emptyList();
List<IEntity> result = new ArrayList<IEntity>(size);
if (isModelChildrenReversed())
for (int i = size - 1; i >= 0; i--) result.add(entity.wGet(i));
else
for (int i = 0; i < size; i++) result.add(entity.wGet(i));
return result;
}
Aggregations