Community
Participate
Working Groups
In our application (IBM Installation Manager), we override 'preWindowOpen()' in 'WorkbenchWindowAdvisor' to set initial size to IWorkbenchWindowConfigurer (e.g. IWorkbenchWindowConfigurer.setInitialSize(lastSessionIMSize)) . But this initial size is not used to create the workbench window after we moved our target environment to Eclipse 4.2.1. It used to work before our E4 adoption.
When will this bug be fixed?
No one is looking at this. PW
Any plan when this is going to be fixed? I got an APAR for this problem.
Paul, we need to look at this one.
We have code in org.eclipse.ui.internal.Workbench.createWorkbenchWindow(IAdaptable, IPerspectiveDescriptor, MWindow, boolean) that will fill in the initial size for new windows. But it appears on startup of an RCP app we end up calling createWorkbenchWindow(*) with newWindow = false, and the stack trace looks like: Thread [main] (Suspended (breakpoint at line 701 in WorkbenchWindow)) Workbench.createWorkbenchWindow(IAdaptable, IPerspectiveDescriptor, MWindow, boolean) line: 1399 Workbench.getActiveWorkbenchWindow() line: 1372 WorkbenchSourceProvider.updateActiveShell(Map) line: 924 WorkbenchSourceProvider.getCurrentState() line: 133 WorkbenchSourceProvider$6.handleEvent(Event) line: 684 EventTable.sendEvent(Event) line: 84 Display.filterEvent(Event) line: 1552 Shell(Widget).sendEvent(Event) line: 1386 Shell(Widget).sendEvent(int, Event, boolean) line: 1411 Shell(Widget).sendEvent(int) line: 1392 Shell.filterProc(long, long, long) line: 752 Display.filterProc(long, long, long) line: 1564 OS._g_main_context_iteration(long, boolean) line: not available [native method] OS.g_main_context_iteration(long, boolean) line: 2260 Display.readAndDispatch() line: 3359 PartRenderingEngine$9.run() line: 1113 Realm.runWithDefault(Realm, Runnable) line: 332 PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 997 E4Workbench.createAndRunUI(MApplicationElement) line: 144 Workbench$5.run() line: 613 Realm.runWithDefault(Realm, Runnable) line: 332 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 567 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 150 Application.start(IApplicationContext) line: 20 EclipseAppHandle.run(Object) line: 196 EclipseAppLauncher.runApplication(Object) line: 109 EclipseAppLauncher.start(Object) line: 80 EclipseStarter.run(Object) line: 372 EclipseStarter.run(String[], Runnable) line: 226 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43 Method.invoke(Object, Object...) line: 601 Main.invokeFramework(String[], URL[]) line: 636 Main.basicRun(String[]) line: 591 Main.run(String[]) line: 1450 Main.main(String[]) line: 1426 org.eclipse.ui.internal.Workbench.openWorkbenchWindow(String, IAdaptable) looks like the only path where we say newWindow = true; We need to initialize that first window an RCP app creates.
Also, preWindowOpened is not called until after methods like org.eclipse.ui.internal.WorkbenchWindow.configureShell(Shell, IEclipseContext) are called PW
Here's a proposed fix for RCP applications: https://git.eclipse.org/r/16851 Set the size of the shell after the preWindowOpen has been called. Set the default size of the shell in ui.workbench (the final refuge to load a new model for RCP apps) to 5,5 to avoid a large grey rectangle. PW
Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=9e3a192774a5791281df43c15f4d3666ba525fdc PW
Verified (using the RCPMail app) in 4.4.0.I20131028-2000.