# HG changeset patch # User dadubrow # Date 1282787588 18000 # Node ID 7232c671a6c793103e044c225b852f81fdede07e # Parent fc9d5d520518347c04911c996f439a24c1fe69a4 Show all features if file does not exist - better than missing installed features to export diff -r fc9d5d520518 -r 7232c671a6c7 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ExportWizard.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ExportWizard.java Wed Aug 25 20:02:15 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ExportWizard.java Wed Aug 25 20:53:08 2010 -0500 @@ -68,18 +68,15 @@ } private Collection getInitialFeatureIds() { - // make sure it exists if not written already + Collection installedFeatures = null; File file = P2Utils.getInitialFeaturesFile(); - if (!file.exists()) { - P2Utils.writeFeaturesToFile(file); - } - - Collection installedFeatures = null; - try { - ImportExportData data = Streamer.readFromXML(new FileInputStream(file)); - installedFeatures = data.getFeatureInfos(); - } catch (Exception e) { - Activator.logError(Messages.ExportWizard_ReadInstalledFeaturesError + file, e); + if (file.exists()) { + try { + ImportExportData data = Streamer.readFromXML(new FileInputStream(file)); + installedFeatures = data.getFeatureInfos(); + } catch (Exception e) { + Activator.logError(Messages.ExportWizard_ReadInstalledFeaturesError + file, e); + } } Collection featureIds = new ArrayList();