Community
Participate
Working Groups
Changes to the current selection within a workbench window are not propagated through the ISourceProvider framework after a modal dialog (such as an InputDialog) is opened and then closed again. The problem seems to be the "shellListener" inner class in the class ui.internal.services.CurrentSelectionSourceProvider. If a new shell (such as a dialog window) is activated, the updateWindows method is called with a reference to a WorkbenchWindow. That reference comes from the attached data field of the source widget of the event, in this case the new shell. If a new dialog window is created that data field contains a reference to this newly created window and not the WorkbenchWindow. Therefore the updateWindows method is called with a null parameter, the CurrentSelectionSourceProvider removes itself from the list of selection listeners and changes to the current selection will no longer be propagated.
Thanx for pointing out the right point - you really saved my life Non of my menues worked after opening any kind of dialog, but now it's clear It may not be the right way, but simply: case SWT.Activate: IWorkbenchWindow window = null; if (event.widget.getData() instanceof WorkbenchWindow) { window = (IWorkbenchWindow) event.widget.getData(); // RAP [bm]: no detached windows // } else if (event.widget.getData() instanceof DetachedWindow) { // window = ((DetachedWindow) event.widget.getData()) // .getWorkbenchPage().getWorkbenchWindow(); // RAPEND: [bm] //Bug #245100 } else if((event.widget.getStyle()&SWT.APPLICATION_MODAL)!=0){ event.widget.addListener(SWT.Dispose, this); } updateWindows(window); break; case SWT.Dispose: updateWindows(PlatformUI.getWorkbench().getActiveWorkbenchWindow()); } made it to work for me as expected
This should urgently be fixed.
Hi, I've just posted a message concerning dialogs and variables : http://www.eclipse.org/newsportal/article.php?id=6193&group=eclipse.technology.rap#6193 I guess my problem is linked to that bug. I let my e-mail in CC for more informations. I hope this bug will be fixed soon :). Maghen.
This is fixed in CVS HEAD by fixing bug 267056.
Can not set to "Confirmed". But it works now. Good job!
Hi, Yes it works for me too. My problem has been resolved with this fix. Thank you.