Skip to content

Conversation

@jmle
Copy link
Collaborator

@jmle jmle commented Jan 27, 2026

Fixes: konveyor/analyzer-lsp#1079

Summary by CodeRabbit

  • Bug Fixes

    • Improved method annotation query matching for more accurate symbol filtering.
  • Chores

    • Updated build pipeline to support amd64 and arm64 architectures.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

Updates gitignore to exclude VSCode editor files, expands method annotation query matching to include SourceMethod alongside ResolvedSourceMethod, adds necessary import statement, introduces comprehensive unit tests for MethodDeclarationSymbolProvider, and reduces target architectures in the image build workflow from four to two.

Changes

Cohort / File(s) Summary
Gitignore Configuration
.gitignore
Added .vscode/ to exclude VSCode editor-specific files from version control.
Symbol Provider Enhancements
java-analyzer-bundle.core/src/main/java/io/konveyor/tackle/core/internal/symbol/MethodDeclarationSymbolProvider.java, java-analyzer-bundle.core/src/main/java/io/konveyor/tackle/core/internal/symbol/WithAnnotationQuery.java
Added SourceMethod.class to eligible classes for annotation query matching, broadening method representation support. Added import for org.eclipse.jdt.internal.core.SourceMethod and minor formatting adjustment.
Test Suite Addition
java-analyzer-bundle.test/src/main/java/io/konveyor/tackle/core/internal/symbol/MethodDeclarationSymbolProviderTest.java
Introduced comprehensive unit tests covering initialization, getter/setter behavior, query validation, support for both ResolvedSourceMethod and SourceMethod, and AnnotationQuery state management.
CI/CD Workflow
.github/workflows/image-build.yaml
Reduced target build architectures from four (amd64, arm64, ppc64le, s390x) to two (amd64, arm64).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A rabbit hops through symbol trees,
With SourceMethod added with ease,
New tests hop along the way,
VSCode secrets tucked away,
Architectures lean and light,
Everything feels just right! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: fixing annotated method processing by enabling SourceMethod support in annotation query matching alongside ResolvedSourceMethod.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@java-analyzer-bundle.core/src/main/java/io/konveyor/tackle/core/internal/symbol/WithAnnotationQuery.java`:
- Line 10: Remove the unused import of SourceMethod from
WithAnnotationQuery.java; locate the import line "import
org.eclipse.jdt.internal.core.SourceMethod;" and delete it so only the used
types (e.g., SourceRefElement) remain imported, ensuring there are no leftover
references to SourceMethod elsewhere in the class (e.g., in methods or type
parameters).

Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@java-analyzer-bundle.test/src/main/java/io/konveyor/tackle/core/internal/symbol/MethodDeclarationSymbolProviderTest.java`:
- Around line 53-60: The test testSetQuery currently only checks provider
non-null and doesn't validate provider.setQuery behavior; update the test to
assert the query was actually stored by either calling a new public getQuery()
on the provider or using reflection to read the private query field after
invoking provider.setQuery("com.example.ClassName.method"), and if the
provider.get() is expected to use that query ensure you add an assertion that
provider.get() results change accordingly; if no getter exists, add a simple
getQuery() to the provider class, or adjust get() to consider the query field
before asserting in the test.
🧹 Nitpick comments (1)
java-analyzer-bundle.test/src/main/java/io/konveyor/tackle/core/internal/symbol/MethodDeclarationSymbolProviderTest.java (1)

62-123: Avoid hardcoding the supported-class list in tests.
testMatchesAnnotationQueryWithoutAnnotationQuery, testBothResolvedAndSourceMethodClassesAreSupported, and testClassesListStructureMatchesImplementation rebuild the list locally instead of exercising MethodDeclarationSymbolProvider. These tests can pass even if the implementation changes. Consider deriving the list from the provider (or exposing a package-private accessor) and asserting against that output.

@jmle jmle force-pushed the bugfix/annotated-method branch from 50d1bcc to f5f794d Compare January 27, 2026 13:33
Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
@jmle jmle merged commit fbefe25 into konveyor:main Jan 27, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Annotated feature on METHOD location does not work

2 participants