/** Open attributes from an XML file. May return an empty value set, but never null. */ static AttributeValueSets openAttributes() { final IPath pathHint = FileDialogs.recallPath(REMEMBER_DIRECTORY); final IPath readLocation = FileDialogs.openReadXML(pathHint); if (readLocation != null) { FileDialogs.rememberDirectory(REMEMBER_DIRECTORY, readLocation); try { final Persister persister = new Persister(); final AttributeValueSets avs = persister.read(AttributeValueSets.class, readLocation.toFile()); return avs; } catch (Exception e) { Utils.showError( new Status( IStatus.ERROR, WorkbenchCorePlugin.PLUGIN_ID, "Failed to read attributes from: " + readLocation.toOSString(), e)); } } return new AttributeValueSets(); }