Esempio n. 1
0
 private static List<String> getListProfileProperty(IProfile profile, String key) {
   List<String> listProperty = new ArrayList<String>();
   String dropinRepositories = profile.getProperty(key);
   if (dropinRepositories != null) {
     StringTokenizer tokenizer = new StringTokenizer(dropinRepositories, PIPE);
     while (tokenizer.hasMoreTokens()) {
       listProperty.add(tokenizer.nextToken());
     }
   }
   return listProperty;
 }
Esempio n. 2
0
 public static String getOSFromProfile(IProfile profile) {
   String environments = profile.getProperty(IProfile.PROP_ENVIRONMENTS);
   if (environments == null) return null;
   for (StringTokenizer tokenizer = new StringTokenizer(environments, ",");
       tokenizer.hasMoreElements(); ) { // $NON-NLS-1$
     String entry = tokenizer.nextToken();
     int i = entry.indexOf('=');
     String key = entry.substring(0, i).trim();
     if (!key.equals("osgi.os")) // $NON-NLS-1$
     continue;
     return entry.substring(i + 1).trim();
   }
   return null;
 }
 protected void parseExitdata(String message) {
   // if the exit data contains a message telling us the location of the log file, then get it
   String data = TestActivator.getContext().getProperty("eclipse.exitdata");
   if (data == null) return;
   String log = null;
   // big hack but for now assume the log file path is the last segment of the error message
   for (StringTokenizer tokenizer = new StringTokenizer(data); tokenizer.hasMoreTokens(); )
     log = tokenizer.nextToken();
   if (log == null) return;
   // remove trailing "."
   if (log.endsWith(".")) log = log.substring(0, log.length() - 1);
   String errors = read(log);
   if (errors == null) return;
   // fail using the text from the log file
   assertOK(message, new Status(IStatus.ERROR, TestActivator.PI_PROV_TESTS, errors));
 }