UsageGroup (@NotNull Usage usage, UsageTarget @NotNull [] targets) { if (usage instanceof UnknownUsagesInUnloadedModules) { return ourUnloadedGroup; } if (usage instanceof PsiElementUsage) { if (usage instanceof UsageInfo2UsageAdapter) { final UsageInfo usageInfo = ((UsageInfo2UsageAdapter)usage).getUsageInfo(); if (usageInfo.isDynamicUsage()) { return myDynamicCodeGroup; } } if (((PsiElementUsage)usage).isNonCodeUsage()) { return myNonCodeGroup; } else { return myCodeGroup; } } return null; }