|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mevenide.idea.psi.util.XmlTagPath
public class XmlTagPath
| Constructor Summary | |
|---|---|
XmlTagPath(com.intellij.psi.xml.XmlFile pFile)
Creates an instance using the given file. |
|
XmlTagPath(com.intellij.psi.xml.XmlFile pFile,
String pPath)
Creates an instance using the given file and tag path expression. |
|
XmlTagPath(XmlTagPath pParent,
String pPath)
Creates an instance that extends the given parent path with the specified path. |
|
| Method Summary | |
|---|---|
com.intellij.psi.xml.XmlTag |
ensureTag()
Like the getTag() method, this method will return the final tag for the
tag path. |
com.intellij.openapi.editor.Document |
getDocument()
Returns the document (not the xml document). |
com.intellij.psi.xml.XmlFile |
getFile()
Returns the XML file. |
XmlTagPath |
getParent()
Returns the tag path parent, if any. |
String |
getPath()
Returns the tag path. |
String |
getPath(boolean pIncludeParent)
Returns the tag path, including or excluding the parent path, as specified by the given flag. |
String[] |
getPathAndConcat(String pTagName)
Returns the tag path as string tokens, concatenating the given tag name to the end of the tag path. |
String[] |
getPathTokens()
Returns the tag path as string tokens, where each item in the array is a tag name or expression. |
String[] |
getPathTokens(boolean pIncludeParent)
Returns the tag path as string tokens, where each item in the array is a tag name or expression. |
com.intellij.openapi.project.Project |
getProject()
Returns the path project. |
Integer |
getRow()
Returns the row for the last path path. |
String |
getStringValue()
|
com.intellij.psi.xml.XmlTag |
getTag()
Returns (but does not create) the xml tag for the tag path expression. |
com.intellij.psi.xml.XmlTag[] |
getTags()
Returns the tags in the tag-path as an array. |
void |
setPath(String pPath)
Sets the tag path. |
void |
setRow(Integer pRow)
Sets the row for the last path path. |
void |
setValue(Object pValue)
|
void |
setValueProtected(Object pValue)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlTagPath(com.intellij.psi.xml.XmlFile pFile)
pFile - the XML file
public XmlTagPath(com.intellij.psi.xml.XmlFile pFile,
String pPath)
pFile - the XML filepPath - the tag path expression
public XmlTagPath(XmlTagPath pParent,
String pPath)
pParent - the parent path to extendpPath - the extending path| Method Detail |
|---|
public final com.intellij.openapi.project.Project getProject()
public final com.intellij.psi.xml.XmlFile getFile()
public XmlTagPath getParent()
null if there isn't anypublic final com.intellij.openapi.editor.Document getDocument()
public final String getPath()
public final String getPath(boolean pIncludeParent)
pIncludeParent - whether to use the parent path as a prefix
public final void setPath(String pPath)
pPath - the new path (may be null)public final Integer getRow()
If this tag path has no path, this method will throw an IllegalStateException. If the last tag has no row, null is returned.
nullpublic final void setRow(Integer pRow)
If this tag path has no path, this method will throw an IllegalStateException. If the last tag already has a row, it is replaced with the
new row number.
pRow - the new row numberpublic final String[] getPathTokens()
public final String[] getPathTokens(boolean pIncludeParent)
public final String[] getPathAndConcat(String pTagName)
pTagName - the tag name to add at the end of the path
public final com.intellij.psi.xml.XmlTag getTag()
This method will not create the path, and will return null if the
path cannot be parsed (missing tags).
nullpublic final com.intellij.psi.xml.XmlTag[] getTags()
For instance, if the path is set to "a/b/c", and tag "c" does
not exist, the returned array will be: ["a","b"].
XmlTag instances
public final com.intellij.psi.xml.XmlTag ensureTag()
throws com.intellij.util.IncorrectOperationException
getTag() method, this method will return the final tag for the
tag path.
If, however, the tag path cannot be found, it will be created.
com.intellij.util.IncorrectOperationException - if the root tag does not satisfy the tag
expression (incorrect name)public final String getStringValue()
public void setValue(Object pValue)
throws com.intellij.util.IncorrectOperationException
com.intellij.util.IncorrectOperationExceptionpublic final void setValueProtected(Object pValue)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||