use of org.jkiss.dbeaver.ext.erd.model.ERDObject in project dbeaver by serge-rider.
the class ERDEditorStandalone method getExecutionContext.
@Override
public DBCExecutionContext getExecutionContext() {
for (Object part : getViewer().getSelectedEditParts()) {
EditPart editPart = (EditPart) part;
if (editPart.getModel() instanceof ERDObject) {
final ERDObject model = (ERDObject) editPart.getModel();
Object object = model.getObject();
if (object instanceof DBSObject) {
DBSObject dbObject = (DBSObject) object;
DBPDataSource dataSource = dbObject.getDataSource();
return dataSource.getDefaultContext(true);
}
}
}
return null;
}
use of org.jkiss.dbeaver.ext.erd.model.ERDObject in project dbeaver by dbeaver.
the class ERDEditorStandalone method getExecutionContext.
@Override
public DBCExecutionContext getExecutionContext() {
for (Object part : getViewer().getSelectedEditParts()) {
EditPart editPart = (EditPart) part;
if (editPart.getModel() instanceof ERDObject) {
final ERDObject model = (ERDObject) editPart.getModel();
Object object = model.getObject();
if (object instanceof DBSObject) {
DBSObject dbObject = (DBSObject) object;
DBPDataSource dataSource = dbObject.getDataSource();
return dataSource.getDefaultContext(true);
}
}
}
return null;
}
Aggregations