Search in sources :

Example 1 with PortForwardingWizardModel

use of org.jboss.tools.openshift.internal.ui.portforwading.PortForwardingWizardModel in project jbosstools-openshift by jbosstools.

the class PortForwardingHandler method openDialog.

private void openDialog(final IPod pod) {
    Shell shell = PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
    WizardDialog dialog = new OkButtonWizardDialog(shell, new PortForwardingWizard(new PortForwardingWizardModel(pod)));
    dialog.setMinimumPageSize(700, 400);
    dialog.create();
    dialog.open();
}
Also used : OkButtonWizardDialog(org.jboss.tools.openshift.common.ui.wizard.OkButtonWizardDialog) Shell(org.eclipse.swt.widgets.Shell) PortForwardingWizardModel(org.jboss.tools.openshift.internal.ui.portforwading.PortForwardingWizardModel) OkButtonWizardDialog(org.jboss.tools.openshift.common.ui.wizard.OkButtonWizardDialog) WizardDialog(org.eclipse.jface.wizard.WizardDialog) PortForwardingWizard(org.jboss.tools.openshift.internal.ui.portforwading.PortForwardingWizard)

Example 2 with PortForwardingWizardModel

use of org.jboss.tools.openshift.internal.ui.portforwading.PortForwardingWizardModel in project jbosstools-openshift by jbosstools.

the class PortForwardingWizardModelTest method setUp.

@Before
public void setUp() throws Exception {
    when(port.getName()).thenReturn("http");
    when(port.getContainerPort()).thenReturn(3436);
    when(port.getProtocol()).thenReturn("TCP");
    when(pod.getName()).thenReturn("apodname");
    Set<IPort> ports = new HashSet<>();
    ports.add(port);
    when(pod.getNamespaceName()).thenReturn("anamespace");
    when(pod.getContainerPorts()).thenReturn(ports);
    this.model = new PortForwardingWizardModel(pod);
}
Also used : IPort(com.openshift.restclient.model.IPort) PortForwardingWizardModel(org.jboss.tools.openshift.internal.ui.portforwading.PortForwardingWizardModel) HashSet(java.util.HashSet) Before(org.junit.Before)

Aggregations

PortForwardingWizardModel (org.jboss.tools.openshift.internal.ui.portforwading.PortForwardingWizardModel)2 IPort (com.openshift.restclient.model.IPort)1 HashSet (java.util.HashSet)1 WizardDialog (org.eclipse.jface.wizard.WizardDialog)1 Shell (org.eclipse.swt.widgets.Shell)1 OkButtonWizardDialog (org.jboss.tools.openshift.common.ui.wizard.OkButtonWizardDialog)1 PortForwardingWizard (org.jboss.tools.openshift.internal.ui.portforwading.PortForwardingWizard)1 Before (org.junit.Before)1