use of org.eclipse.linuxtools.internal.docker.ui.wizards.ImagePull in project linuxtools by eclipse.
the class PullImageCommandHandler method execute.
@Override
public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
final IDockerConnection connection = CommandUtils.getCurrentConnection(activePart);
if (connection == null) {
MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), CommandMessages.getString(MISSING_CONNECTION), CommandMessages.getString(ERROR_PULLING_IMAGE_NO_CONNECTION));
} else {
final ImagePull wizard = new ImagePull(connection);
final boolean pullImage = CommandUtils.openWizard(wizard, HandlerUtil.getActiveShell(event));
if (pullImage) {
performPullImage(connection, wizard.getSelectedImageName(), // part of the IRegistry interface
(AbstractRegistry) wizard.getSelectedRegistryAccount());
}
}
return null;
}
Aggregations