use of org.eclipse.linuxtools.internal.docker.ui.wizards.ImageRunSelectionModel.ExposedPortModel in project linuxtools by eclipse.
the class ImageRunSelectionPage method onEditPort.
private SelectionListener onEditPort(final CheckboxTableViewer exposedPortsTableViewer) {
return SelectionListener.widgetSelectedAdapter(e -> {
final IStructuredSelection selection = exposedPortsTableViewer.getStructuredSelection();
final ExposedPortModel selectedContainerPort = (ExposedPortModel) selection.getFirstElement();
final ContainerPortDialog dialog = new ContainerPortDialog(getShell(), selectedContainerPort);
dialog.create();
if (dialog.open() == IDialogConstants.OK_ID) {
final ExposedPortModel configuredPort = dialog.getPort();
selectedContainerPort.setContainerPort(configuredPort.getContainerPort());
selectedContainerPort.setHostAddress(configuredPort.getHostAddress());
selectedContainerPort.setHostPort(configuredPort.getHostPort());
exposedPortsTableViewer.refresh();
}
});
}
Aggregations