use of org.jboss.tools.openshift.internal.ui.wizard.project.ManageProjectsWizard in project jbosstools-openshift by jbosstools.
the class ManageProjectsHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection selection = HandlerUtil.getCurrentSelection(event);
Connection connection = UIUtils.getFirstElement(selection, Connection.class);
if (connection == null) {
IResource resource = UIUtils.getFirstElement(selection, IResource.class);
if (resource != null) {
connection = ConnectionsRegistryUtil.getConnectionFor(resource);
}
}
if (connection == null) {
return OpenShiftUIActivator.statusFactory().cancelStatus("No connection selected that we can manage projects for.");
}
new OkButtonWizardDialog(HandlerUtil.getActiveShell(event), new ManageProjectsWizard(connection)).open();
return null;
}
Aggregations