1
0
mirror of https://github.com/aNNiMON/HotaruFX.git synced 2024-09-19 14:14:21 +03:00

Auto expand log pane on parse errors

This commit is contained in:
Victor 2017-09-04 15:16:03 +03:00
parent 306f3efc32
commit 15c1d40f70
2 changed files with 4 additions and 1 deletions

View File

@ -32,6 +32,8 @@ public class EditorController implements Initializable {
@FXML @FXML
public TextArea log; public TextArea log;
@FXML
public TitledPane logPane;
@FXML @FXML
public void handleMenuExit(ActionEvent event) { public void handleMenuExit(ActionEvent event) {
@ -62,6 +64,7 @@ public class EditorController implements Initializable {
sb.append(parseError); sb.append(parseError);
} }
log.setText(sb.toString()); log.setText(sb.toString());
logPane.setExpanded(true);
return; return;
} }
program.accept(new InterpreterVisitor(), context); program.accept(new InterpreterVisitor(), context);

View File

@ -34,7 +34,7 @@
</VBox> </VBox>
</top> </top>
<bottom> <bottom>
<TitledPane animated="false" expanded="false" text="Log" BorderPane.alignment="CENTER"> <TitledPane fx:id="logPane" animated="false" expanded="false" text="Log" BorderPane.alignment="CENTER">
<TextArea editable="false" fx:id="log" /> <TextArea editable="false" fx:id="log" />
</TitledPane> </TitledPane>
</bottom> </bottom>