Search in sources :

Example 1 with SelectCreateExternalTargetDialog

use of org.jetbrains.idea.svn.dialogs.SelectCreateExternalTargetDialog in project intellij-community by JetBrains.

the class CreateExternalAction method actionPerformed.

@Override
public void actionPerformed(@NotNull AnActionEvent e) {
    Project project = e.getRequiredData(CommonDataKeys.PROJECT);
    VirtualFile file = notNull(getIfSingle(e.getData(VcsDataKeys.VIRTUAL_FILE_STREAM)));
    SelectCreateExternalTargetDialog dialog = new SelectCreateExternalTargetDialog(project, file);
    if (dialog.showAndGet()) {
        String url = dialog.getSelectedURL();
        boolean checkout = dialog.isCheckout();
        String target = dialog.getLocalTarget().trim();
        new Task.Backgroundable(project, "Creating External") {

            @Override
            public void run(@NotNull ProgressIndicator indicator) {
                doInBackground(project, file, url, checkout, target);
            }
        }.queue();
    }
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) Project(com.intellij.openapi.project.Project) Task(com.intellij.openapi.progress.Task) ProgressIndicator(com.intellij.openapi.progress.ProgressIndicator) SelectCreateExternalTargetDialog(org.jetbrains.idea.svn.dialogs.SelectCreateExternalTargetDialog)

Aggregations

ProgressIndicator (com.intellij.openapi.progress.ProgressIndicator)1 Task (com.intellij.openapi.progress.Task)1 Project (com.intellij.openapi.project.Project)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 SelectCreateExternalTargetDialog (org.jetbrains.idea.svn.dialogs.SelectCreateExternalTargetDialog)1