1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef MAVENPROJECTGENERATOR_H |
6 | #define MAVENPROJECTGENERATOR_H |
7 | |
8 | #include "mavenasynparse.h" |
9 | #include "services/project/projectservice.h" |
10 | |
11 | #include <QObject> |
12 | #include <QDomDocument> |
13 | |
14 | class MavenProjectGeneratorPrivate; |
15 | namespace config { |
16 | class ConfigureParam; |
17 | } |
18 | class MavenProjectGenerator : public dpfservice::ProjectGenerator |
19 | { |
20 | Q_OBJECT |
21 | MavenProjectGeneratorPrivate *const d; |
22 | public: |
23 | explicit MavenProjectGenerator(); |
24 | virtual ~MavenProjectGenerator(); |
25 | static QString toolKitName() { return "maven"; } |
26 | virtual QStringList supportLanguages() override; |
27 | virtual QStringList supportFileNames() override; |
28 | virtual QDialog* configureWidget(const QString &language, |
29 | const QString &projectPath) override; |
30 | virtual bool configure(const dpfservice::ProjectInfo &info = {}) override; |
31 | virtual QStandardItem *createRootItem(const dpfservice::ProjectInfo &info) override; |
32 | virtual void removeRootItem(QStandardItem* root) override; |
33 | virtual QMenu* createItemMenu(const QStandardItem *item) override; |
34 | private slots: |
35 | void itemModified(const QList<QStandardItem*> &item); |
36 | void doAddMavenMeue(const dpfservice::ProjectActionInfos &infos); |
37 | void doActionTriggered(); |
38 | void actionProperties(const dpfservice::ProjectInfo &info, QStandardItem *item); |
39 | |
40 | private: |
41 | void restoreRuntimeCfg(dpfservice::ProjectInfo &info); |
42 | }; |
43 | |
44 | #endif // MAVENPROJECTGENERATOR_H |
45 |