@@ -47,6 +47,7 @@ public abstract class WriteControllerTask implements ExecutableTask {
4747
4848 private final CollectRULsTask collectRULsTask ;
4949 private final boolean isLHD ;
50+ private final String markerText ;
5051 private final Queue <Pattern > patterns ;
5152 private final URI inputURI ;
5253 private final File outputFile ;
@@ -56,20 +57,21 @@ public abstract class WriteControllerTask implements ExecutableTask {
5657 private long starttime ;
5758
5859 public static ExecutableTask getInstance (CompileMode mode , CollectRULsTask collectRULsTask ,
59- boolean isLHD , Queue <Pattern > patterns , URI inputURI , File outputFile , View view ) {
60+ boolean isLHD , String markerText , Queue <Pattern > patterns , URI inputURI , File outputFile , View view ) {
6061 if (mode .isInteractive ()) {
61- return new GUITask (collectRULsTask , isLHD , patterns , inputURI , outputFile , view );
62+ return new GUITask (collectRULsTask , isLHD , markerText , patterns , inputURI , outputFile , view );
6263 } else {
63- return new CommandLineTask (collectRULsTask , isLHD , patterns , inputURI , outputFile , view );
64+ return new CommandLineTask (collectRULsTask , isLHD , markerText , patterns , inputURI , outputFile , view );
6465 }
6566 }
6667
6768 public abstract boolean get () throws InterruptedException , ExecutionException ;
6869
6970 private WriteControllerTask (CollectRULsTask collectRULsTask ,
70- boolean isLHD , Queue <Pattern > patterns , URI inputURI , File outputFile , View view ) {
71+ boolean isLHD , String markerText , Queue <Pattern > patterns , URI inputURI , File outputFile , View view ) {
7172 this .collectRULsTask = collectRULsTask ;
7273 this .isLHD = isLHD ;
74+ this .markerText = markerText ;
7375 this .patterns = patterns ;
7476 this .inputURI = inputURI ;
7577 this .outputFile = outputFile ;
@@ -123,7 +125,10 @@ public void stateChanged(ChangeEvent e) {
123125 // LText (Controller marker)
124126 LOGGER .info ("Adding Controller marker description text" );
125127 DBPFLText ltext = new DBPFLText (new byte [0 ], LTEXT_TGI , false );
126- ltext .setString (getControllerMarkerText (lastModf , WriteControllerTask .this .isLHD ));
128+ ltext .setString (
129+ WriteControllerTask .this .markerText .isEmpty ()
130+ ? getDefaultControllerMarkerText (lastModf , WriteControllerTask .this .isLHD )
131+ : WriteControllerTask .this .markerText );
127132 writeList .add (ltext );
128133 }
129134 // write to file
@@ -169,7 +174,7 @@ private void determineResult() {
169174 * @param isLHD
170175 * @return
171176 */
172- private String getControllerMarkerText (long date , boolean isLHD ) {
177+ private String getDefaultControllerMarkerText (long date , boolean isLHD ) {
173178 DateFormat dateFormat = new SimpleDateFormat ("yyyy MMM dd - HH:mm:ss (z)" , Locale .ENGLISH );
174179 dateFormat .setTimeZone (TimeZone .getTimeZone ("UTC" ));
175180// return "Version: " + (isLHD ? "LHD " : "RHD ") + (isESeries ? "(e-series) - " : "(s-series) - ") + dateFormat.format(new Date(date));
@@ -187,8 +192,8 @@ private static class GUITask extends WriteControllerTask {
187192 private final SwingWorker <Boolean , String > worker ;
188193
189194 private GUITask (CollectRULsTask collectRULsTask ,
190- boolean isLHD , Queue <Pattern > patterns , URI inputURI , File outputFile , View view ) {
191- super (collectRULsTask , isLHD , patterns , inputURI , outputFile , view );
195+ boolean isLHD , String markerText , Queue <Pattern > patterns , URI inputURI , File outputFile , View view ) {
196+ super (collectRULsTask , isLHD , markerText , patterns , inputURI , outputFile , view );
192197 worker = new MyWorker ();
193198 }
194199
@@ -230,8 +235,8 @@ private static class CommandLineTask extends WriteControllerTask implements Publ
230235 private Exception executionExceptionCause = null ;
231236
232237 private CommandLineTask (CollectRULsTask collectRULsTask ,
233- boolean isLHD , Queue <Pattern > patterns , URI inputURI , File outputFile , View view ) {
234- super (collectRULsTask , isLHD , patterns , inputURI , outputFile , view );
238+ boolean isLHD , String markerText , Queue <Pattern > patterns , URI inputURI , File outputFile , View view ) {
239+ super (collectRULsTask , isLHD , markerText , patterns , inputURI , outputFile , view );
235240 }
236241
237242 @ Override
0 commit comments