2013-01-30 18:19:31 +01:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2013-01-30 18:19:31 +01:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** 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.
|
2013-01-30 18:19:31 +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.
|
2013-01-30 18:19:31 +01:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2013-01-30 18:19:31 +01:00
|
|
|
|
2017-04-07 13:46:50 +02:00
|
|
|
#include <coreplugin/id.h>
|
2013-01-30 18:19:31 +01:00
|
|
|
#include <extensionsystem/iplugin.h>
|
2013-05-27 14:36:59 +02:00
|
|
|
#include <utils/parameteraction.h>
|
2013-01-30 18:19:31 +01:00
|
|
|
|
2017-02-24 12:33:33 +01:00
|
|
|
namespace ProjectExplorer { class Project; }
|
2013-01-30 18:19:31 +01:00
|
|
|
|
|
|
|
|
namespace QbsProjectManager {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class QbsProject;
|
|
|
|
|
|
|
|
|
|
class QbsProjectManagerPlugin : public ExtensionSystem::IPlugin
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QbsProjectManager.json")
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
bool initialize(const QStringList &arguments, QString *errorMessage);
|
|
|
|
|
|
|
|
|
|
void extensionsInitialized();
|
|
|
|
|
|
2016-06-28 23:29:21 +03:00
|
|
|
private:
|
2014-04-08 14:59:14 +02:00
|
|
|
void projectWasAdded(ProjectExplorer::Project *project);
|
2017-02-24 12:33:33 +01:00
|
|
|
void projectChanged();
|
2014-04-08 14:59:14 +02:00
|
|
|
|
2013-01-30 18:19:31 +01:00
|
|
|
void buildFileContextMenu();
|
2013-05-27 14:36:59 +02:00
|
|
|
void buildFile();
|
2013-06-10 15:40:18 +02:00
|
|
|
void buildProductContextMenu();
|
2017-04-07 13:46:50 +02:00
|
|
|
void cleanProductContextMenu();
|
|
|
|
|
void rebuildProductContextMenu();
|
|
|
|
|
void runStepsForProductContextMenu(const QList<Core::Id> &stepTypes);
|
2013-06-10 15:40:18 +02:00
|
|
|
void buildProduct();
|
2017-04-07 13:46:50 +02:00
|
|
|
void cleanProduct();
|
|
|
|
|
void rebuildProduct();
|
|
|
|
|
void runStepsForProduct(const QList<Core::Id> &stepTypes);
|
2014-02-10 17:28:15 +01:00
|
|
|
void buildSubprojectContextMenu();
|
2017-04-07 13:46:50 +02:00
|
|
|
void cleanSubprojectContextMenu();
|
|
|
|
|
void rebuildSubprojectContextMenu();
|
|
|
|
|
void runStepsForSubprojectContextMenu(const QList<Core::Id> &stepTypes);
|
2014-02-10 17:28:15 +01:00
|
|
|
void buildSubproject();
|
2017-04-07 13:46:50 +02:00
|
|
|
void cleanSubproject();
|
|
|
|
|
void rebuildSubproject();
|
|
|
|
|
void runStepsForSubproject(const QList<Core::Id> &stepTypes);
|
2013-01-30 18:19:31 +01:00
|
|
|
|
2014-04-08 14:50:20 +02:00
|
|
|
void reparseSelectedProject();
|
2014-04-08 15:13:05 +02:00
|
|
|
void reparseCurrentProject();
|
|
|
|
|
void reparseProject(QbsProject *project);
|
2013-01-30 18:19:31 +01:00
|
|
|
|
2014-04-08 16:46:08 +02:00
|
|
|
void updateContextActions();
|
|
|
|
|
void updateReparseQbsAction();
|
|
|
|
|
void updateBuildActions();
|
|
|
|
|
|
2013-07-24 16:47:02 +02:00
|
|
|
void buildFiles(QbsProject *project, const QStringList &files,
|
|
|
|
|
const QStringList &activeFileTags);
|
|
|
|
|
void buildSingleFile(QbsProject *project, const QString &file);
|
2017-04-07 13:46:50 +02:00
|
|
|
|
|
|
|
|
void runStepsForProducts(QbsProject *project, const QStringList &products,
|
|
|
|
|
const QList<Core::Id> &stepTypes);
|
2013-05-27 14:36:59 +02:00
|
|
|
|
2017-02-23 14:07:47 +01:00
|
|
|
QAction *m_reparseQbs = nullptr;
|
|
|
|
|
QAction *m_reparseQbsCtx = nullptr;
|
|
|
|
|
QAction *m_buildFileCtx = nullptr;
|
|
|
|
|
QAction *m_buildProductCtx = nullptr;
|
2017-04-07 13:46:50 +02:00
|
|
|
QAction *m_cleanProductCtx = nullptr;
|
|
|
|
|
QAction *m_rebuildProductCtx = nullptr;
|
2017-02-23 14:07:47 +01:00
|
|
|
QAction *m_buildSubprojectCtx = nullptr;
|
2017-04-07 13:46:50 +02:00
|
|
|
QAction *m_cleanSubprojectCtx = nullptr;
|
|
|
|
|
QAction *m_rebuildSubprojectCtx = nullptr;
|
2017-02-23 14:07:47 +01:00
|
|
|
Utils::ParameterAction *m_buildFile = nullptr;
|
|
|
|
|
Utils::ParameterAction *m_buildProduct = nullptr;
|
2017-04-07 13:46:50 +02:00
|
|
|
Utils::ParameterAction *m_cleanProduct = nullptr;
|
|
|
|
|
Utils::ParameterAction *m_rebuildProduct = nullptr;
|
2017-02-23 14:07:47 +01:00
|
|
|
Utils::ParameterAction *m_buildSubproject = nullptr;
|
2017-04-07 13:46:50 +02:00
|
|
|
Utils::ParameterAction *m_cleanSubproject = nullptr;
|
|
|
|
|
Utils::ParameterAction *m_rebuildSubproject = nullptr;
|
2013-01-30 18:19:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
2013-06-12 12:03:12 +02:00
|
|
|
} // namespace QbsProjectManager
|