aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/android/javaeditor.cpp
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2014-07-31 14:44:35 +0200
committerhjk <hjk121@nokiamail.com>2014-07-31 16:45:31 +0200
commit98fd59fd091e973e25061d44c0a6eb4b817ee13c (patch)
treeeb3d9517543b98d8ca4d937a6d64198200c6a5af /src/plugins/android/javaeditor.cpp
parent9fd2fe5a9a0b4824ac22c8c46b2dd1ed55ce8bfa (diff)
TextEditor: Start moving data from *EditorWidget to *Editor
Goal is to consolidate "controller" related data in the *Editor hierarchy. This patch introduces temporary "cross-Private" accessors dd() to keep the patches small. First item moved is the AutoCompleter, a glimps at long term benefits is the simplification in the JavaEditorWidget which is now essentially a BaseTextEditorWidget, only containing the still-wrong createEditor(). But that can only be move if the *Editors are self-contained, i.e. keep data themselves, not indirectly through the *EditorWidgets. Change-Id: Ia0ab90f0322bb17ac20458e6581069eed30acbaf Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/android/javaeditor.cpp')
-rw-r--r--src/plugins/android/javaeditor.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/plugins/android/javaeditor.cpp b/src/plugins/android/javaeditor.cpp
index 163941fcd9b..f9d22aec970 100644
--- a/src/plugins/android/javaeditor.cpp
+++ b/src/plugins/android/javaeditor.cpp
@@ -57,6 +57,7 @@ JavaEditor::JavaEditor(JavaEditorWidget *editor)
setDuplicateSupported(true);
setCommentStyle(Utils::CommentDefinition::CppStyle);
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<JavaCompletionAssistProvider>());
+ setAutoCompleter(new JavaAutoCompleter);
}
Core::IEditor *JavaEditor::duplicate()
@@ -74,18 +75,11 @@ Core::IEditor *JavaEditor::duplicate()
JavaEditorWidget::JavaEditorWidget(QWidget *parent)
: BaseTextEditorWidget(new JavaDocument(), parent)
{
- ctor();
}
JavaEditorWidget::JavaEditorWidget(JavaEditorWidget *other)
: BaseTextEditorWidget(other)
{
- ctor();
-}
-
-void JavaEditorWidget::ctor()
-{
- setAutoCompleter(new JavaAutoCompleter);
}
TextEditor::BaseTextEditor *JavaEditorWidget::createEditor()