public abstract class XmlElementFactory
extends java.lang.Object
| Constructor and Description |
|---|
XmlElementFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract XmlAttribute |
createAttribute(java.lang.String name,
java.lang.String value,
PsiElement context)
Creates an attribute with the specified name and value with given context.
|
abstract XmlText |
createDisplayText(java.lang.String s)
Creates an XML text element from the specified string, escaping the special
characters in the string as necessary.
|
abstract XmlTag |
createHTMLTagFromText(java.lang.String s)
Creates an HTML tag with the specified text.
|
abstract XmlTag |
createTagFromText(java.lang.CharSequence text)
Creates an XML tag with the specified text.
|
abstract XmlTag |
createTagFromText(java.lang.CharSequence text,
Language language)
Creates XML like tag with the specified text and language.
|
abstract XmlTag |
createXHTMLTagFromText(java.lang.String s)
Creates an XHTML tag with the specified text.
|
abstract XmlAttribute |
createXmlAttribute(java.lang.String name,
java.lang.String value)
Creates an XML attribute with the specified name and value.
|
static XmlElementFactory |
getInstance(Project project) |
public static XmlElementFactory getInstance(Project project)
public abstract XmlText createDisplayText(java.lang.String s) throws IncorrectOperationException
s - the text of the element to create.IncorrectOperationException - if the creation failed for some reason.public abstract XmlTag createXHTMLTagFromText(java.lang.String s) throws IncorrectOperationException
s - the text of an XHTML tag (which can contain attributes and subtags).IncorrectOperationException - if the text does not specify a valid XML fragment.public abstract XmlTag createHTMLTagFromText(java.lang.String s) throws IncorrectOperationException
s - the text of an HTML tag (which can contain attributes and subtags).IncorrectOperationException - if the text does not specify a valid XML fragment.public abstract XmlTag createTagFromText(java.lang.CharSequence text) throws IncorrectOperationException
text - the text of an XML tag (which can contain attributes and subtags).IncorrectOperationException - if the text does not specify a valid XML fragment.createTagFromText(CharSequence text, Language language)public abstract XmlTag createTagFromText(java.lang.CharSequence text, Language language) throws IncorrectOperationException
text - the text of an XML tag (which can contain attributes and subtags).language - the language for tag to be created.IncorrectOperationException - if the text does not specify a valid XML fragment.createTagFromText(CharSequence)public abstract XmlAttribute createXmlAttribute(java.lang.String name, java.lang.String value) throws IncorrectOperationException
name - the name of the attribute to create.value - the value of the attribute to create.IncorrectOperationException - if either name or value are not valid.public abstract XmlAttribute createAttribute(java.lang.String name, java.lang.String value, PsiElement context) throws IncorrectOperationException
name - the name of the attribute to create.value - the value of the attribute to create.context - element which can be used to determine created attribute file type.IncorrectOperationException - if either name or value are not valid.