From: Dan B. <dan...@us...> - 2008-11-25 21:58:29
|
Update of /cvsroot/jmri/jmri/jmrit/operations/trains In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27760/src/jmri/jmrit/operations/trains Modified Files: Train.java TrainBuilder.java Log Message: Show number of engines and cars at locations Index: TrainBuilder.java =================================================================== RCS file: /cvsroot/jmri/jmri/jmrit/operations/trains/TrainBuilder.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** TrainBuilder.java 22 Nov 2008 01:27:22 -0000 1.19 --- TrainBuilder.java 25 Nov 2008 21:31:10 -0000 1.20 *************** *** 194,198 **** terminateStageTrack = terminateLocation.getTrackById((String)stagingTracksTerminate.get(i)); if (terminateStageTrack.getNumberRS() == 0 && terminateStageTrack.getDropRS() == 0){ ! addLine(fileOut, ONE, "Track "+terminateStageTrack.getName()+" is available"); break; } else { --- 194,198 ---- terminateStageTrack = terminateLocation.getTrackById((String)stagingTracksTerminate.get(i)); if (terminateStageTrack.getNumberRS() == 0 && terminateStageTrack.getDropRS() == 0){ ! addLine(fileOut, ONE, "Track "+terminateStageTrack.getName()+" is available at "+terminateLocation.getName()); break; } else { *************** *** 213,217 **** for (int i=0; i<stagingTracks.size(); i++ ){ departStageTrack = departLocation.getTrackById((String)stagingTracks.get(i)); ! addLine(fileOut, ONE, "Staging track ("+departStageTrack.getName()+") has "+departStageTrack.getNumberRS()+" engines and cars"); if (departStageTrack.getNumberRS()>0 && getEngines(fileOut)){ break; --- 213,220 ---- for (int i=0; i<stagingTracks.size(); i++ ){ departStageTrack = departLocation.getTrackById((String)stagingTracks.get(i)); ! addLine(fileOut, ONE, "Staging track (" ! + departStageTrack.getName() + ") has " ! + departStageTrack.getNumberEngines() + " engines and " ! + departStageTrack.getNumberCars() + " cars"); if (departStageTrack.getNumberRS()>0 && getEngines(fileOut)){ break; Index: Train.java =================================================================== RCS file: /cvsroot/jmri/jmri/jmrit/operations/trains/Train.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Train.java 23 Nov 2008 05:34:37 -0000 1.28 --- Train.java 25 Nov 2008 21:31:09 -0000 1.29 *************** *** 727,735 **** || inputLine[0].equals(Setup.BUILD_REPORT_NORMAL + "-") || inputLine[0].equals(Setup.BUILD_REPORT_MINIMAL + "-")) { ! line = ""; ! // skip the first set of characters ! for (int i = 1; i < inputLine.length; i++) { ! line += inputLine[i] + " "; ! } if (Setup.getBuildReportLevel().equals(Setup.BUILD_REPORT_MINIMAL)){ if (inputLine[0].equals(Setup.BUILD_REPORT_NORMAL + "-") --- 727,731 ---- || inputLine[0].equals(Setup.BUILD_REPORT_NORMAL + "-") || inputLine[0].equals(Setup.BUILD_REPORT_MINIMAL + "-")) { ! if (Setup.getBuildReportLevel().equals(Setup.BUILD_REPORT_MINIMAL)){ if (inputLine[0].equals(Setup.BUILD_REPORT_NORMAL + "-") *************** *** 750,756 **** } } } else { ! log ! .debug("ERROR first characters of build report not valid (" + line + ")"); } --- 746,774 ---- } } + // do not indent if false + if (false){ + // indent lines based on level + if (inputLine[0].equals(Setup.BUILD_REPORT_VERY_DETAILED + "-")){ + inputLine[0] = " "; + } + else if (inputLine[0].equals(Setup.BUILD_REPORT_DETAILED + "-")){ + inputLine[0] = " "; + } + else if (inputLine[0].equals(Setup.BUILD_REPORT_NORMAL + "-")){ + inputLine[0] = " "; + } + else if (inputLine[0].equals(Setup.BUILD_REPORT_MINIMAL + "-")){ + inputLine[0] = ""; + } + } else { + inputLine[0] = ""; + } + // rebuild line + line = ""; + for (int i = 0; i < inputLine.length; i++) { + line += inputLine[i] + " "; + } } else { ! log.debug("ERROR first characters of build report not valid (" + line + ")"); } |