public abstract class DomManager extends CompositeModificationTracker implements ModificationTracker
Modifier and Type | Field and Description |
---|---|
static Key<Module> |
MOCK_ELEMENT_MODULE |
EVER_CHANGED, NEVER_CHANGED
Constructor and Description |
---|
DomManager(Project project) |
Modifier and Type | Method and Description |
---|---|
abstract void |
addDomEventListener(DomEventListener listener,
Disposable parentDisposable) |
abstract <T extends DomElement> |
createMockElement(java.lang.Class<T> aClass,
Module module,
boolean physical) |
abstract ModelMerger |
createModelMerger() |
abstract <T extends DomElement> |
createStableValue(Factory<? extends T> provider)
Creates DOM element of needed type, that is wrapper around real DOM element.
|
abstract <T> T |
createStableValue(Factory<? extends T> provider,
Condition<? super T> validator) |
abstract AbstractDomChildrenDescription |
findChildrenDescription(XmlTag templateChildTag,
DomElement parent) |
abstract ConverterManager |
getConverterManager()
Deprecated.
This will be moved at the application level
|
abstract GenericAttributeValue<?> |
getDomElement(XmlAttribute element) |
abstract DomElement |
getDomElement(XmlTag element) |
DomFileDescription<?> |
getDomFileDescription(XmlFile xmlFile) |
static DomManager |
getDomManager(Project project) |
abstract <T extends DomElement> |
getFileElement(XmlFile file)
Deprecated.
|
abstract <T extends DomElement> |
getFileElement(XmlFile file,
java.lang.Class<T> domClass) |
abstract <T extends DomElement> |
getFileElement(XmlFile file,
java.lang.Class<T> aClass,
java.lang.String rootTagName)
Deprecated.
|
abstract DomGenericInfo |
getGenericInfo(java.lang.reflect.Type type) |
abstract DomElement |
getIdentityScope(DomElement element) |
abstract Project |
getProject() |
abstract DomElement |
getResolvingScope(GenericDomValue<?> element) |
abstract TypeChooserManager |
getTypeChooserManager() |
abstract boolean |
isMockElement(DomElement element) |
abstract void |
registerFileDescription(DomFileDescription<?> description)
Deprecated.
Make your file description an extension (see
DomFileDescription.EP_NAME ) |
getModificationCount
incModificationCount
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getModificationCount
public DomManager(Project project)
public static DomManager getDomManager(Project project)
public abstract Project getProject()
public abstract <T extends DomElement> DomFileElement<T> getFileElement(XmlFile file, java.lang.Class<T> domClass)
file
- XML filedomClass
- desired DOM element classDomFileDescription
s are
asked if they are responsible for the file DomFileDescription.isMyFile(XmlFile, Module)
.
If there is a DomFileDescription
that is responsible for the file, but its DomFileDescription.getRootElementClass()
result is incompatible with domClass parameter, null is returned@Deprecated public abstract <T extends DomElement> DomFileElement<T> getFileElement(XmlFile file)
getFileElement(XmlFile, Class)
@Deprecated public abstract <T extends DomElement> DomFileElement<T> getFileElement(XmlFile file, java.lang.Class<T> aClass, java.lang.String rootTagName)
getFileElement(XmlFile, Class)
public abstract void addDomEventListener(DomEventListener listener, Disposable parentDisposable)
public abstract DomGenericInfo getGenericInfo(java.lang.reflect.Type type)
type
- Type. Only Class
and ParameterizedType
are allowedDomGenericInfo
instance for the desired typepublic abstract DomElement getDomElement(XmlTag element)
element
- tagpublic abstract GenericAttributeValue<?> getDomElement(XmlAttribute element)
element
- attributepublic abstract <T extends DomElement> T createMockElement(java.lang.Class<T> aClass, Module module, boolean physical)
aClass
- Desired DOM element classmodule
- One may wish the result to think that it is in a particular modulephysical
- see PsiElement.isPhysical()
PsiFileFactory.createFileFromText(String, com.intellij.openapi.fileTypes.FileType, CharSequence, long, boolean, boolean)
public abstract boolean isMockElement(DomElement element)
element
- DOM elementcreateMockElement(Class, Module, boolean)
methodpublic abstract <T extends DomElement> T createStableValue(Factory<? extends T> provider)
provider
- provides values to be wrappedpublic abstract <T> T createStableValue(Factory<? extends T> provider, Condition<? super T> validator)
@Deprecated public abstract void registerFileDescription(DomFileDescription<?> description)
DomFileDescription.EP_NAME
)DomFileDescription
within the manager. The description parameter describes some DOM
parameters and restrictions to the particular XML files, that need DOM support. Should be called on
ProjectComponent
loading.description
- The description in question@Deprecated public abstract ConverterManager getConverterManager()
ConverterManager
instancepublic abstract ModelMerger createModelMerger()
public abstract DomElement getResolvingScope(GenericDomValue<?> element)
element
- reference elementDomResolveConverter
uses
this method to resolve DOM references. This result's subtree will be traversed recursively searching for the reference target. See
Resolve
annotation.public abstract DomElement getIdentityScope(DomElement element)
element
- Named DOM elementDomHighlightingHelper.checkNameIdentity(DomElement, com.intellij.util.xml.highlighting.DomElementAnnotationHolder)
public abstract TypeChooserManager getTypeChooserManager()
TypeChooserManager
instancepublic abstract AbstractDomChildrenDescription findChildrenDescription(XmlTag templateChildTag, DomElement parent)
public final DomFileDescription<?> getDomFileDescription(XmlFile xmlFile)