diff --git a/spy-common-ui/src/main/java/pl/baczkowicz/spy/ui/BaseViewManager.java b/spy-common-ui/src/main/java/pl/baczkowicz/spy/ui/BaseViewManager.java index d4f4fbc2..b2b66547 100644 --- a/spy-common-ui/src/main/java/pl/baczkowicz/spy/ui/BaseViewManager.java +++ b/spy-common-ui/src/main/java/pl/baczkowicz/spy/ui/BaseViewManager.java @@ -188,7 +188,10 @@ private void initialiseTestCasesWindow(final Window parentWindow) testCasesStage.setTitle("Test cases"); testCasesStage.initOwner(parentWindow); testCasesStage.setScene(scene); - ((TestCasesExecutionController) loader.getController()).init(); + + final TestCasesExecutionController testCasesExecutionController = (TestCasesExecutionController) loader.getController(); + testCasesExecutionController.setScriptManager(genericScriptManager); + testCasesExecutionController.init(); } private void initialiseFormattersWindow(final Window parentWindow) diff --git a/spy-common-ui/src/main/java/pl/baczkowicz/spy/ui/controllers/TestCasesExecutionController.java b/spy-common-ui/src/main/java/pl/baczkowicz/spy/ui/controllers/TestCasesExecutionController.java index 620ea164..d92c73a5 100644 --- a/spy-common-ui/src/main/java/pl/baczkowicz/spy/ui/controllers/TestCasesExecutionController.java +++ b/spy-common-ui/src/main/java/pl/baczkowicz/spy/ui/controllers/TestCasesExecutionController.java @@ -134,20 +134,12 @@ public class TestCasesExecutionController extends AnchorPane implements Initiali private String scriptsLocation; - // private EventManager eventManager; - - // private IKBus eventBus; - private BaseScriptManagerInterface scriptManager; private InteractiveTestCaseManager testCaseManager; - // private MqttAsyncConnection connection; - private MenuButton settingsButton; - // private ConnectionController connectionController; - private Label titleLabel; public void initialize(URL location, ResourceBundle resources) @@ -339,18 +331,15 @@ public void updateItem(TestCaseStatus item, boolean empty) public void init() { - titleLabel = new Label(pane.getText()); + // Don't populate the title if not embedded + if (pane != null) + { + titleLabel = new Label(pane.getText()); + } - // scriptManager = new InteractiveScriptManager(eventBus, connection); testCaseManager = new InteractiveTestCaseManager(scriptManager, this, testCaseExecutionPaneController); testCaseExecutionPaneController.setTestCaseManager(testCaseManager); - -// if (connectionController != null) -// { -// // paneTitle = new AnchorPane(); -// settingsButton = ViewManager.createTitleButtons(this, new AnchorPane(), connectionController); -// } } public void refreshInfo() @@ -433,11 +422,6 @@ public void showSelected() // === Setters and getters ======= // =============================== -// public void setEventBus(final IKBus eventBus) -// { -// this.eventBus = eventBus; -// } - @Override public TitledPane getTitledPane() { @@ -449,16 +433,6 @@ public void setTitledPane(TitledPane pane) { this.pane = pane; } - -// public void setConnection(MqttAsyncConnection connection) -// { -// this.connection = connection; -// } - -// public void setConnectionController(final ConnectionController connectionController) -// { -// this.connectionController = connectionController; -// } @Override public void updatePane(PaneVisibilityStatus status)