Search in sources :

Example 1 with Revision

use of org.whole.lang.changes.model.Revision in project whole by wholeplatform.

the class RevisionPart method refreshVisuals.

@Override
protected void refreshVisuals() {
    int index = 0, additions = 0, deletions = 0;
    Revision entity = getModelEntity();
    if (EntityUtils.hasParent(entity))
        index = entity.wGetParent().wIndexOf(entity);
    try {
        IBindingManager bm = BindingManagerFactory.instance.createArguments();
        IEntity result = BehaviorUtils.apply("whole:org.whole.lang.changes:RevisionsLibrarySemantics#revisionSummary", entity, bm);
        additions = result.wGet(0).wIntValue();
        deletions = result.wGet(1).wIntValue();
    } catch (Exception e) {
    }
    getFigure().updateData(index, additions, deletions);
}
Also used : Revision(org.whole.lang.changes.model.Revision) IEntity(org.whole.lang.model.IEntity) IBindingManager(org.whole.lang.bindings.IBindingManager)

Example 2 with Revision

use of org.whole.lang.changes.model.Revision in project whole by wholeplatform.

the class RevisionPart method getModelSpecificChildren.

protected List<IEntity> getModelSpecificChildren() {
    Revision entity = getModelEntity();
    List<IEntity> children = new ArrayList<IEntity>(1);
    children.add(entity.getRevisor());
    return children;
}
Also used : Revision(org.whole.lang.changes.model.Revision) IEntity(org.whole.lang.model.IEntity) ArrayList(java.util.ArrayList)

Aggregations

Revision (org.whole.lang.changes.model.Revision)2 IEntity (org.whole.lang.model.IEntity)2 ArrayList (java.util.ArrayList)1 IBindingManager (org.whole.lang.bindings.IBindingManager)1