3737
3838public abstract class Compiler extends AbstractCompiler {
3939
40- // static final String RESOURCE_DIR = "resources";
40+ // static final String RESOURCE_DIR = "resources";
4141
4242 private final File RESOURCE_DIR , XML_DIR , XML_FILE , XML_FILE_TEMP ;
4343 private final File [] DATA_FILES ;
@@ -46,21 +46,21 @@ public abstract class Compiler extends AbstractCompiler {
4646 private File inputDir , outputDir ;
4747 private File [] rulDirs ;
4848 private boolean isLHD ;
49-
49+
5050 private boolean firstXMLisActive ;
5151
5252 private PatternNode rootNode ;
5353 private JTree tree ;
5454// private MyCheckTreeManager checkTreeManager;
5555 private Queue <Pattern > patterns ;
5656 private CollectRULsTask collectRULsTask ;
57-
57+
5858 private File outputFile ;
59-
59+
6060 public static Compiler getCommandLineCompiler (File resourceDir , CommandLineArguments args ) {
6161 return new CommandLineCompiler (resourceDir , args );
6262 }
63-
63+
6464 public static Compiler getInteractiveCompiler (File resourceDir , CompileMode mode ) {
6565 if (!mode .isInteractive ()) {
6666 throw new IllegalArgumentException ("GUICompiler must be executed in interactive mode." );
@@ -79,7 +79,7 @@ public static Compiler getInteractiveCompiler(File resourceDir, CompileMode mode
7979 }
8080 return new GUICompiler (resourceDir , mode );
8181 }
82-
82+
8383 private Compiler (File resourceDir , CompileMode mode , View view , CommandLineArguments args ) {
8484 super (mode , view );
8585 this .RESOURCE_DIR = resourceDir ;
@@ -205,7 +205,7 @@ public boolean collectPatterns() {
205205 return false ;
206206 }
207207 }
208-
208+
209209 @ Override
210210 public boolean collectRULInputFiles () {
211211 collectRULsTask = CollectRULsTask .getInstance (mode , rulDirs , isLHD );
@@ -224,7 +224,7 @@ public boolean checkOutputFilesExist() {
224224 LOGGER .info ("Created output directory: " + outputDir );
225225 }
226226 }
227-
227+
228228// outputFile = new File(outputDir, String.format(
229229// "NetworkAddonMod_Controller_%s_HAND_VERSION.dat", isLHD ? "LEFT" : "RIGHT"));
230230 outputFile = new File (outputDir , "NetworkAddonMod_Controller.dat" );
@@ -274,27 +274,27 @@ public boolean writeSettings() {
274274 }
275275 return false ;
276276 }
277-
277+
278278 @ Override
279279 public void writeControllerFile () {
280280 ExecutableTask writeTask = WriteControllerTask .getInstance (mode , collectRULsTask , isLHD , patterns , inputDir .toURI (), outputFile , view );
281281 writeTask .execute ();
282282 // result will be handled by determineResult in writeTask
283283 }
284-
284+
285285 private static class GUICompiler extends Compiler {
286-
286+
287287 private GUICompiler (File resourceDir , CompileMode mode ) {
288288 super (resourceDir , mode , new GUIView (), CommandLineArguments .getInstance ());
289289 assert mode .isInteractive () : mode ;
290290 Thread .setDefaultUncaughtExceptionHandler (new UncaughtExceptionHandler () {
291- @ Override
292- public void uncaughtException (Thread t , Throwable e ) {
293- GUICompiler .super .view .publishException (e .getLocalizedMessage (), e );
294- }
295- });
291+ @ Override
292+ public void uncaughtException (Thread t , Throwable e ) {
293+ GUICompiler .super .view .publishException (e .getLocalizedMessage (), e );
294+ }
295+ });
296296 }
297-
297+
298298 @ Override
299299 public boolean readSettings () {
300300 // TODO
@@ -317,13 +317,13 @@ public boolean readSettings() {
317317 return true ;
318318 }
319319 }
320-
320+
321321 @ Override
322322 public void execute () {
323323 runBefore .run ();
324324 showGUI ();
325325 }
326-
326+
327327 private void showGUI () {
328328 SwingUtilities .invokeLater (new Runnable () {
329329 @ Override
@@ -351,7 +351,7 @@ public void actionPerformed(ActionEvent ae) {
351351 }
352352 });
353353 }
354-
354+
355355 @ Override
356356 public boolean readXML () {
357357 boolean success = super .readXML ();
@@ -363,27 +363,27 @@ public boolean readXML() {
363363 return success ;
364364 }
365365 }
366-
366+
367367 private static class CommandLineCompiler extends Compiler {
368-
368+
369369 private CommandLineCompiler (File resourceDir , CommandLineArguments args ) {
370370 super (resourceDir , CompileMode .COMMAND_LINE , new ConsoleView (), args );
371371 super .inputDir = new File (super .settingsManager .getInput ());
372372 super .outputDir = new File (super .settingsManager .getOutput ());
373373 super .isLHD = super .settingsManager .getLhdFlag ();
374374 }
375-
375+
376376 @ Override
377377 public boolean readSettings () {
378378 return true ;
379379 }
380-
380+
381381 @ Override
382382 public void execute () {
383383 runBefore .run ();
384384 runAfter .run ();
385385 }
386-
386+
387387 @ Override
388388 public boolean writeSettings () {
389389 // this method does not write the XML file, in contrast to the super method
0 commit comments