forked from qt-creator/qt-creator
Add QmlJS semantic checker.
* Add SemanticHighlighter to QmlJSTextEditor to update the semantic info in a background thread. * Add QmlJS::Check to run semantic checks on qml and js documents. * Add a check for incorrect property names. * Fix hoverhandler to show tool tips from extra selections over help tooltips.
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
namespace QmlJS {
|
||||
|
||||
class Bind;
|
||||
class Snapshot;
|
||||
|
||||
class QMLJS_EXPORT Document
|
||||
{
|
||||
@@ -96,6 +97,9 @@ private:
|
||||
QString _path;
|
||||
QString _componentName;
|
||||
QString _source;
|
||||
|
||||
// for documentFromSource
|
||||
friend class Snapshot;
|
||||
};
|
||||
|
||||
class QMLJS_EXPORT Snapshot
|
||||
@@ -118,6 +122,9 @@ public:
|
||||
Document::Ptr document(const QString &fileName) const
|
||||
{ return _documents.value(fileName); }
|
||||
|
||||
Document::Ptr documentFromSource(const QString &code,
|
||||
const QString &fileName) const;
|
||||
|
||||
QList<Document::Ptr> importedDocuments(const Document::Ptr &doc, const QString &importPath) const;
|
||||
QMap<QString, Document::Ptr> componentsDefinedByImportedDocuments(const Document::Ptr &doc, const QString &importPath) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user