completion: enable multiple completors for different use cases.

Introduce CompletionPolicy enum, use 'TextCompletion' for the new plain
text completion, and 'SemanticCompletion' or 'QuickFixCompletion' for
the existing cases.

Reviewed-by: Erik Verbruggen
This commit is contained in:
hjk
2011-02-21 14:02:00 +01:00
parent 43c980e6a3
commit 9a6c4a42f7
25 changed files with 135 additions and 93 deletions

View File

@@ -250,13 +250,11 @@ void GLSLEditorPlugin::initializeEditor(GLSLEditor::GLSLTextEditor *editor)
TextEditor::TextEditorSettings::instance()->initializeEditor(editor);
// // auto completion
connect(editor, SIGNAL(requestAutoCompletion(TextEditor::ITextEditable*, bool)),
TextEditor::CompletionSupport::instance(), SLOT(autoComplete(TextEditor::ITextEditable*, bool)));
// // quick fix
// connect(editor, SIGNAL(requestQuickFix(TextEditor::ITextEditable*)),
// this, SLOT(quickFix(TextEditor::ITextEditable*)));
// auto completion and quick fix
connect(editor,
SIGNAL(requestCompletion(TextEditor::ITextEditable*,TextEditor::CompletionPolicy,bool)),
TextEditor::CompletionSupport::instance(),
SLOT(autoComplete(TextEditor::ITextEditable*,TextEditor::CompletionPolicy,bool)));
}