Editors: Refactor auto-complete code out of the editors for better reusability.

Reviewed-by: Thorbjorn Lindeijer
This commit is contained in:
Leandro Melo
2010-11-08 16:11:26 +01:00
parent 11f0208caf
commit 36fa1de4c6
16 changed files with 759 additions and 388 deletions

View File

@@ -202,13 +202,6 @@ protected:
void createToolBar(Internal::QmlJSEditorEditable *editable);
TextEditor::BaseTextEditor::Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true);
//// brace matching
virtual bool contextAllowsAutoParentheses(const QTextCursor &cursor, const QString &textToInsert = QString()) const;
virtual bool contextAllowsElectricCharacters(const QTextCursor &cursor) const;
virtual bool isInComment(const QTextCursor &cursor) const;
virtual QString insertMatchingBrace(const QTextCursor &tc, const QString &text, QChar la, int *skippedChars) const;
virtual QString insertParagraphSeparator(const QTextCursor &tc) const;
private:
bool isClosingBrace(const QList<QmlJS::Token> &tokens) const;