forked from qt-creator/qt-creator
texteditor: merge ITextEditable into ITextEditor
rename BastTextEditor->BaseTextEditorWidget, BaseTextEditorEditable->BaseTextEditor
rename BaseTextEditor{,Widget} subclasses
rename editableInterface->editorInterface
rename createEditableInterface->createEditor
minor cleanups after renamings
This commit is contained in:
@@ -264,7 +264,7 @@ ExtensionSystem::IPlugin::ShutdownFlag QmlJSEditorPlugin::aboutToShutdown()
|
||||
return IPlugin::aboutToShutdown();
|
||||
}
|
||||
|
||||
void QmlJSEditorPlugin::initializeEditor(QmlJSEditor::QmlJSTextEditor *editor)
|
||||
void QmlJSEditorPlugin::initializeEditor(QmlJSEditor::QmlJSTextEditorWidget *editor)
|
||||
{
|
||||
QTC_ASSERT(m_instance, /**/);
|
||||
|
||||
@@ -277,14 +277,14 @@ void QmlJSEditorPlugin::followSymbolUnderCursor()
|
||||
{
|
||||
Core::EditorManager *em = Core::EditorManager::instance();
|
||||
|
||||
if (QmlJSTextEditor *editor = qobject_cast<QmlJSTextEditor*>(em->currentEditor()->widget()))
|
||||
if (QmlJSTextEditorWidget *editor = qobject_cast<QmlJSTextEditorWidget*>(em->currentEditor()->widget()))
|
||||
editor->followSymbolUnderCursor();
|
||||
}
|
||||
|
||||
void QmlJSEditorPlugin::findUsages()
|
||||
{
|
||||
Core::EditorManager *em = Core::EditorManager::instance();
|
||||
if (QmlJSTextEditor *editor = qobject_cast<QmlJSTextEditor*>(em->currentEditor()->widget()))
|
||||
if (QmlJSTextEditorWidget *editor = qobject_cast<QmlJSTextEditorWidget*>(em->currentEditor()->widget()))
|
||||
editor->findUsages();
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ void QmlJSEditorPlugin::showContextPane()
|
||||
{
|
||||
Core::EditorManager *em = Core::EditorManager::instance();
|
||||
|
||||
if (QmlJSTextEditor *editor = qobject_cast<QmlJSTextEditor*>(em->currentEditor()->widget()))
|
||||
if (QmlJSTextEditorWidget *editor = qobject_cast<QmlJSTextEditorWidget*>(em->currentEditor()->widget()))
|
||||
editor->showContextPane();
|
||||
|
||||
}
|
||||
@@ -311,7 +311,7 @@ Core::Command *QmlJSEditorPlugin::addToolAction(QAction *a, Core::ActionManager
|
||||
QmlJSQuickFixCollector *QmlJSEditorPlugin::quickFixCollector() const
|
||||
{ return m_quickFixCollector; }
|
||||
|
||||
void QmlJSEditorPlugin::quickFix(TextEditor::ITextEditable *editable)
|
||||
void QmlJSEditorPlugin::quickFix(TextEditor::ITextEditor *editable)
|
||||
{
|
||||
m_currentTextEditable = editable;
|
||||
quickFixNow();
|
||||
@@ -323,9 +323,9 @@ void QmlJSEditorPlugin::quickFixNow()
|
||||
return;
|
||||
|
||||
Core::EditorManager *em = Core::EditorManager::instance();
|
||||
QmlJSTextEditor *currentEditor = qobject_cast<QmlJSTextEditor*>(em->currentEditor()->widget());
|
||||
QmlJSTextEditorWidget *currentEditor = qobject_cast<QmlJSTextEditorWidget*>(em->currentEditor()->widget());
|
||||
|
||||
if (QmlJSTextEditor *editor = qobject_cast<QmlJSTextEditor*>(m_currentTextEditable->widget())) {
|
||||
if (QmlJSTextEditorWidget *editor = qobject_cast<QmlJSTextEditorWidget*>(m_currentTextEditable->widget())) {
|
||||
if (currentEditor == editor) {
|
||||
if (editor->isOutdated()) {
|
||||
// qDebug() << "TODO: outdated document" << editor->editorRevision() << editor->semanticInfo().revision();
|
||||
@@ -344,7 +344,7 @@ void QmlJSEditorPlugin::currentEditorChanged(Core::IEditor *editor)
|
||||
if (! editor)
|
||||
return;
|
||||
|
||||
else if (QmlJSTextEditor *textEditor = qobject_cast<QmlJSTextEditor *>(editor->widget())) {
|
||||
else if (QmlJSTextEditorWidget *textEditor = qobject_cast<QmlJSTextEditorWidget *>(editor->widget())) {
|
||||
textEditor->forceSemanticRehighlight();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user