Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 23066 - TextEditor performSaveAs doesn't show default path or file name
Summary: TextEditor performSaveAs doesn't show default path or file name
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M1   Edit
Assignee: Kai-Uwe Maetzel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 23025
  Show dependency tree
 
Reported: 2002-08-31 05:11 EDT by Bob Foster CLA
Modified: 2002-09-11 12:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Foster CLA 2002-08-31 05:11:13 EDT
Problem is, dialog.setOriginalFile() is called after dialog.create(), which has
already used null value of originalFile. The code should be:

		SaveAsDialog dialog= new SaveAsDialog(shell);
		
		IEditorInput input = getEditorInput();
		
		IFile original= (input instanceof IFileEditorInput) ? ((IFileEditorInput)
input).getFile() : null;
		if (original != null)
			dialog.setOriginalFile(original);

		dialog.create();
Comment 1 Kai-Uwe Maetzel CLA 2002-09-11 12:03:28 EDT
Build > 20020910.