Community
Participate
Working Groups
Build Identifier: e4 M4a I find in my 3.6 based app Running on e4.1 that the postWindowOpen hook never gets called. As I start my p2 update queries there this is essential to me. Reproducible: Always Steps to Reproduce: 1. create a old school rcp app 2. put a breakpoint or log msg in postWindowOpen 3. wait forever ;)
After some diving I found that the workbenchwindow is actually openend in the WBWRenderer.postProcess() and I have no clue (maybe thats the point) how to access the workbenchwindowadvisor from there. Could anyone give me an idea how to hook in there to fire something after the window is openened ?
3.x call trace as follows: Thread [main] (Suspended (breakpoint at line 241 in WorkbenchWindowAdvisor)) IDEWorkbenchWindowAdvisor(WorkbenchWindowAdvisor).postWindowOpen() line: 241 WorkbenchWindow.fireWindowOpened() line: 1329 WorkbenchWindow.open() line: 803 Workbench$66.runWithException() line: 3658 Workbench$66(StartupThreading$StartupRunnable).run() line: 31 RunnableLock.run() line: 35 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 134 Display.runAsyncMessages(boolean) line: 4059 Display.readAndDispatch() line: 3678 IDEWorkbenchAdvisor(WorkbenchAdvisor).openWindows() line: 803 Workbench$31.runWithException() line: 1567 Workbench$31(StartupThreading$StartupRunnable).run() line: 31 RunnableLock.run() line: 35 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 134 Display.runAsyncMessages(boolean) line: 4059 Display.readAndDispatch() line: 3678 Workbench.runUI() line: 2548 Workbench.access$4(Workbench) line: 2438 Workbench$7.run() line: 671 Realm.runWithDefault(Realm, Runnable) line: 332 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 664 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 115 EclipseAppHandle.run(Object) line: 196 EclipseAppLauncher.runApplication(Object) line: 110 EclipseAppLauncher.start(Object) line: 79 EclipseStarter.run(Object) line: 369 EclipseStarter.run(String[], Runnable) line: 179 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 48 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 37 Method.invoke(Object, Object...) line: 600 Main.invokeFramework(String[], URL[]) line: 622 Main.basicRun(String[]) line: 577 Main.run(String[]) line: 1410 Main.main(String[]) line: 1386 (In reply to comment #1) > After some diving I found that the workbenchwindow is actually openend in the > WBWRenderer.postProcess() and I have no clue (maybe thats the point) how to > access the workbenchwindowadvisor from there. > > Could anyone give me an idea how to hook in there to fire something after the > window is openened ? From a cursory glance, I don't think this is where we should be putting that code.
Hi, I could workaround by putting it in earlyStartup extension. so this is not a blocker anymore. But I guess its hard to fix.
Created attachment 186016 [details] Advisor notification patch v1 Due to the differences in how startup is done, it's difficult to say if sending out the notification at this point is necessarily "correct". Thomas, since you don't seem to be doing anything related to the actual workbench window, I think this patch should do the trick for you.
Updated patch released to CVS HEAD.
Verified by source inspection with I20110125-2200 on Windows XP that the code changes are there. Thanks for the bug report, Thomas!
postWindowOpen() is still not called here. I don't see any log messages I have there and the debugger doesn't stop when putting a breakpoint in it. Please reopen this bug. My version is Eclipse 4.1 Build I20110407-2200.
(In reply to comment #7) > postWindowOpen() is still not called here. I don't see any log messages I have > there and the debugger doesn't stop when putting a breakpoint in it. Please > reopen this bug. My version is Eclipse 4.1 Build I20110407-2200. Without looking at the code I suspect this is either a) a problem on first startup but disappears on subsequent startups, or b) not a problem on first startup but becomes a problem on subsequent startups.
Created attachment 193252 [details] Workbench patch v1 (In reply to comment #8) > (In reply to comment #7) > > postWindowOpen() is still not called here. I don't see any log messages I have > > there and the debugger doesn't stop when putting a breakpoint in it. Please > > reopen this bug. My version is Eclipse 4.1 Build I20110407-2200. > > Without looking at the code I suspect this is either a) a problem on first > startup but disappears on subsequent startups, or b) not a problem on first > startup but becomes a problem on subsequent startups. The problem has identified as being A.
(In reply to comment #9) > Created attachment 193252 [details] > Workbench patch v1 Patch released to HEAD. Thank you very much for letting us know about this problem, Joachim!
Thank you for fixing the bug so quickly. I finally managed to update my installation and now I can see my output there.