TextEditor: Move CompletionAssistProvider to *Widget

All the others live there, too.

Change-Id: I0a418bf235343d40a53fbee089234765386ee05d
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
hjk
2014-09-03 10:57:51 +02:00
parent 877bf3b305
commit e3bc7d19cf
10 changed files with 46 additions and 37 deletions

View File

@@ -58,6 +58,19 @@ public:
JavaEditor()
{
setDuplicateSupported(true);
}
};
//
// JavaEditorWidget
//
class JavaEditorWidget : public TextEditor::BaseTextEditorWidget
{
public:
JavaEditorWidget()
{
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<JavaCompletionAssistProvider>());
}
};
@@ -106,8 +119,9 @@ JavaEditorFactory::JavaEditorFactory()
setDisplayName(tr("Java Editor"));
addMimeType(Constants::JAVA_MIMETYPE);
setEditorCreator([]() { return new JavaEditor; });
setDocumentCreator([]() { return new JavaDocument; });
setEditorWidgetCreator([]() { return new JavaEditorWidget; });
setEditorCreator([]() { return new JavaEditor; });
setAutoCompleterCreator([]() { return new JavaAutoCompleter; });
setGenericSyntaxHighlighter(QLatin1String(Constants::JAVA_MIMETYPE));
setCommentStyle(Utils::CommentDefinition::CppStyle);