use of org.eclipse.linuxtools.internal.docker.ui.wizards.ImageRemoveTag in project linuxtools by eclipse.
the class RemoveTagCommandHandler method execute.
@Override
public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
final List<IDockerImage> selectedImages = CommandUtils.getSelectedImages(activePart);
final IDockerConnection connection = CommandUtils.getCurrentConnection(activePart);
if (selectedImages.size() != 1 || connection == null) {
Activator.log(new DockerException(CommandMessages.getString(// $NON-NLS-1$
"Command.missing.selection.failure")));
return null;
}
final IDockerImage image = selectedImages.get(0);
final ImageRemoveTag wizard = new ImageRemoveTag(image);
final boolean removeTag = CommandUtils.openWizard(wizard, HandlerUtil.getActiveShell(event));
if (removeTag) {
performRemoveTagImage(connection, wizard.getTag());
}
return null;
}
Aggregations