Search in sources :

Example 1 with IDesktopUIFacade

use of org.eclipse.scout.rt.client.ui.desktop.IDesktopUIFacade in project scout.rt by eclipse.

the class UiSession method startDesktop.

protected void startDesktop(Map<String, String> sessionStartupParams) {
    final IFuture<Void> future = ModelJobs.schedule(new IRunnable() {

        @Override
        public void run() throws Exception {
            IDesktop desktop = m_clientSession.getDesktop();
            IDesktopUIFacade uiFacade = desktop.getUIFacade();
            boolean desktopOpen = desktop.isOpened();
            if (!desktopOpen) {
                uiFacade.openFromUI();
            }
            // Don't handle deep links for persistent sessions,
            // in that case the client state shall be recovered rather than following the deep link
            PropertyMap.CURRENT.get().put(DeepLinkUrlParameter.HANDLE_DEEP_LINK, !isPersistent() || !desktopOpen);
            uiFacade.fireGuiAttached();
        }
    }, ModelJobs.newInput(ClientRunContexts.copyCurrent().withSession(m_clientSession, true).withProperties(// Make startup parameters available at {@link PropertyMap#CURRENT} during desktop attaching
    sessionStartupParams)).withName("Starting Desktop").withExceptionHandling(null, false));
    BEANS.get(UiJobs.class).awaitAndGet(future);
}
Also used : IRunnable(org.eclipse.scout.rt.platform.util.concurrent.IRunnable) IDesktopUIFacade(org.eclipse.scout.rt.client.ui.desktop.IDesktopUIFacade) IDesktop(org.eclipse.scout.rt.client.ui.desktop.IDesktop)

Aggregations

IDesktop (org.eclipse.scout.rt.client.ui.desktop.IDesktop)1 IDesktopUIFacade (org.eclipse.scout.rt.client.ui.desktop.IDesktopUIFacade)1 IRunnable (org.eclipse.scout.rt.platform.util.concurrent.IRunnable)1