Search in sources :

Example 1 with OIDNavigatorDialog

use of com.cubrid.common.ui.common.dialog.OIDNavigatorDialog in project cubrid-manager by CUBRID.

the class OIDNavigatorAction method run.

public void run() {
    Object[] obj = this.getSelectedObj();
    if (!isSupported(obj)) {
        this.setEnabled(false);
        return;
    }
    ISchemaNode node = (ISchemaNode) obj[0];
    CubridDatabase database = node.getDatabase();
    Connection conn = null;
    try {
        conn = JDBCConnectionManager.getConnection(database.getDatabaseInfo(), true);
        OIDNavigatorDialog dialog = new OIDNavigatorDialog(getShell(), conn, null);
        dialog.open();
    } catch (SQLException e) {
        LOGGER.error("Can not request oid information by jdbc.", e);
        //TODO: error message localizing
        String message = Messages.bind(Messages.errCommonTip, e.getErrorCode(), e.getMessage());
        CommonUITool.openErrorBox(message);
    } finally {
        QueryUtil.freeQuery(conn);
    }
}
Also used : ISchemaNode(com.cubrid.common.ui.spi.model.ISchemaNode) SQLException(java.sql.SQLException) Connection(java.sql.Connection) CubridDatabase(com.cubrid.common.ui.spi.model.CubridDatabase) OIDNavigatorDialog(com.cubrid.common.ui.common.dialog.OIDNavigatorDialog)

Aggregations

OIDNavigatorDialog (com.cubrid.common.ui.common.dialog.OIDNavigatorDialog)1 CubridDatabase (com.cubrid.common.ui.spi.model.CubridDatabase)1 ISchemaNode (com.cubrid.common.ui.spi.model.ISchemaNode)1 Connection (java.sql.Connection)1 SQLException (java.sql.SQLException)1