예제 #1
0
 public IExecutionEnvironment getExecutionEnvironment() {
   IEnvironment environment = getEnvironment();
   if (environment != null) {
     return (IExecutionEnvironment) environment.getAdapter(IExecutionEnvironment.class);
   }
   return null;
 }
예제 #2
0
  protected String[] renderCommandLine(IEnvironment environment, IPath interpreter) {
    final List items = new ArrayList();

    items.add(environment.convertPathToString(interpreter));
    items.addAll(interpreterArgs);
    items.add(environment.convertPathToString(scriptFile));
    items.addAll(scriptArgs);

    return (String[]) items.toArray(new String[items.size()]);
  }
 private Map getNativeEnvironment() {
   IEnvironment environment = fDialog.getEnvironment();
   IExecutionEnvironment execEnvironment =
       (IExecutionEnvironment) environment.getAdapter(IExecutionEnvironment.class);
   Map stringVars = execEnvironment.getEnvironmentVariables(true);
   HashMap vars = new HashMap();
   for (Iterator i = stringVars.keySet().iterator(); i.hasNext(); ) {
     String key = (String) i.next();
     String value = (String) stringVars.get(key);
     vars.put(key, new EnvironmentVariable(key, value));
   }
   return vars;
 }