forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -57,6 +57,7 @@ JavaEditor::JavaEditor(JavaEditorWidget *editor)
|
|||||||
setDuplicateSupported(true);
|
setDuplicateSupported(true);
|
||||||
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
||||||
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<JavaCompletionAssistProvider>());
|
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<JavaCompletionAssistProvider>());
|
||||||
|
setAutoCompleter(new JavaAutoCompleter);
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *JavaEditor::duplicate()
|
Core::IEditor *JavaEditor::duplicate()
|
||||||
@@ -74,18 +75,11 @@ Core::IEditor *JavaEditor::duplicate()
|
|||||||
JavaEditorWidget::JavaEditorWidget(QWidget *parent)
|
JavaEditorWidget::JavaEditorWidget(QWidget *parent)
|
||||||
: BaseTextEditorWidget(new JavaDocument(), parent)
|
: BaseTextEditorWidget(new JavaDocument(), parent)
|
||||||
{
|
{
|
||||||
ctor();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JavaEditorWidget::JavaEditorWidget(JavaEditorWidget *other)
|
JavaEditorWidget::JavaEditorWidget(JavaEditorWidget *other)
|
||||||
: BaseTextEditorWidget(other)
|
: BaseTextEditorWidget(other)
|
||||||
{
|
{
|
||||||
ctor();
|
|
||||||
}
|
|
||||||
|
|
||||||
void JavaEditorWidget::ctor()
|
|
||||||
{
|
|
||||||
setAutoCompleter(new JavaAutoCompleter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditor::BaseTextEditor *JavaEditorWidget::createEditor()
|
TextEditor::BaseTextEditor *JavaEditorWidget::createEditor()
|
||||||
|
@@ -64,7 +64,6 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
JavaEditorWidget(BaseTextEditorWidget *); // avoid stupidity
|
JavaEditorWidget(BaseTextEditorWidget *); // avoid stupidity
|
||||||
void ctor();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class JavaDocument : public TextEditor::BaseTextDocument
|
class JavaDocument : public TextEditor::BaseTextDocument
|
||||||
|
@@ -253,7 +253,7 @@ bool CppDocumentationCommentHelper::handleKeyPressEvent(QKeyEvent *e) const
|
|||||||
|
|
||||||
if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) {
|
if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) {
|
||||||
QTextCursor cursor = m_editorWidget->textCursor();
|
QTextCursor cursor = m_editorWidget->textCursor();
|
||||||
if (!m_editorWidget->autoCompleter()->isInComment(cursor))
|
if (!m_editorWidget->editor()->autoCompleter()->isInComment(cursor))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// We are interested on two particular cases:
|
// We are interested on two particular cases:
|
||||||
|
@@ -117,6 +117,7 @@ CPPEditor::CPPEditor(CppEditorWidget *editor)
|
|||||||
setCompletionAssistProvider([this] () -> TextEditor::CompletionAssistProvider * {
|
setCompletionAssistProvider([this] () -> TextEditor::CompletionAssistProvider * {
|
||||||
return CppModelManagerInterface::instance()->cppEditorSupport(this)->completionAssistProvider();
|
return CppModelManagerInterface::instance()->cppEditorSupport(this)->completionAssistProvider();
|
||||||
});
|
});
|
||||||
|
setAutoCompleter(new CppAutoCompleter);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_GLOBAL_STATIC(CppTools::SymbolFinder, symbolFinder)
|
Q_GLOBAL_STATIC(CppTools::SymbolFinder, symbolFinder)
|
||||||
@@ -197,7 +198,6 @@ void CppEditorWidget::ctor()
|
|||||||
setParenthesesMatchingEnabled(true);
|
setParenthesesMatchingEnabled(true);
|
||||||
setMarksVisible(true);
|
setMarksVisible(true);
|
||||||
setCodeFoldingSupported(true);
|
setCodeFoldingSupported(true);
|
||||||
setAutoCompleter(new CppAutoCompleter);
|
|
||||||
|
|
||||||
if (d->m_modelManager) {
|
if (d->m_modelManager) {
|
||||||
CppEditorSupport *editorSupport = d->m_modelManager->cppEditorSupport(editor());
|
CppEditorSupport *editorSupport = d->m_modelManager->cppEditorSupport(editor());
|
||||||
|
@@ -64,5 +64,5 @@ void CppSnippetProvider::decorateEditor(TextEditor::SnippetEditorWidget *editor)
|
|||||||
{
|
{
|
||||||
editor->setSyntaxHighlighter(new CppHighlighter);
|
editor->setSyntaxHighlighter(new CppHighlighter);
|
||||||
editor->baseTextDocument()->setIndenter(new CppTools::CppQtStyleIndenter);
|
editor->baseTextDocument()->setIndenter(new CppTools::CppQtStyleIndenter);
|
||||||
editor->setAutoCompleter(new CppAutoCompleter);
|
editor->editor()->setAutoCompleter(new CppAutoCompleter);
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,6 @@
|
|||||||
#include "glsleditorplugin.h"
|
#include "glsleditorplugin.h"
|
||||||
#include "glslhighlighter.h"
|
#include "glslhighlighter.h"
|
||||||
#include "glslautocompleter.h"
|
#include "glslautocompleter.h"
|
||||||
#include "glslindenter.h"
|
|
||||||
#include "glslcompletionassist.h"
|
#include "glslcompletionassist.h"
|
||||||
|
|
||||||
#include <glsl/glsllexer.h>
|
#include <glsl/glsllexer.h>
|
||||||
@@ -160,7 +159,6 @@ void GlslEditorWidget::ctor()
|
|||||||
setParenthesesMatchingEnabled(true);
|
setParenthesesMatchingEnabled(true);
|
||||||
setMarksVisible(true);
|
setMarksVisible(true);
|
||||||
setCodeFoldingSupported(true);
|
setCodeFoldingSupported(true);
|
||||||
setAutoCompleter(new GLSLCompleter());
|
|
||||||
|
|
||||||
m_updateDocumentTimer = new QTimer(this);
|
m_updateDocumentTimer = new QTimer(this);
|
||||||
m_updateDocumentTimer->setInterval(UPDATE_DOCUMENT_DEFAULT_INTERVAL);
|
m_updateDocumentTimer->setInterval(UPDATE_DOCUMENT_DEFAULT_INTERVAL);
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include "glsleditoreditable.h"
|
#include "glsleditoreditable.h"
|
||||||
#include "glsleditorconstants.h"
|
#include "glsleditorconstants.h"
|
||||||
#include "glslcompletionassist.h"
|
#include "glslcompletionassist.h"
|
||||||
|
#include "glslautocompleter.h"
|
||||||
|
|
||||||
#include <texteditor/texteditorconstants.h>
|
#include <texteditor/texteditorconstants.h>
|
||||||
|
|
||||||
@@ -48,6 +49,7 @@ GlslEditor::GlslEditor(GlslEditorWidget *editor)
|
|||||||
setDuplicateSupported(true);
|
setDuplicateSupported(true);
|
||||||
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
||||||
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<GLSLCompletionAssistProvider>());
|
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<GLSLCompletionAssistProvider>());
|
||||||
|
setAutoCompleter(new GLSLCompleter);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -35,7 +35,6 @@
|
|||||||
#include "qmljseditorplugin.h"
|
#include "qmljseditorplugin.h"
|
||||||
#include "qmloutlinemodel.h"
|
#include "qmloutlinemodel.h"
|
||||||
#include "qmljsfindreferences.h"
|
#include "qmljsfindreferences.h"
|
||||||
#include "qmljsautocompleter.h"
|
|
||||||
#include "qmljscompletionassist.h"
|
#include "qmljscompletionassist.h"
|
||||||
#include "qmljsquickfixassist.h"
|
#include "qmljsquickfixassist.h"
|
||||||
|
|
||||||
@@ -120,7 +119,6 @@ void QmlJSTextEditorWidget::ctor()
|
|||||||
setParenthesesMatchingEnabled(true);
|
setParenthesesMatchingEnabled(true);
|
||||||
setMarksVisible(true);
|
setMarksVisible(true);
|
||||||
setCodeFoldingSupported(true);
|
setCodeFoldingSupported(true);
|
||||||
setAutoCompleter(new AutoCompleter);
|
|
||||||
setLanguageSettingsId(QmlJSTools::Constants::QML_JS_SETTINGS_ID);
|
setLanguageSettingsId(QmlJSTools::Constants::QML_JS_SETTINGS_ID);
|
||||||
|
|
||||||
m_updateUsesTimer = new QTimer(this);
|
m_updateUsesTimer = new QTimer(this);
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
#include "qmljseditor.h"
|
#include "qmljseditor.h"
|
||||||
#include "qmljseditorconstants.h"
|
#include "qmljseditorconstants.h"
|
||||||
#include "qmljscompletionassist.h"
|
#include "qmljscompletionassist.h"
|
||||||
|
#include "qmljsautocompleter.h"
|
||||||
|
|
||||||
#include <qmljstools/qmljstoolsconstants.h>
|
#include <qmljstools/qmljstoolsconstants.h>
|
||||||
#include <texteditor/texteditorconstants.h>
|
#include <texteditor/texteditorconstants.h>
|
||||||
@@ -56,6 +57,7 @@ QmlJSEditor::QmlJSEditor(QmlJSTextEditorWidget *editor)
|
|||||||
setDuplicateSupported(true);
|
setDuplicateSupported(true);
|
||||||
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
||||||
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<Internal::QmlJSCompletionAssistProvider>());
|
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<Internal::QmlJSCompletionAssistProvider>());
|
||||||
|
setAutoCompleter(new AutoCompleter);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QmlJSEditor::isDesignModePreferred() const
|
bool QmlJSEditor::isDesignModePreferred() const
|
||||||
|
@@ -66,5 +66,5 @@ void QmlJSSnippetProvider::decorateEditor(TextEditor::SnippetEditorWidget *edito
|
|||||||
{
|
{
|
||||||
editor->setSyntaxHighlighter(new Highlighter);
|
editor->setSyntaxHighlighter(new Highlighter);
|
||||||
editor->baseTextDocument()->setIndenter(new Indenter);
|
editor->baseTextDocument()->setIndenter(new Indenter);
|
||||||
editor->setAutoCompleter(new AutoCompleter);
|
editor->editor()->setAutoCompleter(new AutoCompleter);
|
||||||
}
|
}
|
||||||
|
@@ -188,6 +188,9 @@ private:
|
|||||||
class BaseTextEditorPrivate
|
class BaseTextEditorPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
BaseTextEditorPrivate()
|
||||||
|
{}
|
||||||
|
|
||||||
// Note: This is always a copy of IContext::m_widget.
|
// Note: This is always a copy of IContext::m_widget.
|
||||||
BaseTextEditorWidget *m_editorWidget;
|
BaseTextEditorWidget *m_editorWidget;
|
||||||
|
|
||||||
@@ -199,6 +202,7 @@ public:
|
|||||||
Utils::LineColumnLabel *m_fileEncodingLabel;
|
Utils::LineColumnLabel *m_fileEncodingLabel;
|
||||||
CommentDefinition m_commentDefinition;
|
CommentDefinition m_commentDefinition;
|
||||||
std::function<CompletionAssistProvider *()> m_completionAssistProvider;
|
std::function<CompletionAssistProvider *()> m_completionAssistProvider;
|
||||||
|
QScopedPointer<AutoCompleter> m_autoCompleter;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BaseTextEditorWidgetPrivate
|
class BaseTextEditorWidgetPrivate
|
||||||
@@ -209,6 +213,9 @@ class BaseTextEditorWidgetPrivate
|
|||||||
public:
|
public:
|
||||||
BaseTextEditorWidgetPrivate(BaseTextEditorWidget *parent);
|
BaseTextEditorWidgetPrivate(BaseTextEditorWidget *parent);
|
||||||
|
|
||||||
|
// FIXME: Remove after relevant members have been moved to BaseTextEditorPrivate
|
||||||
|
BaseTextEditorPrivate *dd() { return q->editor()->d; }
|
||||||
|
|
||||||
void setupDocumentSignals();
|
void setupDocumentSignals();
|
||||||
void updateLineSelectionColor();
|
void updateLineSelectionColor();
|
||||||
|
|
||||||
@@ -364,8 +371,6 @@ public:
|
|||||||
QPoint m_markDragStart;
|
QPoint m_markDragStart;
|
||||||
bool m_markDragging;
|
bool m_markDragging;
|
||||||
|
|
||||||
QScopedPointer<AutoCompleter> m_autoCompleter;
|
|
||||||
|
|
||||||
QScopedPointer<Internal::ClipboardAssistProvider> m_clipboardAssistProvider;
|
QScopedPointer<Internal::ClipboardAssistProvider> m_clipboardAssistProvider;
|
||||||
|
|
||||||
bool m_isMissingSyntaxDefinition;
|
bool m_isMissingSyntaxDefinition;
|
||||||
@@ -1892,7 +1897,7 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
|
|||||||
cursor.beginEditBlock();
|
cursor.beginEditBlock();
|
||||||
|
|
||||||
int extraBlocks =
|
int extraBlocks =
|
||||||
d->m_autoCompleter->paragraphSeparatorAboutToBeInserted(cursor,
|
dd()->m_autoCompleter->paragraphSeparatorAboutToBeInserted(cursor,
|
||||||
d->m_document->tabSettings());
|
d->m_document->tabSettings());
|
||||||
|
|
||||||
QString previousIndentationString;
|
QString previousIndentationString;
|
||||||
@@ -2092,16 +2097,17 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
|
|||||||
case Qt::Key_Insert:
|
case Qt::Key_Insert:
|
||||||
if (ro) break;
|
if (ro) break;
|
||||||
if (e->modifiers() == Qt::NoModifier) {
|
if (e->modifiers() == Qt::NoModifier) {
|
||||||
|
AutoCompleter *ac = dd()->m_autoCompleter.data();
|
||||||
if (inOverwriteMode) {
|
if (inOverwriteMode) {
|
||||||
d->m_autoCompleter->setAutoParenthesesEnabled(d->autoParenthesisOverwriteBackup);
|
ac->setAutoParenthesesEnabled(d->autoParenthesisOverwriteBackup);
|
||||||
d->m_autoCompleter->setSurroundWithEnabled(d->surroundWithEnabledOverwriteBackup);
|
ac->setSurroundWithEnabled(d->surroundWithEnabledOverwriteBackup);
|
||||||
setOverwriteMode(false);
|
setOverwriteMode(false);
|
||||||
viewport()->update();
|
viewport()->update();
|
||||||
} else {
|
} else {
|
||||||
d->autoParenthesisOverwriteBackup = d->m_autoCompleter->isAutoParenthesesEnabled();
|
d->autoParenthesisOverwriteBackup = ac->isAutoParenthesesEnabled();
|
||||||
d->surroundWithEnabledOverwriteBackup = d->m_autoCompleter->isSurroundWithEnabled();
|
d->surroundWithEnabledOverwriteBackup = ac->isSurroundWithEnabled();
|
||||||
d->m_autoCompleter->setAutoParenthesesEnabled(false);
|
ac->setAutoParenthesesEnabled(false);
|
||||||
d->m_autoCompleter->setSurroundWithEnabled(false);
|
ac->setSurroundWithEnabled(false);
|
||||||
setOverwriteMode(true);
|
setOverwriteMode(true);
|
||||||
}
|
}
|
||||||
e->accept();
|
e->accept();
|
||||||
@@ -2150,7 +2156,7 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
|
|||||||
// only go here if control is not pressed, except if also alt is pressed
|
// only go here if control is not pressed, except if also alt is pressed
|
||||||
// because AltGr maps to Alt + Ctrl
|
// because AltGr maps to Alt + Ctrl
|
||||||
QTextCursor cursor = textCursor();
|
QTextCursor cursor = textCursor();
|
||||||
const QString &autoText = d->m_autoCompleter->autoComplete(cursor, eventText);
|
const QString &autoText = dd()->m_autoCompleter->autoComplete(cursor, eventText);
|
||||||
|
|
||||||
QChar electricChar;
|
QChar electricChar;
|
||||||
if (d->m_document->typingSettings().m_autoIndent) {
|
if (d->m_document->typingSettings().m_autoIndent) {
|
||||||
@@ -2190,7 +2196,7 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
|
|||||||
//Select the inserted text, to be able to re-indent the inserted text
|
//Select the inserted text, to be able to re-indent the inserted text
|
||||||
cursor.setPosition(pos, QTextCursor::KeepAnchor);
|
cursor.setPosition(pos, QTextCursor::KeepAnchor);
|
||||||
}
|
}
|
||||||
if (!electricChar.isNull() && d->m_autoCompleter->contextAllowsElectricCharacters(cursor))
|
if (!electricChar.isNull() && dd()->m_autoCompleter->contextAllowsElectricCharacters(cursor))
|
||||||
d->m_document->autoIndent(cursor, electricChar);
|
d->m_document->autoIndent(cursor, electricChar);
|
||||||
if (!autoText.isEmpty())
|
if (!autoText.isEmpty())
|
||||||
cursor.setPosition(autoText.length() == 1 ? cursor.position() : cursor.anchor());
|
cursor.setPosition(autoText.length() == 1 ? cursor.position() : cursor.anchor());
|
||||||
@@ -2666,12 +2672,12 @@ int BaseTextEditorWidget::visibleWrapColumn() const
|
|||||||
return d->m_visibleWrapColumn;
|
return d->m_visibleWrapColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseTextEditorWidget::setAutoCompleter(AutoCompleter *autoCompleter)
|
void BaseTextEditor::setAutoCompleter(AutoCompleter *autoCompleter)
|
||||||
{
|
{
|
||||||
d->m_autoCompleter.reset(autoCompleter);
|
d->m_autoCompleter.reset(autoCompleter);
|
||||||
}
|
}
|
||||||
|
|
||||||
AutoCompleter *BaseTextEditorWidget::autoCompleter() const
|
AutoCompleter *BaseTextEditor::autoCompleter() const
|
||||||
{
|
{
|
||||||
return d->m_autoCompleter.data();
|
return d->m_autoCompleter.data();
|
||||||
}
|
}
|
||||||
@@ -2721,7 +2727,6 @@ BaseTextEditorWidgetPrivate::BaseTextEditorWidgetPrivate(BaseTextEditorWidget *p
|
|||||||
m_cursorBlockNumber(-1),
|
m_cursorBlockNumber(-1),
|
||||||
m_blockCount(0),
|
m_blockCount(0),
|
||||||
m_markDragging(false),
|
m_markDragging(false),
|
||||||
m_autoCompleter(new AutoCompleter),
|
|
||||||
m_clipboardAssistProvider(new Internal::ClipboardAssistProvider),
|
m_clipboardAssistProvider(new Internal::ClipboardAssistProvider),
|
||||||
m_isMissingSyntaxDefinition(false)
|
m_isMissingSyntaxDefinition(false)
|
||||||
{
|
{
|
||||||
@@ -5060,7 +5065,7 @@ void BaseTextEditorWidgetPrivate::handleBackspaceKey()
|
|||||||
const TextEditor::TabSettings &tabSettings = m_document->tabSettings();
|
const TextEditor::TabSettings &tabSettings = m_document->tabSettings();
|
||||||
const TextEditor::TypingSettings &typingSettings = m_document->typingSettings();
|
const TextEditor::TypingSettings &typingSettings = m_document->typingSettings();
|
||||||
|
|
||||||
if (typingSettings.m_autoIndent && m_autoCompleter->autoBackspace(cursor))
|
if (typingSettings.m_autoIndent && dd()->m_autoCompleter->autoBackspace(cursor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
@@ -6003,8 +6008,8 @@ void BaseTextEditorWidget::setStorageSettings(const StorageSettings &storageSett
|
|||||||
|
|
||||||
void BaseTextEditorWidget::setCompletionSettings(const TextEditor::CompletionSettings &completionSettings)
|
void BaseTextEditorWidget::setCompletionSettings(const TextEditor::CompletionSettings &completionSettings)
|
||||||
{
|
{
|
||||||
d->m_autoCompleter->setAutoParenthesesEnabled(completionSettings.m_autoInsertBrackets);
|
dd()->m_autoCompleter->setAutoParenthesesEnabled(completionSettings.m_autoInsertBrackets);
|
||||||
d->m_autoCompleter->setSurroundWithEnabled(completionSettings.m_autoInsertBrackets
|
dd()->m_autoCompleter->setSurroundWithEnabled(completionSettings.m_autoInsertBrackets
|
||||||
&& completionSettings.m_surroundingAutoBrackets);
|
&& completionSettings.m_surroundingAutoBrackets);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6678,6 +6683,11 @@ void BaseTextEditorWidget::doFoo() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BaseTextEditorPrivate *BaseTextEditorWidget::dd() const
|
||||||
|
{
|
||||||
|
return editor()->d;
|
||||||
|
}
|
||||||
|
|
||||||
BaseTextBlockSelection::BaseTextBlockSelection(const BaseTextBlockSelection &other)
|
BaseTextBlockSelection::BaseTextBlockSelection(const BaseTextBlockSelection &other)
|
||||||
{
|
{
|
||||||
positionBlock = other.positionBlock;
|
positionBlock = other.positionBlock;
|
||||||
|
@@ -130,7 +130,6 @@ public:
|
|||||||
|
|
||||||
static BaseTextEditor *currentTextEditor();
|
static BaseTextEditor *currentTextEditor();
|
||||||
|
|
||||||
friend class BaseTextEditorWidget;
|
|
||||||
BaseTextEditorWidget *editorWidget() const;
|
BaseTextEditorWidget *editorWidget() const;
|
||||||
BaseTextDocument *baseTextDocument();
|
BaseTextDocument *baseTextDocument();
|
||||||
|
|
||||||
@@ -195,6 +194,9 @@ public:
|
|||||||
|
|
||||||
QObject *fileEncodingLabel() const; // FIXME: Remove
|
QObject *fileEncodingLabel() const; // FIXME: Remove
|
||||||
|
|
||||||
|
void setAutoCompleter(AutoCompleter *autoCompleter);
|
||||||
|
AutoCompleter *autoCompleter() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void markRequested(TextEditor::BaseTextEditor *editor, int line, TextEditor::BaseTextEditor::MarkRequestKind kind);
|
void markRequested(TextEditor::BaseTextEditor *editor, int line, TextEditor::BaseTextEditor::MarkRequestKind kind);
|
||||||
void markContextMenuRequested(TextEditor::BaseTextEditor *editor, int line, QMenu *menu);
|
void markContextMenuRequested(TextEditor::BaseTextEditor *editor, int line, QMenu *menu);
|
||||||
@@ -210,6 +212,8 @@ private slots:
|
|||||||
void setFileEncodingLabelText(const QString &text);
|
void setFileEncodingLabelText(const QString &text);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
friend class Internal::BaseTextEditorWidgetPrivate;
|
||||||
|
friend class BaseTextEditorWidget;
|
||||||
Internal::BaseTextEditorPrivate *d;
|
Internal::BaseTextEditorPrivate *d;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -315,9 +319,6 @@ public:
|
|||||||
|
|
||||||
QRegion translatedLineRegion(int lineStart, int lineEnd) const;
|
QRegion translatedLineRegion(int lineStart, int lineEnd) const;
|
||||||
|
|
||||||
void setAutoCompleter(AutoCompleter *autoCompleter);
|
|
||||||
AutoCompleter *autoCompleter() const;
|
|
||||||
|
|
||||||
QPoint toolTipPosition(const QTextCursor &c) const;
|
QPoint toolTipPosition(const QTextCursor &c) const;
|
||||||
|
|
||||||
void invokeAssist(AssistKind assistKind, IAssistProvider *provider = 0);
|
void invokeAssist(AssistKind assistKind, IAssistProvider *provider = 0);
|
||||||
@@ -619,6 +620,7 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Internal::BaseTextEditorWidgetPrivate *d;
|
Internal::BaseTextEditorWidgetPrivate *d;
|
||||||
|
Internal::BaseTextEditorPrivate *dd() const;
|
||||||
friend class Internal::BaseTextEditorWidgetPrivate;
|
friend class Internal::BaseTextEditorWidgetPrivate;
|
||||||
friend class Internal::TextEditorOverlay;
|
friend class Internal::TextEditorOverlay;
|
||||||
friend class RefactorOverlay;
|
friend class RefactorOverlay;
|
||||||
|
Reference in New Issue
Block a user