Search in sources :

Example 1 with PackageVMWizard

use of org.eclipse.linuxtools.internal.vagrant.ui.wizards.PackageVMWizard in project linuxtools by eclipse.

the class PackageVMCommandHandler method execute.

@Override
public Object execute(ExecutionEvent event) {
    final IStructuredSelection selection = HandlerUtil.getCurrentStructuredSelection(event);
    List<IVagrantVM> vms = CommandUtils.getSelectedContainers(selection);
    IVagrantVM vm = vms.iterator().next();
    PackageVMWizard wizard = new PackageVMWizard();
    boolean finished = CommandUtils.openWizard(wizard, HandlerUtil.getActiveShell(event));
    if (finished) {
        performPackageVM(vm, wizard.getBoxName(), Paths.get(wizard.getBoxFolder()));
    }
    return null;
}
Also used : IVagrantVM(org.eclipse.linuxtools.vagrant.core.IVagrantVM) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) PackageVMWizard(org.eclipse.linuxtools.internal.vagrant.ui.wizards.PackageVMWizard)

Aggregations

IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 PackageVMWizard (org.eclipse.linuxtools.internal.vagrant.ui.wizards.PackageVMWizard)1 IVagrantVM (org.eclipse.linuxtools.vagrant.core.IVagrantVM)1