コード例 #1
0
 /*
  * Save the given configuration to disk.
  */
 public void save(String message, Configuration configuration) {
   File configLocation =
       new File(output, getRootFolder() + "configuration/org.eclipse.update/platform.xml");
   File installLocation = new File(output, getRootFolder());
   try {
     configuration.save(configLocation, installLocation.toURL());
   } catch (ProvisionException e) {
     fail(message, e);
   } catch (MalformedURLException e) {
     fail(message, e);
   }
 }
コード例 #2
0
 public Configuration loadConfiguration(File configLocation, File installLocation) {
   try {
     return Configuration.load(configLocation, installLocation.toURL());
   } catch (ProvisionException e) {
     fail("Error while reading configuration from " + configLocation);
   } catch (MalformedURLException e) {
     fail("Unable to convert install location to URL " + installLocation);
   }
   assertTrue("Unable to read configuration from " + configLocation, false);
   // avoid compiler error
   return null;
 }