public FileReopenerImpl( final Workbench workbench, final Preferences preferences) { this.workbench = workbench; this.preferences = preferences; try { filenames.addAll(PreferencesUtil.getOpenedFiles(preferences)); } catch (InvalidDataTypeException ex) { log.warn("Unable to retrieve the rememebered files", ex); } catch (BackendException ex) { log.warn("Unable to retrieve the rememebered files", ex); } }
private String getPreferredConfigurationUUID(final File file) throws InvalidDataTypeException, BackendException { if (file == null) { throw new NullPointerException("File may not be null"); } final String uuid = PreferencesUtil.getPreferredUUIDForFile(preferences, file); log.debug("File: " + file.getName() + " is associated with configuration UUID: " + uuid); return uuid; }
@Override public void close() { Set<String> rememeberedFiles = getRememeberedFiles(); log.debug("Rememebering: " + rememeberedFiles.size() + " filenames"); try { PreferencesUtil.rememeberOpenedFiles(preferences, rememeberedFiles); } catch (InvalidDataTypeException ex) { // Ignore, nothing we can do and nothing the user wants to know about log.warn("Unable to save rememebered files", ex); } catch (BackendException ex) { // Ignore, nothing we can do and nothing the user wants to know about log.warn("Unable to save rememebered files", ex); } } }
selectedConfiguration.addListener(TailPane.this); try { PreferencesUtil.setPreferredUUIDForFile(preferences, tailer.getFile(), selectedConfiguration.getGuid()); } catch (InvalidDataTypeException ex) { selectedConfiguration = null; try { PreferencesUtil.setPreferredUUIDForFile(preferences, tailer.getFile(), null); } catch (InvalidDataTypeException ex) {