void (DomElement domElement, boolean requestFocus) { if (!domElement.isValid()) return; final DomFileElement<DomElement> fileElement = DomUtil.getFileElement(domElement); if (fileElement == null) return; VirtualFile file = fileElement.getFile().getVirtualFile(); if (file == null) return; XmlElement xmlElement = domElement.getXmlElement(); if (xmlElement instanceof XmlAttribute) xmlElement = ((XmlAttribute)xmlElement).getValueElement(); final OpenFileDescriptor fileDescriptor = xmlElement != null ? new OpenFileDescriptor(myProject, file, xmlElement.getTextOffset()) : new OpenFileDescriptor(myProject, file); FileEditorManagerEx.getInstanceEx(myProject).openTextEditor(fileDescriptor, requestFocus); }