mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
Find usages for symbols did not work because SearchTargetVariantsDataRuleKt.targetVariants did not get any results from dc.getData(FindUsagesAction.SEARCH_TARGETS). This happened because SEARCH_TARGETS (SearchTargetsDataRule) is a data context rule, and it uses another data context rule, CommonDataKeys.SYMBOLS (TargetSymbolsDataRule). These rules use data keys that are never present in one given DataProvider. So, their call chain never succeeds. The fix is to mark both rules as `type="context"`. Also, a test is written with a generic test language and a test search target. The key for proper data context testing is calling `fallbackToProductionDataManager(...)`. Otherwise, TestDataProvider is used, which indeed has all necessary keys in a single place. GitOrigin-RevId: 9e4f3a59b9afb58424307faaaf3665a77308ed56