skidus f705cd11b9 feat: implement advanced bidirectional field referencing and cross-module path resolution
- Core Logic Enhancements:
    - Implement bidirectional field referencing between <FIELDS>, <LAYOUT>, and <TITLES> tags in .frml files, enabling seamless navigation from definitions to usages and vice versa.
    - Add robust support for AJAX-OPTION field mapping:
        - SRC attribute: Links to field definitions within defs/ajax.xml datasets.
        - TARGET attribute: Links to local field definitions within the same form.
    - Implement global grid resolution: GRID-ID now searches across the current file and all recursively included files (<INCLUDE>).
    - Enhance deep recursive search for fields/sections within nested tags like <SECTION>, <ROW>, and <FIELD-LIST>.

- Path Resolution & Helpers (DynFormPathUtils):
    - Added support for module-relative paths starting with # (mapping to view/frm/).
    - Added support for cross-module paths starting with / (mapping to WEB-INF/app/module/{module}/view/frm/).
    - Implemented auto-correction for common keyboard typos (Thai 'ิ' instead of /).
    - Added specialized helpers for locating ajax.xml and included files within the framework's structure.

- Smart Completion Enhancements:
    - Added context-aware completion for TARGET and SRC fields in AJAX update-fields.
    - Enabled global GRID-ID completion by scanning all included resources.
    - Improved dataset completion to include both local and AJAX-defined datasets.

- Test Resources:
    - Added a comprehensive set of real-world examples (bdgt04, bdgt05, bdgt06) in DevResources/full-examples/ to validate complex cross-module and master-detail scenarios.
2026-04-10 12:56:04 +07:00

DynamicFormTools

Project Overview

The DynamicFormTools is an IntelliJ Platform Plugin designed to automate the generation of Java ActionBean and Data Transfer Object (DTO) classes from a database schema. This plugin integrates directly into the IntelliJ IDE, allowing developers to select a database table and generate corresponding Java classes based on predefined FreeMarker templates.

Key Features:

  • Database Schema Introspection: Utilizes IntelliJ's database tools to read table and column metadata.
  • Code Generation: Generates ActionBean and DTO classes using FreeMarker templates.
  • Template-driven: Customizable code generation via FreeMarker templates (actionBean.ftl, actionBean.extend.ftl, actionDTO.ftl, actionDTO.extend.ftl).
  • IDE Integration: Provides a context menu action ("Generate Action Models") in the Database View for easy access.

Core Technologies:

  • Java: Primary development language.
  • Kotlin: Configured in build.gradle.kts, indicating potential for Kotlin usage.
  • Gradle (Kotlin DSL): Build automation system.
  • IntelliJ Platform SDK: For IDE integration and database interaction.
  • FreeMarker: Templating engine for code generation.

Building and Running

This project is an IntelliJ Platform Plugin built with Gradle.

Build the Plugin: To build the plugin, use the following Gradle command:

./gradlew build

This will produce a .zip plugin artifact in the build/distributions directory.

Run the Plugin in a Development IDE: To run a new IntelliJ IDE instance with this plugin installed for development and testing:

./gradlew runIde

Alternatively, you can use the "Run IDE with Plugin" run configuration provided in the .run directory within IntelliJ IDEA.

Development Conventions

  • Language: Primarily Java, with Kotlin support configured.
  • Build System: Gradle with Kotlin DSL (.gradle.kts files).
  • Code Generation: FreeMarker templates are located in src/main/resources/templates/. Modifications to these templates will change the generated code structure.
  • IntelliJ Platform APIs: Development involves using IntelliJ Platform SDK for UI actions, virtual file system operations, and database schema access.
  • Action Definition: New actions are defined in src/main/resources/META-INF/plugin.xml.
Description
Generates ActionBean Java classes from a database schema. Right-click on a package and select "Generate Database Action Models" to start.
Readme 499 KiB
Languages
Java 96.7%
Fluent 3%
FreeMarker 0.3%