예제 #1
0
 /**
  * Retrieves the old configuration key, if preferences have not yet been set based on the builder
  * id.
  *
  * @return the name of the program runner arguments -preference in the plugin preferences
  */
 private String getArgumentsPreferenceNameByClass() {
   String clazz = runner.getLegacyClass();
   if (clazz == null) {
     clazz = runner.getClass().getName();
   }
   return clazz + "_args";
 }
예제 #2
0
 /**
  * Retrieves the old configuration key, if preferences have not yet been set based on the builder
  * id.
  *
  * @return the name of the program runner path -preference in the plugin preferences
  */
 private String getCommandPreferenceNameByClass() {
   String clazz = runner.getLegacyClass();
   if (clazz == null) {
     clazz = runner.getClass().getName();
   }
   return clazz + "_prog";
 }
예제 #3
0
 /**
  * Initializes the default preferences for the runner.
  *
  * @param pref preferences
  * @param dir directory for looking up the runner executable
  */
 public void initializeDefaults(IPreferenceStore pref, String dir) {
   pref.setDefault(getCommandPreferenceName(), getDefaultProgramFile(dir));
   String defaultArgs = runner.getDefaultArguments();
   if (defaultArgs == null) {
     defaultArgs = "%input";
   }
   pref.setDefault(getArgumentsPreferenceName(), defaultArgs);
 }
예제 #4
0
 /**
  * Returns the absolute path of the default program file used for executing this runner. This
  * includes the given directory and the default executable.
  *
  * @param dir directory where to look for the runner executable
  * @return the default program file path
  */
 private String getDefaultProgramFile(String dir) {
   String runnerPath = "";
   if (dir != null && dir.length() > 0) {
     File runnerFile = new File(dir + File.separator + runner.getExecutable());
     if (runnerFile.exists() && runnerFile.isFile()) {
       runnerPath = runnerFile.getAbsolutePath();
     }
   }
   return runnerPath;
 }
예제 #5
0
 /**
  * Based on the builder id, retrieves the configuration id of the runner preferences.
  *
  * @return the preferences name of the program runner arguments
  */
 private String getArgumentsPreferenceName() {
   return "runner_" + runner.getId() + "_args";
 }
예제 #6
0
 /**
  * Based on the builder id, retrieves the configuration id of the runner preferences.
  *
  * @return the preferences name of the program runner path
  */
 private String getCommandPreferenceName() {
   return "runner_" + runner.getId() + "_prog";
 }