use of com.cubrid.common.ui.spi.table.button.TableEditButtonSupport in project cubrid-manager by CUBRID.
the class ColumnViewerSorter method setInputs.
public void setInputs() {
tableListView.setInput(tableList);
tableListView.refresh();
Connection connection = null;
try {
connection = JDBCConnectionManager.getConnection(database.getDatabaseInfo(), true);
isSchemaCommentInstalled = SchemaCommentHandler.isInstalledMetaTable(database.getDatabaseInfo(), connection);
TableDashboardComposite tableComp = new TableDashboardComposite(tabFolder, SWT.NONE);
tableComp.initialize();
if (database.getDatabaseInfo().getUserTableInfoList().size() > 0) {
ClassInfo classInfo = database.getDatabaseInfo().getUserTableInfoList().get(0);
SchemaInfo schemaInfo = database.getDatabaseInfo().getSchemaInfo(connection, classInfo.getClassName());
IDatabaseSpec dbSpec = database.getDatabaseInfo();
if (schemaInfo != null && SchemaCommentHandler.isInstalledMetaTable(dbSpec, connection)) {
Map<String, SchemaComment> comments = SchemaCommentHandler.loadDescription(dbSpec, connection, classInfo.getClassName());
if (comments != null) {
SchemaCommentHandler.bindSchemaInfo(comments, schemaInfo);
}
}
tableComp.setInput(schemaInfo, database.getDatabaseInfo(), isSchemaCommentInstalled);
}
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
} finally {
QueryUtil.freeQuery(connection);
}
if (isSchemaCommentInstalled) {
new TableEditButtonSupport(tableListView, this, 1);
}
}
Aggregations