removed unused option
This commit is contained in:
@@ -26,7 +26,6 @@ import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.File;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.logging.Level;
|
||||
@@ -91,8 +90,6 @@ public class AcquisitionMain {
|
||||
boolean nogui = false;
|
||||
String files[] = null;
|
||||
|
||||
HashMap<String,String> varTable = new HashMap<String,String>();
|
||||
|
||||
// Iterations option
|
||||
OptionBuilder.hasArg();
|
||||
OptionBuilder.withArgName("iterations");
|
||||
@@ -100,19 +97,11 @@ public class AcquisitionMain {
|
||||
OptionBuilder.withType(new Integer(1));
|
||||
Option o_iterations = OptionBuilder.create( "iterations");
|
||||
|
||||
// Variables option
|
||||
OptionBuilder.hasArg();
|
||||
OptionBuilder.withArgName("variables");
|
||||
OptionBuilder.withDescription("Scan variables - variables are specified in the form var=value,var2=value2");
|
||||
OptionBuilder.withType(new Integer(1));
|
||||
Option o_variables = OptionBuilder.create( "variables");
|
||||
|
||||
Option o_autoclose = new Option( "autoclose", "Close down application after scan" );
|
||||
Option o_init = new Option( "initialize", "Initialize application directories and configuration files" );
|
||||
Option o_nogui = new Option( "nogui", "Do not show scan GUI" );
|
||||
|
||||
Options options = new Options();
|
||||
options.addOption(o_variables);
|
||||
options.addOption(o_iterations);
|
||||
options.addOption(o_autoclose);
|
||||
options.addOption(o_init);
|
||||
@@ -142,19 +131,6 @@ public class AcquisitionMain {
|
||||
iterations = Integer.parseInt(line.getOptionValue(o_iterations.getOpt()));
|
||||
}
|
||||
|
||||
// Variables
|
||||
if( line.hasOption(o_variables.getOpt()) ){
|
||||
String variables = line.getOptionValue(o_variables.getOpt() );
|
||||
String[] vars = variables.split(",");
|
||||
for(String varp:vars){
|
||||
String[] pair = varp.split("=");
|
||||
if(pair.length!=2){
|
||||
throw new ParseException("Variables are not specified the correct way. -variables var1=val1,var2=val2");
|
||||
}
|
||||
varTable.put(pair[0], pair[1]);
|
||||
}
|
||||
}
|
||||
|
||||
// Autoclose option
|
||||
if( line.hasOption( o_autoclose.getOpt() ) ) {
|
||||
autoclose = true;
|
||||
@@ -175,7 +151,7 @@ public class AcquisitionMain {
|
||||
// Run application
|
||||
try{
|
||||
for(String file: files){
|
||||
run(new File(file), iterations, autoclose, nogui, varTable);
|
||||
run(new File(file), iterations, autoclose, nogui);
|
||||
}
|
||||
|
||||
// Close application automatically if autoclose option is set (and visualizations are specified)
|
||||
@@ -200,7 +176,7 @@ public class AcquisitionMain {
|
||||
* @param nogui Flag whether to run the scan with a GUI
|
||||
* @param variables Table of scan variables
|
||||
*/
|
||||
public static void run(File file, Integer iterations, boolean autoclose, boolean nogui, HashMap<String,String> variables){
|
||||
public static void run(File file, Integer iterations, boolean autoclose, boolean nogui){
|
||||
|
||||
// Initialize application
|
||||
ApplicationConfigurator ac = new ApplicationConfigurator();
|
||||
|
||||
Reference in New Issue
Block a user