QmlJS: Detect whether cursor is in an import.

Reviewed-by: Roberto Raggi
This commit is contained in:
Christian Kamm
2010-11-12 11:57:44 +01:00
parent ff2dc588b7
commit cab2180f7e
2 changed files with 96 additions and 0 deletions

View File

@@ -53,11 +53,13 @@ public:
QStringList bindingPropertyName() const;
bool isInStringLiteral() const;
bool isInImport() const;
private:
int findOpeningBrace(int startTokenIndex);
void getQmlObjectTypeName(int startTokenIndex);
void checkBinding();
void checkImport();
QTextCursor m_cursor;
QStringList m_qmlObjectTypeName;
@@ -66,6 +68,7 @@ private:
int m_colonCount;
bool m_behaviorBinding;
bool m_inStringLiteral;
bool m_inImport;
};
} // namespace QmlJS