Search in sources :

Example 1 with SelectRouteDialog

use of org.jboss.tools.openshift.internal.ui.dialog.SelectRouteDialog in project jbosstools-openshift by jbosstools.

the class RouteChooser method chooseRoute.

@Override
public IRoute chooseRoute(List<IRoute> routes) {
    final IRoute[] selectedRoute = new IRoute[1];
    Display.getDefault().syncExec(() -> {
        SelectRouteDialog routeDialog = new SelectRouteDialog(routes, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
        if (Dialog.OK == routeDialog.open()) {
            selectedRoute[0] = routeDialog.getSelectedRoute();
            rememberChoice = routeDialog.isRememberChoice();
        }
    });
    return selectedRoute[0];
}
Also used : SelectRouteDialog(org.jboss.tools.openshift.internal.ui.dialog.SelectRouteDialog) IRoute(com.openshift.restclient.model.route.IRoute)

Aggregations

IRoute (com.openshift.restclient.model.route.IRoute)1 SelectRouteDialog (org.jboss.tools.openshift.internal.ui.dialog.SelectRouteDialog)1