Changeset 1179 for trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs
- Timestamp:
- 04/29/13 10:29:06 (12 years ago)
- Location:
- trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDparseDirJFC.java
r1178 r1179 73 73 Console.traceln(Level.INFO, "Processing file: " + source); 74 74 75 parser.parseFile(source); 75 try { 76 parser.parseFile(source); 77 } 78 catch (Exception e) { 79 Console.printerrln("Could not parse " + source + ": " + e.getMessage()); 80 } 76 81 } 77 82 -
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDparseDirOldJFC.java
r1178 r1179 73 73 Console.traceln(Level.INFO, "Processing file: " + source); 74 74 75 parser.parseFile(source); 75 try { 76 parser.parseFile(source); 77 } 78 catch (Exception e) { 79 Console.printerrln("Could not parse " + source + ": " + e.getMessage()); 80 } 76 81 } 77 82 -
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDparseJFC.java
r1037 r1179 23 23 import de.ugoe.cs.autoquest.plugin.jfc.JFCSimplifiedLogParser; 24 24 import de.ugoe.cs.util.console.Command; 25 import de.ugoe.cs.util.console.Console; 25 26 import de.ugoe.cs.util.console.GlobalDataContainer; 26 27 27 28 /** 28 29 * <p> 29 * Command to parse an XML file with sessions monitored by EventBench's 30 * JFCMonitor. 30 * Command to parse an XML file with sessions monitored by EventBench's JFCMonitor. 31 31 * </p> 32 32 * … … 36 36 public class CMDparseJFC implements Command { 37 37 38 39 40 41 42 43 44 45 46 38 /* 39 * (non-Javadoc) 40 * 41 * @see de.ugoe.cs.util.console.Command#run(java.util.List) 42 */ 43 @Override 44 public void run(List<Object> parameters) { 45 String filename; 46 String sequencesName = "sequences"; 47 47 48 try { 49 filename = (String) parameters.get(0); 50 if (parameters.size() >= 2) { 51 sequencesName = (String) parameters.get(1); 52 } 53 } catch (Exception e) { 54 throw new IllegalArgumentException(); 55 } 56 57 JFCSimplifiedLogParser parser = new JFCSimplifiedLogParser(); 48 try { 49 filename = (String) parameters.get(0); 50 if (parameters.size() >= 2) { 51 sequencesName = (String) parameters.get(1); 52 } 53 } 54 catch (Exception e) { 55 throw new IllegalArgumentException(); 56 } 58 57 59 parser.parseFile(filename); 60 Collection<List<Event>> sequences = parser.getSequences(); 58 JFCSimplifiedLogParser parser = new JFCSimplifiedLogParser(); 61 59 62 GUIModel targets = parser.getGuiModel(); 60 try { 61 parser.parseFile(filename); 62 } 63 catch (Exception e) { 64 Console.printerrln("Could not parse " + filename + ": " + e.getMessage()); 65 return; 66 } 63 67 64 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 65 CommandHelpers.dataOverwritten(sequencesName); 66 } 67 68 if (GlobalDataContainer.getInstance().addData(sequencesName + "_targets", targets)) { 69 CommandHelpers.dataOverwritten(sequencesName + "_targets"); 70 } 71 } 68 Collection<List<Event>> sequences = parser.getSequences(); 72 69 73 /* 74 * (non-Javadoc) 75 * 76 * @see de.ugoe.cs.util.console.Command#help() 77 */ 78 @Override 79 public String help() { 80 return "parseJFC <filename> {<sequencesName>}"; 81 } 70 GUIModel targets = parser.getGuiModel(); 71 72 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 73 CommandHelpers.dataOverwritten(sequencesName); 74 } 75 76 if (GlobalDataContainer.getInstance().addData(sequencesName + "_targets", targets)) { 77 CommandHelpers.dataOverwritten(sequencesName + "_targets"); 78 } 79 } 80 81 /* 82 * (non-Javadoc) 83 * 84 * @see de.ugoe.cs.util.console.Command#help() 85 */ 86 @Override 87 public String help() { 88 return "parseJFC <filename> {<sequencesName>}"; 89 } 82 90 83 91 } -
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDparseOldJFC.java
r1037 r1179 23 23 import de.ugoe.cs.autoquest.plugin.jfc.JFCLogParser; 24 24 import de.ugoe.cs.util.console.Command; 25 import de.ugoe.cs.util.console.Console; 25 26 import de.ugoe.cs.util.console.GlobalDataContainer; 26 27 27 28 /** 28 29 * <p> 29 * Command to parse an old XML file with sessions monitored by EventBench's 30 * JFCMonitor. For new logfiles parseJFC must be used instead.30 * Command to parse an old XML file with sessions monitored by EventBench's JFCMonitor. For new log 31 * files parseJFC must be used instead. 31 32 * </p> 32 33 * … … 36 37 public class CMDparseOldJFC implements Command { 37 38 38 39 40 41 42 43 44 45 46 39 /* 40 * (non-Javadoc) 41 * 42 * @see de.ugoe.cs.util.console.Command#run(java.util.List) 43 */ 44 @Override 45 public void run(List<Object> parameters) { 46 String filename; 47 String sequencesName = "sequences"; 47 48 48 try { 49 filename = (String) parameters.get(0); 50 if (parameters.size() >= 2) { 51 sequencesName = (String) parameters.get(1); 52 } 53 } catch (Exception e) { 54 throw new IllegalArgumentException(); 55 } 56 57 JFCLogParser parser = new JFCLogParser(); 49 try { 50 filename = (String) parameters.get(0); 51 if (parameters.size() >= 2) { 52 sequencesName = (String) parameters.get(1); 53 } 54 } 55 catch (Exception e) { 56 throw new IllegalArgumentException(); 57 } 58 58 59 parser.parseFile(filename); 60 Collection<List<Event>> sequences = parser.getSequences(); 59 JFCLogParser parser = new JFCLogParser(); 61 60 62 GUIModel targets = parser.getGuiModel(); 61 try { 62 parser.parseFile(filename); 63 } 64 catch (Exception e) { 65 Console.printerrln("Could not parse " + filename + ": " + e.getMessage()); 66 return; 67 } 63 68 64 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 65 CommandHelpers.dataOverwritten(sequencesName); 66 } 67 68 if (GlobalDataContainer.getInstance().addData(sequencesName + "_targets", targets)) { 69 CommandHelpers.dataOverwritten(sequencesName + "_targets"); 70 } 71 } 69 Collection<List<Event>> sequences = parser.getSequences(); 72 70 73 /* 74 * (non-Javadoc) 75 * 76 * @see de.ugoe.cs.util.console.Command#help() 77 */ 78 @Override 79 public String help() { 80 return "parseOldJFC <filename> {<sequencesName>}"; 81 } 71 GUIModel targets = parser.getGuiModel(); 72 73 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 74 CommandHelpers.dataOverwritten(sequencesName); 75 } 76 77 if (GlobalDataContainer.getInstance().addData(sequencesName + "_targets", targets)) { 78 CommandHelpers.dataOverwritten(sequencesName + "_targets"); 79 } 80 } 81 82 /* 83 * (non-Javadoc) 84 * 85 * @see de.ugoe.cs.util.console.Command#help() 86 */ 87 @Override 88 public String help() { 89 return "parseOldJFC <filename> {<sequencesName>}"; 90 } 82 91 83 92 }
Note: See TracChangeset
for help on using the changeset viewer.