use of org.talend.sqlbuilder.erdiagram.ui.nodes.Column in project tdi-studio-se by Talend.
the class CreateRelationAction method calculateEnabled.
@Override
protected boolean calculateEnabled() {
if (getSelectedObjects().isEmpty()) {
return false;
}
List parts = getSelectedObjects();
if (parts.size() == 1) {
Object o = parts.get(0);
if (!(o instanceof ColumnPart)) {
return false;
}
columnPart = (ColumnPart) o;
if (!columnPart.isActive()) {
return false;
}
Column col = (Column) columnPart.getModel();
if (col.getElementName().equals("*")) {
//$NON-NLS-1$
return false;
}
return true;
}
return false;
}
use of org.talend.sqlbuilder.erdiagram.ui.nodes.Column in project tdi-studio-se by Talend.
the class ColumnGraphicalEditPolicy method getConnectionCreateCommand.
@Override
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
Column source = (Column) getHost().getModel();
RelationCreateCommand command = new RelationCreateCommand(source);
request.setStartCommand(command);
return command;
}
Aggregations