Skip to content

Conversation

@xterao
Copy link
Collaborator

@xterao xterao commented May 2, 2025

  • Improve type resolution for top-level for directives

    • Now correctly retrieves the definition element’s type when the source is a field access via a DAO parameter.
    • Likewise, supports type lookup when the source is a static property call.
  • Centralize common logic in Util

    • Refactored shared routines—such as field-access type analysis and parent-for-directive search—into the Util class.
  • Remove unused classes

    • Deleted deprecated classes that are no longer referenced.

@xterao xterao added the bug Something isn't working label May 2, 2025
@xterao xterao added this to the 0.7.0 Release milestone May 2, 2025
@xterao xterao self-assigned this May 2, 2025
@xterao xterao requested a review from Copilot May 2, 2025 10:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves type resolution for top-level "for" directives, centralizes common utility routines, and removes deprecated/unused classes. Key changes include fixing type lookup for DAO parameters and static property calls, moving common utility classes to a dedicated package, and deleting legacy inspection and validator classes.

Reviewed Changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
GenerateSqlQuickFix.kt Updated import to use the new util package for PluginLoggerUtil.
ForDirectiveInspection.kt Removed unused/deprecated inspection class.
SqlLineMakerProvider.kt, DaoMethodProvider.kt, SqlFormatPreProcessor.kt, JumpToDaoFromSQLAction.kt, JumpToDaoFromDaoAction.kt, GenerateSqlAction.kt Updated import references to PluginLoggerUtil to reflect package refactoring.
ForItemElementDocumentationProvider.kt Refactored documentation generation logic for DAO field and static field access.
SqlParameterCompletionProvider.kt Refactored field access logic in for directives using ForDirectiveUtil.
PluginUtil.kt & PluginLoggerUtil.kt Updated package declarations to the new util package.
Various validation and for-item related classes Deleted legacy files no longer referenced in the codebase.
Comments suppressed due to low confidence (1)

src/main/kotlin/org/domaframework/doma/intellij/inspection/ForDirectiveInspection.kt:1

  • Confirm that removing ForDirectiveInspection is deliberate and that no references to it remain in the codebase.
Entire file removed

@xterao xterao merged commit 28f5cd7 into main May 7, 2025
3 checks passed
@xterao xterao deleted the fix/document-first-for-item branch May 7, 2025 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fix Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Supports field access of Dao parameter type in reference resolution of for directive top element

2 participants