Search in sources :

Example 1 with CreateDatabaseWizard

use of com.cubrid.cubridmanager.ui.cubrid.database.control.CreateDatabaseWizard in project cubrid-manager by CUBRID.

the class CreateDatabaseAction method run.

public void run() {
    Object[] obj = this.getSelectedObj();
    if (obj != null && obj.length > 0) {
        if (!isSupported(obj[0])) {
            this.setEnabled(false);
            return;
        }
        node = (ICubridNode) obj[0];
        server = node.getServer();
        ISelectionProvider provider = this.getSelectionProvider();
        viewer = (TreeViewer) provider;
    }
    String serverNameKey = node.getServer().getId() + ICubridNodeLoader.NODE_SEPARATOR + CubridServerLoader.DATABASE_FOLDER_ID;
    ICubridNode cubridServer = node.getServer().getChild(serverNameKey);
    CMWizardDialog dialog = new CMWizardDialog(getShell(), new CreateDatabaseWizard(server, viewer, cubridServer));
    dialog.setPageSize(580, 420);
    dialog.open();
}
Also used : CreateDatabaseWizard(com.cubrid.cubridmanager.ui.cubrid.database.control.CreateDatabaseWizard) ISelectionProvider(org.eclipse.jface.viewers.ISelectionProvider) ICubridNode(com.cubrid.common.ui.spi.model.ICubridNode) CMWizardDialog(com.cubrid.common.ui.spi.dialog.CMWizardDialog)

Aggregations

CMWizardDialog (com.cubrid.common.ui.spi.dialog.CMWizardDialog)1 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)1 CreateDatabaseWizard (com.cubrid.cubridmanager.ui.cubrid.database.control.CreateDatabaseWizard)1 ISelectionProvider (org.eclipse.jface.viewers.ISelectionProvider)1