use of org.eclipse.reddeer.swt.impl.menu.ContextMenu in project linuxtools by eclipse.
the class DockerConnection method refreshImages.
/**
* Refresh images.
*/
public void refreshImages() {
treeViewerHandler.getTreeItem(item, "Images").select();
new ContextMenu().getItem("Refresh").select();
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenu in project linuxtools by eclipse.
the class DockerContainer method remove.
public void remove() {
select();
boolean removeEnabled = new ContextMenu().getItem("Remove").isEnabled();
if (!removeEnabled) {
new ContextMenu().getItem("Stop").select();
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
item.select();
}
new ContextMenu().getItem("Remove").select();
new WaitUntil(new ShellIsAvailable("Confirm Remove Container"), TimePeriod.DEFAULT);
new PushButton("OK").click();
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenu in project linuxtools by eclipse.
the class DockerConnection method pullImage.
public void pullImage(String imageName, String imageTag, String dockerRegister) {
if (getImage(imageName, imageTag) == null) {
refreshImages();
treeViewerHandler.getTreeItem(item, "Images").select();
new ContextMenu().getItem("Pull...").select();
new WaitUntil(new ShellIsAvailable("Pull Image"), TimePeriod.DEFAULT);
Shell pullShell = new DefaultShell("Pull Image");
// select register
if (dockerRegister != null) {
Combo combo = new DefaultCombo();
combo.setSelection(dockerRegister);
}
new LabeledText(IMAGE_NAME_LABEL_DIALOG).setFocus();
new LabeledText(IMAGE_NAME_LABEL_DIALOG).setText(imageTag == null ? imageName : imageName + ":" + imageTag);
new WaitUntil(new ControlIsEnabled(new FinishButton()));
new FinishButton(pullShell).click();
new WaitWhile(new ShellIsAvailable(pullShell));
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenu in project linuxtools by eclipse.
the class DockerConnection method openImageSearchDialog.
public void openImageSearchDialog(String imageName, String imageTag, String dockerRegister) {
refreshImages();
treeViewerHandler.getTreeItem(item, "Images").select();
new ContextMenu().getItem("Pull...").select();
new WaitUntil(new ShellIsAvailable("Pull Image"), TimePeriod.DEFAULT);
// select register
if (dockerRegister != null) {
Combo combo = new DefaultCombo();
combo.setSelection(dockerRegister);
}
new LabeledText(IMAGE_NAME_LABEL_DIALOG).setFocus();
new LabeledText(IMAGE_NAME_LABEL_DIALOG).setText(imageTag == null ? imageName : imageName + ":" + imageTag);
new PushButton("Search...").click();
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenu in project linuxtools by eclipse.
the class DockerImage method pushImage.
public void pushImage(String registryAccount, boolean forceTagging, boolean keepTaggedImage) {
select();
new ContextMenu().getItem("Push...").select();
new DefaultShell("Push Image");
Combo combo = new DefaultCombo();
combo.setSelection(registryAccount);
new CheckBox("Force tagging image with selected registry").toggle(forceTagging);
new CheckBox("Keep tagged image upon completion").toggle(keepTaggedImage);
new FinishButton().click();
}
Aggregations