Search in sources :

Example 1 with CreateSandboxProjectDialog

use of org.talend.repository.ui.login.sandboxProject.CreateSandboxProjectDialog in project tdi-studio-se by Talend.

the class LoginProjectPage method createSandboxProject.

private void createSandboxProject() {
    if (getConnection() != null) {
        // must set the current connection, if existed
        setRepositoryContextInContext();
    }
    CreateSandboxProjectDialog sandboxDialog = new CreateSandboxProjectDialog(getShell(), getConnection());
    if (sandboxDialog.open() == Window.OK) {
        ConnectionUserPerReader instance = ConnectionUserPerReader.getInstance();
        loginHelper.setStoredConnections(instance.forceReadConnections());
        loginHelper.setLastConnection(sandboxDialog.getConnectionBean().getName());
        loginHelper.saveConnections();
        fillUIContentsWithBusyCursor();
    }
    try {
        checkErrors();
    } catch (PersistenceException e1) {
        CommonExceptionHandler.process(e1);
    }
    if (getConnection() != null) {
        // reset the context, because there are some changes in create sandbox dialog
        setRepositoryContextInContext();
    }
}
Also used : CreateSandboxProjectDialog(org.talend.repository.ui.login.sandboxProject.CreateSandboxProjectDialog) ConnectionUserPerReader(org.talend.repository.ui.login.connections.ConnectionUserPerReader) PersistenceException(org.talend.commons.exception.PersistenceException)

Aggregations

PersistenceException (org.talend.commons.exception.PersistenceException)1 ConnectionUserPerReader (org.talend.repository.ui.login.connections.ConnectionUserPerReader)1 CreateSandboxProjectDialog (org.talend.repository.ui.login.sandboxProject.CreateSandboxProjectDialog)1