Skip to content

Configurable code repository #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kamil-orwat-vmltech
Copy link
Collaborator

No description provided.

Copy link

@Copilot 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 makes the CodeRepository configurable and integrates it into the assist modules to dynamically look up class source links.

  • Replaces static class link mappings with a configurable OSGi component using metatype annotations.
  • Injects the CodeRepository instance in VariableSuggestion and ClassSuggestion for improved dependency management.
  • Updates Assistancer to use the injected CodeRepository when building suggestions.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
core/src/main/java/com/vml/es/aem/acm/core/code/CodeRepository.java Converted static mapping to a configurable OSGi component with dynamic registration via activate/modified methods.
core/src/main/java/com/vml/es/aem/acm/core/assist/VariableSuggestion.java Updated constructor and usage to inject CodeRepository instead of using static access.
core/src/main/java/com/vml/es/aem/acm/core/assist/ClassSuggestion.java Similar injection update to use CodeRepository instance for linking class details.
core/src/main/java/com/vml/es/aem/acm/core/assist/Assistancer.java Adjusted mapping for variable and class suggestions to incorporate the injected CodeRepository.
Comments suppressed due to low confidence (2)

core/src/main/java/com/vml/es/aem/acm/core/assist/VariableSuggestion.java:38

  • [nitpick] The lambda parameter name 'cf' is ambiguous; consider renaming it to 'variable' for improved clarity.
.map(cf -> new VariableSuggestion(cf, codeRepository));

core/src/main/java/com/vml/es/aem/acm/core/assist/ClassSuggestion.java:39

  • [nitpick] The lambda parameter name 'cf' is unclear; consider renaming it to 'classInfo' to better reflect its purpose.
.map(cf -> new ClassSuggestion(cf, codeRepository));

@kamil-orwat-vmltech kamil-orwat-vmltech marked this pull request as ready for review April 22, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants