forked from qt-creator/qt-creator
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:
@@ -37,6 +37,7 @@
|
||||
#include "glslhighlighter.h"
|
||||
#include "glslautocompleter.h"
|
||||
#include "glslindenter.h"
|
||||
#include "glslcompletionassist.h"
|
||||
|
||||
#include <glsl/glsllexer.h>
|
||||
#include <glsl/glslparser.h>
|
||||
@@ -412,3 +413,17 @@ Document::Ptr GLSLTextEditorWidget::glslDocument() const
|
||||
{
|
||||
return m_glslDocument;
|
||||
}
|
||||
|
||||
TextEditor::IAssistInterface *GLSLTextEditorWidget::createAssistInterface(
|
||||
TextEditor::AssistKind kind,
|
||||
TextEditor::AssistReason reason) const
|
||||
{
|
||||
if (kind == TextEditor::Completion)
|
||||
return new GLSLCompletionAssistInterface(document(),
|
||||
position(),
|
||||
editor()->file(),
|
||||
reason,
|
||||
mimeType(),
|
||||
glslDocument());
|
||||
return BaseTextEditorWidget::createAssistInterface(kind, reason);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user