Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095811

SceneBuilder always writes default properties when saving, even when original FXML file omitted them.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8u40
    • 8
    • javafx
    • None

    Description

      I appreciate that with the general release of SceneBuilder 2.0, I can now finally load an FXML file which omits FXML "default properties" without failing assertions (SceneBuilder DTL-6181 has been fixed). However, when I do so and then save the file from within SceneBuilder, it adds all the default properties back in again! Finally being able to use default properties in my FXML was one of the main things I was looking for when moving from the SceneBuilder 2 EA to the GA release, and I am disappointed that I still can't really do this.

      This makes my FXML file much larger and harder to understand, and basically means that there is little point in me using default properties to reduce the clutter when editing the text manually. (Removing them is particularly easy since my IDE, IntelliJ, marks unnecessary use of a default property as a warning when editing an FXML file, and provides a "quick fix" to remove the unnecessary XML elements) . I can remove them to declutter my file, but as soon as I edit the file with SceneBuilder 2.0 and then save the file, it will add them all back again. Frustrating!

      Please either add a user preference as to whether to generate default properties or not when saving FXML files, or (even better, and possibly in addition to this) remember whether or not a loaded file contained any default properties, and if not, don't generate them when writing a modified version of the file back to disk. Really, I would rather not see default properties, ever, so if you just decided to non-optionally always omit them when writing an FXML file, that would be fine too.

      Thanks!

      Attachments

        Activity

          People

            eleponn Eric Le Ponner
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: