It seems a Bug when calling "WorkbenchPage.resetPerspective" [message #520081] |
Thu, 11 March 2010 01:02  |
Eclipse User |
|
|
|
My Env: Eclipse 3.5 RAP 1.3M4
Please consider this scenario: custom define PresentationFactory, don't show CoolBar in ApplicationWorkbenchWindowAdvisor
In this case, when calling resetPerspective, as per the code in WorkbenchPage.resetPerspective()
public void resetPerspective() {
// Run op in busy cursor.
// Use set redraw to eliminate the "flash" that can occur in the
// coolbar as the perspective is reset.
ICoolBarManager2 mgr = (ICoolBarManager2) window.getCoolBarManager2();
try {
mgr.getControl2().setRedraw(false);
BusyIndicator.showWhile(null, new Runnable() {
public void run() {
busyResetPerspective();
}
});
} finally {
mgr.getControl2().setRedraw(true);
}
}
mgr.getControl2() will be null because we setShowCoolBar(false);
Then an exception will be throw.
Isn't is a bug?
|
|
|
|
|
|
Re: It seems a Bug when calling "WorkbenchPage.resetPerspective" [message #520157 is a reply to message #520151] |
Thu, 11 March 2010 06:39  |
Eclipse User |
|
|
|
Actually I am not quite sure about that.
But just from the simple logic, I guess. if we don't show CoolBar, then the CoolBar will not create its Control2, when getting Control2.xxxx() will throw an Exception.
And when I use default Presentation Factory, I found that it does create a Control2, so it works.
Maybe we could refer to the implementation of default Presentation Factory.
|
|
|
Powered by
FUDForum. Page generated in 0.50583 seconds