Search in sources :

Example 1 with ImagePush

use of org.eclipse.linuxtools.internal.docker.ui.wizards.ImagePush in project linuxtools by eclipse.

the class PushImageCommandHandler method execute.

@Override
public Object execute(final ExecutionEvent event) {
    final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
    final IDockerImage selectedImage = CommandUtils.getSelectedImage(activePart);
    final ImagePush wizard = new ImagePush(selectedImage, selectedImage.repo() + ":" + selectedImage.tags().get(0));
    final boolean pushImage = CommandUtils.openWizard(wizard, HandlerUtil.getActiveShell(event));
    if (pushImage) {
        final IDockerConnection connection = CommandUtils.getCurrentConnection(activePart);
        performPushImage(wizard, connection);
    }
    return null;
}
Also used : IWorkbenchPart(org.eclipse.ui.IWorkbenchPart) IDockerConnection(org.eclipse.linuxtools.docker.core.IDockerConnection) IDockerImage(org.eclipse.linuxtools.docker.core.IDockerImage) ImagePush(org.eclipse.linuxtools.internal.docker.ui.wizards.ImagePush)

Aggregations

IDockerConnection (org.eclipse.linuxtools.docker.core.IDockerConnection)1 IDockerImage (org.eclipse.linuxtools.docker.core.IDockerImage)1 ImagePush (org.eclipse.linuxtools.internal.docker.ui.wizards.ImagePush)1 IWorkbenchPart (org.eclipse.ui.IWorkbenchPart)1