Renamed qmlmodelmanager.

This commit is contained in:
Roberto Raggi
2010-02-15 13:49:00 +01:00
parent 52b04f5d99
commit 2a63387085
16 changed files with 55 additions and 55 deletions

View File

@@ -30,7 +30,7 @@
#include "qmljscodecompletion.h"
#include "qmlexpressionundercursor.h"
#include "qmljseditor.h"
#include "qmlmodelmanagerinterface.h"
#include "qmljsmodelmanagerinterface.h"
#include <qmljs/parser/qmljsast_p.h>
#include <qmljs/qmljsbind.h>
@@ -508,7 +508,7 @@ void FunctionArgumentWidget::updateHintText()
} } // end of namespace QmlJSEditor::Internal
CodeCompletion::CodeCompletion(QmlModelManagerInterface *modelManager, QObject *parent)
CodeCompletion::CodeCompletion(ModelManagerInterface *modelManager, QObject *parent)
: TextEditor::ICompletionCollector(parent),
m_modelManager(modelManager),
m_editor(0),

View File

@@ -41,7 +41,7 @@ class ITextEditable;
namespace QmlJSEditor {
class QmlModelManagerInterface;
class ModelManagerInterface;
namespace Internal {
@@ -52,7 +52,7 @@ class CodeCompletion: public TextEditor::ICompletionCollector
Q_OBJECT
public:
CodeCompletion(QmlModelManagerInterface *modelManager, QObject *parent = 0);
CodeCompletion(ModelManagerInterface *modelManager, QObject *parent = 0);
virtual ~CodeCompletion();
Qt::CaseSensitivity caseSensitivity() const;
@@ -77,7 +77,7 @@ private:
bool maybeTriggersCompletion(TextEditor::ITextEditable *editor);
bool isDelimiter(const QChar &ch) const;
QmlModelManagerInterface *m_modelManager;
ModelManagerInterface *m_modelManager;
TextEditor::ITextEditable *m_editor;
int m_startPosition;
QList<TextEditor::CompletionItem> m_completions;

View File

@@ -31,7 +31,7 @@
#include "qmljseditorconstants.h"
#include "qmljshighlighter.h"
#include "qmljseditorplugin.h"
#include "qmlmodelmanager.h"
#include "qmljsmodelmanager.h"
#include <qmljs/qmljsindenter.h>
#include <qmljs/qmljsinterpreter.h>
@@ -583,7 +583,7 @@ QmlJSTextEditor::QmlJSTextEditor(QWidget *parent) :
baseTextDocument()->setSyntaxHighlighter(new Highlighter(document()));
m_modelManager = ExtensionSystem::PluginManager::instance()->getObject<QmlModelManagerInterface>();
m_modelManager = ExtensionSystem::PluginManager::instance()->getObject<ModelManagerInterface>();
if (m_modelManager) {
connect(m_modelManager, SIGNAL(documentUpdated(QmlJS::Document::Ptr)),

View File

@@ -45,7 +45,7 @@ class ICore;
namespace QmlJSEditor {
class QmlModelManagerInterface;
class ModelManagerInterface;
namespace Internal {
@@ -178,7 +178,7 @@ private:
QTimer *m_updateDocumentTimer;
QTimer *m_updateUsesTimer;
QComboBox *m_methodCombo;
QmlModelManagerInterface *m_modelManager;
ModelManagerInterface *m_modelManager;
QTextCharFormat m_occurrencesFormat;
QTextCharFormat m_occurrencesUnusedFormat;
QTextCharFormat m_occurrenceRenameFormat;

View File

@@ -20,8 +20,8 @@ HEADERS += \
qmlfilewizard.h \
qmljshighlighter.h \
qmljshoverhandler.h \
qmlmodelmanager.h \
qmlmodelmanagerinterface.h
qmljsmodelmanager.h \
qmljsmodelmanagerinterface.h
SOURCES += \
qmljscodecompletion.cpp \
@@ -33,8 +33,8 @@ SOURCES += \
qmlfilewizard.cpp \
qmljshighlighter.cpp \
qmljshoverhandler.cpp \
qmlmodelmanager.cpp \
qmlmodelmanagerinterface.cpp
qmljsmodelmanager.cpp \
qmljsmodelmanagerinterface.cpp
RESOURCES += qmljseditor.qrc
OTHER_FILES += QmlJSEditor.pluginspec QmlJSEditor.mimetypes.xml

View File

@@ -34,7 +34,7 @@
#include "qmljseditorfactory.h"
#include "qmljscodecompletion.h"
#include "qmljshoverhandler.h"
#include "qmlmodelmanager.h"
#include "qmljsmodelmanager.h"
#include "qmlfilewizard.h"
#include <coreplugin/icore.h>
@@ -90,7 +90,7 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e
if (!core->mimeDatabase()->addMimeTypes(QLatin1String(":/qmljseditor/QmlJSEditor.mimetypes.xml"), error_message))
return false;
m_modelManager = new QmlModelManager(this);
m_modelManager = new ModelManager(this);
addAutoReleasedObject(m_modelManager);
QList<int> context;

View File

@@ -38,7 +38,7 @@ class TextEditorActionHandler;
namespace QmlJSEditor {
class QmlModelManagerInterface;
class ModelManagerInterface;
class QmlFileWizard;
namespace Internal {
@@ -70,7 +70,7 @@ public Q_SLOTS:
private:
static QmlJSEditorPlugin *m_instance;
QmlModelManagerInterface *m_modelManager;
ModelManagerInterface *m_modelManager;
QmlFileWizard *m_wizard;
QmlJSEditorFactory *m_editor;
TextEditor::TextEditorActionHandler *m_actionHandler;

View File

@@ -61,7 +61,7 @@ HoverHandler::HoverHandler(QObject *parent)
: QObject(parent)
, m_helpEngineNeedsSetup(false)
{
m_modelManager = ExtensionSystem::PluginManager::instance()->getObject<QmlModelManagerInterface>();
m_modelManager = ExtensionSystem::PluginManager::instance()->getObject<ModelManagerInterface>();
ICore *core = ICore::instance();
QFileInfo fi(core->settings()->fileName());

View File

@@ -30,7 +30,7 @@
#ifndef QMLJSHOVERHANDLER_H
#define QMLJSHOVERHANDLER_H
#include "qmlmodelmanagerinterface.h"
#include "qmljsmodelmanagerinterface.h"
#include <QtCore/QObject>
@@ -79,7 +79,7 @@ private:
QStringList *baseClasses) const;
private:
QmlModelManagerInterface *m_modelManager;
ModelManagerInterface *m_modelManager;
QHelpEngineCore *m_helpEngine;
QString m_helpId;
QString m_toolTip;

View File

@@ -28,7 +28,7 @@
**************************************************************************/
#include "qmljseditorconstants.h"
#include "qmlmodelmanager.h"
#include "qmljsmodelmanager.h"
#include "qmljseditor.h"
#include <coreplugin/icore.h>
@@ -47,8 +47,8 @@ using namespace QmlJS;
using namespace QmlJSEditor;
using namespace QmlJSEditor::Internal;
QmlModelManager::QmlModelManager(QObject *parent):
QmlModelManagerInterface(parent),
ModelManager::ModelManager(QObject *parent):
ModelManagerInterface(parent),
m_core(Core::ICore::instance())
{
m_synchronizer.setCancelOnWait(true);
@@ -59,19 +59,19 @@ QmlModelManager::QmlModelManager(QObject *parent):
this, SLOT(onDocumentUpdated(QmlJS::Document::Ptr)));
}
Snapshot QmlModelManager::snapshot() const
Snapshot ModelManager::snapshot() const
{
QMutexLocker locker(&m_mutex);
return _snapshot;
}
void QmlModelManager::updateSourceFiles(const QStringList &files)
void ModelManager::updateSourceFiles(const QStringList &files)
{
refreshSourceFiles(files);
}
QFuture<void> QmlModelManager::refreshSourceFiles(const QStringList &sourceFiles)
QFuture<void> ModelManager::refreshSourceFiles(const QStringList &sourceFiles)
{
if (sourceFiles.isEmpty()) {
return QFuture<void>();
@@ -79,7 +79,7 @@ QFuture<void> QmlModelManager::refreshSourceFiles(const QStringList &sourceFiles
const QMap<QString, WorkingCopy> workingCopy = buildWorkingCopyList();
QFuture<void> result = QtConcurrent::run(&QmlModelManager::parse,
QFuture<void> result = QtConcurrent::run(&ModelManager::parse,
workingCopy, sourceFiles,
this);
@@ -104,7 +104,7 @@ QFuture<void> QmlModelManager::refreshSourceFiles(const QStringList &sourceFiles
return result;
}
QMap<QString, QmlModelManager::WorkingCopy> QmlModelManager::buildWorkingCopyList()
QMap<QString, ModelManager::WorkingCopy> ModelManager::buildWorkingCopyList()
{
QMap<QString, WorkingCopy> workingCopy;
Core::EditorManager *editorManager = m_core->editorManager();
@@ -123,20 +123,20 @@ QMap<QString, QmlModelManager::WorkingCopy> QmlModelManager::buildWorkingCopyLis
return workingCopy;
}
void QmlModelManager::emitDocumentUpdated(Document::Ptr doc)
void ModelManager::emitDocumentUpdated(Document::Ptr doc)
{ emit documentUpdated(doc); }
void QmlModelManager::onDocumentUpdated(Document::Ptr doc)
void ModelManager::onDocumentUpdated(Document::Ptr doc)
{
QMutexLocker locker(&m_mutex);
_snapshot.insert(doc);
}
void QmlModelManager::parse(QFutureInterface<void> &future,
void ModelManager::parse(QFutureInterface<void> &future,
QMap<QString, WorkingCopy> workingCopy,
QStringList files,
QmlModelManager *modelManager)
ModelManager *modelManager)
{
Core::MimeDatabase *db = Core::ICore::instance()->mimeDatabase();
Core::MimeType jsSourceTy = db->findByType(QLatin1String("application/javascript"));
@@ -186,7 +186,7 @@ void QmlModelManager::parse(QFutureInterface<void> &future,
}
// Check whether fileMimeType is the same or extends knownMimeType
bool QmlModelManager::matchesMimeType(const Core::MimeType &fileMimeType, const Core::MimeType &knownMimeType)
bool ModelManager::matchesMimeType(const Core::MimeType &fileMimeType, const Core::MimeType &knownMimeType)
{
Core::MimeDatabase *db = Core::ICore::instance()->mimeDatabase();

View File

@@ -27,10 +27,10 @@
**
**************************************************************************/
#ifndef QMLMODELMANAGER_H
#define QMLMODELMANAGER_H
#ifndef QMLJSMODELMANAGER_H
#define QMLJSMODELMANAGER_H
#include "qmlmodelmanagerinterface.h"
#include "qmljsmodelmanagerinterface.h"
#include <qmljs/qmljsdocument.h>
@@ -46,12 +46,12 @@ class MimeType;
namespace QmlJSEditor {
namespace Internal {
class QmlModelManager: public QmlModelManagerInterface
class ModelManager: public ModelManagerInterface
{
Q_OBJECT
public:
QmlModelManager(QObject *parent = 0);
ModelManager(QObject *parent = 0);
virtual QmlJS::Snapshot snapshot() const;
virtual void updateSourceFiles(const QStringList &files);
@@ -80,7 +80,7 @@ protected:
static void parse(QFutureInterface<void> &future,
QMap<QString, WorkingCopy> workingCopy,
QStringList files,
QmlModelManager *modelManager);
ModelManager *modelManager);
private:
static bool matchesMimeType(const Core::MimeType &fileMimeType, const Core::MimeType &knownMimeType);
@@ -95,4 +95,4 @@ private:
} // namespace Internal
} // namespace QmlJSEditor
#endif // QMLMODELMANAGER_H
#endif // QMLJSMODELMANAGER_H

View File

@@ -27,15 +27,15 @@
**
**************************************************************************/
#include "qmlmodelmanagerinterface.h"
#include "qmljsmodelmanagerinterface.h"
using namespace QmlJSEditor;
QmlModelManagerInterface::QmlModelManagerInterface(QObject *parent):
ModelManagerInterface::ModelManagerInterface(QObject *parent):
QObject(parent)
{
}
QmlModelManagerInterface::~QmlModelManagerInterface()
ModelManagerInterface::~ModelManagerInterface()
{
}

View File

@@ -27,8 +27,8 @@
**
**************************************************************************/
#ifndef QMLMODELMANAGERINTERFACE_H
#define QMLMODELMANAGERINTERFACE_H
#ifndef QMLJSMODELMANAGERINTERFACE_H
#define QMLJSMODELMANAGERINTERFACE_H
#include "qmljseditor_global.h"
@@ -44,13 +44,13 @@ class Snapshot;
namespace QmlJSEditor {
class QMLJSEDITOR_EXPORT QmlModelManagerInterface: public QObject
class QMLJSEDITOR_EXPORT ModelManagerInterface: public QObject
{
Q_OBJECT
public:
QmlModelManagerInterface(QObject *parent = 0);
virtual ~QmlModelManagerInterface();
ModelManagerInterface(QObject *parent = 0);
virtual ~ModelManagerInterface();
virtual QmlJS::Snapshot snapshot() const = 0;
virtual void updateSourceFiles(const QStringList &files) = 0;
@@ -61,4 +61,4 @@ signals:
} // namespace QmlJSEditor
#endif // QMLMODELMANAGERINTERFACE_H
#endif // QMLJSMODELMANAGERINTERFACE_H