public class XmlElementFactoryImpl extends XmlElementFactory
| Constructor and Description |
|---|
XmlElementFactoryImpl(Project project) |
| Modifier and Type | Method and Description |
|---|---|
XmlAttribute |
createAttribute(java.lang.String name,
java.lang.String value,
PsiElement context)
Creates an attribute with the specified name and value with given context.
|
XmlText |
createDisplayText(java.lang.String s)
Creates an XML text element from the specified string, escaping the special
characters in the string as necessary.
|
XmlTag |
createHTMLTagFromText(java.lang.String text)
Creates an HTML tag with the specified text.
|
XmlTag |
createTagFromText(java.lang.CharSequence text)
Creates an XML tag with the specified text.
|
XmlTag |
createTagFromText(java.lang.CharSequence text,
Language language)
Creates XML like tag with the specified text and language.
|
XmlTag |
createXHTMLTagFromText(java.lang.String text)
Creates an XHTML tag with the specified text.
|
XmlAttribute |
createXmlAttribute(java.lang.String name,
java.lang.String value)
Creates an XML attribute with the specified name and value.
|
static java.lang.String |
quoteValue(java.lang.String value) |
getInstancepublic XmlElementFactoryImpl(Project project)
public XmlTag createTagFromText(java.lang.CharSequence text, Language language) throws IncorrectOperationException
XmlElementFactorycreateTagFromText in class XmlElementFactorytext - 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.XmlElementFactory.createTagFromText(CharSequence)public XmlTag createTagFromText(java.lang.CharSequence text) throws IncorrectOperationException
XmlElementFactorycreateTagFromText in class XmlElementFactorytext - the text of an XML tag (which can contain attributes and subtags).IncorrectOperationException - if the text does not specify a valid XML fragment.XmlElementFactory.createTagFromText(CharSequence text, Language language)public XmlAttribute createXmlAttribute(java.lang.String name, java.lang.String value) throws IncorrectOperationException
XmlElementFactorycreateXmlAttribute in class XmlElementFactoryname - 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 XmlAttribute createAttribute(java.lang.String name, java.lang.String value, PsiElement context) throws IncorrectOperationException
XmlElementFactorycreateAttribute in class XmlElementFactoryname - 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.public static java.lang.String quoteValue(java.lang.String value)
public XmlText createDisplayText(java.lang.String s) throws IncorrectOperationException
XmlElementFactorycreateDisplayText in class XmlElementFactorys - the text of the element to create.IncorrectOperationException - if the creation failed for some reason.public XmlTag createXHTMLTagFromText(java.lang.String text) throws IncorrectOperationException
XmlElementFactorycreateXHTMLTagFromText in class XmlElementFactorytext - the text of an XHTML tag (which can contain attributes and subtags).IncorrectOperationException - if the text does not specify a valid XML fragment.public XmlTag createHTMLTagFromText(java.lang.String text) throws IncorrectOperationException
XmlElementFactorycreateHTMLTagFromText in class XmlElementFactorytext - the text of an HTML tag (which can contain attributes and subtags).IncorrectOperationException - if the text does not specify a valid XML fragment.