7

I started with a good JavaFX Scene Builder 11.0.0 installation, and IDE integration was working fine. Then Scene Builder failed to open a FXML file. With trial and error I discovered that Scene Builder did not like a <!-- comment --> at the end of a tag, and I produced a test case as seen below.

Now while I try to submit the test case, Scene Builder stops working and sometimes takes 10 minutes to start up. I do not know where to configure logging for Scene Builder and the log file is always empty.

Here is the test case:

<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.VBox?>

<BorderPane maxHeight="-Infinity" maxWidth="-Infinity"
            minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
            prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1"
            style="-fx-background:#A2A3A5;">
    <center>
    </center>
    <top>
    </top>
    <right>
        <VBox alignment="TOP_CENTER" prefHeight="329.0" prefWidth="165.0"
              spacing="10.0" BorderPane.alignment="TOP_CENTER">
            <children>
                <ScrollPane prefHeight="209.0"
                            prefWidth="459.0"
                            style="-fx-background: white; -fx-border-color: green; -fx-border-width: 2;"
                            AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
                            AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"><!-- This comment breaks the file for Scene Builder -->
                    <content>
                        <GridPane hgap="2" prefHeight="100"
                                  prefWidth="100" vgap="2">
                        </GridPane>
                    </content>
                </ScrollPane>
            </children>
        </VBox>
    </right>
</BorderPane>

My questions are:

  1. How can I configure logging in this version so I see the error?
  2. How much hand editing is supported - are comments allowed?
  3. What is this start-up delay?
Abra
  • 19,142
  • 7
  • 29
  • 41
user250343
  • 1,163
  • 1
  • 15
  • 24

1 Answers1

0

It is a known issue with Scene-Builder and happens when the comment is in the same line as the FXML-tag. If you just add a new line in between, it should work.If you go to help->About JavaFX Scene Builder, you will see default logging information: default on linux systems is file path /tmp/scenebuilder-[your version of scene builder].log In the same folder you will find DTL-[number].fxml file. This file would contain FXML source code as Scene Builder interprets it:

<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.VBox?>

<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" style="-fx-background:#A2A3A5;" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
    <center>
    </center>
    <top>
    </top>
    <right>
        <VBox alignment="TOP_CENTER" prefHeight="329.0" prefWidth="165.0" spacing="10.0" BorderPane.alignment="TOP_CENTER">
            <children>
                <ScrollPane prefHeight="209.0" prefWidth="459.0" style="-fx-background: white; -fx-border-color: green; -fx-border-width: 2;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"<!-- This comment breaks the file for Scene Builder -->>
                    <content>
                        <GridPane hgap="2" prefHeight="100" prefWidth="100" vgap="2">
                        </GridPane>
                    </content>
                </ScrollPane>
            </children>
        </VBox>
    </right>
</BorderPane>