|
|
|
Re: Problem with perspective change [message #504615 is a reply to message #504532] |
Mon, 21 December 2009 19:05  |
Rüdiger Herrmann Messages: 581 Registered: July 2009 |
Senior Member |
|
|
as you are metnioning a "logout" scenario, are you executing the
code *after* the workbench was closed? If so, that would explain the
exception.
If you have a snippet to reproduce and think this is a bug, please
open a bugzilla.
On 21.12.2009 10:53, Aleksandar Pavlov wrote:
> Rüdiger Herrmann wrote:
>> would you please file a bug report so that we can keep track of the
>> problem.
>
> Hello again,
> Interestingly enough I couldn't create a snippet reproducing the
> problem. In a small exemplary project the perspective switch works fine.
> However, I changed the approach for login from:
>
> PlatformUI.getWorkbench().openWorkbenchWindow("myProject.perspectiveMain ",
> null);
>
> to:
>
> PlatformUI.getWorkbench().showPerspective("myProject.perspectiveMain ",
> PlatformUI.getWorkbench().getActiveWorkbenchWindow());
>
> But now I have new problem for the logout command, the code:
>
> IWorkbenchWindow activeWorkbenchWindow =
> PlatformUI.getWorkbench().getWorkbenchWindows()[0];
>
> PlatformUI.getWorkbench().showPerspective("myProject.perspectiveLogin ",
> activeWorkbenchWindow);
>
> throws SWTException "Widget disposed".
>
> PlatformUI.getWorkbench().getActiveWorkbenchWindow() also throws
> SWTException "Widget disposed" when I use it derectly.
>
> Could someone give me suggestions what is happening with my perspectives
> and what other ways are there for switching them.
>
> Thanks a lot,
> Aleks
|
|
|
Powered by
FUDForum. Page generated in 0.02085 seconds