use of org.eclipse.linuxtools.internal.docker.ui.wizards.ContainerCommit in project linuxtools by eclipse.
the class CommitContainerCommandHandler method execute.
@Override
public Object execute(final ExecutionEvent event) {
final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
List<IDockerContainer> selectedContainers = CommandUtils.getSelectedContainers(activePart);
final IDockerConnection connection = CommandUtils.getCurrentConnection(activePart);
if (selectedContainers.size() != 1 || connection == null)
return null;
final IDockerContainer container = selectedContainers.get(0);
final ContainerCommit wizard = new ContainerCommit(container.id());
final boolean commitContainer = CommandUtils.openWizard(wizard, HandlerUtil.getActiveShell(event));
if (commitContainer) {
performCommitContainer(wizard, connection, container);
}
return null;
}
Aggregations