use of com.intellij.usages.rules.UsageInModule in project intellij-community by JetBrains.
the class ModuleGroupingRule method groupUsage.
@Override
public UsageGroup groupUsage(@NotNull Usage usage) {
if (usage instanceof UsageInModule) {
UsageInModule usageInModule = (UsageInModule) usage;
Module module = usageInModule.getModule();
if (module != null)
return new ModuleUsageGroup(module);
}
if (usage instanceof UsageInLibrary) {
UsageInLibrary usageInLibrary = (UsageInLibrary) usage;
OrderEntry entry = usageInLibrary.getLibraryEntry();
if (entry != null)
return new LibraryUsageGroup(entry);
}
return null;
}
Aggregations