+ nodeSession = nodeRepository.login();
+ Node repoNode = nodeSession.getNode(targetRepoPath);
+ Repository repository = RepoUtils.getRepository(repositoryFactory,
+ keyring, repoNode);
+ Credentials credentials = RepoUtils.getRepositoryCredentials(
+ keyring, repoNode);
+
+ // TODO : add an input validator
+ InputDialog inputDialog = new InputDialog(HandlerUtil
+ .getActiveWorkbenchWindow(event).getShell(),
+ "Workspace name?",
+ "Choose a name for the workspace to create",
+ prefix == null ? "" : prefix + "-", null);
+ int result = inputDialog.open();
+
+ String workspaceName = inputDialog.getValue();
+
+ // Canceled by user
+ if (result == Dialog.CANCEL || workspaceName == null
+ || "".equals(workspaceName.trim()))
+ return null;
+
+ session = repository.login(credentials);