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

Change-Id: I71a9cc3f284ce1c05c3729afc4444362bd0ccd28

Former-commit-id: 9a65c297a6 [formerly 5fd962449b] [formerly 58a27aeb75 [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 1d4b52e5ad
commit a336ce07d3

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 * 03/25/2014 #2884 randerso Added xxxid to check for disabling editor
* 05/12/2014 16195 zhao Modified widgetSelected() for "Auto Wrap" option widget * 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 * 10/20/2014 #3685 randerso Made conversion to upper case conditional on product id
* 12/01/2014 #624 zhao Modified saveFile()
* *
* </pre> * </pre>
* *
@ -2225,10 +2226,22 @@ public class ProductEditorComp extends Composite implements
* Save the current text in the product editor to a file. * Save the current text in the product editor to a file.
*/ */
private void saveFile() { 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); FileDialog fd = new FileDialog(parent.getShell(), SWT.SAVE);
fd.setText("Save As"); fd.setText("Save As");
fd.setFilterPath(fname); String filePath = (new File(fname)).getParentFile().getPath();
fd.setFilterPath(filePath);
fd.setFileName(guessFilename()); fd.setFileName(guessFilename());
fname = fd.open(); fname = fd.open();