use of org.whole.lang.ui.editparts.CompositeColumnWithPlaceholderPart in project whole by wholeplatform.
the class TablePartFactory method createEditPart.
public EditPart createEditPart(EditPart context, Object modelEntity) {
IEntity entity = (IEntity) modelEntity;
EntityDescriptor<?> ed = entity.wGetEntityDescriptor();
if (!ed.equals(CommonsEntityDescriptorEnum.Resolver))
switch(entity.wGetEntityKind()) {
case DATA:
switch(ed.getDataKind()) {
case STRING:
return new LiteralTextualEntityPart();
default:
return new LiteralDataEntityPart();
}
case COMPOSITE:
if (ed.getEntityFeatureDescriptor(0).isReference())
return new CompositeEntityReferenceColumnPart(ed);
else if (embedChildren(entity))
return new CompositeEntityTablePart(ed);
else
return new CompositeColumnWithPlaceholderPart();
case SIMPLE:
if (isEmbedded(entity))
return new SimpleEntityTableRowPart(ed);
else
return new SimpleEntityTablePart(ed);
}
return new PlaceHolderPart();
}
use of org.whole.lang.ui.editparts.CompositeColumnWithPlaceholderPart in project whole by wholeplatform.
the class ArtifactsOutlinePartFactoryVisitor method visit.
@Override
public void visit(Artifacts entity) {
super.visit(entity);
part = new CompositeColumnWithPlaceholderPart();
}
use of org.whole.lang.ui.editparts.CompositeColumnWithPlaceholderPart in project whole by wholeplatform.
the class QueriesPartFactoryVisitor method visit.
@Override
public void visit(Expressions entity) {
IEntity parent = entity.wGetParent();
if (EntityUtils.hasParent(entity)) {
if (Matcher.match(QueriesEntityDescriptorEnum.EntityTemplate, parent)) {
part = new CompositeColumnWithPlaceholderPart();
return;
} else if (Matcher.match(QueriesEntityDescriptorEnum.UnionAll, parent) || Matcher.isAssignableAsIsFrom(QueriesEntityDescriptorEnum.CollectByExpression, parent)) {
part = new CommaSeparatedCompositeColumnPart();
return;
}
}
part = new CommaSeparatedCompositeFlowPart();
}
Aggregations