diff --git a/tools.descartes.pmx.console/src/tools/descartes/pmx/console/PMXCommandLine.java b/tools.descartes.pmx.console/src/tools/descartes/pmx/console/PMXCommandLine.java index 600a42ac464a7759a18bf6c8326ca7a15e142ff5..043ebe39cf9e0a3aa649ac433ea83762b9e0c4b6 100644 --- a/tools.descartes.pmx.console/src/tools/descartes/pmx/console/PMXCommandLine.java +++ b/tools.descartes.pmx.console/src/tools/descartes/pmx/console/PMXCommandLine.java @@ -163,14 +163,14 @@ public class PMXCommandLine { private PMXController createPMX() { try { - String inputDir = getInputDir(); + String[] inputDirs = getInputDirs(); Configuration pmxConfiguration = new Configuration(); AnalysisController analysisController = new AnalysisController(pmxConfiguration); - registerFSReader(analysisController, inputDir); + registerFSReader(analysisController, inputDirs); String outputDir = commandLine.getOptionValue(CMD_LONG_OPT_OUTPUT_DIR); if(outputDir == null){ - outputDir = inputDir; + outputDir = inputDirs[0]; log.info("No output directory specified. Logging to input directory."); } @@ -194,25 +194,26 @@ public class PMXCommandLine { } - - private String getInputDir() { - String inputDir = commandLine.getOptionValue(CMD_LONG_OPT_INPUT_DIR); - if (inputDir == null) { - log.info("missing value for command line option '" + CMD_LONG_OPT_INPUT_DIR + "'"); - System.exit(1); - } else if (!new File(inputDir).exists()) { - log.info("File does not exist: " + CMD_LONG_OPT_INPUT_DIR); - log.info("\tcurrent:" + System.getProperty("user.dir")); - log.info("\trequested:" +inputDir); - System.exit(1); // or other exit code? + private String[] getInputDirs() { + String inputDirCmd = commandLine.getOptionValue(CMD_LONG_OPT_INPUT_DIR); + String[] inputDirs = inputDirCmd.split(";"); + for (int idx = 0; idx < inputDirs.length; idx++) { + final String inputDir = inputDirs[idx]; + if (inputDir == null) { + log.info("missing value for command line option '" + CMD_LONG_OPT_INPUT_DIR + "'"); + System.exit(1); + } else if (!new File(inputDir).exists()) { + log.info("File does not exist: " + CMD_LONG_OPT_INPUT_DIR); + log.info("\tcurrent:" + System.getProperty("user.dir")); + log.info("\trequested:" + inputDir); + System.exit(1); // or other exit code? + } } - return inputDir; + return inputDirs; } - private static FSReader registerFSReader(IAnalysisController analysisInstance, final String kiekerTraceFile) { - String[] inputDirs; - inputDirs = new String[1]; - inputDirs[0] = kiekerTraceFile; + private static FSReader registerFSReader(IAnalysisController analysisInstance, final String[] kiekerTraceFile) { + final String[] inputDirs = kiekerTraceFile; // if (new File(kiekerTraceFile).getName().startsWith("kieker-")) { // inputDirs = new String[1]; @@ -322,7 +323,7 @@ public class PMXCommandLine { private String parseOutputDir() { String outputDir = commandLine.getOptionValue(CMD_LONG_OPT_OUTPUT_DIR); if (outputDir == null) { - outputDir = getInputDir(); + outputDir = getInputDirs()[0]; log.info("No output directory specified. Logging to input directory."); } return outputDir;