forked from qt-creator/qt-creator
TextEditor: Further *Editor/*EditorWidget disentangling
In most cases, the *Editor constructor does not need to access the *EditorWidget. Change-Id: I1f5c076a0f723d5d82b398e8c250c7bd1d47eb17 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -49,8 +49,7 @@ using namespace Android::Internal;
|
||||
// JavaEditor
|
||||
//
|
||||
|
||||
JavaEditor::JavaEditor(JavaEditorWidget *editor)
|
||||
: BaseTextEditor(editor)
|
||||
JavaEditor::JavaEditor()
|
||||
{
|
||||
setContext(Core::Context(Constants::C_JAVA_EDITOR,
|
||||
TextEditor::Constants::C_TEXTEDITOR));
|
||||
@@ -78,7 +77,7 @@ JavaEditorWidget::JavaEditorWidget()
|
||||
|
||||
TextEditor::BaseTextEditor *JavaEditorWidget::createEditor()
|
||||
{
|
||||
return new JavaEditor(this);
|
||||
return new JavaEditor;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -86,7 +85,6 @@ TextEditor::BaseTextEditor *JavaEditorWidget::createEditor()
|
||||
//
|
||||
|
||||
JavaDocument::JavaDocument()
|
||||
: TextEditor::BaseTextDocument()
|
||||
{
|
||||
setId(Constants::JAVA_EDITOR_ID);
|
||||
setMimeType(QLatin1String(Constants::JAVA_MIMETYPE));
|
||||
|
||||
@@ -38,14 +38,13 @@ namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
class JavaEditorFactory;
|
||||
class JavaEditorWidget;
|
||||
|
||||
class JavaEditor : public TextEditor::BaseTextEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
JavaEditor(JavaEditorWidget *);
|
||||
JavaEditor();
|
||||
|
||||
Core::IEditor *duplicate();
|
||||
TextEditor::CompletionAssistProvider *completionAssistProvider();
|
||||
|
||||
Reference in New Issue
Block a user