use of org.jboss.tools.openshift.internal.ui.wizard.applicationexplorer.CreateStorageModel in project jbosstools-openshift by jbosstools.
the class CreateStorageHandler method execute.
@Override
public Object execute(ComponentElement component, Shell shell) throws ExecutionException {
try {
Odo odo = component.getRoot().getOdo();
String projectName = component.getParent().getParent().getWrapped();
String applicationName = component.getParent().getWrapped().getName();
final CreateStorageModel model = new CreateStorageModel(odo, projectName, applicationName, component.getWrapped().getName(), Storage.getSizes());
final IWizard createStorageWizard = new CreateStorageWizard(model);
if (WizardUtils.openWizardDialog(createStorageWizard, shell) == Window.OK) {
executeInJob("Create storage", monitor -> execute(model, component));
}
return Status.OK_STATUS;
} catch (IOException e) {
return OpenShiftUIActivator.statusFactory().errorStatus(e);
}
}
Aggregations