Files
Dynamic-Form-Tools/src/main/resources/META-INF/plugin.xml
skidus 8f011e637b feat(config): persistent context, path portability, and refined browsing
- Generator now remembers last used directory for Action Beans and Datasets independently per project.
- Added settings to customize automatic file opening and table limits.
- Enforced project-relative paths for i18n/XSD for better project portability.
- Refined File Browser to start at current directory with strict project scope.
- Implemented DynFormAnnotator for structural validation.
- Bumped plugin version to 3.2.7.
2026-04-22 16:04:37 +07:00

201 lines
15 KiB
XML

<!-- 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.dynform.tools</id>
<name>DynamicForm Tools</name>
<vendor>Sakda Sakprapakorn</vendor>
<description><![CDATA[
<h3>Enhance Development with DynamicForm Tools</h3>
<p>This plugin is a comprehensive suite of tools designed to streamline the development of Java-based web applications (like <code>vrms-system</code> and <code>teddy-taxi-web</code>) that utilize the DynForm framework.</p>
<h4>Core Modules:</h4>
<ul>
<li><strong>Action Models Generator:</strong> Automates the creation of <b>ActionBean</b>, <b>DTO</b>, and <b>Dataset XML</b> files directly from your database schema using FreeMarker templates. Support for both V2 and V3 (<code>sdk.db.xxxx</code>) architectures.</li>
<li><strong>I18n Tools:</strong> Simplifies internationalization workflows with inlay hints, code folding, and smart completion for <code>message.xml</code> keys across Java, XML (JSP/FRML), and JavaScript files.</li>
<li><strong>DynForm Helper:</strong> Provides specialized support for <code>.frml</code> files, including custom file type recognition, improved navigation, and intelligent auto-completion for framework-specific attributes and paths.</li>
</ul>
<h4>Key Features:</h4>
<ul>
<li><b>Database Introspection:</b> Reads table metadata and comments to generate consistent code and XML definitions.</li>
<li><b>Smart Navigation:</b> Easily jump from message keys to their definitions or find usages across the project.</li>
<li><b>Real-time Insights:</b> View translated text directly in the editor via inlay hints without switching files.</li>
</ul>
<h4>Compatibility:</h4>
<p>Works with any database supported by IntelliJ IDEA and integrates seamlessly with standard web development technologies (JSP, JS, XML).</p>
<h4>Usage:</h4>
<ul>
<li><b>Generation:</b> Right-click a table in the <b>Database tool window</b> -> <b>"Generate Action Models"</b>.</li>
<li><b>I18n:</b> Type <code>@M{</code> in XML or use supported I18n methods in Java/JS to see suggestions. Configure message file paths in <b>Settings -> DynamicForm Tools</b>.</li>
</ul>
]]></description>
<change-notes><![CDATA[
<h2>[3.2.7]</h2>
<ul>
<li><strong>Persistent Generation Context:</strong> Generator now remembers the last used directory for Action Beans and Dataset XMLs independently per project.</li>
<li><strong>Configurable Auto-Open:</strong> Added new settings to toggle automatic file opening after generation and customize the table limit.</li>
<li><strong>Enhanced Path Portability:</strong> i18n and XSD configurations now strictly use project-relative paths, ensuring settings remain valid across different environments.</li>
<li><strong>Refined File Navigation:</strong> Improved the File Browser to prioritize starting at the current configured directory while maintaining strict project-scope visibility.</li>
</ul>
<h2>[3.2.6]</h2>
<ul>
<li><strong>Structural Validation:</strong> Introduced a new Annotator to validate that all fields used in <code>&lt;LAYOUT&gt;</code> and <code>&lt;FILTERS&gt;</code> are correctly defined in their respective <code>&lt;FIELDS&gt;</code> sections.</li>
<li><strong>Generator Logic Update:</strong> Refined the column width calculation for NUMBER and DATE types in the ActionBean generator for better XML compatibility.</li>
<li><strong>Improved File Opening:</strong> Switched to <code>FileEditorManagerEx</code> for opening generated files, ensuring better window focus and management in recent IDE versions.</li>
</ul>
<h2>[3.2.4]</h2>
<ul>
<li><strong>Persistent Generation Directories:</strong> Generator now remembers the last used directory for Action Beans and Dataset XMLs independently per project.</li>
<li><strong>Auto-Open Generated Files:</strong> Added configuration to automatically open newly created files in the editor, with a customizable limit on the number of files.</li>
<li><strong>Strict Project-Relative Paths:</strong> I18n and XSD configuration now strictly enforces file selection within the project root and stores paths as relative for maximum portability.</li>
<li><strong>Smart File Browser:</strong> Improved file picker logic to automatically start at the current configured directory if it's within the project, falling back to the project root otherwise.</li>
</ul>
<h2>[3.2.3]</h2>
<ul>
<li><strong>Advanced Data Referencing:</strong> Implemented comprehensive reference and completion support for <code>&lt;FOREIGN-DATASETS&gt;</code> and <code>&lt;MASTER-DATA&gt;</code> structures.</li>
<li><strong>Contextual Field Resolution:</strong> Enhanced field resolution logic to resolve fields from datasets specified by <code>DATASET-ID</code> and <code>DATAID</code> attributes within their respective tags.</li>
<li><strong>Recursive Resource Scanning:</strong> Improved dataset and grid scanning to search across recursively included <code>.frml</code> files, ensuring consistent navigation and completion throughout the project.</li>
</ul>
<h2>[3.2.2]</h2>
<ul>
<li><strong>UI/UX Improvement:</strong> Updated the I18n settings to allow selecting the message bundle XML file directly via a file browser, improving configuration usability.</li>
<li><strong>Core Enhancement:</strong> Modified I18nUtils to load message files via absolute paths from project settings, increasing reliability across different project structures.</li>
</ul>
<h2>[3.2.1]</h2>
<ul>
<li><strong>Bug Fix:</strong> Resolved a <code>ConcurrentModificationException</code> in the I18n cache mechanism caused by concurrent background thread access.</li>
</ul>
<h2>[3.2.0]</h2>
<ul>
<li><strong>Schema Validation:</strong> Introduced project-level automatic XSD registration. Configure a target folder and namespace prefix to seamlessly map <code>.xsd</code> files to the <code>ExternalResourceManager</code>.</li>
<li><strong>Architecture:</strong> Finalized rebranding by standardizing internal packages to <code>com.sdk.dynform.*</code> for better consistency.</li>
<li><strong>UI Improvement:</strong> Streamlined the plugin settings UI into distinct Internationalization and Schema Validation groups.</li>
</ul>
<h2>[3.1.0]</h2>
<ul>
<li><strong>Advanced Navigation:</strong> Implemented bidirectional field referencing between <code>&lt;FIELDS&gt;</code>, <code>&lt;LAYOUT&gt;</code>, and <code>&lt;TITLES&gt;</code> tags in <code>.frml</code> files.</li>
<li><strong>Cross-Module Support:</strong> Added support for cross-module file inclusion and referencing using <code>/module/path</code> and module-relative <code>#path</code> syntax.</li>
<li><strong>AJAX-OPTION Enhancements:</strong>
<ul>
<li>Reference and completion support for datasets defined in <code>defs/ajax.xml</code>.</li>
<li>Smart mapping for <code>SRC</code> (AJAX datasets) and <code>TARGET</code> (local form fields) attributes.</li>
</ul>
</li>
<li><strong>Robust Field Resolution:</strong> Enhanced deep recursive search for fields/sections within nested layouts (Sections, Rows, and Multi-field lists).</li>
<li><strong>Path Auto-Correction:</strong> Added handling for common keyboard typos (e.g., Thai 'ิ' instead of '/') in file paths.</li>
<li><strong>Global Resource Scanning:</strong> <code>GRID-ID</code> now intelligently searches across all recursively included <code>.frml</code> files.</li>
</ul>
<h2>[3.0.1]</h2>
<ul>
<li><strong>Rebranding:</strong> Renamed plugin to "DynamicForm Tools" to better reflect its expanding capabilities beyond code generation.</li>
<li><strong>I18n Support:</strong> Added comprehensive tools for internationalization:
<ul>
<li>Inlay hints and code folding for i18n keys in Java, XML, and JavaScript.</li>
<li>Auto-completion and reference navigation for keys defined in <code>message.xml</code>.</li>
<li>Support for multiple message file locations and naming patterns.</li>
</ul>
</li>
<li><strong>DynForm Support:</strong> Introduced dedicated support for <code>.frml</code> files, including file type recognition and specialized completion helpers for paths and attributes.</li>
<li><strong>Architecture Refactoring:</strong> Complete package reorganization to <code>com.sdk.dynform.tools</code> for improved project structure and maintainability.</li>
</ul>
<h2>[2.1.2]</h2>
<ul>
<li>Feature: Grouped database actions into a single "Generate Action Models" popup menu.</li>
<li>UI: Renamed base action to "Generate Action Models V2" to distinguish it from V3.</li>
<li>UI: Improved context menu organization by placing grouped actions at the top of the Database View menu.</li>
</ul>
<h2>[2.1.1]</h2>
<ul>
<li>Update: Case-insensitive column type mapping in GUtils.java.</li>
<li>Update: Add "number" type mapping support for broader database compatibility.</li>
<li>Resource: Added sample Dataset.xml in DevResources for reference.</li>
</ul>
<h2>[2.1.0]</h2>
<ul>
<li>Add: Generate Dataset XML feature to generate XML table definitions from database tables.</li>
<li>Feature: Intelligent label generation for XML datasets, prioritizing database column comments with fallback to entity-based keys.</li>
<li>Feature: Automatic mapping of database types to XML types (TEXT, NUMBER, DATE) and column width extraction.</li>
<li>Shortcut: Added <code>Ctrl + Alt + J</code> for the dataset generation action.</li>
</ul>
<h2>[2.0.1]</h2>
<ul>
<li>update : Refactory class structure of sdk.dbutils -> sdk.db.xxxx</li>
<li>Add : Generate for new class structure as V3 </li>
</ul>
]]></change-notes>
<depends>com.intellij.modules.platform</depends>
<depends>com.intellij.modules.java</depends>
<depends>com.intellij.database</depends>
<depends>com.intellij.jsp</depends>
<depends>com.intellij.modules.xml</depends>
<depends>com.intellij.modules.javascript</depends>
<depends>JavaScript</depends>
<actions>
<group id="com.sdk.dynform.tools.actionbean.actionmodels.GeneratorGroup" popup="true" text="Generate Action Models">
<add-to-group group-id="DatabaseViewPopupMenu" anchor="first"/>
<action id="com.sdk.dynform.tools.actionbean.GenerateBeanAction"
class="com.sdk.dynform.tools.actionbean.GenerateBeanAction"
text="Generate Action Models V2"
description="Generates ActionBean classes from a database schema.">
</action>
<action id="com.sdk.dynform.tools.actionbean.GenerateBeanAction.v3"
class="com.sdk.dynform.tools.actionbean.GenerateBeanActionV3"
text="Generate Action Models V3"
description="Generates ActionBean classes from a database schema V3 (sdk.db.xxx).">
</action>
<action id="com.sdk.dynform.tools.actionbean.GenerateDatasetAction"
class="com.sdk.dynform.tools.actionbean.GenerateDatasetAction"
text="Generate Dataset XML"
description="Generates Dataset XML definition from a database table.">
</action>
</group>
</actions>
<extensions defaultExtensionNs="com.intellij">
<projectService serviceImplementation="com.sdk.dynform.tools.config.DynFormSettings"/>
<projectConfigurable instance="com.sdk.dynform.tools.config.DynFormConfigurable"
id="com.sdk.dynform.tools.config.DynFormConfigurable"
displayName="DynamicForm Tools"
nonDefaultProject="true"/>
<fileType name="FRML" implementationClass="com.sdk.dynform.tools.dynform.FRMLFileType" extensions="frml" language="XML"/>
<notificationGroup id="Dynamic-Form-Tools-Notification" displayType="BALLOON" isLogByDefault="true"/>
<!-- Folding Builders -->
<lang.foldingBuilder language="JAVA" implementationClass="com.sdk.dynform.tools.i18n.I18nFoldingBuilder"/>
<lang.foldingBuilder language="XML" implementationClass="com.sdk.dynform.tools.i18n.I18nFoldingBuilder"/>
<lang.foldingBuilder language="JavaScript" implementationClass="com.sdk.dynform.tools.i18n.I18nFoldingBuilder"/>
<!-- Inlay Hints Providers -->
<codeInsight.inlayProvider language="JAVA" implementationClass="com.sdk.dynform.tools.i18n.I18nInlayHintsProvider"/>
<codeInsight.inlayProvider language="XML" implementationClass="com.sdk.dynform.tools.i18n.I18nInlayHintsProvider"/>
<codeInsight.inlayProvider language="JavaScript" implementationClass="com.sdk.dynform.tools.i18n.I18nInlayHintsProvider"/>
<!-- Reference Contributors -->
<psi.referenceContributor language="JAVA" implementation="com.sdk.dynform.tools.i18n.I18nReferenceContributor"/>
<psi.referenceContributor language="XML" implementation="com.sdk.dynform.tools.i18n.I18nReferenceContributor"/>
<psi.referenceContributor language="JavaScript" implementation="com.sdk.dynform.tools.i18n.I18nReferenceContributor"/>
<psi.referenceContributor language="JAVA" implementation="com.sdk.dynform.tools.dynform.DynFormReferenceContributor"/>
<psi.referenceContributor language="XML" implementation="com.sdk.dynform.tools.dynform.DynFormReferenceContributor"/>
<psi.referenceContributor language="JavaScript" implementation="com.sdk.dynform.tools.dynform.DynFormReferenceContributor"/>
<!-- Completion Contributors -->
<completion.contributor language="JAVA" implementationClass="com.sdk.dynform.tools.i18n.I18nCompletionContributor"/>
<completion.contributor language="XML" implementationClass="com.sdk.dynform.tools.i18n.I18nCompletionContributor"/>
<completion.contributor language="JavaScript" implementationClass="com.sdk.dynform.tools.i18n.I18nCompletionContributor"/>
<completion.contributor language="JAVA" implementationClass="com.sdk.dynform.tools.dynform.DynFormCompletionContributor"/>
<completion.contributor language="XML" implementationClass="com.sdk.dynform.tools.dynform.DynFormCompletionContributor"/>
<completion.contributor language="JavaScript" implementationClass="com.sdk.dynform.tools.dynform.DynFormCompletionContributor"/>
<annotator language="XML" implementationClass="com.sdk.dynform.tools.dynform.DynFormAnnotator"/>
</extensions>
</idea-plugin>