Locating Component Source Code with Designer4Debug

During development, you often need to find the source class corresponding to a UI component in the designer. You can do this visually using Designer4Debug + SwingExplorer.

Steps

  1. Make sure you are using the latest designer source code.

  2. When launching the designer, select Designer4Debug — i.e., use the main class com.fr.start.Designer4Debug:

    Select the Designer4Debug entry point

  3. After startup, both the designer and a Swing Explorer window will open:

    Designer4Debug startup result

  4. Bring the Swing Explorer window to the front and select a tree node in it:

    Swing Explorer tree node

  5. Click the "Display selected component" button:

    Click Display selected component

  6. The component display area in Swing Explorer will now mirror the designer's interface in real time.

  7. Click a component in the designer — the code tree on the left will highlight the corresponding class:

    Locating the template tree widget

    Locating the dataset tab widget

  8. Search for that class in your IDE to find the source code:

    Search result in IDE

  9. Locating components inside pop-up dialogs: Switch to the designer window and open the dialog via the relevant menu, then switch back to Swing Explorer and click Refresh. The new dialog will appear and you can locate its components using the same steps above.

results matching ""

    No results matching ""