feat(types): ссылка «См.» на форму по полному имени - #4382
Conversation
Форму в описании называют полным именем, а её синтетический тип зарегистрирован с приставкой базового типа формы. Сопоставляет одно с другим тот же резолвер, что типизирует «ПолучитьФорму(<полное имя>)», — теперь его спрашивает и разбор ссылки, когда путь метаданных не разрешился.
|
Warning Review limit reached
Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesForm reference resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/main/java/com/github/_1c_syntax/bsl/languageserver/types/index/SymbolTypeIndex.java`:
- Around line 386-392: Update the JavaDoc for resolveSeeReference to document
form-name resolution as a fallback, then update the corresponding user-facing
documentation in both docs/ and docs/en/. Describe the supported behavior and
usage without exposing resolver implementation details; leave the existing
formByNameResolver implementation unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 5d350d4f-7424-45bd-b445-481a7e23d4b0
📒 Files selected for processing (3)
src/main/java/com/github/_1c_syntax/bsl/languageserver/types/index/SymbolTypeIndex.javasrc/test/java/com/github/_1c_syntax/bsl/languageserver/types/SeeFormRefInferenceTest.javasrc/test/java/com/github/_1c_syntax/bsl/languageserver/types/index/SymbolTypeIndexHyperlinkTest.java
Помимо квалифицированной ссылки и имени типа разбор понимает путь в нотации конфигуратора и полное имя формы.
Виды ссылки — цепочка членов, путь метаданных, имя формы — перебираются в одном месте, а сам разбор «См.» остался про выбор между квалифицированной ссылкой, локальной функцией и именем типа.
|



Пункт 3.29 рекомендации «Типизация кода»: «Ссылка на форму указывается по полному имени формы».
Что было
Тип не выводился вовсе. Синтетический тип формы регистрируется под именем «базовый тип формы + ссылка на объект метаданных» —
ФормаКлиентскогоПриложения.Справочник.Товары.Форма.ФормаЭлемента(FormTypesProvider#selfTypeQualifiedName), а в ссылке пишут только вторую половину. Разбор ссылки пробовал табличную часть, реквизит объекта и полное имя типа — ни одно не подошло.Что сделано
Разбор
См.-ссылки, не найдя пути в метаданных, спрашиваетFormByNameResolver— тот самый, что типизируетПолучитьФорму("<полное имя>"): он перебирает приставки базовых типов форм и, если не нашёл точного имени, пробует основную форму объекта. Новой логики поиска не появилось, добавилась связка.Проверки
SeeFormRefInferenceTest: ссылка даёт тип конкретной формы, а через него — основной реквизит (Форма.Объект.Ссылка→СправочникСсылка.Справочник1) и элемент формы (Форма.Элементы.Наименование→ПолеФормы). Оба теста красные до правки.Прогоны
*types.*и*providers.*— зелёные.Summary by CodeRabbit
Bug Fixes
Tests