summaryrefslogtreecommitdiff
path: root/src/plugins/haskell/haskellproject.h
blob: 79bec049ae46198766c562dc9fb9f1f9d4d1e9ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include <projectexplorer/buildsystem.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/treescanner.h>

namespace Haskell {
namespace Internal {

class HaskellProject : public ProjectExplorer::Project
{
    Q_OBJECT

public:
    explicit HaskellProject(const Utils::FilePath &fileName);

    static bool isHaskellProject(Project *project);
};

class HaskellBuildSystem : public ProjectExplorer::BuildSystem
{
    Q_OBJECT

public:
    HaskellBuildSystem(ProjectExplorer::Target *t);

    void triggerParsing() override;
    QString name() const final { return QLatin1String("haskell"); }

private:
    void updateApplicationTargets();
    void refresh();

private:
    ParseGuard m_parseGuard;
    ProjectExplorer::TreeScanner m_scanner;
};

} // namespace Internal
} // namespace Haskell