public class LightPackageReferenceExpression extends LightPackageReference implements PsiReferenceExpression
Iconable.IconFlags, Iconable.LastComputedIcon
myManager
FLAGS_LOCKED, ICON_PLACEHOLDER
ARRAY_FACTORY, EMPTY_ARRAY, EXPRESSION_TO_TYPE
ARRAY_FACTORY, EMPTY_ARRAY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
EMPTY_NAVIGATABLE_ELEMENT_ARRAY
EMPTY_NAVIGATION_ITEM_ARRAY
Constructor and Description |
---|
LightPackageReferenceExpression(PsiManager manager,
PsiPackage refPackage) |
Modifier and Type | Method and Description |
---|---|
PsiElement |
bindToElementViaStaticImport(PsiClass aClass)
Creates an
import static statement importing the referenced member
from the specified class, or qualifies the reference with the class name if
that class is already imported by a regular import statement. |
PsiExpression |
getQualifierExpression()
Returns the expression used as the qualifier of the reference (the content up to the
last period).
|
PsiType |
getType()
Returns the type of the expression.
|
boolean |
isReferenceTo(PsiElement element)
Checks if the reference targets the specified element.
|
void |
setQualifierExpression(PsiExpression newQualifier) |
accept, advancedResolve, bindToElement, copy, getCanonicalText, getElement, getParameterList, getQualifiedName, getQualifier, getRangeInElement, getReference, getReferenceName, getReferenceNameElement, getText, getTypeParameters, getVariants, handleElementRename, isQualified, isSoft, isValid, multiResolve, processVariants, resolve, toString
add, addAfter, addBefore, checkAdd, checkDelete, delete, findElementAt, getChildren, getContainingFile, getLanguage, getManager, getNavigationElement, getNextSibling, getNode, getParent, getPrevSibling, getStartOffsetInParent, getTextLength, getTextOffset, getTextRange, isPhysical, isWritable, replace, setNavigationElement, textMatches, textMatches, textToCharArray
acceptChildren, addRange, addRangeAfter, addRangeBefore, canNavigate, canNavigateToSource, deleteChildRange, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getContext, getFirstChild, getLastChild, getName, getOriginalElement, getPresentation, getProject, getReferences, getResolveScope, getUseScope, isEquivalentTo, navigate, notNullChild, processDeclarations, textContains
buildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlags
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getParameterList, getQualifiedName, getReferenceNameElement, getTypeParameters, isQualified
advancedResolve, multiResolve, processVariants
resolveReference
accept, acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray, toString
getUserData, putUserData
getQualifier, getReferenceName
bindToElement, getCanonicalText, getElement, getRangeInElement, getVariants, handleElementRename, isSoft, resolve, resolvesTo
getAbsoluteRange
public LightPackageReferenceExpression(PsiManager manager, PsiPackage refPackage)
public PsiExpression getQualifierExpression()
PsiReferenceExpression
getQualifierExpression
in interface PsiReferenceExpression
public PsiElement bindToElementViaStaticImport(PsiClass aClass) throws IncorrectOperationException
PsiReferenceExpression
import static
statement importing the referenced member
from the specified class, or qualifies the reference with the class name if
that class is already imported by a regular import statement.bindToElementViaStaticImport
in interface PsiReferenceExpression
aClass
- the class to import.IncorrectOperationException
- if the modification failed for some reason.public void setQualifierExpression(PsiExpression newQualifier) throws IncorrectOperationException
setQualifierExpression
in interface PsiReferenceExpression
IncorrectOperationException
public PsiType getType()
PsiExpression
getType
in interface PsiExpression
public boolean isReferenceTo(PsiElement element)
PsiReference
isReferenceTo
in interface PsiReference
isReferenceTo
in class LightPackageReference
element
- the element to check target for.true
if the reference targets that element, false
otherwise.