public class DomFileDescription<T>
extends java.lang.Object
com.intellij.dom.fileMetaData
to register.MergingFileDescription
Modifier and Type | Field and Description |
---|---|
static ExtensionPointName<DomFileDescription> |
EP_NAME
Deprecated.
use
com.intellij.dom.fileMetaData extension instead |
protected java.lang.Class<T> |
myRootElementClass |
protected java.lang.String |
myRootTagName |
Constructor and Description |
---|
DomFileDescription(java.lang.Class<T> rootElementClass,
java.lang.String rootTagName,
java.lang.String... allPossibleRootTagNamespaces) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsOtherRootTagNames() |
DomElementsAnnotator |
createAnnotator()
Create custom DOM annotator that will be used when error-highlighting DOM.
|
java.util.List<java.lang.String> |
getAllowedNamespaces(java.lang.String namespaceKey,
XmlFile file)
Consider using
DomService.getXmlFileHeader(XmlFile) when implementing this. |
java.lang.String [] |
getAllPossibleRootTagNamespaces() |
java.util.Set<?> |
getDependencyItems(XmlFile file)
Get dependency items (the same, as in
CachedValue ) for file. |
javax.swing.Icon |
getFileIcon(int flags) |
DomElement |
getIdentityScope(DomElement element) |
java.util.Map<java.lang.Class<? extends DomElement>,java.lang.Class<? extends DomElement>> |
getImplementations() |
java.util.List<DomReferenceInjector> |
getReferenceInjectors() |
DomElement |
getResolveScope(GenericDomValue<?> reference) |
java.lang.Class<T> |
getRootElementClass() |
java.lang.String |
getRootTagName() |
protected DomElement |
getScopeFromAnnotation(DomElement element) |
int |
getStubVersion()
Deprecated.
define "stubVersion" of
com.intellij.dom.fileMetaData extension instead |
TypeChooserManager |
getTypeChooserManager() |
int |
getVersion()
Deprecated.
use "domVersion" attribute of
com.intellij.dom.fileMetaData extension instead |
boolean |
hasStubs()
Deprecated.
define "stubVersion" of
com.intellij.dom.fileMetaData extension instead |
protected void |
initializeFileDescription()
|
boolean |
isAutomaticHighlightingEnabled() |
boolean |
isMyFile(XmlFile file,
Module module) |
<Dom extends DomElement> |
registerImplementation(java.lang.Class<Dom> domElementClass,
java.lang.Class<? extends Dom> implementationClass)
Deprecated.
use dom.implementation extension point instead
|
protected void |
registerNamespacePolicy(java.lang.String namespaceKey,
NotNullFunction<XmlTag,java.util.List<java.lang.String>> policy)
Deprecated.
use
registerNamespacePolicy(String, String...) or override getAllowedNamespaces(String, XmlFile) instead |
void |
registerNamespacePolicy(java.lang.String namespaceKey,
java.lang.String... namespaces) |
protected void |
registerReferenceInjector(DomReferenceInjector injector) |
protected void |
registerTypeChooser(java.lang.reflect.Type aClass,
TypeChooser typeChooser) |
java.lang.String |
toString() |
@Deprecated public static final ExtensionPointName<DomFileDescription> EP_NAME
com.intellij.dom.fileMetaData
extension insteadprotected final java.lang.Class<T> myRootElementClass
protected final java.lang.String myRootTagName
public DomFileDescription(java.lang.Class<T> rootElementClass, java.lang.String rootTagName, java.lang.String... allPossibleRootTagNamespaces)
public java.lang.String [] getAllPossibleRootTagNamespaces()
@Deprecated public final <Dom extends DomElement> void registerImplementation(java.lang.Class<Dom> domElementClass, java.lang.Class<? extends Dom> implementationClass)
domElementClass
- interface class.implementationClass
- abstract implementation class.initializeFileDescription()
@Deprecated protected final void registerNamespacePolicy(java.lang.String namespaceKey, NotNullFunction<XmlTag,java.util.List<java.lang.String>> policy)
registerNamespacePolicy(String, String...)
or override getAllowedNamespaces(String, XmlFile)
insteadnamespaceKey
- namespace identifierpolicy
- function that takes XML file root tag and returns (maybe empty) list of possible namespace URLs or DTD public ids. This
function shouldn't use DOM since it may be not initialized for the file at the momentNamespace
public final void registerNamespacePolicy(java.lang.String namespaceKey, java.lang.String... namespaces)
namespaceKey
- namespace identifiernamespaces
- XML namespace or DTD public or system id value for the given namespaceKeyNamespace
public java.util.List<java.lang.String> getAllowedNamespaces(java.lang.String namespaceKey, XmlFile file)
DomService.getXmlFileHeader(XmlFile)
when implementing this.@Deprecated public int getVersion()
com.intellij.dom.fileMetaData
extension insteadsuper.getVersion()+1
) when after some changes some files stopped being
described by this description or vice versa, so that the
DomService.getDomFileCandidates(Class, com.intellij.openapi.project.Project, com.intellij.psi.search.GlobalSearchScope)
index is rebuilt correctly.protected final void registerTypeChooser(java.lang.reflect.Type aClass, TypeChooser typeChooser)
public final TypeChooserManager getTypeChooserManager()
protected final void registerReferenceInjector(DomReferenceInjector injector)
public java.util.List<DomReferenceInjector> getReferenceInjectors()
public boolean isAutomaticHighlightingEnabled()
public javax.swing.Icon getFileIcon(int flags)
protected void initializeFileDescription()
public DomElementsAnnotator createAnnotator()
DomElementsProblemsHolder
. The highlighting will be most probably done in an
BasicDomElementsInspection
instance.public final java.util.Map<java.lang.Class<? extends DomElement>,java.lang.Class<? extends DomElement>> getImplementations()
public final java.lang.Class<T> getRootElementClass()
public final java.lang.String getRootTagName()
public boolean acceptsOtherRootTagNames()
public java.util.Set<?> getDependencyItems(XmlFile file)
CachedValue
) for file. On any dependency item change, the
isMyFile(XmlFile, Module)
method will be invoked once more to ensure that the file description still
accepts this file.file
- XML file to get dependencies ofpublic DomElement getResolveScope(GenericDomValue<?> reference)
reference
- DOM referencepublic DomElement getIdentityScope(DomElement element)
element
- DOM elementParentScopeProvider
).protected final DomElement getScopeFromAnnotation(DomElement element)
@Deprecated public boolean hasStubs()
com.intellij.dom.fileMetaData
extension insteadStubbed
@Deprecated public int getStubVersion()
com.intellij.dom.fileMetaData
extension insteadStubbed
public java.lang.String toString()
toString
in class java.lang.Object