ASM #624 GFE: default file save directory different from AWIPS 1

Change-Id: I71a9cc3f284ce1c05c3729afc4444362bd0ccd28

Former-commit-id: 5fd962449b [formerly 5fd962449b [formerly e6d7e8b2bec9c7cebdf25618897443cff909879d]]
Former-commit-id: 58a27aeb75
Former-commit-id: 1086bdcf98
This commit is contained in:
Zhidong.Hao 2014-12-01 14:39:07 -05:00
parent b18ec06b44
commit 6669d2e47c

View file

@ -160,6 +160,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* 03/25/2014 #2884 randerso Added xxxid to check for disabling editor
* 05/12/2014 16195 zhao Modified widgetSelected() for "Auto Wrap" option widget
* 10/20/2014 #3685 randerso Made conversion to upper case conditional on product id
* 12/01/2014 #624 zhao Modified saveFile()
*
* </pre>
*
@ -2225,10 +2226,22 @@ public class ProductEditorComp extends Composite implements
* Save the current text in the product editor to a file.
*/
private void saveFile() {
String fname = getDir();
String fname = null;
if ( productDefinition.get("outputFile") != null ) {
fname = getDefString("outputFile");
if ( fname.equals(EMPTY) ) {
return;
}
} else {
return;
}
fname = fixfname(fname);
FileDialog fd = new FileDialog(parent.getShell(), SWT.SAVE);
fd.setText("Save As");
fd.setFilterPath(fname);
String filePath = (new File(fname)).getParentFile().getPath();
fd.setFilterPath(filePath);
fd.setFileName(guessFilename());
fname = fd.open();