Search in sources :

Example 41 with IEntity

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

the class RemoveOperation method remove.

public <E extends IEntity> E remove(E entity) {
    collectDescendantTree(entity);
    splitAdjacencyGraph();
    IEntity parent = entity.wGetParent();
    if (!EntityUtils.isNull(parent))
        parent.wRemove(entity);
    return entity;
}
Also used : IEntity(org.whole.lang.model.IEntity)

Example 42 with IEntity

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

the class ReflectionServer method insertAround.

// TODO String.. sourceIds
public IEntity insertAround(IEntity targetEntity, IEntity sourceEntity) {
    // add as arguments
    IEntity parentEntity = targetEntity.wGetParent();
    int index = parentEntity.wIndexOf(targetEntity);
    parentEntity.wSet(index, sourceEntity);
    return sourceEntity;
}
Also used : IEntity(org.whole.lang.model.IEntity) InternalIEntity(org.whole.lang.model.InternalIEntity)

Example 43 with IEntity

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

the class ReflectionServer method insertBefore.

// TODO String.. sourceIds
public IEntity insertBefore(IEntity targetEntity, IEntity sourceEntity) {
    // add as arguments
    IEntity parentEntity = targetEntity.wGetParent();
    int index = parentEntity.wIndexOf(targetEntity);
    parentEntity.wAdd(index, sourceEntity);
    return sourceEntity;
}
Also used : IEntity(org.whole.lang.model.IEntity) InternalIEntity(org.whole.lang.model.InternalIEntity)

Example 44 with IEntity

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

the class ReflectionServer method insertAfter.

// TODO String.. sourceIds
public IEntity insertAfter(IEntity targetEntity, IEntity sourceEntity) {
    // add as arguments
    IEntity parentEntity = targetEntity.wGetParent();
    int index = parentEntity.wIndexOf(targetEntity);
    parentEntity.wAdd(index + 1, sourceEntity);
    return sourceEntity;
}
Also used : IEntity(org.whole.lang.model.IEntity) InternalIEntity(org.whole.lang.model.InternalIEntity)

Example 45 with IEntity

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

the class AttributeRowPart method getModelSpecificChildren.

protected List<IEntity> getModelSpecificChildren() {
    Attribute entity = getModelEntity();
    List<IEntity> children = new ArrayList<IEntity>(2);
    children.add(entity.getName());
    children.add(entity.getValue());
    return children;
}
Also used : Attribute(org.whole.lang.frames.model.Attribute) 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