public class RefManagerImpl extends RefManager
Constructor and Description |
---|
RefManagerImpl(Project project,
AnalysisScope scope,
GlobalInspectionContext context) |
Modifier and Type | Method and Description |
---|---|
boolean |
belongsToScope(PsiElement psiElement) |
void |
cleanup() |
Element |
export(RefEntity refEntity,
int actualLine) |
void |
findAllDeclarations() |
void |
fireBuildReferences(RefElement refElement) |
void |
fireNodeMarkedReferenced(PsiElement what,
PsiElement from) |
void |
fireNodeMarkedReferenced(RefElement refWhat,
RefElement refFrom,
boolean referencedFromClassInitializer,
boolean forReading,
boolean forWriting) |
void |
fireNodeMarkedReferenced(RefElement refWhat,
RefElement refFrom,
boolean referencedFromClassInitializer,
boolean forReading,
boolean forWriting,
PsiElement element) |
PsiNamedElement |
getContainerElement(PsiElement element) |
GlobalInspectionContext |
getContext() |
<T> T |
getExtension(Key<T> key) |
<T extends RefElement> |
getFromRefTableOrCache(PsiElement element,
NullableFactory<? extends T> factory) |
java.lang.String |
getGroupName(RefElement entity) |
long |
getLastUsedMask() |
Project |
getProject()
Returns the project for which the reference graph has been built.
|
PsiManager |
getPsiManager() |
java.lang.String |
getQualifiedName(RefEntity refEntity) |
RefElement |
getReference(PsiElement elem)
Creates (if necessary) and returns the reference graph node for the specified PSI element.
|
RefElement |
getReference(PsiElement elem,
boolean ignoreScope) |
RefEntity |
getReference(java.lang.String type,
java.lang.String fqName)
Creates (if necessary) and returns the reference graph node for the PSI element specified by its type and FQName.
|
RefEntity |
getRefinedElement(RefEntity ref) |
RefModule |
getRefModule(Module module)
Creates (if necessary) and returns the reference graph node for the specified module.
|
RefProject |
getRefProject()
Returns the reference graph node pointing to the project for which the reference
graph has been built.
|
AnalysisScope |
getScope()
Returns the analysis scope for which the reference graph has been built.
|
java.util.List<RefElement> |
getSortedElements() |
java.lang.String |
getType(RefEntity ref) |
void |
initializeAnnotators() |
void |
inspectionReadActionFinished() |
void |
inspectionReadActionStarted() |
boolean |
isDeclarationsFound() |
boolean |
isInGraph(VirtualFile file) |
boolean |
isInProcess() |
boolean |
isOfflineView() |
boolean |
isValidPointForReference() |
void |
iterate(RefVisitor visitor)
Runs the specified visitor through all elements in the reference graph.
|
void |
registerGraphAnnotator(RefGraphAnnotator annotator) |
void |
removeRefElement(RefElement refElement,
java.util.List<RefElement> deletedRefs) |
void |
startOfflineView() |
export
public RefManagerImpl(Project project, AnalysisScope scope, GlobalInspectionContext context)
public GlobalInspectionContext getContext()
public void iterate(RefVisitor visitor)
RefManager
iterate
in class RefManager
visitor
- the visitor to run.public void cleanup()
public AnalysisScope getScope()
RefManager
getScope
in class RefManager
public void fireNodeMarkedReferenced(RefElement refWhat, RefElement refFrom, boolean referencedFromClassInitializer, boolean forReading, boolean forWriting)
public void fireNodeMarkedReferenced(RefElement refWhat, RefElement refFrom, boolean referencedFromClassInitializer, boolean forReading, boolean forWriting, PsiElement element)
public void fireNodeMarkedReferenced(PsiElement what, PsiElement from)
public void fireBuildReferences(RefElement refElement)
public void registerGraphAnnotator(RefGraphAnnotator annotator)
public long getLastUsedMask()
getLastUsedMask
in class RefManager
public <T> T getExtension(Key<T> key)
getExtension
in class RefManager
public java.lang.String getType(RefEntity ref)
getType
in class RefManager
public RefEntity getRefinedElement(RefEntity ref)
getRefinedElement
in class RefManager
public Element export(RefEntity refEntity, int actualLine)
export
in class RefManager
public java.lang.String getGroupName(RefElement entity)
getGroupName
in class RefManager
public void findAllDeclarations()
public boolean isDeclarationsFound()
public void inspectionReadActionStarted()
public void inspectionReadActionFinished()
public void startOfflineView()
public boolean isOfflineView()
public boolean isInProcess()
public Project getProject()
RefManager
getProject
in class RefManager
public RefProject getRefProject()
RefManager
getRefProject
in class RefManager
public java.util.List<RefElement> getSortedElements()
public PsiManager getPsiManager()
getPsiManager
in class RefManager
public boolean isInGraph(VirtualFile file)
isInGraph
in class RefManager
RefManagerExtension
was registered for language and is not covered by default implementation for PsiClassOwner
true, otherwisepublic PsiNamedElement getContainerElement(PsiElement element)
getContainerElement
in class RefManager
public void initializeAnnotators()
public RefElement getReference(PsiElement elem)
RefManager
getReference
in class RefManager
elem
- the element for which the reference graph node is requested.public RefElement getReference(PsiElement elem, boolean ignoreScope)
public RefEntity getReference(java.lang.String type, java.lang.String fqName)
RefManager
getReference
in class RefManager
type
- SmartRefElementPointer#FILE, etc.
fqName
- fully qualified name for the elementpublic <T extends RefElement> T getFromRefTableOrCache(PsiElement element, NullableFactory<? extends T> factory)
public RefModule getRefModule(Module module)
RefManager
getRefModule
in class RefManager
module
- the module for which the reference graph node is requested.module
is null.public boolean belongsToScope(PsiElement psiElement)
belongsToScope
in class RefManager
public java.lang.String getQualifiedName(RefEntity refEntity)
getQualifiedName
in class RefManager
public void removeRefElement(RefElement refElement, java.util.List<RefElement> deletedRefs)
removeRefElement
in class RefManager
public boolean isValidPointForReference()