2010-07-07 11:45:18 +02:00
|
|
|
/**************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2012-01-26 18:33:46 +01:00
|
|
|
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
2010-07-07 11:45:18 +02:00
|
|
|
**
|
2012-07-19 12:26:56 +02:00
|
|
|
** Contact: http://www.qt-project.org/
|
2010-07-07 11:45:18 +02:00
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** 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.
|
2010-07-07 11:45:18 +02:00
|
|
|
**
|
2010-12-17 17:14:20 +01:00
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
2011-04-13 08:42:33 +02:00
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
2010-12-17 17:14:20 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Other Usage
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
|
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
|
|
|
**
|
2010-07-07 11:45:18 +02:00
|
|
|
**
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
#ifndef QMLJSTOOLS_H
|
|
|
|
|
#define QMLJSTOOLS_H
|
2010-07-07 11:45:18 +02:00
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
#include <extensionsystem/iplugin.h>
|
|
|
|
|
#include <projectexplorer/projectexplorer.h>
|
2010-07-07 11:45:18 +02:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QTextDocument>
|
|
|
|
|
#include <QSharedPointer>
|
2010-07-07 11:45:18 +02:00
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QFileInfo;
|
|
|
|
|
class QDir;
|
2011-06-23 15:12:03 +02:00
|
|
|
class QAction;
|
2010-11-11 10:05:05 +01:00
|
|
|
QT_END_NAMESPACE
|
2010-08-12 14:00:15 +02:00
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
namespace QmlJSTools {
|
2011-05-25 08:50:01 +02:00
|
|
|
|
|
|
|
|
class QmlJSToolsSettings;
|
|
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
namespace Internal {
|
2010-07-07 11:45:18 +02:00
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
class ModelManager;
|
|
|
|
|
|
|
|
|
|
class QmlJSToolsPlugin : public ExtensionSystem::IPlugin
|
2010-07-07 11:45:18 +02:00
|
|
|
{
|
2010-11-11 10:05:05 +01:00
|
|
|
Q_OBJECT
|
2012-02-21 16:52:28 +01:00
|
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QmlJSTools.json")
|
2011-07-13 18:02:35 +02:00
|
|
|
|
2010-07-07 11:45:18 +02:00
|
|
|
public:
|
2010-11-11 10:05:05 +01:00
|
|
|
static QmlJSToolsPlugin *instance() { return m_instance; }
|
2010-07-07 11:45:18 +02:00
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
QmlJSToolsPlugin();
|
|
|
|
|
~QmlJSToolsPlugin();
|
2010-07-07 11:45:18 +02:00
|
|
|
|
2011-09-21 13:05:15 +02:00
|
|
|
bool initialize(const QStringList &arguments, QString *errorMessage);
|
2010-11-11 10:05:05 +01:00
|
|
|
void extensionsInitialized();
|
|
|
|
|
ShutdownFlag aboutToShutdown();
|
|
|
|
|
ModelManager *modelManager() { return m_modelManager; }
|
2010-07-07 11:45:18 +02:00
|
|
|
|
2011-06-23 15:12:03 +02:00
|
|
|
private slots:
|
|
|
|
|
void onTaskStarted(const QString &type);
|
|
|
|
|
void onAllTasksFinished(const QString &type);
|
|
|
|
|
|
2011-11-15 11:02:32 +01:00
|
|
|
#ifdef WITH_TESTS
|
|
|
|
|
void test_basic();
|
|
|
|
|
#endif
|
|
|
|
|
|
2010-07-07 11:45:18 +02:00
|
|
|
private:
|
2010-11-11 10:05:05 +01:00
|
|
|
ModelManager *m_modelManager;
|
2011-05-25 08:50:01 +02:00
|
|
|
QmlJSToolsSettings *m_settings;
|
2011-06-23 15:12:03 +02:00
|
|
|
QAction *m_resetCodeModelAction;
|
2010-07-07 11:45:18 +02:00
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
static QmlJSToolsPlugin *m_instance;
|
2010-07-07 11:45:18 +02:00
|
|
|
};
|
|
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace CppTools
|
2010-07-07 11:45:18 +02:00
|
|
|
|
2010-11-11 10:05:05 +01:00
|
|
|
#endif // QMLJSTOOLS_H
|