Search in sources :

Example 56 with IEntity

use of org.whole.lang.model.IEntity in project whole by wholeplatform.

the class ReplacePart method getModelSpecificChildren.

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

Example 57 with IEntity

use of org.whole.lang.model.IEntity 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 58 with IEntity

use of org.whole.lang.model.IEntity 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)

Example 59 with IEntity

use of org.whole.lang.model.IEntity in project whole by wholeplatform.

the class EditorPart method getModelSpecificChildren.

protected List<IEntity> getModelSpecificChildren() {
    Editor entity = getModelEntity();
    List<IEntity> list = new ArrayList<IEntity>(5);
    list.add(entity.getEditorName());
    list.add(entity.getSuperEditorName());
    list.add(entity.getModelComponent());
    list.add(entity.getViewComponent());
    list.add(entity.getControllerComponent());
    return list;
}
Also used : IEntity(org.whole.lang.model.IEntity) ArrayList(java.util.ArrayList) Editor(org.whole.lang.editors.model.Editor)

Example 60 with IEntity

use of org.whole.lang.model.IEntity in project whole by wholeplatform.

the class NotPart method getModelSpecificChildren.

protected List<IEntity> getModelSpecificChildren() {
    Not entity = getModelEntity();
    List<IEntity> list = new ArrayList<IEntity>(1);
    list.add(entity.getPredicate());
    return list;
}
Also used : Not(org.whole.lang.grammars.model.Not) IEntity(org.whole.lang.model.IEntity) ArrayList(java.util.ArrayList)

Aggregations

IEntity (org.whole.lang.model.IEntity)1407 ArrayList (java.util.ArrayList)604 Test (org.junit.Test)241 IBindingManager (org.whole.lang.bindings.IBindingManager)141 PathExpression (org.whole.lang.queries.model.PathExpression)68 ITemplateManager (org.whole.lang.templates.ITemplateManager)61 Grammar (org.whole.lang.grammars.model.Grammar)50 TestXmlGrammar (org.whole.lang.grammars.util.TestXmlGrammar)46 FeatureDescriptor (org.whole.lang.reflect.FeatureDescriptor)43 Model (org.whole.lang.models.model.Model)40 InternalIEntity (org.whole.lang.model.InternalIEntity)38 VisitException (org.whole.lang.visitors.VisitException)35 IEntityPartViewer (org.whole.lang.ui.viewers.IEntityPartViewer)30 ModelsModel (org.whole.lang.models.codebase.ModelsModel)27 WholeIllegalArgumentException (org.whole.lang.exceptions.WholeIllegalArgumentException)26 StreamPersistenceProvider (org.whole.lang.codebase.StreamPersistenceProvider)24 ModelBuilderOperation (org.whole.lang.builders.ModelBuilderOperation)22 XmlModel (org.whole.lang.models.codebase.XmlModel)22 MissingVariableException (org.whole.lang.visitors.MissingVariableException)22 IEntityPart (org.whole.lang.ui.editparts.IEntityPart)21