2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2009-09-04 16:51:11 +02:00
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2009-09-04 16:51:11 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2009-09-04 16:51:11 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
|
|
|
|
** conditions see http://qt.digia.com/licensing. For further information
|
|
|
|
|
** use the contact form at http://qt.digia.com/contact-us.
|
2009-09-04 16:51:11 +02:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** 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.
|
2009-09-04 16:51:11 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2009-09-04 16:51:11 +02:00
|
|
|
|
2010-02-15 13:49:00 +01:00
|
|
|
#ifndef QMLJSMODELMANAGER_H
|
|
|
|
|
#define QMLJSMODELMANAGER_H
|
2009-09-04 16:51:11 +02:00
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
#include "qmljstools_global.h"
|
|
|
|
|
|
2010-06-09 15:56:03 +02:00
|
|
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
2013-05-21 11:35:15 +02:00
|
|
|
#include <qmljs/qmljsqrcparser.h>
|
2013-11-19 10:42:57 +01:00
|
|
|
#include <qmljs/qmljsconstants.h>
|
2011-01-20 14:03:07 +01:00
|
|
|
|
2011-08-18 16:46:26 +02:00
|
|
|
#include <cplusplus/CppDocument.h>
|
2013-11-12 10:58:32 +01:00
|
|
|
#include <utils/qtcoverride.h>
|
2009-12-02 17:59:27 +01:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QFuture>
|
|
|
|
|
#include <QFutureSynchronizer>
|
|
|
|
|
#include <QMutex>
|
2009-09-04 16:51:11 +02:00
|
|
|
|
2010-12-03 10:13:15 +01:00
|
|
|
QT_FORWARD_DECLARE_CLASS(QTimer)
|
2013-05-21 11:35:15 +02:00
|
|
|
QT_FORWARD_DECLARE_CLASS(QLocale)
|
2010-12-03 10:13:15 +01:00
|
|
|
|
2014-02-11 21:55:42 +02:00
|
|
|
namespace Core { class MimeType; }
|
2009-09-04 16:51:11 +02:00
|
|
|
|
2014-02-11 21:55:42 +02:00
|
|
|
namespace CPlusPlus { class CppModelManagerInterface; }
|
2011-08-18 16:46:26 +02:00
|
|
|
|
2014-02-11 21:55:42 +02:00
|
|
|
namespace QmlJS { class QrcParser; }
|
2013-05-21 11:35:15 +02:00
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
namespace QmlJSTools {
|
2011-09-09 10:55:11 +02:00
|
|
|
|
2009-09-04 16:51:11 +02:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2010-11-10 15:07:53 +01:00
|
|
|
class PluginDumper;
|
|
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
class QMLJSTOOLS_EXPORT ModelManager: public QmlJS::ModelManagerInterface
|
2009-09-04 16:51:11 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2010-02-15 13:49:00 +01:00
|
|
|
ModelManager(QObject *parent = 0);
|
2011-10-20 11:25:38 +02:00
|
|
|
~ModelManager();
|
2009-09-04 16:51:11 +02:00
|
|
|
|
2010-12-03 10:13:15 +01:00
|
|
|
void delayedInitialization();
|
2009-09-04 16:51:11 +02:00
|
|
|
protected:
|
2014-01-23 14:28:31 +01:00
|
|
|
QHash<QString, QmlJS::Language::Enum> languageForSuffix() const QTC_OVERRIDE;
|
|
|
|
|
void writeMessageInternal(const QString &msg) const QTC_OVERRIDE;
|
|
|
|
|
WorkingCopy workingCopyInternal() const QTC_OVERRIDE;
|
|
|
|
|
void addTaskInternal(QFuture<void> result, const QString &msg, const char *taskId) const QTC_OVERRIDE;
|
2014-07-24 11:48:30 +02:00
|
|
|
ProjectInfo defaultProjectInfoForProject(ProjectExplorer::Project *project) const QTC_OVERRIDE;
|
2014-06-30 11:56:28 +02:00
|
|
|
private slots:
|
|
|
|
|
void updateDefaultProjectInfo();
|
2009-09-04 16:51:11 +02:00
|
|
|
private:
|
2014-01-23 14:28:31 +01:00
|
|
|
void loadDefaultQmlTypeDescriptions();
|
2010-01-20 16:43:50 +01:00
|
|
|
static bool matchesMimeType(const Core::MimeType &fileMimeType, const Core::MimeType &knownMimeType);
|
2009-09-04 16:51:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
2012-12-06 17:20:58 +01:00
|
|
|
|
|
|
|
|
QMLJSTOOLS_EXPORT void setupProjectInfoQmlBundles(QmlJS::ModelManagerInterface::ProjectInfo &projectInfo);
|
|
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
} // namespace QmlJSTools
|
2009-09-04 16:51:11 +02:00
|
|
|
|
2010-02-15 13:49:00 +01:00
|
|
|
#endif // QMLJSMODELMANAGER_H
|