![]() |
Qt 6.x
The Qt SDK
|
Represents and maintains a mapping between elements and their location in a file. More...
#include <qqmldomattachedinfo_p.h>
Public Types | |
using | Tree = std::shared_ptr< AttachedInfoT< FileLocations > > |
Public Member Functions | |
DomType | kind () const |
bool | iterateDirectSubpaths (DomItem &self, DirectVisitor) |
void | ensureCommentLocations (QList< QString > keys) |
Static Public Member Functions | |
static Tree | createTree (Path basePath) |
static Tree | ensure (Tree base, Path basePath, AttachedInfo::PathType pType=AttachedInfo::PathType::Relative) |
static Tree | find (Tree self, Path p, AttachedInfo::PathType pType=AttachedInfo::PathType::Relative) |
static AttachedInfoLookupResult< Tree > | findAttachedInfo (DomItem &item, AttachedInfo::FindOptions options=AttachedInfo::FindOption::Default) |
static FileLocations::Tree | treeOf (DomItem &) |
static const FileLocations * | fileLocationsOf (DomItem &) |
static void | updateFullLocation (Tree fLoc, SourceLocation loc) |
static void | addRegion (Tree fLoc, QString locName, SourceLocation loc) |
static void | addRegion (Tree fLoc, QStringView locName, SourceLocation loc) |
Public Attributes | |
SourceLocation | fullRegion |
QMap< QString, SourceLocation > | regions |
QMap< QString, QList< SourceLocation > > | preCommentLocations |
QMap< QString, QList< SourceLocation > > | postCommentLocations |
Static Public Attributes | |
static constexpr DomType | kindValue = DomType::FileLocations |
Represents and maintains a mapping between elements and their location in a file.
The location information is attached to the element it refers to via AttachedInfo There are static methods to simplify the handling of the tree of AttachedInfo.
Attributes: \list
Definition at line 238 of file qqmldomattachedinfo_p.h.
using QQmlJS::Dom::FileLocations::Tree = std::shared_ptr<AttachedInfoT<FileLocations> > |
Definition at line 240 of file qqmldomattachedinfo_p.h.
|
static |
Definition at line 143 of file qqmldomattachedinfo.cpp.
References Q_ASSERT.
Referenced by QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::createFileLocations(), QQmlJS::Dom::OutWriter::regionStart(), QQmlJS::Dom::QQmlDomAstCreator::visit(), QQmlJS::Dom::QQmlDomAstCreator::visit(), QQmlJS::Dom::QQmlDomAstCreator::visit(), QQmlJS::Dom::QQmlDomAstCreator::visit(), QQmlJS::Dom::QQmlDomAstCreator::visit(), QQmlJS::Dom::QQmlDomAstCreator::visit(), QQmlJS::Dom::QQmlDomAstCreator::visit(), and QQmlJS::Dom::QQmlDomAstCreator::visit().
|
static |
Definition at line 149 of file qqmldomattachedinfo.cpp.
References QStringView::toString().
|
static |
Definition at line 94 of file qqmldomattachedinfo.cpp.
Referenced by QQmlJS::Dom::OutWriter::updatedFile().
|
static |
Definition at line 98 of file qqmldomattachedinfo.cpp.
References base.
Referenced by QQmlJS::Dom::ScriptElements::ScriptElementBase< type >::createFileLocations(), QQmlJS::Dom::QQmlDomAstCreator::endVisit(), QQmlJS::Dom::QQmlDomAstCreator::endVisit(), QQmlJS::Dom::OutWriter::itemStart(), QQmlJS::Dom::OutWriter::updatedFile(), QQmlJS::Dom::QQmlDomAstCreator::visit(), and QQmlJS::Dom::QQmlDomAstCreator::visit().
Definition at line 86 of file qqmldomattachedinfo.cpp.
References keys.
|
static |
Returns the filelocation Info corresponding to a DomItem.
Definition at line 121 of file qqmldomattachedinfo.cpp.
References item.
Referenced by QmlGoToTypeDefinitionSupport::process(), and QQmlJS::Dom::ErrorMessage::withItem().
|
inlinestatic |
Definition at line 249 of file qqmldomattachedinfo_p.h.
|
static |
Definition at line 103 of file qqmldomattachedinfo.cpp.
References item.
bool QQmlJS::Dom::FileLocations::iterateDirectSubpaths | ( | DomItem & | self, |
DirectVisitor | visitor | ||
) |
Definition at line 29 of file qqmldomattachedinfo.cpp.
References el, fullRegion, QString::length(), QQmlJS::Dom::locationToData(), map, QStringView::mid(), preCommentLocations, and regions.
|
inline |
Definition at line 242 of file qqmldomattachedinfo_p.h.
|
static |
Returns the tree corresponding to a DomItem.
Definition at line 112 of file qqmldomattachedinfo.cpp.
References item.
Referenced by findMethodDefinitionOf(), findPropertyDefinitionOf(), findUsagesHelper(), and findUsagesOfNonJSIdentifiers().
|
static |
Definition at line 128 of file qqmldomattachedinfo.cpp.
References QQmlJS::SourceLocation::begin(), QQmlJS::SourceLocation::end(), and Q_ASSERT.
Referenced by QQmlJS::Dom::OutWriter::itemStart().
SourceLocation QQmlJS::Dom::FileLocations::fullRegion |
Definition at line 266 of file qqmldomattachedinfo_p.h.
Referenced by iterateDirectSubpaths().
|
staticconstexpr |
Definition at line 241 of file qqmldomattachedinfo_p.h.
QMap<QString, QList<SourceLocation> > QQmlJS::Dom::FileLocations::postCommentLocations |
Definition at line 269 of file qqmldomattachedinfo_p.h.
QMap<QString, QList<SourceLocation> > QQmlJS::Dom::FileLocations::preCommentLocations |
Definition at line 268 of file qqmldomattachedinfo_p.h.
Referenced by iterateDirectSubpaths().
QMap<QString, SourceLocation> QQmlJS::Dom::FileLocations::regions |
Definition at line 267 of file qqmldomattachedinfo_p.h.
Referenced by iterateDirectSubpaths().