Dialogs [message #8574] |
Fri, 16 March 2007 12:20  |
Eclipse User |
|
|
|
Hello,
I' am having problems opening a dialog, especially the ErrorDialog. I
created a ViewPart with a button. There is a selection listener on that
button that opens the error dialog.
But the dialog is not active and my workbench is also not active. This
causes that I can not do anything as no dialog is active anymore. I figured
out that this behavior only happens if
the WorkbenchWindowAdvisor does not set I valid location in the Method
postWindowOpen. I wanted to do a setLocation(0,0), so that the window starts
in the upper left corner filling the whole window.
Now I set the location to 1,1 and everthing works well, but now there is a
gap from the right side of the workbench window to the right side of the
browser window and the workbench window is moveable.
Is this a bug or is there something more I need to do? Any Ideas?
You can check this behavior by changing the code of your Demo as follows:
public void preWindowOpen() {
IWorkbenchWindowConfigurer workbenchWindowConfigurer =
getWindowConfigurer();
workbenchWindowConfigurer.setShellStyle(RWT.NONE | RWT.TITLE );
Rectangle bounds = Display.getCurrent().getBounds();
workbenchWindowConfigurer.setInitialSize(new
Point(bounds.width,bounds.height));
workbenchWindowConfigurer.setShowCoolBar(true);
workbenchWindowConfigurer.setTitle("Workbench Demo");
}
public void postWindowOpen() {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
//with this line active the dialogs do not work
//window.getShell().setLocation( 0, 0 );
//with this line active the dialogs work, but the workbench window is
not fullscreen and it is moveable.
window.getShell().setLocation( 1, 1 );
}
Best reagards,
Markus Kr
|
|
|
Re: Dialogs [message #9490 is a reply to message #8574] |
Sat, 17 March 2007 08:15  |
Eclipse User |
|
|
|
Originally posted by: rsternberg.innoopract.com
Hi Markus,
I could reproduce this behavior. Strangely enough, it happens only in
IE, in Firefox all works fine. It's obviously a bug but I think we can
fix it within the next weeks.
I filed a bug report so you can stay tuned on the issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=177889
Regards,
Ralf
Markus Krüger schrieb:
> I' am having problems opening a dialog, especially the ErrorDialog. I
> created a ViewPart with a button. There is a selection listener on that
> button that opens the error dialog.
> But the dialog is not active and my workbench is also not active. This
> causes that I can not do anything as no dialog is active anymore. I figured
> out that this behavior only happens if
> the WorkbenchWindowAdvisor does not set I valid location in the Method
> postWindowOpen. I wanted to do a setLocation(0,0), so that the window starts
> in the upper left corner filling the whole window.
> Now I set the location to 1,1 and everthing works well, but now there is a
> gap from the right side of the workbench window to the right side of the
> browser window and the workbench window is moveable.
>
> Is this a bug or is there something more I need to do? Any Ideas?
>
> You can check this behavior by changing the code of your Demo as follows:
>
> public void preWindowOpen() {
> IWorkbenchWindowConfigurer workbenchWindowConfigurer =
> getWindowConfigurer();
> workbenchWindowConfigurer.setShellStyle(RWT.NONE | RWT.TITLE );
> Rectangle bounds = Display.getCurrent().getBounds();
> workbenchWindowConfigurer.setInitialSize(new
> Point(bounds.width,bounds.height));
> workbenchWindowConfigurer.setShowCoolBar(true);
> workbenchWindowConfigurer.setTitle("Workbench Demo");
> }
>
> public void postWindowOpen() {
> IWorkbench workbench = PlatformUI.getWorkbench();
> IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
> //with this line active the dialogs do not work
> //window.getShell().setLocation( 0, 0 );
> //with this line active the dialogs work, but the workbench window is
> not fullscreen and it is moveable.
> window.getShell().setLocation( 1, 1 );
> }
>
> Best reagards,
>
> Markus Krüger
|
|
|
Powered by
FUDForum. Page generated in 0.02419 seconds