| Summary: | [Compatibility] IPageListener's pageOpened(*) is sent out too early | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Remy Suen <remy.suen> |
| Component: | UI | Assignee: | Oleg Besedin <ob1.eclipse> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, pwebster |
| Version: | 4.2 | ||
| Target Milestone: | 4.2 M7 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Remy Suen
The event was being sent, just a little too early. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e1b2a24fdb25939d58ec89391aa2580be2ce04dd Reverted. Mac is having problems. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=3203b9656681feb1d30be828a405e06b4a7780c1 I think the original fix (moving notification) is good, but then it exposes a problem in Workbench.getActiveWorkbenchWindow() For some reason this method in 4.x always creates a new workbench window (unless we are closing down). That code has being added for Bug 333764 "[Compatibility] NPE thrown when shutting down with Acceleo's 'Result' view up". Remy, do you remember by chance if that was done on purpose? (In reply to comment #3) > For some reason this method in 4.x always creates a new workbench window > (unless we are closing down). Basically, we want the first call to getActiveWorkbenchWindow() to return something meaningful and is why we "always" instantiate a workbench window instance. If our startup story was improved this probably wouldn't be necessary. (In reply to comment #4) > (In reply to comment #3) > > For some reason this method in 4.x always creates a new workbench window > > (unless we are closing down). > > Basically, we want the first call to getActiveWorkbenchWindow() to return > something meaningful and is why we "always" instantiate a workbench window > instance. If our startup story was improved this probably wouldn't be > necessary. Hmm... this method is an API and can be called at any time by anybody, creating a new workbench window on every call. (In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #3) > > > For some reason this method in 4.x always creates a new workbench window > > > (unless we are closing down). > > > > Basically, we want the first call to getActiveWorkbenchWindow() to return > > something meaningful and is why we "always" instantiate a workbench window > > instance. If our startup story was improved this probably wouldn't be > > necessary. > > Hmm... this method is an API and can be called at any time by anybody, creating > a new workbench window on every call. I was wrong about this, it only creates a new one if there is not one already present in the context. I restored original fix and the code around Workbench.getActiveWorkbenchWindow() as it was prior to the bug 333764 . The underlying problem in Acceleo was fixed in M6 (bug 333774). Git reference: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=571a10a64ba8c021d64d50a09407f9a90c2112ee *** Bug 373646 has been marked as a duplicate of this bug. *** *** Bug 365043 has been marked as a duplicate of this bug. *** I noticed that it is easy to get into a state where nobody creates WorkbenchWindow anymore. Not good, rolling back part of the fix dealing with Workbench.getActiveWorkbenchWindow(). Another fix for the side effects: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=c501a689e0f3ba86dd12fdb66a5bfeebc14cc482 Verified in I20120430-1800. |