# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /home/matthias/NetBeansProjects/core-main # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: db.dataview/src/org/netbeans/modules/db/dataview/table/celleditor/BlobFieldTableCellEditor.java --- db.dataview/src/org/netbeans/modules/db/dataview/table/celleditor/BlobFieldTableCellEditor.java Base (BASE) +++ db.dataview/src/org/netbeans/modules/db/dataview/table/celleditor/BlobFieldTableCellEditor.java Locally Modified (Based On LOCAL) @@ -74,17 +74,19 @@ ActionListener, AlwaysEnable { private static final Logger LOG = Logger.getLogger( BlobFieldTableCellEditor.class.getName()); + private static final String EDIT = "edit"; - protected static final String EDIT = "edit"; - protected Blob currentValue; - protected JButton button; - protected JPopupMenu popup; - protected JTable table; - protected JMenuItem saveContentMenuItem; - protected JMenuItem miOpenImageMenuItem; - protected JMenuItem miLobLoadAction; - protected JMenuItem miLobNullAction; + private static File lastFile; + private Blob currentValue; + private JButton button; + private JPopupMenu popup; + private JTable table; + private JMenuItem saveContentMenuItem; + private JMenuItem miOpenImageMenuItem; + private JMenuItem miLobLoadAction; + private JMenuItem miLobNullAction; + @SuppressWarnings("LeakingThisInConstructor") public BlobFieldTableCellEditor() { button = new JButton(); @@ -208,9 +210,11 @@ return; } JFileChooser c = new JFileChooser(); + c.setCurrentDirectory(lastFile); int fileDialogState = c.showSaveDialog(table); if (fileDialogState == JFileChooser.APPROVE_OPTION) { File f = c.getSelectedFile(); + lastFile = f; InputStream is; FileOutputStream fos; try { @@ -231,10 +235,12 @@ private Blob loadLobFromFile() { JFileChooser c = new JFileChooser(); + c.setCurrentDirectory(lastFile); Blob result = null; int fileDialogState = c.showOpenDialog(table); if (fileDialogState == JFileChooser.APPROVE_OPTION) { File f = c.getSelectedFile(); + lastFile = f; FileInputStream fis; try { fis = new FileInputStream(f); Index: db.dataview/src/org/netbeans/modules/db/dataview/table/celleditor/ClobFieldTableCellEditor.java --- db.dataview/src/org/netbeans/modules/db/dataview/table/celleditor/ClobFieldTableCellEditor.java Base (BASE) +++ db.dataview/src/org/netbeans/modules/db/dataview/table/celleditor/ClobFieldTableCellEditor.java Locally Modified (Based On LOCAL) @@ -95,20 +95,23 @@ } private static final Logger LOG = Logger.getLogger( ClobFieldTableCellEditor.class.getName()); - protected static final String EDIT = "edit"; - protected Clob currentValue; - protected JButton button; - protected JPopupMenu popup; - protected JTable table; - protected int currentRow; - protected int currentColumn; - protected int currentModelRow; - protected int currentModelColumn; - protected JMenuItem saveContentMenuItem; - protected JMenuItem editContentMenuItem; - protected JMenuItem loadContentMenuItem; - protected JMenuItem nullContentMenuItem; + private static final String EDIT = "edit"; + private static File lastFile; + + private Clob currentValue; + private JButton button; + private JPopupMenu popup; + private JTable table; + private int currentRow; + private int currentColumn; + private int currentModelRow; + private int currentModelColumn; + private JMenuItem saveContentMenuItem; + private JMenuItem editContentMenuItem; + private JMenuItem loadContentMenuItem; + private JMenuItem nullContentMenuItem; + @SuppressWarnings("LeakingThisInConstructor") public ClobFieldTableCellEditor() { button = new JButton(); @@ -238,10 +241,12 @@ } CharsetSelector charset = new CharsetSelector(); JFileChooser c = new JFileChooser(); + c.setCurrentDirectory(lastFile); c.setAccessory(charset); int fileDialogState = c.showSaveDialog(table); if (fileDialogState == JFileChooser.APPROVE_OPTION) { File f = c.getSelectedFile(); + lastFile = f; Reader r; Writer w; try { @@ -263,11 +268,13 @@ private Clob loadLobFromFile() { CharsetSelector charset = new CharsetSelector(); JFileChooser c = new JFileChooser(); + c.setCurrentDirectory(lastFile); c.setAccessory(charset); Clob result = null; int fileDialogState = c.showOpenDialog(table); if (fileDialogState == JFileChooser.APPROVE_OPTION) { File f = c.getSelectedFile(); + lastFile = f; Reader r; try { result = new FileBackedClob();