package nl.mvdr.tinustris.gui;

import java.io.IOException;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

/**
 * Main class which opens the configuration screen.
 * 
 * @author Martijn van de Rijdt
 */
//When testing the application in Eclipse, don't run this class directly. Use ConfigurationScreenTestContext instead.
public class ConfigurationScreen extends Application {

    /** {@inheritDoc} */
    @Override
    public void start(Stage primaryStage) throws IOException {
        Parent parent = FXMLLoader.load(getClass().getResource("/Configuration.fxml"));
        
        primaryStage.setScene(new Scene(parent));
        primaryStage.show();
    }

    /**
     * Main method.
     * 
     * @param args commandline arguments; these are passed on to JavaFX
     */
    public static void main(String[] args) {
        launch(args);
    }
}

@@ -54,16 +54,61 @@
 ption;%0A%0A
+import org.slf4j.bridge.SLF4JBridgeHandler;%0A%0A
 import j
@@ -250,16 +250,50 @@
 e.Stage;
+%0Aimport lombok.extern.slf4j.Slf4j;
 %0A%0A/**%0A *
@@ -500,16 +500,23 @@
 nstead.%0A
+@Slf4j%0A
 public c
@@ -562,17 +562,16 @@
 ation %7B%0A
-%0A
     /** 
@@ -676,363 +676,2383 @@
     
-Parent parent = FXMLLoader.load(getClass().getResource(%22/Configuration.fxml%22));%0A        %0A        primaryStage.setScene(new Scene(parent));%0A        primaryStage.show();%0A    %7D%0A%0A    /**%0A     * Main method.%0A     * %0A     * @param args commandline arguments; these are passed on to JavaFX%0A     */%0A    public static void main(String%5B%5D args) %7B%0A        launch(args
+logVersionInfo();%0A        %0A        Thread.currentThread().setUncaughtExceptionHandler(%0A                (thread, throwable) -%3E log.error(%22Uncaught runtime exception on JavaFX Thread%22, throwable));%0A        %0A        Parent parent = FXMLLoader.load(getClass().getResource(%22/Configuration.fxml%22));%0A        %0A        primaryStage.setScene(new Scene(parent));%0A        primaryStage.show();%0A    %7D%0A    %0A    /** Logs some version info. */%0A    // default visibility for unit tests%0A    void logVersionInfo() %7B%0A        if (log.isInfoEnabled()) %7B%0A            String version = retrieveVersion();%0A            if (version != null) %7B%0A                log.info(%22Application version: %22 + version);%0A            %7D else %7B%0A                log.info(%22Application version unknown.%22);%0A            %7D%0A%0A            log.info(%22Classpath: %22 + System.getProperty(%22java.class.path%22));%0A            log.info(%22Library path: %22 + System.getProperty(%22java.library.path%22));%0A            log.info(%22Java vendor: %22 + System.getProperty(%22java.vendor%22));%0A            log.info(%22Java version: %22 + System.getProperty(%22java.version%22));%0A            log.info(%22OS name: %22 + System.getProperty(%22os.name%22));%0A            log.info(%22OS version: %22 + System.getProperty(%22os.version%22));%0A            log.info(%22OS architecture: %22 + System.getProperty(%22os.arch%22));%0A        %7D%0A    %7D%0A    %0A    /**%0A     * Returns the version number from the jar manifest file.%0A     * %0A     * @return version number, or null if it cannot be determined%0A     */%0A    private String retrieveVersion() %7B%0A        String result;%0A        Package p = Tinustris.class.getPackage();%0A        if (p != null) %7B%0A            result = p.getImplementationVersion();%0A        %7D else %7B%0A            result = null;%0A        %7D%0A        return result;%0A    %7D%0A%0A    /**%0A     * Main method.%0A     * %0A     * @param args commandline arguments; these are passed on to JavaFX%0A     */%0A    public static void main(String%5B%5D args) %7B%0A        // JInput uses java.util.logging; redirect to slf4j.%0A        installSlf4jBridge();%0A%0A        launch(args);%0A    %7D%0A    %0A    /** Installs a bridge for java.util.logging to slf4j. */%0A    private static void installSlf4jBridge() %7B%0A        // remove existing handlers attached to java.util.logging root logger%0A        SLF4JBridgeHandler.removeHandlersForRootLogger();%0A%0A        // add SLF4JBridgeHandler to java.util.logging's root logger%0A        SLF4JBridgeHandler.install(
 );%0A 

Version logging, log bridge installation and uncaught exception handling.