+ private String getLastSelectedDirectory() {
+ final IDialogSettings settings = getDialogSettings();
+ if (settings != null) {
+ final String directory = settings.get(STORE_DIRECTORY_ID);
+ if (directory != null && !directory.isEmpty()) {
+ final File file = new File(directory);
+ if (file.exists()) {
+ return directory.toString();
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private void saveSelectedDirectory(File directory) {
+ final IDialogSettings settings = getDialogSettings();
+ if (settings != null && directory != null && directory.exists()) {
+ settings.put(STORE_DIRECTORY_ID, directory.toString());
+ }
+ }
+