mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[lombok] IDEA-310810 IDEA-380110 Show Lombok-generated methods in 'Caller-Hierarchy' tool window, apply review suggestions
GitOrigin-RevId: d3cc45468756d840bec3f5e9c974efb391d9708c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
55dfc2580c
commit
d6698abecb
@@ -5,18 +5,35 @@ import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiMember;
|
||||
import com.intellij.psi.PsiMethod;
|
||||
import com.intellij.psi.search.SearchScope;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* The CallHierarchyElementProvider ExtensionPoint is designed to augment the Call Hierarchy results (specifically the "Caller Hierarchy" view).
|
||||
* Its primary purpose is to allow plugins to provide "virtual" or "implicit" relationships between code elements that are not represented
|
||||
* by standard physical PsiReference objects in the source code.
|
||||
* This is particularly useful for frameworks that generate code or use bytecode manipulation (like Lombok),
|
||||
* where a method or field might be logically "called" or "used" by elements that the standard Java reference search cannot find.
|
||||
*/
|
||||
public interface CallHierarchyElementProvider {
|
||||
ExtensionPointName<CallHierarchyElementProvider> EP_NAME =
|
||||
ExtensionPointName.create("com.intellij.hierarchy.elementProvider");
|
||||
|
||||
boolean canProvide(@NotNull PsiMember element);
|
||||
/**
|
||||
* Collects augmented elements, which are not really present in code but virtually references to psiMember
|
||||
* @param psiMember some PsiMember to find referenced elements for
|
||||
* @return collection of virtually augmented elements references to psiMember
|
||||
*/
|
||||
@NotNull
|
||||
Collection<PsiElement> provideReferencedMembers(@NotNull PsiMember psiMember);
|
||||
|
||||
Collection<PsiElement> provideReferencedMembers(@NotNull PsiMember reference);
|
||||
|
||||
void appendReferencedMethods(@NotNull PsiMethod methodToFind, @NotNull JavaCallHierarchyData hierarchyData);
|
||||
/**
|
||||
* Collects augmented PsiMethods, which are not really present in code but virtually references to methodToFind
|
||||
* @param methodToFind some PsiMethod to find virtually referenced other PsiMethods for
|
||||
** @return collection of virtually augmented PsiMethods references to methodToFind
|
||||
*/
|
||||
@NotNull
|
||||
Collection<PsiMethod> provideReferencedMethods(@NotNull PsiMethod methodToFind);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user