public final class SmartPointerManagerImpl extends SmartPointerManager implements Disposable
Disposable.Parent
Constructor and Description |
---|
SmartPointerManagerImpl(Project project) |
Modifier and Type | Method and Description |
---|---|
<E extends PsiElement> |
createSmartPsiElementPointer(E element)
Creates a smart pointer to the specified PSI element.
|
<E extends PsiElement> |
createSmartPsiElementPointer(E element,
PsiFile containingFile)
Creates a smart pointer to the specified PSI element.
|
<E extends PsiElement> |
createSmartPsiElementPointer(E element,
PsiFile containingFile,
boolean forInjected) |
SmartPsiFileRange |
createSmartPsiFileRangePointer(PsiFile file,
TextRange range) |
SmartPsiFileRange |
createSmartPsiFileRangePointer(PsiFile file,
TextRange range,
boolean forInjected) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
void |
fastenBelts(VirtualFile file) |
int |
getPointersNumber(PsiFile containingFile) |
boolean |
pointToTheSameElement(SmartPsiElementPointer<?> pointer1,
SmartPsiElementPointer<?> pointer2)
This method is cheaper than dereferencing both pointers and comparing the result.
|
void |
removePointer(SmartPsiElementPointer<?> pointer)
Disposes a smart pointer and frees the resources associated with it.
|
void |
updatePointers(Document document,
FrozenDocument frozen,
java.util.List<? extends DocumentEvent> events) |
void |
updatePointerTargetsAfterReparse(VirtualFile file) |
createLazyPointer, createPointer, getInstance
public SmartPointerManagerImpl(Project project)
public void dispose()
Disposable
dispose
in interface Disposable
public void fastenBelts(VirtualFile file)
public <E extends PsiElement> SmartPsiElementPointer<E> createSmartPsiElementPointer(E element)
SmartPointerManager
SmartPointerManager.createSmartPsiElementPointer(PsiElement, PsiFile)
.createSmartPsiElementPointer
in class SmartPointerManager
element
- the element to create a pointer to.public <E extends PsiElement> SmartPsiElementPointer<E> createSmartPsiElementPointer(E element, PsiFile containingFile)
SmartPointerManager
createSmartPsiElementPointer
in class SmartPointerManager
element
- the element to create a pointer to.containingFile
- the result of element.getContainingFile()
.public <E extends PsiElement> SmartPsiElementPointer<E> createSmartPsiElementPointer(E element, PsiFile containingFile, boolean forInjected)
public SmartPsiFileRange createSmartPsiFileRangePointer(PsiFile file, TextRange range)
createSmartPsiFileRangePointer
in class SmartPointerManager
public SmartPsiFileRange createSmartPsiFileRangePointer(PsiFile file, TextRange range, boolean forInjected)
public void removePointer(SmartPsiElementPointer<?> pointer)
SmartPointerManager
removePointer
in class SmartPointerManager
public int getPointersNumber(PsiFile containingFile)
public boolean pointToTheSameElement(SmartPsiElementPointer<?> pointer1, SmartPsiElementPointer<?> pointer2)
SmartPointerManager
pointToTheSameElement
in class SmartPointerManager
pointer1
- smart pointer to comparepointer2
- smart pointer to comparepublic void updatePointers(Document document, FrozenDocument frozen, java.util.List<? extends DocumentEvent> events)
public void updatePointerTargetsAfterReparse(VirtualFile file)