refactor: Restructure project, enhance ActionField and DTOField generation

This commit refactors the project structure by moving generator-related classes
to a new package (`com.sdk.generators.actionmodels`) and standardizing
template directory names (`src/main/resources/templates`).

It introduces new FreeMarker templates (`actionDTO.ftl`, `actionDTO.extend.ftl`)
and corresponding logic in `GeneratorServices.java` to support the generation
of Data Transfer Object (DTO) classes alongside ActionBeans. The changes
also involve enhancements related to `ActionField` and `DTOField` generation.

Updates to `build.gradle.kts`, `plugin.xml`, and Gradle wrapper files
reflect these structural and functional enhancements.
This commit is contained in:
2025-09-23 23:07:19 +07:00
parent 1ac54a0d5d
commit c9147b069e
47 changed files with 946 additions and 305 deletions

View File

@@ -1,7 +1,7 @@
<!-- Plugin Configuration File. Read more: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html -->
<idea-plugin>
<!-- Unique id for this plugin. Must stay constant for the life of the plugin. -->
<id>com.sdk.actionbean.generator</id>
<id>com.sdk.generators.actionmodels</id>
<name>Database Action Models Generator</name>
<vendor>Sakda Sakprapakorn</vendor>
@@ -16,13 +16,17 @@
<actions>
<!-- Defines an action that will appear in the context menu for project directories -->
<action id="ActionModelGenerator.GenerateAction"
class="com.sdk.actionbean.generator.GenerateBeanAction"
text="Generate Database Action Models"
<action id="com.sdk.generators.actionmodels.GenerateBeanAction"
class="com.sdk.generators.actionmodels.GenerateBeanAction"
text="Generate Action Models"
description="Generates ActionBean classes from a database schema.">
<add-to-group group-id="GenerateGroup" anchor="first"/>
<!-- This makes the action visible only when right-clicking a source package -->
<add-to-group group-id="DatabaseViewPopupMenu" anchor="first"/>
<keyboard-shortcut keymap="$default" first-keystroke="ctrl alt G"/>
</action>
</actions>
<!-- in plugin.xml, inside the <extensions defaultExtensionNs="com.intellij"> tag -->
<extensions defaultExtensionNs="com.intellij">
<notificationGroup id="Action-Models-Generator-Notification" displayType="BALLOON" isLogByDefault="true"/>
</extensions>
</idea-plugin>