use of org.eclipse.linuxtools.internal.docker.ui.wizards.ContainerLinkDialog in project linuxtools by eclipse.
the class RunImageLinksTab method onAddLink.
private SelectionListener onAddLink() {
return SelectionListener.widgetSelectedAdapter(e -> {
final ContainerLinkDialog dialog = new ContainerLinkDialog(getShell(), model.getSelectedConnection());
dialog.create();
if (dialog.open() == IDialogConstants.OK_ID) {
model.addLink(dialog.getContainerName(), dialog.getContainerAlias());
}
updateLaunchConfigurationDialog();
});
}
use of org.eclipse.linuxtools.internal.docker.ui.wizards.ContainerLinkDialog in project linuxtools by eclipse.
the class RunImageLinksTab method onEditLink.
private SelectionListener onEditLink(final TableViewer linksTableViewer) {
return SelectionListener.widgetSelectedAdapter(e -> {
final IStructuredSelection selection = linksTableViewer.getStructuredSelection();
final ContainerLinkModel selectedContainerLink = (ContainerLinkModel) selection.getFirstElement();
final ContainerLinkDialog dialog = new ContainerLinkDialog(getShell(), model.getSelectedConnection(), selectedContainerLink);
dialog.create();
if (dialog.open() == IDialogConstants.OK_ID) {
selectedContainerLink.setContainerName(dialog.getContainerName());
selectedContainerLink.setContainerAlias(dialog.getContainerAlias());
linksTableViewer.refresh();
updateLaunchConfigurationDialog();
}
});
}
Aggregations