| Summary: | [Dialogs] SaveAsDialog should not assume what is being saved is an IFile | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Bob Foster <bob> | ||||
| Component: | UI | Assignee: | Tod Creasey <Tod_Creasey> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | kai-uwe_maetzel | ||||
| Version: | 2.0 | Keywords: | helpwanted | ||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 2000 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 23066 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Bob Foster
We would very much like to see your suggestions Bob - please attach them to this PR. Created attachment 1919 [details]
Add setDefaultName method for use with non-IFile resources
Method is actually called setOriginalName(). Note package name in attachment changed for testing here. To see it work, must be accompanied by fix to TextEditor (and others?). See bug 23066. With the new method, the relevant snippet in TextEditor performSaveAs() should look like this: SaveAsDialog dialog = new SaveAsDialog(shell); IEditorInput input = getEditorInput(); IFile original = (input instanceof IFileEditorInput) ? ((IFileEditorInput) input).getFile() : null; if (original != null) dialog.setOriginalFile(original); else dialog.setOriginalName(input.getName()); dialog.create(); Fix to be considered when Text change in Bug 23066 is made. Is this fixed in Build > 20020910 as well? No - Bug 23066 won't be in until 20020917 so this fix will not be addressed until then. Upping priority as this is ready to consider now. Ok, thanks. Reason I asked, resolution changed to FIXED. (I see it's cleared now.) Must be an artifact of the dependency tree. Confusing. Kai has fixed his part so now we can look at this -the PRs are different and you are cc'ed on each - I think that is what confused you. Bob could you possibly resubmit your changes as a patch? There are some formatting differences that are making too many changes show up. Thanks - I am looking at this now. Changes released into HEAD Stream. Will come into effect in build 20020917. Welcome to the list of Eclipse contributors! Tod, I have difficulties to understand what the relation of the two PRs (this one and bug #23066) is. Both are mentioning the SaveAs dialog. What else? If you look at Bobs suggested TextEditor code in this PR he suggests that the new API is also used by the TextEditor in performSaveAs(): SaveAsDialog dialog = new SaveAsDialog(shell); IEditorInput input = getEditorInput(); IFile original = (input instanceof IFileEditorInput) ? ((IFileEditorInput) input).getFile() : null; if (original != null) dialog.setOriginalFile(original); else dialog.setOriginalName(input.getName()); dialog.create(); Marking closed Is that anything like fixed? It was marked fixed 2002-09-11 15:30:12 - I am closing it to tidy up. If you think this is still an issue please reopen and let us know why. |