2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2008-12-02 12:01:29 +01: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
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2010-12-17 16:01:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2013-10-29 16:08:37 +01:00
|
|
|
#ifndef QMAKEPROJECTMANAGERPLUGIN_H
|
|
|
|
|
#define QMAKEPROJECTMANAGERPLUGIN_H
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-03-17 17:45:33 +01:00
|
|
|
#include <extensionsystem/iplugin.h>
|
2010-07-02 13:43:41 +02:00
|
|
|
#include <coreplugin/icontext.h>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-03-17 17:45:33 +01:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QAction;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
namespace ProjectExplorer {
|
2012-04-24 15:49:09 +02:00
|
|
|
class Node;
|
|
|
|
|
class Project;
|
2012-09-03 18:31:44 +02:00
|
|
|
class KitInformation;
|
2012-04-24 15:49:09 +02:00
|
|
|
class Target;
|
2010-03-17 17:45:33 +01:00
|
|
|
}
|
2012-04-12 15:56:02 +04:00
|
|
|
namespace Utils { class ParameterAction; }
|
|
|
|
|
|
2013-10-16 11:02:37 +02:00
|
|
|
namespace QmakeProjectManager {
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2013-10-29 15:15:10 +01:00
|
|
|
class QmakeManager;
|
2013-10-29 14:22:31 +01:00
|
|
|
class QmakeProject;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2013-10-29 15:15:10 +01:00
|
|
|
class QmakeProjectManagerPlugin : public ExtensionSystem::IPlugin
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2013-10-29 16:19:24 +01:00
|
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QmakeProjectManager.json")
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
public:
|
2013-10-29 15:15:10 +01:00
|
|
|
~QmakeProjectManagerPlugin();
|
2011-09-21 13:05:15 +02:00
|
|
|
bool initialize(const QStringList &arguments, QString *errorMessage);
|
2008-12-02 12:01:29 +01:00
|
|
|
void extensionsInitialized();
|
|
|
|
|
|
|
|
|
|
private slots:
|
2015-02-23 12:45:53 +01:00
|
|
|
void projectChanged();
|
2011-10-28 10:15:04 +00:00
|
|
|
void activeTargetChanged();
|
|
|
|
|
void updateRunQMakeAction();
|
2012-05-11 07:29:45 +03:00
|
|
|
void updateContextActions(ProjectExplorer::Node *node, ProjectExplorer::Project *project);
|
2008-12-02 12:01:29 +01:00
|
|
|
void buildStateChanged(ProjectExplorer::Project *pro);
|
2013-04-30 15:12:48 +02:00
|
|
|
void updateBuildFileAction();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
#ifdef WITH_TESTS
|
2010-11-08 13:37:44 +01:00
|
|
|
void testQmakeOutputParsers_data();
|
|
|
|
|
void testQmakeOutputParsers();
|
2008-12-02 12:01:29 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
private:
|
2015-06-18 15:14:06 +02:00
|
|
|
QmakeManager *m_qmakeProjectManager = nullptr;
|
|
|
|
|
QmakeProject *m_previousStartupProject = nullptr;
|
|
|
|
|
ProjectExplorer::Target *m_previousTarget = nullptr;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2015-06-18 15:14:06 +02:00
|
|
|
QAction *m_runQMakeAction = nullptr;
|
|
|
|
|
QAction *m_runQMakeActionContextMenu = nullptr;
|
|
|
|
|
Utils::ParameterAction *m_buildSubProjectContextMenu = nullptr;
|
|
|
|
|
QAction *m_subProjectRebuildSeparator = nullptr;
|
|
|
|
|
QAction *m_rebuildSubProjectContextMenu = nullptr;
|
|
|
|
|
QAction *m_cleanSubProjectContextMenu = nullptr;
|
|
|
|
|
QAction *m_buildFileContextMenu = nullptr;
|
|
|
|
|
Utils::ParameterAction *m_buildSubProjectAction = nullptr;
|
|
|
|
|
Utils::ParameterAction *m_rebuildSubProjectAction = nullptr;
|
|
|
|
|
Utils::ParameterAction *m_cleanSubProjectAction = nullptr;
|
|
|
|
|
Utils::ParameterAction *m_buildFileAction = nullptr;
|
|
|
|
|
QAction *m_addLibraryAction = nullptr;
|
|
|
|
|
QAction *m_addLibraryActionContextMenu = nullptr;
|
2010-07-02 13:43:41 +02:00
|
|
|
Core::Context m_projectContext;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
2008-12-02 16:19:05 +01:00
|
|
|
} // namespace Internal
|
2013-10-16 11:02:37 +02:00
|
|
|
} // namespace QmakeProjectManager
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2013-10-29 16:08:37 +01:00
|
|
|
#endif // QMAKEPROJECTMANAGERPLUGIN_H
|