/** * @param configURI * @param feature * @throws IOException */ public static void createConfiguration(URI configURI, List<String> features) throws IOException { File configFile = FileUtils.getFile(configURI); FileUtils.createFile(configFile); BufferedWriter output = new BufferedWriter(new FileWriter(configFile)); for (String feature : features) { output.append(validFeatureName(feature)); output.newLine(); } output.close(); }
public static void exportFeatureModel(URI featureModelURI, FeatureModel fm) { File fmFile = FileUtils.getFile(featureModelURI); try { FileUtils.createFile(fmFile); } catch (IOException e) { e.printStackTrace(); } save(fm, fmFile); // Refresh in case of workspace IFile file = WorkbenchUtils.getIFileFromFile(fmFile); if (file != null) { WorkbenchUtils.refreshIResource(file); } }