forked from qt-creator/qt-creator
Moved qmljsmodelmanagerinterface.h
This commit is contained in:
@@ -21,7 +21,8 @@ HEADERS += \
|
|||||||
$$PWD/qmljsscopebuilder.h \
|
$$PWD/qmljsscopebuilder.h \
|
||||||
$$PWD/qmljslineinfo.h \
|
$$PWD/qmljslineinfo.h \
|
||||||
$$PWD/qmljscompletioncontextfinder.h \
|
$$PWD/qmljscompletioncontextfinder.h \
|
||||||
$$PWD/qmljscomponentversion.h
|
$$PWD/qmljscomponentversion.h \
|
||||||
|
$$PWD/qmljsmodelmanagerinterface.h \
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/qmljsbind.cpp \
|
$$PWD/qmljsbind.cpp \
|
||||||
@@ -34,7 +35,8 @@ SOURCES += \
|
|||||||
$$PWD/qmljsscopebuilder.cpp \
|
$$PWD/qmljsscopebuilder.cpp \
|
||||||
$$PWD/qmljslineinfo.cpp \
|
$$PWD/qmljslineinfo.cpp \
|
||||||
$$PWD/qmljscompletioncontextfinder.cpp \
|
$$PWD/qmljscompletioncontextfinder.cpp \
|
||||||
$$PWD/qmljscomponentversion.cpp
|
$$PWD/qmljscomponentversion.cpp \
|
||||||
|
$$PWD/qmljsmodelmanagerinterface.cpp
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
$$PWD/parser/qmljs.g
|
$$PWD/parser/qmljs.g
|
||||||
|
42
src/libs/qmljs/qmljsmodelmanagerinterface.cpp
Normal file
42
src/libs/qmljs/qmljsmodelmanagerinterface.cpp
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/**************************************************************************
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator
|
||||||
|
**
|
||||||
|
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
**
|
||||||
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||||
|
**
|
||||||
|
** Commercial Usage
|
||||||
|
**
|
||||||
|
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||||
|
** accordance with the Qt Commercial License Agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Nokia.
|
||||||
|
**
|
||||||
|
** GNU Lesser General Public License Usage
|
||||||
|
**
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
|
**
|
||||||
|
** If you are unsure which license is appropriate for your use, please
|
||||||
|
** contact the sales department at http://qt.nokia.com/contact.
|
||||||
|
**
|
||||||
|
**************************************************************************/
|
||||||
|
|
||||||
|
#include "qmljsmodelmanagerinterface.h"
|
||||||
|
|
||||||
|
using namespace QmlJS;
|
||||||
|
|
||||||
|
ModelManagerInterface::ModelManagerInterface(QObject *parent)
|
||||||
|
: QObject(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ModelManagerInterface::~ModelManagerInterface()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@@ -30,21 +30,18 @@
|
|||||||
#ifndef QMLJSMODELMANAGERINTERFACE_H
|
#ifndef QMLJSMODELMANAGERINTERFACE_H
|
||||||
#define QMLJSMODELMANAGERINTERFACE_H
|
#define QMLJSMODELMANAGERINTERFACE_H
|
||||||
|
|
||||||
#include "qmljseditor_global.h"
|
#include "qmljs_global.h"
|
||||||
|
#include "qmljsdocument.h"
|
||||||
#include <qmljs/qmljsdocument.h>
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
|
|
||||||
namespace QmlJS {
|
namespace QmlJS {
|
||||||
|
|
||||||
class Snapshot;
|
class Snapshot;
|
||||||
}
|
|
||||||
|
|
||||||
namespace QmlJSEditor {
|
class QMLJS_EXPORT ModelManagerInterface: public QObject
|
||||||
|
|
||||||
class QMLJSEDITOR_EXPORT ModelManagerInterface: public QObject
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -67,6 +64,6 @@ signals:
|
|||||||
void aboutToRemoveFiles(const QStringList &files);
|
void aboutToRemoveFiles(const QStringList &files);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmlJSEditor
|
} // namespace QmlJS
|
||||||
|
|
||||||
#endif // QMLJSMODELMANAGERINTERFACE_H
|
#endif // QMLJSMODELMANAGERINTERFACE_H
|
@@ -31,11 +31,10 @@
|
|||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
#include <qmljs/qmljsdocument.h>
|
#include <qmljs/qmljsdocument.h>
|
||||||
#include <qmljseditor/qmljsmodelmanagerinterface.h>
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||||
#include <texteditor/tabsettings.h>
|
#include <texteditor/tabsettings.h>
|
||||||
|
|
||||||
using namespace QmlDesigner;
|
using namespace QmlDesigner;
|
||||||
using namespace QmlJSEditor;
|
|
||||||
|
|
||||||
BaseTextEditModifier::BaseTextEditModifier(TextEditor::BaseTextEditor *textEdit):
|
BaseTextEditModifier::BaseTextEditModifier(TextEditor::BaseTextEditor *textEdit):
|
||||||
PlainTextEditModifier(textEdit)
|
PlainTextEditModifier(textEdit)
|
||||||
@@ -69,16 +68,16 @@ int BaseTextEditModifier::indentDepth() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
static inline QmlJSEditor::ModelManagerInterface *getModelManager()
|
static inline QmlJS::ModelManagerInterface *getModelManager()
|
||||||
{
|
{
|
||||||
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
|
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
|
||||||
return pluginManager->getObject<QmlJSEditor::ModelManagerInterface>();
|
return pluginManager->getObject<QmlJS::ModelManagerInterface>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlJS::Snapshot BaseTextEditModifier::getSnapshot() const
|
QmlJS::Snapshot BaseTextEditModifier::getSnapshot() const
|
||||||
{
|
{
|
||||||
QmlJSEditor::ModelManagerInterface *modelManager = getModelManager();
|
QmlJS::ModelManagerInterface *modelManager = getModelManager();
|
||||||
if (modelManager)
|
if (modelManager)
|
||||||
return modelManager->snapshot();
|
return modelManager->snapshot();
|
||||||
else
|
else
|
||||||
@@ -87,7 +86,7 @@ QmlJS::Snapshot BaseTextEditModifier::getSnapshot() const
|
|||||||
|
|
||||||
QStringList BaseTextEditModifier::importPaths() const
|
QStringList BaseTextEditModifier::importPaths() const
|
||||||
{
|
{
|
||||||
QmlJSEditor::ModelManagerInterface *modelManager = getModelManager();
|
QmlJS::ModelManagerInterface *modelManager = getModelManager();
|
||||||
if (modelManager)
|
if (modelManager)
|
||||||
return modelManager->importPaths();
|
return modelManager->importPaths();
|
||||||
else
|
else
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
#include "propertytypefinder.h"
|
#include "propertytypefinder.h"
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
#include <qmljseditor/qmljsmodelmanagerinterface.h>
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||||
#include <qmljs/qmljsdocument.h>
|
#include <qmljs/qmljsdocument.h>
|
||||||
|
|
||||||
#include <QtGui/QApplication>
|
#include <QtGui/QApplication>
|
||||||
@@ -224,7 +224,7 @@ void ObjectPropertiesView::setPropertyValue(PropertiesViewItem *item, const QVar
|
|||||||
QString ObjectPropertiesView::propertyBaseClass(const QDeclarativeDebugObjectReference &object, const QDeclarativeDebugPropertyReference &property, int &depth)
|
QString ObjectPropertiesView::propertyBaseClass(const QDeclarativeDebugObjectReference &object, const QDeclarativeDebugPropertyReference &property, int &depth)
|
||||||
{
|
{
|
||||||
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
|
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
|
||||||
QmlJSEditor::ModelManagerInterface *modelManager = pluginManager->getObject<QmlJSEditor::ModelManagerInterface>();
|
QmlJS::ModelManagerInterface *modelManager = pluginManager->getObject<QmlJS::ModelManagerInterface>();
|
||||||
QmlJS::Snapshot snapshot = modelManager->snapshot();
|
QmlJS::Snapshot snapshot = modelManager->snapshot();
|
||||||
|
|
||||||
QmlJS::Document::Ptr document = snapshot.document(object.source().url().path());
|
QmlJS::Document::Ptr document = snapshot.document(object.source().url().path());
|
||||||
|
@@ -30,8 +30,8 @@
|
|||||||
#include "qmljscodecompletion.h"
|
#include "qmljscodecompletion.h"
|
||||||
#include "qmlexpressionundercursor.h"
|
#include "qmlexpressionundercursor.h"
|
||||||
#include "qmljseditor.h"
|
#include "qmljseditor.h"
|
||||||
#include "qmljsmodelmanagerinterface.h"
|
|
||||||
|
|
||||||
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||||
#include <qmljs/parser/qmljsast_p.h>
|
#include <qmljs/parser/qmljsast_p.h>
|
||||||
#include <qmljs/qmljsbind.h>
|
#include <qmljs/qmljsbind.h>
|
||||||
#include <qmljs/qmljsinterpreter.h>
|
#include <qmljs/qmljsinterpreter.h>
|
||||||
|
@@ -40,6 +40,8 @@ class ITextEditable;
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace QmlJS {
|
namespace QmlJS {
|
||||||
|
class ModelManagerInterface;
|
||||||
|
|
||||||
namespace Interpreter {
|
namespace Interpreter {
|
||||||
class Value;
|
class Value;
|
||||||
}
|
}
|
||||||
@@ -47,8 +49,6 @@ namespace QmlJS {
|
|||||||
|
|
||||||
namespace QmlJSEditor {
|
namespace QmlJSEditor {
|
||||||
|
|
||||||
class ModelManagerInterface;
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class FunctionArgumentWidget;
|
class FunctionArgumentWidget;
|
||||||
@@ -58,7 +58,7 @@ class CodeCompletion: public TextEditor::ICompletionCollector
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CodeCompletion(ModelManagerInterface *modelManager, QObject *parent = 0);
|
CodeCompletion(QmlJS::ModelManagerInterface *modelManager, QObject *parent = 0);
|
||||||
virtual ~CodeCompletion();
|
virtual ~CodeCompletion();
|
||||||
|
|
||||||
virtual TextEditor::ITextEditable *editor() const;
|
virtual TextEditor::ITextEditable *editor() const;
|
||||||
@@ -88,7 +88,7 @@ private:
|
|||||||
const QHash<QString, const QmlJS::Interpreter::Value *> &newCompletions,
|
const QHash<QString, const QmlJS::Interpreter::Value *> &newCompletions,
|
||||||
const QIcon &icon, int relevance);
|
const QIcon &icon, int relevance);
|
||||||
|
|
||||||
ModelManagerInterface *m_modelManager;
|
QmlJS::ModelManagerInterface *m_modelManager;
|
||||||
TextEditor::ITextEditable *m_editor;
|
TextEditor::ITextEditable *m_editor;
|
||||||
int m_startPosition;
|
int m_startPosition;
|
||||||
QList<TextEditor::CompletionItem> m_completions;
|
QList<TextEditor::CompletionItem> m_completions;
|
||||||
|
@@ -1430,7 +1430,7 @@ SemanticInfo SemanticHighlighter::semanticInfo(const Source &source)
|
|||||||
return semanticInfo;
|
return semanticInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SemanticHighlighter::setModelManager(QmlJSEditor::ModelManagerInterface *modelManager)
|
void SemanticHighlighter::setModelManager(QmlJS::ModelManagerInterface *modelManager)
|
||||||
{
|
{
|
||||||
m_modelManager = modelManager;
|
m_modelManager = modelManager;
|
||||||
}
|
}
|
||||||
|
@@ -47,9 +47,11 @@ namespace Core {
|
|||||||
class ICore;
|
class ICore;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace QmlJSEditor {
|
namespace QmlJS {
|
||||||
|
class ModelManagerInterface;
|
||||||
|
}
|
||||||
|
|
||||||
class ModelManagerInterface;
|
namespace QmlJSEditor {
|
||||||
class Highlighter;
|
class Highlighter;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -176,7 +178,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
void rehighlight(const Source &source);
|
void rehighlight(const Source &source);
|
||||||
void setModelManager(ModelManagerInterface *modelManager);
|
void setModelManager(QmlJS::ModelManagerInterface *modelManager);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void changed(const QmlJSEditor::Internal::SemanticInfo &semanticInfo);
|
void changed(const QmlJSEditor::Internal::SemanticInfo &semanticInfo);
|
||||||
@@ -194,7 +196,7 @@ private:
|
|||||||
bool m_done;
|
bool m_done;
|
||||||
Source m_source;
|
Source m_source;
|
||||||
SemanticInfo m_lastSemanticInfo;
|
SemanticInfo m_lastSemanticInfo;
|
||||||
ModelManagerInterface *m_modelManager;
|
QmlJS::ModelManagerInterface *m_modelManager;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QmlJSTextEditor : public TextEditor::BaseTextEditor
|
class QmlJSTextEditor : public TextEditor::BaseTextEditor
|
||||||
@@ -265,7 +267,7 @@ private:
|
|||||||
QTimer *m_updateUsesTimer;
|
QTimer *m_updateUsesTimer;
|
||||||
QTimer *m_semanticRehighlightTimer;
|
QTimer *m_semanticRehighlightTimer;
|
||||||
QComboBox *m_methodCombo;
|
QComboBox *m_methodCombo;
|
||||||
ModelManagerInterface *m_modelManager;
|
QmlJS::ModelManagerInterface *m_modelManager;
|
||||||
QTextCharFormat m_occurrencesFormat;
|
QTextCharFormat m_occurrencesFormat;
|
||||||
QTextCharFormat m_occurrencesUnusedFormat;
|
QTextCharFormat m_occurrencesUnusedFormat;
|
||||||
QTextCharFormat m_occurrenceRenameFormat;
|
QTextCharFormat m_occurrenceRenameFormat;
|
||||||
|
@@ -21,7 +21,6 @@ HEADERS += \
|
|||||||
qmljshighlighter.h \
|
qmljshighlighter.h \
|
||||||
qmljshoverhandler.h \
|
qmljshoverhandler.h \
|
||||||
qmljsmodelmanager.h \
|
qmljsmodelmanager.h \
|
||||||
qmljsmodelmanagerinterface.h \
|
|
||||||
qmljspreviewrunner.h \
|
qmljspreviewrunner.h \
|
||||||
qmljsquickfix.h
|
qmljsquickfix.h
|
||||||
|
|
||||||
@@ -36,7 +35,6 @@ SOURCES += \
|
|||||||
qmljshighlighter.cpp \
|
qmljshighlighter.cpp \
|
||||||
qmljshoverhandler.cpp \
|
qmljshoverhandler.cpp \
|
||||||
qmljsmodelmanager.cpp \
|
qmljsmodelmanager.cpp \
|
||||||
qmljsmodelmanagerinterface.cpp \
|
|
||||||
qmljspreviewrunner.cpp \
|
qmljspreviewrunner.cpp \
|
||||||
qmljsquickfix.cpp
|
qmljsquickfix.cpp
|
||||||
|
|
||||||
|
@@ -50,9 +50,12 @@ namespace TextEditor {
|
|||||||
class ITextEditable;
|
class ITextEditable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace QmlJS {
|
||||||
|
class ModelManagerInterface;
|
||||||
|
}
|
||||||
|
|
||||||
namespace QmlJSEditor {
|
namespace QmlJSEditor {
|
||||||
|
|
||||||
class ModelManagerInterface;
|
|
||||||
class QmlFileWizard;
|
class QmlFileWizard;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -98,7 +101,7 @@ private:
|
|||||||
QAction *m_actionPreview;
|
QAction *m_actionPreview;
|
||||||
QmlJSPreviewRunner *m_previewRunner;
|
QmlJSPreviewRunner *m_previewRunner;
|
||||||
|
|
||||||
ModelManagerInterface *m_modelManager;
|
QmlJS::ModelManagerInterface *m_modelManager;
|
||||||
QmlFileWizard *m_wizard;
|
QmlFileWizard *m_wizard;
|
||||||
QmlJSEditorFactory *m_editor;
|
QmlJSEditorFactory *m_editor;
|
||||||
TextEditor::TextEditorActionHandler *m_actionHandler;
|
TextEditor::TextEditorActionHandler *m_actionHandler;
|
||||||
|
@@ -63,7 +63,7 @@ HoverHandler::HoverHandler(QObject *parent)
|
|||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_helpEngineNeedsSetup(false)
|
, m_helpEngineNeedsSetup(false)
|
||||||
{
|
{
|
||||||
m_modelManager = ExtensionSystem::PluginManager::instance()->getObject<ModelManagerInterface>();
|
m_modelManager = ExtensionSystem::PluginManager::instance()->getObject<QmlJS::ModelManagerInterface>();
|
||||||
|
|
||||||
ICore *core = ICore::instance();
|
ICore *core = ICore::instance();
|
||||||
QFileInfo fi(core->settings()->fileName());
|
QFileInfo fi(core->settings()->fileName());
|
||||||
|
@@ -30,8 +30,7 @@
|
|||||||
#ifndef QMLJSHOVERHANDLER_H
|
#ifndef QMLJSHOVERHANDLER_H
|
||||||
#define QMLJSHOVERHANDLER_H
|
#define QMLJSHOVERHANDLER_H
|
||||||
|
|
||||||
#include "qmljsmodelmanagerinterface.h"
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@@ -79,7 +78,7 @@ private:
|
|||||||
QStringList *baseClasses) const;
|
QStringList *baseClasses) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ModelManagerInterface *m_modelManager;
|
QmlJS::ModelManagerInterface *m_modelManager;
|
||||||
QHelpEngineCore *m_helpEngine;
|
QHelpEngineCore *m_helpEngine;
|
||||||
QString m_helpId;
|
QString m_helpId;
|
||||||
QString m_toolTip;
|
QString m_toolTip;
|
||||||
|
@@ -30,8 +30,7 @@
|
|||||||
#ifndef QMLJSMODELMANAGER_H
|
#ifndef QMLJSMODELMANAGER_H
|
||||||
#define QMLJSMODELMANAGER_H
|
#define QMLJSMODELMANAGER_H
|
||||||
|
|
||||||
#include "qmljsmodelmanagerinterface.h"
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||||
|
|
||||||
#include <qmljs/qmljsdocument.h>
|
#include <qmljs/qmljsdocument.h>
|
||||||
|
|
||||||
#include <QFuture>
|
#include <QFuture>
|
||||||
@@ -47,7 +46,7 @@ class MimeType;
|
|||||||
namespace QmlJSEditor {
|
namespace QmlJSEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class ModelManager: public ModelManagerInterface
|
class ModelManager: public QmlJS::ModelManagerInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@@ -35,9 +35,11 @@
|
|||||||
#include <qmljs/parser/qmljsastfwd_p.h>
|
#include <qmljs/parser/qmljsastfwd_p.h>
|
||||||
#include <qmljs/qmljsdocument.h>
|
#include <qmljs/qmljsdocument.h>
|
||||||
|
|
||||||
namespace QmlJSEditor {
|
namespace QmlJS {
|
||||||
|
class ModelManagerInterface;
|
||||||
|
}
|
||||||
|
|
||||||
class ModelManagerInterface;
|
namespace QmlJSEditor {
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
#include <coreplugin/messagemanager.h>
|
#include <coreplugin/messagemanager.h>
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
#include <projectexplorer/filewatcher.h>
|
#include <projectexplorer/filewatcher.h>
|
||||||
#include <qmljseditor/qmljsmodelmanagerinterface.h>
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||||
|
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <QDeclarativeComponent>
|
#include <QDeclarativeComponent>
|
||||||
@@ -48,7 +48,7 @@ namespace QmlProjectManager {
|
|||||||
QmlProject::QmlProject(Internal::Manager *manager, const QString &fileName)
|
QmlProject::QmlProject(Internal::Manager *manager, const QString &fileName)
|
||||||
: m_manager(manager),
|
: m_manager(manager),
|
||||||
m_fileName(fileName),
|
m_fileName(fileName),
|
||||||
m_modelManager(ExtensionSystem::PluginManager::instance()->getObject<QmlJSEditor::ModelManagerInterface>()),
|
m_modelManager(ExtensionSystem::PluginManager::instance()->getObject<QmlJS::ModelManagerInterface>()),
|
||||||
m_fileWatcher(new ProjectExplorer::FileWatcher(this)),
|
m_fileWatcher(new ProjectExplorer::FileWatcher(this)),
|
||||||
m_targetFactory(new Internal::QmlProjectTargetFactory(this))
|
m_targetFactory(new Internal::QmlProjectTargetFactory(this))
|
||||||
{
|
{
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#include <QtDeclarative/QDeclarativeEngine>
|
#include <QtDeclarative/QDeclarativeEngine>
|
||||||
|
|
||||||
namespace QmlJSEditor {
|
namespace QmlJS {
|
||||||
class ModelManagerInterface;
|
class ModelManagerInterface;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ private:
|
|||||||
QString m_fileName;
|
QString m_fileName;
|
||||||
Internal::QmlProjectFile *m_file;
|
Internal::QmlProjectFile *m_file;
|
||||||
QString m_projectName;
|
QString m_projectName;
|
||||||
QmlJSEditor::ModelManagerInterface *m_modelManager;
|
QmlJS::ModelManagerInterface *m_modelManager;
|
||||||
|
|
||||||
// plain format
|
// plain format
|
||||||
QStringList m_files;
|
QStringList m_files;
|
||||||
|
@@ -47,7 +47,7 @@
|
|||||||
#include <texteditor/texteditoractionhandler.h>
|
#include <texteditor/texteditoractionhandler.h>
|
||||||
|
|
||||||
#include <projectexplorer/taskwindow.h>
|
#include <projectexplorer/taskwindow.h>
|
||||||
#include <qmljseditor/qmljsmodelmanagerinterface.h>
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||||
|
|
||||||
#include <QtCore/QtPlugin>
|
#include <QtCore/QtPlugin>
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ void QmlProjectPlugin::extensionsInitialized()
|
|||||||
ProjectExplorer::TaskWindow *taskWindow = pluginManager->getObject<ProjectExplorer::TaskWindow>();
|
ProjectExplorer::TaskWindow *taskWindow = pluginManager->getObject<ProjectExplorer::TaskWindow>();
|
||||||
m_qmlTaskManager->setTaskWindow(taskWindow);
|
m_qmlTaskManager->setTaskWindow(taskWindow);
|
||||||
|
|
||||||
QmlJSEditor::ModelManagerInterface *modelManager = pluginManager->getObject<QmlJSEditor::ModelManagerInterface>();
|
QmlJS::ModelManagerInterface *modelManager = pluginManager->getObject<QmlJS::ModelManagerInterface>();
|
||||||
Q_ASSERT(modelManager);
|
Q_ASSERT(modelManager);
|
||||||
connect(modelManager, SIGNAL(documentChangedOnDisk(QmlJS::Document::Ptr)),
|
connect(modelManager, SIGNAL(documentChangedOnDisk(QmlJS::Document::Ptr)),
|
||||||
m_qmlTaskManager, SLOT(documentChangedOnDisk(QmlJS::Document::Ptr)));
|
m_qmlTaskManager, SLOT(documentChangedOnDisk(QmlJS::Document::Ptr)));
|
||||||
|
Reference in New Issue
Block a user