class CPLUSPLUS_EXPORT MatchingText
{
public:
- MatchingText();
+ MatchingText(TokenCache *tokenCache);
static bool shouldInsertMatchingText(const QTextCursor &tc);
- static bool shouldInsertMatchingText(const QChar &lookAhead);
+ static bool shouldInsertMatchingText(QChar lookAhead);
QString insertMatchingBrace(const QTextCursor &tc, const QString &text,
- const QChar &la, int *skippedChars) const;
+ QChar la, int *skippedChars) const;
QString insertParagraphSeparator(const QTextCursor &tc) const;
private:
}
QString CPPEditor::insertMatchingBrace(const QTextCursor &tc, const QString &text,
- const QChar &la, int *skippedChars) const
+ QChar la, int *skippedChars) const
{
- MatchingText m;
+ MatchingText m(tokenCache());
return m.insertMatchingBrace(tc, text, la, skippedChars);
}
void updateSnippets();
bool maybeTriggersCompletion(TextEditor::ITextEditable *editor);
- bool isDelimiter(const QChar &ch) const;
+ bool isDelimiter(QChar ch) const;
void addCompletions(const QHash<QString, const QmlJS::Interpreter::Value *> &newCompletions,
- const QIcon &icon);
+ const QIcon &icon, int relevance);
void addCompletions(const QStringList &newCompletions,
- const QIcon &icon);
+ const QIcon &icon, int relevance);
+ void addCompletionsPropertyLhs(
+ const QHash<QString, const QmlJS::Interpreter::Value *> &newCompletions,
+ const QIcon &icon, int relevance);
- ModelManagerInterface *m_modelManager;
+ QmlJS::ModelManagerInterface *m_modelManager;
TextEditor::ITextEditable *m_editor;
int m_startPosition;
QList<TextEditor::CompletionItem> m_completions;