use of com.intellij.ide.structureView.impl.xml.XmlFileTreeElement in project intellij-plugins by JetBrains.
the class StructureViewTreeModel method getRoot.
@NotNull
@Override
public StructureViewTreeElement getRoot() {
final XmlFile xmlFile = getPsiFile();
final DomFileElement<DomElement> fileElement = DomManager.getDomManager(xmlFile.getProject()).getFileElement(xmlFile, DomElement.class);
if (fileElement == null) {
return new XmlFileTreeElement(xmlFile);
}
return new com.intellij.struts2.structure.StructureViewTreeElement(fileElement.getRootElement().createStableCopy());
}
use of com.intellij.ide.structureView.impl.xml.XmlFileTreeElement in project intellij-community by JetBrains.
the class DomStructureViewTreeModel method getRoot.
@Override
@NotNull
public StructureViewTreeElement getRoot() {
XmlFile myFile = getPsiFile();
final DomFileElement<DomElement> fileElement = DomManager.getDomManager(myFile.getProject()).getFileElement(myFile, DomElement.class);
return fileElement == null ? new XmlFileTreeElement(myFile) : new DomStructureTreeElement(fileElement.getRootElement().createStableCopy(), myDescriptor, myNavigationProvider);
}
Aggregations