Files
openide/platform/indexing-impl
Max Medvedev 20c95bc127 IJPL-161383 fix Find Usages for symbols
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
2024-08-31 15:13:15 +00:00
..