use of org.talend.sqlbuilder.erdiagram.ui.parts.RelationPart in project tdi-studio-se by Talend.
the class ErDiagramPartFactory method createEditPart.
/*
* (non-Javadoc)
*
* @see org.eclipse.gef.EditPartFactory#createEditPart(org.eclipse.gef.EditPart, java.lang.Object)
*/
public EditPart createEditPart(EditPart context, Object model) {
EditPart part = null;
if (model instanceof ErDiagram) {
part = new ErDiagramPart();
} else if (model instanceof Column) {
part = new ColumnPart();
} else if (model instanceof Table) {
part = new TablePart();
} else if (model instanceof Relation) {
part = new RelationPart();
} else {
return null;
}
// tell the newly created part about the model object
part.setModel(model);
return part;
}
Aggregations