Files
Dynamic-Form-Tools/GEMINI.md

46 lines
2.5 KiB
Markdown

# DynamicFormTools
## Project Overview
The `DynamicFormTools` is a comprehensive IntelliJ Platform Plugin designed to streamline the development of Java-based web applications that utilize the DynForm framework. It provides a suite of tools for automated code generation, internationalization (i18n) management, and enhanced support for framework-specific file types.
**Key Features:**
* **Action Models Generator:** Automates the generation of `ActionBean`, `DTO`, and `Dataset XML` classes from a database schema using FreeMarker templates.
* **I18n Management:** Simplifies internationalization workflows with inlay hints, code folding, and smart completion for `message.xml` keys across Java, XML, and JavaScript.
* **DynForm Support:** Provides specialized support for `.frml` files, including file type recognition and intelligent auto-completion.
* **Database Schema Introspection:** Utilizes IntelliJ's database tools to read table and column metadata for code generation.
* **Template-driven:** Customizable code generation via FreeMarker templates.
**Core Technologies:**
* **Java:** Primary development language.
* **Kotlin:** Used for Gradle configuration and potentially for plugin logic.
* **Gradle (Kotlin DSL):** Build automation system.
* **IntelliJ Platform SDK:** For IDE integration, UI actions, and language support.
* **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:
```bash
./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:
```bash
./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`.