Search in sources :

Example 1 with CreateLikeTableTask

use of com.cubrid.cubridmanager.core.cubrid.table.task.CreateLikeTableTask in project cubrid-manager by CUBRID.

the class CreateLikeTableDialog method createTable.

/**
	 * 
	 * Execute task to create table
	 * 
	 */
private void createTable() {
    newTableName = newTableNameText.getText();
    String taskName = Messages.bind(Messages.createLikeTableTaskName, newTableName);
    TaskExecutor executor = new CommonTaskExec(taskName);
    CreateLikeTableTask task = new CreateLikeTableTask(getDatabase().getDatabaseInfo());
    likeTableName = likeTableNameText.getText();
    task.setTableName(newTableName);
    task.setLikeTableName(likeTableName);
    executor.addTask(task);
    new ExecTaskWithProgress(executor).exec();
    if (task.isSuccess()) {
        super.buttonPressed(IDialogConstants.OK_ID);
    }
}
Also used : CommonTaskExec(com.cubrid.common.ui.spi.progress.CommonTaskExec) TaskExecutor(com.cubrid.common.ui.spi.progress.TaskExecutor) CreateLikeTableTask(com.cubrid.cubridmanager.core.cubrid.table.task.CreateLikeTableTask) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)

Aggregations

CommonTaskExec (com.cubrid.common.ui.spi.progress.CommonTaskExec)1 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)1 TaskExecutor (com.cubrid.common.ui.spi.progress.TaskExecutor)1 CreateLikeTableTask (com.cubrid.cubridmanager.core.cubrid.table.task.CreateLikeTableTask)1