Search in sources :

Example 1 with WorkbenchAdvisor

use of org.eclipse.ui.application.WorkbenchAdvisor in project translationstudio8 by heartsome.

the class Application method createUI.

@Override
public int createUI() {
    Display display = PlatformUI.createDisplay();
    WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
    return PlatformUI.createAndRunWorkbench(display, advisor);
}
Also used : WorkbenchAdvisor(org.eclipse.ui.application.WorkbenchAdvisor) Display(org.eclipse.swt.widgets.Display)

Example 2 with WorkbenchAdvisor

use of org.eclipse.ui.application.WorkbenchAdvisor in project translationstudio8 by heartsome.

the class Application method createUI.

public int createUI() {
    final Display display = PlatformUI.createDisplay();
    UICallBack.activate(String.valueOf(display.hashCode()));
    RWT.getSessionStore().addSessionStoreListener(new SessionStoreListener() {

        public void beforeDestroy(SessionStoreEvent event) {
            UICallBack.deactivate(String.valueOf(display.hashCode()));
        }
    });
    WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
    return PlatformUI.createAndRunWorkbench(display, advisor);
}
Also used : WorkbenchAdvisor(org.eclipse.ui.application.WorkbenchAdvisor) ApplicationWorkbenchAdvisor(net.heartsome.cat.convert.ui.ApplicationWorkbenchAdvisor) SessionStoreListener(org.eclipse.rwt.service.SessionStoreListener) SessionStoreEvent(org.eclipse.rwt.service.SessionStoreEvent) ApplicationWorkbenchAdvisor(net.heartsome.cat.convert.ui.ApplicationWorkbenchAdvisor) Display(org.eclipse.swt.widgets.Display)

Aggregations

Display (org.eclipse.swt.widgets.Display)2 WorkbenchAdvisor (org.eclipse.ui.application.WorkbenchAdvisor)2 ApplicationWorkbenchAdvisor (net.heartsome.cat.convert.ui.ApplicationWorkbenchAdvisor)1 SessionStoreEvent (org.eclipse.rwt.service.SessionStoreEvent)1 SessionStoreListener (org.eclipse.rwt.service.SessionStoreListener)1