New code assist API

This is a re-work of our completion engine. Primary goals are:

- Allow the computation to run in a separate thread so the GUI is not locked.
- Support a model-based approach. QStrings are still needed (filtering, etc), but
internal structures are free to use more efficient representations.
- Unifiy all kinds of *assist* into a more reusable and extensible framework.
- Remove unnecessary dependencies on the text editor so we have more generic
and easily "plugable" components (still things to be resolved).
This commit is contained in:
Leandro Melo
2011-04-15 16:19:23 +02:00
parent d835b769c7
commit bec4f02495
119 changed files with 9347 additions and 6595 deletions

View File

@@ -34,7 +34,7 @@
#define BASETEXTEDITOR_H
#include "itexteditor.h"
#include "icompletioncollector.h"
#include "codeassist/assistenums.h"
#include <find/ifindsupport.h>
@@ -56,6 +56,9 @@ namespace TextEditor {
class TabSettings;
class RefactorOverlay;
struct RefactorMarker;
class IAssistMonitorInterface;
class IAssistInterface;
class IAssistProvider;
namespace Internal {
class BaseTextEditorPrivate;
@@ -235,6 +238,11 @@ public:
QPoint toolTipPosition(const QTextCursor &c) const;
void invokeAssist(AssistKind assistKind, IAssistProvider *provider = 0);
virtual IAssistInterface *createAssistInterface(AssistKind assistKind,
AssistReason assistReason) const;
public slots:
void setDisplayName(const QString &title);
@@ -492,7 +500,6 @@ signals:
void requestBlockUpdate(const QTextBlock &);
private:
void maybeRequestAutoCompletion(const QChar &ch);
void indentOrUnindent(bool doIndent);
void handleHomeKey(bool anchor);
void handleBackspaceKey();
@@ -531,9 +538,6 @@ private:
void transformSelection(Internal::TransformationMethod method);
private slots:
// auto completion
void _q_requestAutoCompletion();
void handleBlockSelection(int diff_row, int diff_col);
// parentheses matcher