2019-08-19 12:31:25 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** Copyright (C) Filippo Cucchetto <filippocucchetto@gmail.com>
|
|
|
|
|
** Contact: http://www.qt.io/licensing
|
|
|
|
|
**
|
|
|
|
|
** 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
|
|
|
|
|
** 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.
|
|
|
|
|
**
|
|
|
|
|
** 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.
|
|
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <projectexplorer/buildsystem.h>
|
|
|
|
|
#include <projectexplorer/treescanner.h>
|
|
|
|
|
|
|
|
|
|
#include <utils/filesystemwatcher.h>
|
|
|
|
|
|
|
|
|
|
namespace Nim {
|
|
|
|
|
|
|
|
|
|
class NimBuildSystem : public ProjectExplorer::BuildSystem
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2019-10-25 09:55:32 +02:00
|
|
|
explicit NimBuildSystem(ProjectExplorer::Target *target);
|
2019-08-19 12:31:25 +02:00
|
|
|
|
|
|
|
|
bool addFiles(const QStringList &filePaths);
|
|
|
|
|
bool removeFiles(const QStringList &filePaths);
|
|
|
|
|
bool renameFile(const QString &filePath, const QString &newFilePath);
|
|
|
|
|
|
2019-10-22 14:55:51 +02:00
|
|
|
bool supportsAction(ProjectExplorer::Node *,
|
|
|
|
|
ProjectExplorer::ProjectAction action,
|
|
|
|
|
const ProjectExplorer::Node *node) const override;
|
|
|
|
|
bool addFiles(ProjectExplorer::Node *node,
|
|
|
|
|
const QStringList &filePaths, QStringList *) override;
|
|
|
|
|
ProjectExplorer::RemovedFilesFromProject removeFiles(ProjectExplorer::Node *node,
|
|
|
|
|
const QStringList &filePaths,
|
|
|
|
|
QStringList *) override;
|
|
|
|
|
bool deleteFiles(ProjectExplorer::Node *, const QStringList &) override;
|
|
|
|
|
bool renameFile(ProjectExplorer::Node *,
|
|
|
|
|
const QString &filePath, const QString &newFilePath) override;
|
|
|
|
|
|
2019-08-19 12:31:25 +02:00
|
|
|
void setExcludedFiles(const QStringList &list); // Keep for compatibility with Qt Creator 4.10
|
|
|
|
|
QStringList excludedFiles(); // Make private when no longer supporting Qt Creator 4.10
|
|
|
|
|
|
2019-11-29 10:19:46 +01:00
|
|
|
void triggerParsing() override;
|
2019-08-19 12:31:25 +02:00
|
|
|
|
|
|
|
|
const Utils::FilePathList nimFiles() const;
|
|
|
|
|
|
2019-09-16 22:43:27 +02:00
|
|
|
protected:
|
2019-10-25 09:55:32 +02:00
|
|
|
virtual void loadSettings();
|
|
|
|
|
virtual void saveSettings();
|
2019-08-19 12:31:25 +02:00
|
|
|
|
|
|
|
|
void collectProjectFiles();
|
|
|
|
|
void updateProject();
|
|
|
|
|
|
|
|
|
|
ProjectExplorer::TreeScanner m_scanner;
|
|
|
|
|
|
2019-10-25 09:55:32 +02:00
|
|
|
ParseGuard m_guard;
|
2019-08-19 12:31:25 +02:00
|
|
|
|
|
|
|
|
Utils::FileSystemWatcher m_directoryWatcher;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Nim
|