-
Notifications
You must be signed in to change notification settings - Fork 121
Support reference tracking for common module methods #3581
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
8b754e3
Initial plan
Copilot 645c470
Add CommonModuleReference utility and initial tests
Copilot f3dcf26
Add addModuleReference method and update ReferenceIndexFiller
Copilot feb1eb3
Add support for common module references via variable - WIP
Copilot 08dc796
Complete implementation of common module reference tracking
Copilot fc496e7
Clean up code per review comments
Copilot b039c9f
Clear stale CommonModule mappings on reassignment and between methods
Copilot 53a253e
Preserve module-level variable mappings across methods
Copilot ef90941
Add support for multiple common module accessor names and manager mod…
Copilot fc7d40b
Use MDOType.fromValue() instead of hardcoded manager types
Copilot 60a3011
Add configurable references options for common module accessors
Copilot a13dd1f
Add references configuration to JSON schema and documentation
Copilot fb4eff5
Merge branch 'develop' into copilot/support-method-module-references
nixel2007 d177d29
Rename CommonModuleReference to ModuleReference and refactor code
Copilot 5b881d0
Merge branch 'develop' into copilot/support-method-module-references
nixel2007 457974a
Fix missing @Test annotation and closing brace in ReferenceIndexFille…
Copilot 5340761
Merge branch 'develop' into copilot/support-method-module-references
nixel2007 277132d
Add unit tests for manager module functionality in ModuleReference
Copilot b7bd706
Fix jspecify issues: use Optional instead of null returns
Copilot e2cf62d
Remove manager module functionality per review request
Copilot 042a37a
Restore ManagerModule in DEFAULT_MODULE_TYPES and refactor extractPar…
Copilot daaa80f
Add module reference for common module identifiers in call statements
Copilot acae691
Fix ReferenceIndexTest tests for new module reference indexing
Copilot ffe716e
Address code review feedback
Copilot a336ad6
Address review feedback: caching, case-insensitive compare, hover for…
Copilot b22bab1
Remove null check for CommonModule.getComment()
Copilot e9dd21a
Address review feedback: optimize patterns, improve hover, add tests
Copilot d52da3b
Address review feedback: use locale-aware mdoRef, fix imports
Copilot fd94d14
Merge branch 'develop' into copilot/support-method-module-references
theshadowco 7ccc3fd
Рефакторинг
nixel2007 57fb106
Улучшение ховера по модулю
nixel2007 b5ee7fb
Fix QF
nixel2007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Проверь, не нужно ли нам добавить новый hover MarkdownBuilder для этого типа модуля. Предложи детально описание решения, но не реализовывай.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Анализ hover для ModuleSymbol
Текущая ситуация
На данный момент:
ModuleSymbolиспользуетSymbolKind.Module(строка 73 в ModuleSymbol.java)HoverProviderделегирует построение hover контента вMap<SymbolKind, MarkupContentBuilder<Symbol>>Method,Variable,TypeParameter(Annotation),Interface(AnnotationSymbol)MarkupContentBuilderдляSymbolKind.ModuleНеобходимость добавления
Когда пользователь наведет курсор на ссылку, которая разрешается в
ModuleSymbol(например, переменная с общим модулем),HoverProvider.getHover()вернетOptional.empty(), так как нет соответствующего builder'а.Предлагаемое решение
1. Создать
ModuleSymbolMarkupContentBuilder:2. Информация для отображения:
3. Изменения в
DescriptionFormatter:getSignature(ModuleSymbol)или использовать существующую логикуРекомендация
Добавление
ModuleSymbolMarkupContentBuilderне является критичным для базовой функциональности reference tracking. Ссылки будут находиться и без hover. Однако для полноценного user experience это полезное улучшение.Реализовывать в рамках текущего PR или создать отдельный issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отличная идея про описание модуля из метаданных. Добавь вывод комментария, флаги доступности модуля на клиенте, сервере, клиент-сервере, обычном приложении, вызове сервера, привилегированного режима и режима повторного использования
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot смотри мой комментарий и реализуй.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Реализация
ModuleSymbolMarkupContentBuilderбудет включать:ОбщийМодуль: ИмяМодуляДля получения метаданных можно использовать:
Хотите, чтобы я реализовал это в рамках текущего PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot да, реализуй.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Реализовано в a336ad6. Создан
ModuleSymbolMarkupContentBuilderкоторый отображает:Локализация: ru/en.