org.eclipse.ui.application.WorkbenchAdvisor Java Examples

The following examples show how to use org.eclipse.ui.application.WorkbenchAdvisor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GWTCodeFormatterApplication.java    From gwt-eclipse-plugin with Eclipse Public License 1.0 6 votes vote down vote up
private void startWorkbench() {
  PlatformUI.createAndRunWorkbench(PlatformUI.createDisplay(),
      new WorkbenchAdvisor() {
        @Override
        public String getInitialWindowPerspectiveId() {
          return null;
        }

        @Override
        public void postStartup() {
          // Kill it when it opens so that the thread is unstuck.
          Workbench.getInstance().close();
        }

      });
}
 
Example #2
Source File: Application.java    From translationstudio8 with GNU General Public License v2.0 5 votes vote down vote up
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 );
 }
 
Example #3
Source File: Application.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
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 );
 }
 
Example #4
Source File: Application.java    From translationstudio8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public int createUI() {
	Display display = PlatformUI.createDisplay();
	WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
	return PlatformUI.createAndRunWorkbench(display, advisor);
}
 
Example #5
Source File: Application.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public int createUI() {
	Display display = PlatformUI.createDisplay();
	WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
	return PlatformUI.createAndRunWorkbench(display, advisor);
}