Search in sources :

Example 1 with FindImageInfoRunnable

use of org.eclipse.linuxtools.internal.docker.ui.jobs.FindImageInfoRunnable in project linuxtools by eclipse.

the class ImageRunResourceVolumesVariablesPage method findImageInfo.

private IDockerImageInfo findImageInfo(final IDockerImage selectedImage) throws InvocationTargetException, InterruptedException {
    final FindImageInfoRunnable findImageInfoRunnable = new FindImageInfoRunnable(selectedImage);
    getContainer().run(true, true, findImageInfoRunnable);
    final IDockerImageInfo selectedImageInfo = findImageInfoRunnable.getResult();
    return selectedImageInfo;
}
Also used : FindImageInfoRunnable(org.eclipse.linuxtools.internal.docker.ui.jobs.FindImageInfoRunnable) IDockerImageInfo(org.eclipse.linuxtools.docker.core.IDockerImageInfo)

Example 2 with FindImageInfoRunnable

use of org.eclipse.linuxtools.internal.docker.ui.jobs.FindImageInfoRunnable in project linuxtools by eclipse.

the class ImageRunSelectionPage method getImageInfo.

/**
 * @param selectedImage
 * @return the corresponding {@link IDockerImageInfo} or <code>null</code>
 *         if something went wrong.
 */
private IDockerImageInfo getImageInfo(final IDockerImage selectedImage) {
    try {
        final FindImageInfoRunnable findImageInfoRunnable = new FindImageInfoRunnable(selectedImage);
        getContainer().run(true, true, findImageInfoRunnable);
        final IDockerImageInfo selectedImageInfo = findImageInfoRunnable.getResult();
        return selectedImageInfo;
    } catch (InvocationTargetException | InterruptedException e) {
        Activator.log(e);
    }
    return null;
}
Also used : FindImageInfoRunnable(org.eclipse.linuxtools.internal.docker.ui.jobs.FindImageInfoRunnable) IDockerImageInfo(org.eclipse.linuxtools.docker.core.IDockerImageInfo) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Aggregations

IDockerImageInfo (org.eclipse.linuxtools.docker.core.IDockerImageInfo)2 FindImageInfoRunnable (org.eclipse.linuxtools.internal.docker.ui.jobs.FindImageInfoRunnable)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1