javafxfxmlscenebuilder

How to compare fxml files?


I am currently using SceneBuilder to create and modify my fxml files (and as IDE NetBeans 8.2). I would like to compare two fxmls "side by side" but Scene Builder does not seems to have this option.

When I say "side by side" I mean, for example, being able to compare and see if one component is position at the same location on both fmxl without having to switch windows, or checking if they have the same size.
This way when I switch from one fxml to another one in my javafx app I know that all the components are placed correctly.

I don't know if there is a tool that can do that or if Scene Builder is the best to handle fmxl files ?


Solution

  • Preface:

    If you want to visually see the GUI generated side by side: You can't. Your best bet is to use two SceneBuilders parallel.

    If you want to compare text/code:

    You are looking for a tool which is able to do "file diffs".

    I recommend you to use the version control system GIT, because this is integrated in GIT.

    Solution 1:

    There is a GIT-plugin for Netbeans out there: https://netbeans.apache.org/kb/docs/ide/git.html

    Solution 2:

    Use a third party external tool for this. "Meld" ist very good.

    https://meldmerge.org/

    From Meld's website: Meld helps you compare files, directories, and version controlled projects. It provides two- and three-way comparison of both files and directories, and has support for many popular version control systems.

    Meld helps you review code changes and understand patches. It might even help you to figure out what's going on in that merge you keep avoiding.