| Summary: | [implementation] Focus lost after canceling out of the save dialog prompt of an untitled text editor closed by the editor selection dialog | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Remy Suen <remy.suen> |
| Component: | Text | Assignee: | Platform-Text-Inbox <platform-text-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | daniel_megert |
| Version: | 3.7 | ||
| Target Milestone: | 3.7 M6 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Remy Suen
The text editor directly calls getSite().getShell(). It seems to me that IWorkbench's getModalDialogShellProvider() should be used instead so that we don't parent the dialog off of the workbench window's shell. Thread [main] (Suspended (breakpoint at line 1466 in AbstractDecoratedTextEditor)) TextEditor(AbstractDecoratedTextEditor).performSaveAs(IProgressMonitor) line: 1466 TextEditor(AbstractTextEditor).doSave(IProgressMonitor) line: 4823 AbstractTextEditor$TextEditorSavable.doSave(IProgressMonitor) line: 7176 AbstractTextEditor$TextEditorSavable(Saveable).doSave(IProgressMonitor, IShellProvider) line: 214 SaveableHelper.doSaveModel(Saveable, IProgressMonitor, IShellProvider, boolean) line: 349 SaveablesList$4.run(IProgressMonitor) line: 621 SaveableHelper$5.run(IProgressMonitor) line: 277 ModalContext.runInCurrentThread(IRunnableWithProgress, IProgressMonitor) line: 464 ModalContext.run(IRunnableWithProgress, boolean, IProgressMonitor, Display) line: 372 ApplicationWindow$1.run() line: 759 BusyIndicator.showWhile(Display, Runnable) line: 70 WorkbenchWindow(ApplicationWindow).run(boolean, boolean, IRunnableWithProgress) line: 756 WorkbenchWindow.run(boolean, boolean, IRunnableWithProgress) line: 2642 SaveableHelper.runProgressMonitorOperation(String, IRunnableWithProgress, IRunnableContext, IShellProvider) line: 285 SaveablesList.saveModels(List, IShellProvider, IRunnableContext) line: 630 SaveablesList.promptForSaving(List, IShellProvider, IRunnableContext, boolean, boolean) line: 594 SaveablesList.promptForSavingIfNecessary(IShellProvider, IWorkbenchWindow, Set, Map, boolean) line: 433 SaveablesList.preCloseParts(List, boolean, IShellProvider, IWorkbenchWindow) line: 388 WorkbenchEditorsDialog.closeItems(TableItem[]) line: 454 >IWorkbench's getModalDialogShellProvider()
Nice new method. It would be good if one would announce such things in the porting guide.
Fixed in HEAD (AbstractDecoratedTextEditor.java, rev. 1.148).
Available in builds >= I20110201-0800.
(In reply to comment #2) > >IWorkbench's getModalDialogShellProvider() > Nice new method. It would be good if one would announce such things in the > porting guide. Good point, Dani. I have opened bug 335949 for this. |