forked from qt-creator/qt-creator
TextEditor: More BaseText* -> Text* renamings
*Document* and *Layout* classes, all basetext* files Change-Id: I1c6e376733a434fcb5c7f19c6210dfa031eeafde Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#include "analyzerconstants.h"
|
||||
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef ANDROIDMANIFESTDOCUMENT_H
|
||||
#define ANDROIDMANIFESTDOCUMENT_H
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "androidmanifesteditorwidget.h"
|
||||
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QToolBar;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QLineEdit>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef ANDROIDMANIFESTEDITORWIDGET_H
|
||||
#define ANDROIDMANIFESTEDITORWIDGET_H
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QStackedWidget>
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#include "androidconstants.h"
|
||||
#include "javacompletionassistprovider.h"
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <utils/uncommentselection.h>
|
||||
#include <coreplugin/editormanager/ieditorfactory.h>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef JAVAEDITOR_H
|
||||
#define JAVAEDITOR_H
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/messagemanager.h>
|
||||
#include <diffeditor/differ.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/basetextdocumentlayout.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/textdocumentlayout.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/QtConcurrentTools>
|
||||
@@ -288,7 +288,7 @@ void BeautifierPlugin::formatCurrentFileContinue(QObject *watcher)
|
||||
if (const TextBlockUserData *userdata = static_cast<TextBlockUserData *>(block.userData())) {
|
||||
if (userdata->folded()) {
|
||||
foldedBlocks << block.blockNumber();
|
||||
BaseTextDocumentLayout::doFoldOrUnfold(block, true);
|
||||
TextDocumentLayout::doFoldOrUnfold(block, true);
|
||||
}
|
||||
}
|
||||
block = block.next();
|
||||
@@ -386,7 +386,7 @@ void BeautifierPlugin::formatCurrentFileContinue(QObject *watcher)
|
||||
for (int i = 0; i < total; ++i) {
|
||||
QTextBlock block = doc->findBlockByNumber(qMax(0, foldedBlocks.at(i)));
|
||||
if (block.isValid())
|
||||
BaseTextDocumentLayout::doFoldOrUnfold(block, false);
|
||||
TextDocumentLayout::doFoldOrUnfold(block, false);
|
||||
}
|
||||
|
||||
textEditor->document()->setModified(true);
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <coreplugin/actionmanager/command.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <utils/tooltip/tooltip.h>
|
||||
#include <utils/tooltip/tipcontents.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <coreplugin/inavigationwidgetfactory.h>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QMultiMap>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <coreplugin/actionmanager/command.h>
|
||||
#include <coreplugin/id.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
#include <cpptools/cppworkingcopy.h>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/convenience.h>
|
||||
#include <texteditor/codeassist/genericproposalmodel.h>
|
||||
#include <texteditor/codeassist/assistproposalitem.h>
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
#include <cpptools/cppcompletionassist.h>
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/codeassist/iassistproposal.h>
|
||||
#include <texteditor/codeassist/genericproposalmodel.h>
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QTextDocument>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <cplusplus/CppDocument.h>
|
||||
|
||||
namespace TextEditor { class IAssistProposal; }
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <coreplugin/progressmanager/progressmanager.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <QThread>
|
||||
#include <QMutex>
|
||||
|
||||
@@ -71,7 +71,7 @@ CMakeEditor::CMakeEditor()
|
||||
void CMakeEditor::finalizeInitialization()
|
||||
{
|
||||
connect(document(), &IDocument::changed, [this]() {
|
||||
TextDocument *document = textDocument();
|
||||
BaseTextDocument *document = textDocument();
|
||||
if (!document->isModified())
|
||||
return;
|
||||
InfoBar *infoBar = document->infoBar();
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#ifndef CMAKEEDITOR_H
|
||||
#define CMAKEEDITOR_H
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
namespace CMakeProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -48,10 +48,10 @@ enum { debug = 0 };
|
||||
namespace Core {
|
||||
|
||||
namespace Internal {
|
||||
class BaseTextDocumentPrivate
|
||||
class TextDocumentPrivate
|
||||
{
|
||||
public:
|
||||
BaseTextDocumentPrivate() : m_readResult(Utils::TextFileFormat::ReadSuccess) {}
|
||||
TextDocumentPrivate() : m_readResult(Utils::TextFileFormat::ReadSuccess) {}
|
||||
|
||||
Utils::TextFileFormat m_format;
|
||||
Utils::TextFileFormat::ReadResult m_readResult;
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
} // namespace Internal
|
||||
|
||||
BaseTextDocument::BaseTextDocument(QObject *parent) :
|
||||
IDocument(parent), d(new Internal::BaseTextDocumentPrivate)
|
||||
IDocument(parent), d(new Internal::TextDocumentPrivate)
|
||||
{
|
||||
setCodec(Core::EditorManager::defaultTextCodec());
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
namespace Core {
|
||||
|
||||
namespace Internal { class BaseTextDocumentPrivate; }
|
||||
namespace Internal { class TextDocumentPrivate; }
|
||||
|
||||
class CORE_EXPORT BaseTextDocument : public IDocument
|
||||
{
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
bool write(const QString &fileName, const Utils::TextFileFormat &format, const QString &data, QString *errorMessage) const;
|
||||
|
||||
private:
|
||||
Internal::BaseTextDocumentPrivate *d;
|
||||
Internal::TextDocumentPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include <coreplugin/messagemanager.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QDebug>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include <cpptools/cpptoolssettings.h>
|
||||
#include <cpptools/doxygengenerator.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QKeyEvent>
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
#include <cpptools/cppworkingcopy.h>
|
||||
#include <cpptools/symbolfinder.h>
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/basetextdocumentlayout.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/textdocumentlayout.h>
|
||||
#include <texteditor/codeassist/assistproposalitem.h>
|
||||
#include <texteditor/codeassist/genericproposalmodel.h>
|
||||
#include <texteditor/codeassist/genericproposal.h>
|
||||
@@ -706,7 +706,7 @@ void CppEditorWidget::onFunctionDeclDefLinkFound(QSharedPointer<FunctionDeclDefL
|
||||
d->m_declDefLink = link;
|
||||
IDocument *targetDocument = DocumentModel::documentForFilePath( d->m_declDefLink->targetFile->fileName());
|
||||
if (textDocument() != targetDocument) {
|
||||
if (auto textDocument = qobject_cast<TextDocument *>(targetDocument))
|
||||
if (auto textDocument = qobject_cast<BaseTextDocument *>(targetDocument))
|
||||
connect(textDocument, SIGNAL(contentsChanged()),
|
||||
this, SLOT(abortDeclDefLink()));
|
||||
}
|
||||
@@ -741,7 +741,7 @@ void CppEditorWidget::abortDeclDefLink()
|
||||
|
||||
IDocument *targetDocument = DocumentModel::documentForFilePath(d->m_declDefLink->targetFile->fileName());
|
||||
if (textDocument() != targetDocument) {
|
||||
if (auto textDocument = qobject_cast<TextDocument *>(targetDocument))
|
||||
if (auto textDocument = qobject_cast<BaseTextDocument *>(targetDocument))
|
||||
disconnect(textDocument, SIGNAL(contentsChanged()),
|
||||
this, SLOT(abortDeclDefLink()));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "cppfunctiondecldeflink.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
|
||||
#include <QScopedPointer>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <cpptools/cppsemanticinfo.h>
|
||||
#include <cpptools/editordocumenthandle.h>
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
|
||||
#include <QMutex>
|
||||
#include <QTimer>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define CPPELEMENTEVALUATOR_H
|
||||
|
||||
#include <cpptools/symbolfinder.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/helpitem.h>
|
||||
|
||||
#include <QString>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <cpptools/functionutils.h>
|
||||
#include <cpptools/cpptoolsreuse.h>
|
||||
#include <cpptools/symbolfinder.h>
|
||||
#include <texteditor/basetextdocumentlayout.h>
|
||||
#include <texteditor/textdocumentlayout.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QList>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#define CPPFOLLOWSYMBOLUNDERCURSOR_H
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QTextCursor;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <cpptools/cppdoxygen.h>
|
||||
#include <cpptools/cpptoolsreuse.h>
|
||||
#include <texteditor/basetextdocumentlayout.h>
|
||||
#include <texteditor/textdocumentlayout.h>
|
||||
|
||||
#include <cplusplus/SimpleLexer.h>
|
||||
#include <cplusplus/Lexer.h>
|
||||
@@ -89,7 +89,7 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
|
||||
initialLexerState &= ~0x80; // discard newline expected bit
|
||||
int foldingIndent = initialBraceDepth;
|
||||
if (TextBlockUserData *userData = BaseTextDocumentLayout::testUserData(currentBlock())) {
|
||||
if (TextBlockUserData *userData = TextDocumentLayout::testUserData(currentBlock())) {
|
||||
userData->setFoldingIndent(0);
|
||||
userData->setFoldingStartIncluded(false);
|
||||
userData->setFoldingEndIncluded(false);
|
||||
@@ -97,7 +97,7 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
|
||||
if (tokens.isEmpty()) {
|
||||
setCurrentBlockState((braceDepth << 8) | lexerState);
|
||||
BaseTextDocumentLayout::clearParentheses(currentBlock());
|
||||
TextDocumentLayout::clearParentheses(currentBlock());
|
||||
if (text.length()) {// the empty line can still contain whitespace
|
||||
if (initialLexerState == T_COMMENT)
|
||||
highlightLine(text, 0, text.length(), formatForCategory(CppCommentFormat));
|
||||
@@ -106,7 +106,7 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
else
|
||||
setFormat(0, text.length(), formatForCategory(CppVisualWhitespace));
|
||||
}
|
||||
BaseTextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent);
|
||||
TextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
// as if it were inside the folding block
|
||||
if (tk.utf16charsBegin() == firstNonSpace) {
|
||||
++foldingIndent;
|
||||
BaseTextDocumentLayout::userData(currentBlock())->setFoldingStartIncluded(true);
|
||||
TextDocumentLayout::userData(currentBlock())->setFoldingStartIncluded(true);
|
||||
}
|
||||
}
|
||||
} else if (tk.is(T_RPAREN) || tk.is(T_RBRACE) || tk.is(T_RBRACKET)) {
|
||||
@@ -155,7 +155,7 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
if (braceDepth < foldingIndent) {
|
||||
// unless we are at the end of the block, we reduce the folding indent
|
||||
if (i == tokens.size()-1 || tokens.at(i+1).is(T_SEMICOLON))
|
||||
BaseTextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);
|
||||
TextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);
|
||||
else
|
||||
foldingIndent = qMin(braceDepth, foldingIndent);
|
||||
}
|
||||
@@ -207,7 +207,7 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
--braceDepth;
|
||||
// unless we are at the end of the block, we reduce the folding indent
|
||||
if (i == tokens.size()-1)
|
||||
BaseTextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);
|
||||
TextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);
|
||||
else
|
||||
foldingIndent = qMin(braceDepth, foldingIndent);
|
||||
const int tokenEnd = tk.utf16charsBegin() + tk.utf16chars() - 1;
|
||||
@@ -248,17 +248,17 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
}
|
||||
}
|
||||
|
||||
BaseTextDocumentLayout::setParentheses(currentBlock(), parentheses);
|
||||
TextDocumentLayout::setParentheses(currentBlock(), parentheses);
|
||||
|
||||
// if the block is ifdefed out, we only store the parentheses, but
|
||||
|
||||
// do not adjust the brace depth.
|
||||
if (BaseTextDocumentLayout::ifdefedOut(currentBlock())) {
|
||||
if (TextDocumentLayout::ifdefedOut(currentBlock())) {
|
||||
braceDepth = initialBraceDepth;
|
||||
foldingIndent = initialBraceDepth;
|
||||
}
|
||||
|
||||
BaseTextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent);
|
||||
TextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent);
|
||||
|
||||
// optimization: if only the brace depth changes, we adjust subsequent blocks
|
||||
// to have QSyntaxHighlighter stop the rehighlighting
|
||||
@@ -267,13 +267,13 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
int oldState = currentState & 0xff;
|
||||
int oldBraceDepth = currentState >> 8;
|
||||
if (oldState == tokenize.state() && oldBraceDepth != braceDepth) {
|
||||
BaseTextDocumentLayout::FoldValidator foldValidor;
|
||||
foldValidor.setup(qobject_cast<BaseTextDocumentLayout *>(document()->documentLayout()));
|
||||
TextDocumentLayout::FoldValidator foldValidor;
|
||||
foldValidor.setup(qobject_cast<TextDocumentLayout *>(document()->documentLayout()));
|
||||
int delta = braceDepth - oldBraceDepth;
|
||||
QTextBlock block = currentBlock().next();
|
||||
while (block.isValid() && block.userState() != -1) {
|
||||
BaseTextDocumentLayout::changeBraceDepth(block, delta);
|
||||
BaseTextDocumentLayout::changeFoldingIndent(block, delta);
|
||||
TextDocumentLayout::changeBraceDepth(block, delta);
|
||||
TextDocumentLayout::changeFoldingIndent(block, delta);
|
||||
foldValidor.process(block);
|
||||
block = block.next();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "cppelementevaluator.h"
|
||||
|
||||
#include <coreplugin/helpmanager.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <cpptools/builtineditordocumentparser.h>
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
#include <cpptools/editordocumenthandle.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "cpplocalrenaming.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <cpptools/cpplocalsymbols.h>
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
#include <cpptools/cpptoolsreuse.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/convenience.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef CPPVIRTUALFUNCTIONPROPOSALITEM_H
|
||||
#define CPPVIRTUALFUNCTIONPROPOSALITEM_H
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/codeassist/assistproposalitem.h>
|
||||
|
||||
namespace CppEditor {
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <cpptools/cppworkingcopy.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <cplusplus/CppDocument.h>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "cppsemanticinfo.h"
|
||||
#include "cpptools_global.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "cpptoolsreuse.h"
|
||||
#include "cppworkingcopy.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/convenience.h>
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "cppcodeformatter.h"
|
||||
|
||||
#include <texteditor/basetextdocumentlayout.h>
|
||||
#include <texteditor/textdocumentlayout.h>
|
||||
#include <cplusplus/Lexer.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -1090,7 +1090,7 @@ int CodeFormatter::tokenizeBlock(const QTextBlock &block, bool *endedJoined)
|
||||
*endedJoined = tokenize.endedJoined();
|
||||
|
||||
const int lexerState = tokenize.state();
|
||||
BaseTextDocumentLayout::setLexerState(block, lexerState);
|
||||
TextDocumentLayout::setLexerState(block, lexerState);
|
||||
return lexerState;
|
||||
}
|
||||
|
||||
@@ -1143,7 +1143,7 @@ void QtStyleCodeFormatter::setCodeStyleSettings(const CppCodeStyleSettings &sett
|
||||
|
||||
void QtStyleCodeFormatter::saveBlockData(QTextBlock *block, const BlockData &data) const
|
||||
{
|
||||
TextBlockUserData *userData = BaseTextDocumentLayout::userData(*block);
|
||||
TextBlockUserData *userData = TextDocumentLayout::userData(*block);
|
||||
CppCodeFormatterData *cppData = static_cast<CppCodeFormatterData *>(userData->codeFormatterData());
|
||||
if (!cppData) {
|
||||
cppData = new CppCodeFormatterData;
|
||||
@@ -1154,7 +1154,7 @@ void QtStyleCodeFormatter::saveBlockData(QTextBlock *block, const BlockData &dat
|
||||
|
||||
bool QtStyleCodeFormatter::loadBlockData(const QTextBlock &block, BlockData *data) const
|
||||
{
|
||||
TextBlockUserData *userData = BaseTextDocumentLayout::testUserData(block);
|
||||
TextBlockUserData *userData = TextDocumentLayout::testUserData(block);
|
||||
if (!userData)
|
||||
return false;
|
||||
CppCodeFormatterData *cppData = static_cast<CppCodeFormatterData *>(userData->codeFormatterData());
|
||||
@@ -1167,12 +1167,12 @@ bool QtStyleCodeFormatter::loadBlockData(const QTextBlock &block, BlockData *dat
|
||||
|
||||
void QtStyleCodeFormatter::saveLexerState(QTextBlock *block, int state) const
|
||||
{
|
||||
BaseTextDocumentLayout::setLexerState(*block, state);
|
||||
TextDocumentLayout::setLexerState(*block, state);
|
||||
}
|
||||
|
||||
int QtStyleCodeFormatter::loadLexerState(const QTextBlock &block) const
|
||||
{
|
||||
return BaseTextDocumentLayout::lexerState(block);
|
||||
return TextDocumentLayout::lexerState(block);
|
||||
}
|
||||
|
||||
void QtStyleCodeFormatter::addContinuationIndent(int *paddingDepth) const
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <texteditor/codeassist/iassistproposal.h>
|
||||
#include <texteditor/convenience.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <utils/changeset.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <cplusplus/Symbol.h>
|
||||
#include <cplusplus/TypeOfExpression.h>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/codeassist/genericproposalmodel.h>
|
||||
#include <texteditor/codeassist/assistinterface.h>
|
||||
#include <texteditor/codeassist/iassistprocessor.h>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "cppprojects.h"
|
||||
|
||||
#include <projectexplorer/project.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
#include <cplusplus/cppmodelmanagerbase.h>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/plaintexteditorfactory.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "cpptoolstestcase.h"
|
||||
#include "editordocumenthandle.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "cpptoolstestcase.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/codeassist/iassistproposal.h>
|
||||
#include <texteditor/codeassist/iassistproposalmodel.h>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "cppsemanticinfo.h"
|
||||
#include "cpptools_global.h"
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/semantichighlighter.h>
|
||||
|
||||
#include <QFutureWatcher>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <projectexplorer/taskhub.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <utils/synchronousprocess.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/taskhub.h>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <utils/savedaction.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/editormanager/documentmodel.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <utils/tooltip/tooltip.h>
|
||||
#include <utils/tooltip/tipcontents.h>
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -117,7 +117,7 @@ DisassemblerAgentPrivate::DisassemblerAgentPrivate()
|
||||
resetLocationScheduled(false)
|
||||
{
|
||||
locationMark.setIcon(debuggerCore()->locationMarkIcon());
|
||||
locationMark.setPriority(TextEditor::TextMark::HighPriority);
|
||||
locationMark.setPriority(TextMark::HighPriority);
|
||||
}
|
||||
|
||||
DisassemblerAgentPrivate::~DisassemblerAgentPrivate()
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#include <projectexplorer/devicesupport/deviceprocess.h>
|
||||
#include <projectexplorer/itaskhandler.h>
|
||||
#include <projectexplorer/taskhub.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#include <utils/savedaction.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <debugger/watchhandler.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <qmljseditor/qmljseditorconstants.h>
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
#include <qmljs/consolemanagerinterface.h>
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/helpmanager.h>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef QMLLIVETEXTPREVIEW_H
|
||||
#define QMLLIVETEXTPREVIEW_H
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <qmljs/qmljsdocument.h>
|
||||
|
||||
namespace Core { class IEditor; }
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <debugger/debuggeractions.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <qmljs/consolemanagerinterface.h>
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "debuggercore.h"
|
||||
#include "stackhandler.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/textmark.h>
|
||||
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "watchdata.h"
|
||||
#include "watchutils.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <cpptools/abstracteditorsupport.h>
|
||||
#include <cpptools/cppprojectfile.h>
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "resourcehandler.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "designer_export.h"
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
namespace Designer {
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef FORMWINDOWFILE_H
|
||||
#define FORMWINDOWFILE_H
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <cpptools/symbolfinder.h>
|
||||
#include <cplusplus/Overview.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/minisplitter.h>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <texteditor/displaysettings.h>
|
||||
#include <texteditor/marginsettings.h>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "selectabletexteditorwidget.h"
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
|
||||
#include <QPainter>
|
||||
#include <QTextBlock>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define SELECTABLETEXTEDITORWIDGET_H
|
||||
|
||||
#include "diffeditor_global.h"
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
namespace DiffEditor {
|
||||
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
#include <QTextCodec>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/basetextdocumentlayout.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/textdocumentlayout.h>
|
||||
#include <texteditor/highlighterfactory.h>
|
||||
#include <texteditor/syntaxhighlighter.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/displaysettings.h>
|
||||
@@ -363,7 +363,7 @@ bool SideDiffEditorWidget::selectionVisible(int blockNumber) const
|
||||
bool SideDiffEditorWidget::replacementVisible(int blockNumber) const
|
||||
{
|
||||
return isChunkLine(blockNumber) || (isFileLine(blockNumber)
|
||||
&& TextEditor::BaseTextDocumentLayout::isFolded(
|
||||
&& TextEditor::TextDocumentLayout::isFolded(
|
||||
document()->findBlockByNumber(blockNumber)));
|
||||
}
|
||||
|
||||
@@ -531,7 +531,7 @@ void SideDiffEditorWidget::paintSeparator(QPainter &painter,
|
||||
const int replacementTextWidth = fontMetrics().width(replacementText) + 24;
|
||||
int x = replacementTextWidth + offset.x();
|
||||
if (x < document()->documentMargin()
|
||||
|| !TextEditor::BaseTextDocumentLayout::isFolded(block)) {
|
||||
|| !TextEditor::TextDocumentLayout::isFolded(block)) {
|
||||
x = document()->documentMargin();
|
||||
}
|
||||
const QString elidedText = fontMetrics().elidedText(text,
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
#include <QTextCodec>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/basetextdocumentlayout.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/textdocumentlayout.h>
|
||||
#include <texteditor/highlighterfactory.h>
|
||||
#include <texteditor/syntaxhighlighter.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/displaysettings.h>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <QPlainTextEdit>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "fakevimhandler.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <QtTest>
|
||||
#include <QTextEdit>
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <texteditor/basetextdocumentlayout.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/textdocumentlayout.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/textmark.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include <texteditor/typingsettings.h>
|
||||
@@ -1568,7 +1568,7 @@ void FakeVimPluginPrivate::foldToggle(int depth)
|
||||
QTC_ASSERT(handler != 0, return);
|
||||
|
||||
QTextBlock block = handler->textCursor().block();
|
||||
fold(depth, !BaseTextDocumentLayout::isFolded(block));
|
||||
fold(depth, !TextDocumentLayout::isFolded(block));
|
||||
}
|
||||
|
||||
void FakeVimPluginPrivate::foldAll(bool fold)
|
||||
@@ -1578,13 +1578,13 @@ void FakeVimPluginPrivate::foldAll(bool fold)
|
||||
QTC_ASSERT(editor != 0, return);
|
||||
|
||||
QTextDocument *doc = editor->document();
|
||||
BaseTextDocumentLayout *documentLayout =
|
||||
qobject_cast<BaseTextDocumentLayout*>(doc->documentLayout());
|
||||
TextDocumentLayout *documentLayout =
|
||||
qobject_cast<TextDocumentLayout*>(doc->documentLayout());
|
||||
QTC_ASSERT(documentLayout != 0, return);
|
||||
|
||||
QTextBlock block = editor->document()->firstBlock();
|
||||
while (block.isValid()) {
|
||||
BaseTextDocumentLayout::doFoldOrUnfold(block, !fold);
|
||||
TextDocumentLayout::doFoldOrUnfold(block, !fold);
|
||||
block = block.next();
|
||||
}
|
||||
|
||||
@@ -1601,25 +1601,25 @@ void FakeVimPluginPrivate::fold(int depth, bool fold)
|
||||
QTC_ASSERT(editor != 0, return);
|
||||
|
||||
QTextDocument *doc = editor->document();
|
||||
BaseTextDocumentLayout *documentLayout =
|
||||
qobject_cast<BaseTextDocumentLayout*>(doc->documentLayout());
|
||||
TextDocumentLayout *documentLayout =
|
||||
qobject_cast<TextDocumentLayout*>(doc->documentLayout());
|
||||
QTC_ASSERT(documentLayout != 0, return);
|
||||
|
||||
QTextBlock block = handler->textCursor().block();
|
||||
int indent = BaseTextDocumentLayout::foldingIndent(block);
|
||||
int indent = TextDocumentLayout::foldingIndent(block);
|
||||
if (fold) {
|
||||
if (BaseTextDocumentLayout::isFolded(block)) {
|
||||
while (block.isValid() && (BaseTextDocumentLayout::foldingIndent(block) >= indent
|
||||
if (TextDocumentLayout::isFolded(block)) {
|
||||
while (block.isValid() && (TextDocumentLayout::foldingIndent(block) >= indent
|
||||
|| !block.isVisible())) {
|
||||
block = block.previous();
|
||||
}
|
||||
}
|
||||
if (BaseTextDocumentLayout::canFold(block))
|
||||
if (TextDocumentLayout::canFold(block))
|
||||
++indent;
|
||||
while (depth != 0 && block.isValid()) {
|
||||
const int indent2 = BaseTextDocumentLayout::foldingIndent(block);
|
||||
if (BaseTextDocumentLayout::canFold(block) && indent2 < indent) {
|
||||
BaseTextDocumentLayout::doFoldOrUnfold(block, false);
|
||||
const int indent2 = TextDocumentLayout::foldingIndent(block);
|
||||
if (TextDocumentLayout::canFold(block) && indent2 < indent) {
|
||||
TextDocumentLayout::doFoldOrUnfold(block, false);
|
||||
if (depth > 0)
|
||||
--depth;
|
||||
indent = indent2;
|
||||
@@ -1627,21 +1627,21 @@ void FakeVimPluginPrivate::fold(int depth, bool fold)
|
||||
block = block.previous();
|
||||
}
|
||||
} else {
|
||||
if (BaseTextDocumentLayout::isFolded(block)) {
|
||||
if (TextDocumentLayout::isFolded(block)) {
|
||||
if (depth < 0) {
|
||||
// recursively open fold
|
||||
while (depth < 0 && block.isValid()
|
||||
&& BaseTextDocumentLayout::foldingIndent(block) >= indent) {
|
||||
if (BaseTextDocumentLayout::canFold(block)) {
|
||||
BaseTextDocumentLayout::doFoldOrUnfold(block, true);
|
||||
&& TextDocumentLayout::foldingIndent(block) >= indent) {
|
||||
if (TextDocumentLayout::canFold(block)) {
|
||||
TextDocumentLayout::doFoldOrUnfold(block, true);
|
||||
if (depth > 0)
|
||||
--depth;
|
||||
}
|
||||
block = block.next();
|
||||
}
|
||||
} else {
|
||||
if (BaseTextDocumentLayout::canFold(block)) {
|
||||
BaseTextDocumentLayout::doFoldOrUnfold(block, true);
|
||||
if (TextDocumentLayout::canFold(block)) {
|
||||
TextDocumentLayout::doFoldOrUnfold(block, true);
|
||||
if (depth > 0)
|
||||
--depth;
|
||||
}
|
||||
@@ -1667,10 +1667,10 @@ void FakeVimPluginPrivate::foldGoTo(int count, bool current)
|
||||
int repeat = count;
|
||||
block = block.next();
|
||||
QTextBlock prevBlock = block;
|
||||
int indent = BaseTextDocumentLayout::foldingIndent(block);
|
||||
int indent = TextDocumentLayout::foldingIndent(block);
|
||||
block = block.next();
|
||||
while (block.isValid()) {
|
||||
int newIndent = BaseTextDocumentLayout::foldingIndent(block);
|
||||
int newIndent = TextDocumentLayout::foldingIndent(block);
|
||||
if (current ? indent > newIndent : indent < newIndent) {
|
||||
if (prevBlock.isVisible()) {
|
||||
pos = prevBlock.position();
|
||||
@@ -1687,10 +1687,10 @@ void FakeVimPluginPrivate::foldGoTo(int count, bool current)
|
||||
}
|
||||
} else if (count < 0) {
|
||||
int repeat = -count;
|
||||
int indent = BaseTextDocumentLayout::foldingIndent(block);
|
||||
int indent = TextDocumentLayout::foldingIndent(block);
|
||||
block = block.previous();
|
||||
while (block.isValid()) {
|
||||
int newIndent = BaseTextDocumentLayout::foldingIndent(block);
|
||||
int newIndent = TextDocumentLayout::foldingIndent(block);
|
||||
if (current ? indent > newIndent : indent < newIndent) {
|
||||
while (block.isValid() && !block.isVisible())
|
||||
block = block.previous();
|
||||
@@ -1876,10 +1876,8 @@ void FakeVimPluginPrivate::setUseFakeVimInternal(bool on)
|
||||
// Context(FAKEVIM_CONTEXT));
|
||||
resetCommandBuffer();
|
||||
foreach (IEditor *editor, m_editorToHandler.keys()) {
|
||||
if (TextDocument *textDocument =
|
||||
qobject_cast<TextDocument *>(editor->document())) {
|
||||
if (TextDocument *textDocument = qobject_cast<TextDocument *>(editor->document()))
|
||||
m_editorToHandler[editor]->restoreWidget(textDocument->tabSettings().m_tabSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef GENERICPROJECTFILESEDITOR_H
|
||||
#define GENERICPROJECTFILESEDITOR_H
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
namespace GenericProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <vcsbase/vcsoutputwindow.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QRegExp>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef GLSLEDITOR_H
|
||||
#define GLSLEDITOR_H
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
namespace GlslEditor {
|
||||
namespace Internal {
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#include "glsleditor.h"
|
||||
#include <glsl/glsllexer.h>
|
||||
#include <glsl/glslparser.h>
|
||||
#include <texteditor/basetextdocumentlayout.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocumentlayout.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
@@ -93,7 +93,7 @@ void GlslHighlighter::highlightBlock(const QString &text)
|
||||
state = lex.state(); // refresh the state
|
||||
|
||||
int foldingIndent = initialBraceDepth;
|
||||
if (TextBlockUserData *userData = BaseTextDocumentLayout::testUserData(currentBlock())) {
|
||||
if (TextBlockUserData *userData = TextDocumentLayout::testUserData(currentBlock())) {
|
||||
userData->setFoldingIndent(0);
|
||||
userData->setFoldingStartIncluded(false);
|
||||
userData->setFoldingEndIncluded(false);
|
||||
@@ -101,10 +101,10 @@ void GlslHighlighter::highlightBlock(const QString &text)
|
||||
|
||||
if (tokens.isEmpty()) {
|
||||
setCurrentBlockState(previousState);
|
||||
BaseTextDocumentLayout::clearParentheses(currentBlock());
|
||||
TextDocumentLayout::clearParentheses(currentBlock());
|
||||
if (text.length()) // the empty line can still contain whitespace
|
||||
setFormat(0, text.length(), formatForCategory(GLSLVisualWhitespace));
|
||||
BaseTextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent);
|
||||
TextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ void GlslHighlighter::highlightBlock(const QString &text)
|
||||
// as if it were inside the folding block
|
||||
if (tk.begin() == firstNonSpace) {
|
||||
++foldingIndent;
|
||||
BaseTextDocumentLayout::userData(currentBlock())->setFoldingStartIncluded(true);
|
||||
TextDocumentLayout::userData(currentBlock())->setFoldingStartIncluded(true);
|
||||
}
|
||||
}
|
||||
} else if (tk.is(GLSL::Parser::T_RIGHT_PAREN) || tk.is(GLSL::Parser::T_RIGHT_BRACE) || tk.is(GLSL::Parser::T_RIGHT_BRACKET)) {
|
||||
@@ -151,7 +151,7 @@ void GlslHighlighter::highlightBlock(const QString &text)
|
||||
if (braceDepth < foldingIndent) {
|
||||
// unless we are at the end of the block, we reduce the folding indent
|
||||
if (i == tokens.size()-1 || tokens.at(i+1).is(GLSL::Parser::T_SEMICOLON))
|
||||
BaseTextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);
|
||||
TextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);
|
||||
else
|
||||
foldingIndent = qMin(braceDepth, foldingIndent);
|
||||
}
|
||||
@@ -184,7 +184,7 @@ void GlslHighlighter::highlightBlock(const QString &text)
|
||||
--braceDepth;
|
||||
// unless we are at the end of the block, we reduce the folding indent
|
||||
if (i == tokens.size()-1)
|
||||
BaseTextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);
|
||||
TextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);
|
||||
else
|
||||
foldingIndent = qMin(braceDepth, foldingIndent);
|
||||
const int tokenEnd = tk.begin() + tk.length - 1;
|
||||
@@ -217,17 +217,17 @@ void GlslHighlighter::highlightBlock(const QString &text)
|
||||
++braceDepth;
|
||||
}
|
||||
|
||||
BaseTextDocumentLayout::setParentheses(currentBlock(), parentheses);
|
||||
TextDocumentLayout::setParentheses(currentBlock(), parentheses);
|
||||
|
||||
// if the block is ifdefed out, we only store the parentheses, but
|
||||
|
||||
// do not adjust the brace depth.
|
||||
if (BaseTextDocumentLayout::ifdefedOut(currentBlock())) {
|
||||
if (TextDocumentLayout::ifdefedOut(currentBlock())) {
|
||||
braceDepth = initialBraceDepth;
|
||||
foldingIndent = initialBraceDepth;
|
||||
}
|
||||
|
||||
BaseTextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent);
|
||||
TextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent);
|
||||
|
||||
// optimization: if only the brace depth changes, we adjust subsequent blocks
|
||||
// to have QSyntaxHighlighter stop the rehighlighting
|
||||
@@ -239,8 +239,8 @@ void GlslHighlighter::highlightBlock(const QString &text)
|
||||
int delta = braceDepth - oldBraceDepth;
|
||||
QTextBlock block = currentBlock().next();
|
||||
while (block.isValid() && block.userState() != -1) {
|
||||
BaseTextDocumentLayout::changeBraceDepth(block, delta);
|
||||
BaseTextDocumentLayout::changeFoldingIndent(block, delta);
|
||||
TextDocumentLayout::changeBraceDepth(block, delta);
|
||||
TextDocumentLayout::changeFoldingIndent(block, delta);
|
||||
block = block.next();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/helpmanager.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
using namespace Core;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "macroevent.h"
|
||||
#include "macro.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "projectexplorer.h"
|
||||
#include "editorconfiguration.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <utils/filesearch.h>
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <coreplugin/id.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <texteditor/simplecodestylepreferences.h>
|
||||
#include <texteditor/typingsettings.h>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <coreplugin/progressmanager/progressmanager.h>
|
||||
#include <coreplugin/modemanager.h>
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/stylehelper.h>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef PYTHONEDITOR_EDITOR_H
|
||||
#define PYTHONEDITOR_EDITOR_H
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
namespace PythonEditor {
|
||||
namespace Internal {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "pythonhighlighter.h"
|
||||
#include "lexical/pythonscanner.h"
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
|
||||
namespace PythonEditor {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef PROFILEEDITOR_H
|
||||
#define PROFILEEDITOR_H
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
namespace QmakeProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <coreplugin/helpmanager.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <utils/htmldocextractor.h>
|
||||
|
||||
#include <QTextBlock>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "qmldesignercorelib_global.h"
|
||||
#include "plaintexteditmodifier.h"
|
||||
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/tabsettings.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <qmljs/qmljsscanner.h>
|
||||
#include <qmljstools/qmljssemanticinfo.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/quickfix.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include <utils/uncommentselection.h>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <qmljs/qmljsdocument.h>
|
||||
#include <qmljstools/qmljssemanticinfo.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
|
||||
#include <QTextLayout>
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ int QmlJSHighlighter::onBlockStart()
|
||||
m_braceDepth = 0;
|
||||
m_foldingIndent = 0;
|
||||
m_inMultilineComment = false;
|
||||
if (TextBlockUserData *userData = BaseTextDocumentLayout::testUserData(currentBlock())) {
|
||||
if (TextBlockUserData *userData = TextDocumentLayout::testUserData(currentBlock())) {
|
||||
userData->setFoldingIndent(0);
|
||||
userData->setFoldingStartIncluded(false);
|
||||
userData->setFoldingEndIncluded(false);
|
||||
@@ -310,8 +310,8 @@ int QmlJSHighlighter::onBlockStart()
|
||||
void QmlJSHighlighter::onBlockEnd(int state)
|
||||
{
|
||||
setCurrentBlockState((m_braceDepth << 8) | state);
|
||||
BaseTextDocumentLayout::setParentheses(currentBlock(), m_currentBlockParentheses);
|
||||
BaseTextDocumentLayout::setFoldingIndent(currentBlock(), m_foldingIndent);
|
||||
TextDocumentLayout::setParentheses(currentBlock(), m_currentBlockParentheses);
|
||||
TextDocumentLayout::setFoldingIndent(currentBlock(), m_foldingIndent);
|
||||
}
|
||||
|
||||
void QmlJSHighlighter::onOpeningParenthesis(QChar parenthesis, int pos, bool atStart)
|
||||
@@ -321,7 +321,7 @@ void QmlJSHighlighter::onOpeningParenthesis(QChar parenthesis, int pos, bool atS
|
||||
// if a folding block opens at the beginning of a line, treat the entire line
|
||||
// as if it were inside the folding block
|
||||
if (atStart)
|
||||
BaseTextDocumentLayout::userData(currentBlock())->setFoldingStartIncluded(true);
|
||||
TextDocumentLayout::userData(currentBlock())->setFoldingStartIncluded(true);
|
||||
}
|
||||
m_currentBlockParentheses.push_back(Parenthesis(Parenthesis::Opened, parenthesis, pos));
|
||||
}
|
||||
@@ -331,7 +331,7 @@ void QmlJSHighlighter::onClosingParenthesis(QChar parenthesis, int pos, bool atE
|
||||
if (parenthesis == QLatin1Char('}') || parenthesis == QLatin1Char(']') || parenthesis == QLatin1Char('-')) {
|
||||
--m_braceDepth;
|
||||
if (atEnd)
|
||||
BaseTextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);
|
||||
TextDocumentLayout::userData(currentBlock())->setFoldingEndIncluded(true);
|
||||
else
|
||||
m_foldingIndent = qMin(m_braceDepth, m_foldingIndent); // folding indent is the minimum brace depth of a block
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <qmljs/qmljsscanner.h>
|
||||
|
||||
#include <texteditor/basetextdocumentlayout.h>
|
||||
#include <texteditor/textdocumentlayout.h>
|
||||
#include <texteditor/syntaxhighlighter.h>
|
||||
|
||||
namespace QmlJSEditor {
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <qmljs/parser/qmljsastfwd_p.h>
|
||||
#include <qmljs/qmljsutils.h>
|
||||
#include <qmljs/qmljsqrcparser.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/helpitem.h>
|
||||
#include <utils/tooltip/tooltip.h>
|
||||
#include <utils/tooltip/tipcontents.h>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <qmljs/parser/qmljsastvisitor_p.h>
|
||||
#include <qmljs/qmljsstaticanalysismessage.h>
|
||||
#include <texteditor/syntaxhighlighter.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <qmljs/qmljsscopebuilder.h>
|
||||
#include <qmljs/qmljsevaluate.h>
|
||||
#include <qmljs/qmljsutils.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/tabsettings.h>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <qtsupport/qmldumptool.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
|
||||
#include <QDir>
|
||||
|
||||
@@ -47,7 +47,7 @@ CreatorCodeFormatter::CreatorCodeFormatter(const TextEditor::TabSettings &tabSet
|
||||
|
||||
void CreatorCodeFormatter::saveBlockData(QTextBlock *block, const BlockData &data) const
|
||||
{
|
||||
TextBlockUserData *userData = BaseTextDocumentLayout::userData(*block);
|
||||
TextBlockUserData *userData = TextDocumentLayout::userData(*block);
|
||||
QmlJSCodeFormatterData *cppData = static_cast<QmlJSCodeFormatterData *>(userData->codeFormatterData());
|
||||
if (!cppData) {
|
||||
cppData = new QmlJSCodeFormatterData;
|
||||
@@ -58,7 +58,7 @@ void CreatorCodeFormatter::saveBlockData(QTextBlock *block, const BlockData &dat
|
||||
|
||||
bool CreatorCodeFormatter::loadBlockData(const QTextBlock &block, BlockData *data) const
|
||||
{
|
||||
TextBlockUserData *userData = BaseTextDocumentLayout::testUserData(block);
|
||||
TextBlockUserData *userData = TextDocumentLayout::testUserData(block);
|
||||
if (!userData)
|
||||
return false;
|
||||
QmlJSCodeFormatterData *cppData = static_cast<QmlJSCodeFormatterData *>(userData->codeFormatterData());
|
||||
@@ -71,10 +71,10 @@ bool CreatorCodeFormatter::loadBlockData(const QTextBlock &block, BlockData *dat
|
||||
|
||||
void CreatorCodeFormatter::saveLexerState(QTextBlock *block, int state) const
|
||||
{
|
||||
BaseTextDocumentLayout::setLexerState(*block, state);
|
||||
TextDocumentLayout::setLexerState(*block, state);
|
||||
}
|
||||
|
||||
int CreatorCodeFormatter::loadLexerState(const QTextBlock &block) const
|
||||
{
|
||||
return BaseTextDocumentLayout::lexerState(block);
|
||||
return TextDocumentLayout::lexerState(block);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "qmljstools_global.h"
|
||||
|
||||
#include <texteditor/basetextdocumentlayout.h>
|
||||
#include <texteditor/textdocumentlayout.h>
|
||||
#include <qmljs/qmljscodeformatter.h>
|
||||
|
||||
namespace TextEditor { class TabSettings; }
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "qmljsindenter.h"
|
||||
|
||||
#include <qmljs/parser/qmljsast_p.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/tabsettings.h>
|
||||
#include <projectexplorer/editorconfiguration.h>
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/localapplicationrunconfiguration.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user