#ifndef QMLJSCOMPLETIONCONTEXTFINDER_H #define QMLJSCOMPLETIONCONTEXTFINDER_H #include "qmljs_global.h" #include #include #include namespace QmlJS { class QMLJS_EXPORT CompletionContextFinder : public LineInfo { public: CompletionContextFinder(const QTextCursor &cursor); //bool inQmlObjectDefinition(); bool inQmlBindingRhs(); QStringList qmlObjectTypeName() const; bool isInQmlContext() const; bool isInLhsOfBinding() const; bool isInRhsOfBinding() const; bool isAfterOnInLhsOfBinding() const; QStringList bindingPropertyName() const; private: int findOpeningBrace(int startTokenIndex); void getQmlObjectTypeName(int startTokenIndex); void checkBinding(); QTextCursor m_cursor; QStringList m_qmlObjectTypeName; QStringList m_bindingPropertyName; int m_startTokenIndex; int m_colonCount; bool m_behaviorBinding; }; } // namespace QmlJS #endif // QMLJSCOMPLETIONCONTEXTFINDER_H