Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363807

Summary: [Compatibility] WorkbenchWindowAdvisor#postWindowCreate() never fired
Product: [Eclipse Project] Platform Reporter: Brian de Alwis <bsd>
Component: UIAssignee: Paul Elder <pelder.eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jli1, jonas.ruettimann, pelder.eclipse, pwebster, remy.suen
Version: 4.2   
Target Milestone: 4.3 M7   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=494026
Whiteboard:

Description Brian de Alwis CLA 2011-11-15 07:19:23 EST
I can't find a reference to the method, and my app's #postWindowCreate() is never called.  Should it be sent before #preWindowOpen()?
Comment 1 Remy Suen CLA 2011-11-15 09:42:22 EST
(In reply to comment #0)
> I can't find a reference to the method, and my app's #postWindowCreate() is
> never called.  Should it be sent before #preWindowOpen()?

In 3.x, postWindowCreate() is called _after_ preWindowOpen().
Comment 2 Jonas Ruttimann CLA 2013-01-07 04:52:21 EST
This Bug seems to exist quite a while. So what's the workaround until 4.3?
Comment 3 Paul Webster CLA 2013-01-08 12:10:50 EST
To fix this we would need a patch.

The only workaround I can think of is to add a org.eclipse.ui.IWindowListener and run the same code in org.eclipse.ui.IWindowListener.windowOpened(IWorkbenchWindow) ... it will be fired slightly later than the postWindowCreate() though.

PW
Comment 4 Jonas Ruttimann CLA 2013-01-09 01:51:00 EST
(In reply to comment #3)
That works for me. Thanks!
Comment 5 Janice Li CLA 2013-01-21 15:12:52 EST
Our application (IBM Installation Manager) relies on this method to set shell size and title. Is there any workaround for the applications to use? Can we move the code to set the shell size and title to 'postWindowOpen()'?
Comment 6 Janice Li CLA 2013-01-21 15:29:41 EST
In my last comment, i meant 'set minimum size of the shell' (instead of setting the size of shell).
Comment 7 Paul Elder CLA 2013-04-19 10:29:33 EDT
In 3.x, postWindowCreated() is fired immediately before openIntro(). So one work around is to use postIntro(). I'm working on a patch to call postWindowCreated() in 4.3
Comment 8 Paul Elder CLA 2013-04-19 15:52:20 EDT
Pushed patch to Gerrit:

https://git.eclipse.org/r/12077

(I'll get Eric to look at it - it's time he learned to use Gerrit.)
Comment 9 Paul Elder CLA 2013-04-19 16:13:46 EDT
Fix has been committed to HEAD.
Comment 10 Paul Elder CLA 2013-04-30 10:30:30 EDT
Verified fixed in 4.3.0.I20130430-0031