refactor(config): refine file browser path resolution and clean up test scripts

- Finalized the resolvePath logic in DynFormConfigurable to ensure strict project-root orientation.
- Cleaned up temporary test scripts and agent artifacts.
- Included minor updates to resource examples.
This commit is contained in:
2026-04-18 13:54:21 +07:00
parent ffe1712318
commit d42a514f44
5 changed files with 20 additions and 5 deletions

View File

@@ -1,6 +1,18 @@
import com.intellij.javaee.ExternalResourceManagerEx; import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx;
import com.intellij.javaee.ExternalResourceManager; import java.lang.reflect.Method;
public class CheckAPI { public class CheckAPI {
public static void main(String[] args) { public static void main(String[] args) {
try {
Class<?> clazz = FileEditorManagerEx.class;
System.out.println("Methods in FileEditorManagerEx:");
for (Method m : clazz.getMethods()) {
if (m.getName().toLowerCase().contains("open")) {
System.out.println(m.getName() + " -> " + m.getParameterCount() + " params");
}
}
} catch (Exception e) {
e.printStackTrace();
}
} }
} }

View File

@@ -56,6 +56,7 @@
<SUBDATASET NAME="ACTIVITIES" DATASET-ID="DS-ACTIVITY-TREE" LINK-FIELDS="PROJ_ID"/> <SUBDATASET NAME="ACTIVITIES" DATASET-ID="DS-ACTIVITY-TREE" LINK-FIELDS="PROJ_ID"/>
</SUBDATASETS> </SUBDATASETS>
</DATASET> </DATASET>
<DATASET ID="DS-ACTIVITY-TREE"> <DATASET ID="DS-ACTIVITY-TREE">
<SCHEMA>APP</SCHEMA> <SCHEMA>APP</SCHEMA>
<TABLENAME>V_ACTIVITY_TREE</TABLENAME> <TABLENAME>V_ACTIVITY_TREE</TABLENAME>

View File

@@ -81,7 +81,7 @@
</SQL> </SQL>
<FIELDS> <FIELDS>
<FIELD NAME="PROJ_ID" TYPE="TEXT" LABEL="รหัสอ้างอิงโครงการ" WIDTH="32"/> <FIELD NAME="PROJ_ID" TYPE="TEXT" LABEL="รหัสอ้างอิงโครงการ" WIDTH="32"/>
<FIELD NAME="ACM_CODE" TYPE="TEXT" LABEL="รหัสกิจกรรม" WIDTH="33"/> <FIELD NAME="ACM_CODE" TYPE="TEXT" LABEL="รหัสกิจกรรม" WIDTH="33" FORM-NAME="VACM_CODE"/>
<FIELD NAME="PWMT_UNIT" TYPE="TEXT" LABEL="หน่วยนับ" WIDTH="32"/> <FIELD NAME="PWMT_UNIT" TYPE="TEXT" LABEL="หน่วยนับ" WIDTH="32"/>
<FIELD NAME="PTGT_QT_0101" TYPE="NUMBER" LABEL="เป้าหมายไตรมาส 1 (แผน)" WIDTH="15"/> <FIELD NAME="PTGT_QT_0101" TYPE="NUMBER" LABEL="เป้าหมายไตรมาส 1 (แผน)" WIDTH="15"/>
<FIELD NAME="PTGT_QT_0102" TYPE="NUMBER" LABEL="เป้าหมายไตรมาส 1 (ผล)" WIDTH="15"/> <FIELD NAME="PTGT_QT_0102" TYPE="NUMBER" LABEL="เป้าหมายไตรมาส 1 (ผล)" WIDTH="15"/>

View File

@@ -111,7 +111,8 @@ public class DynFormConfigurable implements Configurable {
} }
} }
} }
}.withRoots(projectDir); };
if (projectDir != null) xmlDescriptor.withRoots(projectDir);
i18nMessageFileField.addBrowseFolderListener("Select Message XML File", "Select the main message bundle XML file (within project)", i18nMessageFileField.addBrowseFolderListener("Select Message XML File", "Select the main message bundle XML file (within project)",
project, xmlDescriptor, new TextComponentAccessor<>() { project, xmlDescriptor, new TextComponentAccessor<>() {
@@ -175,7 +176,8 @@ public class DynFormConfigurable implements Configurable {
} }
} }
} }
}.withRoots(projectDir); };
if (projectDir != null) folderDescriptor.withRoots(projectDir);
xsdFolderField.addBrowseFolderListener("Select XSD Folder", "Select the folder containing DynForm .xsd schemas (within project)", xsdFolderField.addBrowseFolderListener("Select XSD Folder", "Select the folder containing DynForm .xsd schemas (within project)",
project, folderDescriptor, new TextComponentAccessor<>() { project, folderDescriptor, new TextComponentAccessor<>() {