aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/mesonprojectmanager/mesonprojectplugin.cpp
blob: 1da316952bb810013bb905316e05316a1a0af208 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright (C) 2020 Alexis Jeandet.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "mesonactionsmanager.h"
#include "mesonbuildconfiguration.h"
#include "mesonbuildstep.h"
#include "mesonbuildsystem.h"
#include "mesonpluginconstants.h"
#include "mesonproject.h"
#include "mesonprojectmanagertr.h"
#include "mesonrunconfiguration.h"
#include "toolssettingsaccessor.h"
#include "toolssettingspage.h"

#include <coreplugin/dialogs/ioptionspage.h>

#include <extensionsystem/iplugin.h>

#include <utils/fsengine/fileiconprovider.h>

using namespace ProjectExplorer;
using namespace Utils;

namespace MesonProjectManager::Internal {

class MesonProjectPlugin final : public ExtensionSystem::IPlugin
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "MesonProjectManager.json")

    void initialize() final
    {
        Core::IOptionsPage::registerCategory(
            Constants::SettingsPage::CATEGORY, Tr::tr("Meson"), Constants::Icons::MESON_BW);

        setupToolsSettingsPage();
        setupToolsSettingsAccessor();

        setupMesonBuildSystem();
        setupMesonBuildConfiguration();
        setupMesonBuildStep();

        setupMesonRunConfiguration();
        setupMesonRunAndDebugWorkers();

        setupMesonProject();

        setupMesonActions(this);

        FileIconProvider::registerIconOverlayForFilename(Constants::Icons::MESON, "meson.build");
        FileIconProvider::registerIconOverlayForFilename(Constants::Icons::MESON, "meson_options.txt");
    }
};

} // MesonProjectManager::Internal

#include "mesonprojectplugin.moc"