public class IncludedXmlAttribute extends IncludedXmlElement<XmlAttribute> implements XmlAttribute
Iconable.IconFlags, Iconable.LastComputedIcon
myManager
FLAGS_LOCKED, ICON_PLACEHOLDER
EMPTY_ARRAY
DEPENDING_ELEMENT, DO_NOT_VALIDATE, INCLUDING_ELEMENT
ARRAY_FACTORY
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 |
---|
IncludedXmlAttribute(XmlAttribute original,
XmlTag parent) |
Modifier and Type | Method and Description |
---|---|
int |
displayToPhysical(int offset) |
XmlAttributeDescriptor |
getDescriptor() |
java.lang.String |
getDisplayValue() |
java.lang.String |
getLocalName() |
java.lang.String |
getName()
Returns the name of the element.
|
XmlElement |
getNameElement() |
java.lang.String |
getNamespace() |
java.lang.String |
getNamespacePrefix() |
XmlTag |
getParent()
Returns the parent of the PSI element.
|
java.lang.String |
getValue() |
XmlAttributeValue |
getValueElement() |
TextRange |
getValueTextRange() |
boolean |
isNamespaceDeclaration() |
int |
physicalToDisplay(int offset) |
PsiElement |
setName(java.lang.String name)
Renames the element.
|
void |
setValue(java.lang.String value) |
equals, getContainingFile, getNavigationElement, getOriginal, hashCode, isValid, processElements, toString
accept, add, addAfter, addBefore, checkAdd, checkDelete, copy, delete, findElementAt, getChildren, getLanguage, getManager, getNextSibling, getNode, getPrevSibling, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, isPhysical, isWritable, replace, setNavigationElement, textMatches, textMatches, textToCharArray
acceptChildren, addRange, addRangeAfter, addRangeBefore, canNavigate, canNavigateToSource, deleteChildRange, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getContext, getFirstChild, getLastChild, getOriginalElement, getPresentation, getProject, getReference, 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
finalize, getClass, notify, notifyAll, wait, wait, wait
processElements, skipValidation
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, 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
public IncludedXmlAttribute(XmlAttribute original, XmlTag parent)
public java.lang.String getName()
PsiNamedElement
getName
in interface NavigationItem
getName
in interface PsiNamedElement
getName
in interface XmlAttribute
getName
in class PsiElementBase
public PsiElement setName(java.lang.String name) throws IncorrectOperationException
PsiNamedElement
setName
in interface PsiNamedElement
name
- the new element name.this
or a different element if the rename caused the element to be replaced).IncorrectOperationException
- if the modification is not supported or not possible for some reason.public java.lang.String getLocalName()
getLocalName
in interface XmlAttribute
public XmlElement getNameElement()
getNameElement
in interface XmlAttribute
public java.lang.String getNamespace()
getNamespace
in interface XmlAttribute
public java.lang.String getNamespacePrefix()
getNamespacePrefix
in interface XmlAttribute
public XmlTag getParent()
PsiElement
getParent
in interface PsiElement
getParent
in interface XmlAttribute
getParent
in class IncludedXmlElement<XmlAttribute>
public java.lang.String getValue()
getValue
in interface XmlAttribute
public java.lang.String getDisplayValue()
getDisplayValue
in interface XmlAttribute
public int physicalToDisplay(int offset)
physicalToDisplay
in interface XmlAttribute
offset
- in string returned by XmlAttribute.getValue()
(with quotes stripped)XmlAttribute.getDisplayValue()
or -1 if the offset is out of valid rangepublic int displayToPhysical(int offset)
displayToPhysical
in interface XmlAttribute
offset
- in the string returned from XmlAttribute.getDisplayValue()
XmlAttribute.getValue()
(with quotes stripped) or -1 if the offset is out of valid rangepublic TextRange getValueTextRange()
getValueTextRange
in interface XmlAttribute
new TextRange(1, getValue().getTextLength()-1)
, otherwise it is new TextRange(0, getValue().getTextLength())
public boolean isNamespaceDeclaration()
isNamespaceDeclaration
in interface XmlAttribute
xmlns
or starts with xmlns:
)public XmlAttributeDescriptor getDescriptor()
getDescriptor
in interface XmlAttribute
public XmlAttributeValue getValueElement()
getValueElement
in interface XmlAttribute
public void setValue(java.lang.String value) throws IncorrectOperationException
setValue
in interface XmlAttribute
IncorrectOperationException