1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef MAVENASYNPARSE_H
6#define MAVENASYNPARSE_H
7
8#include "services/project/projectinfo.h"
9#include "common/common.h"
10
11#include <QFileSystemWatcher>
12#include <QObject>
13#include <QtXml>
14
15class QStandardItem;
16class QAction;
17class MavenAsynParsePrivate;
18class MavenAsynParse : public QFileSystemWatcher
19{
20 Q_OBJECT
21 MavenAsynParsePrivate *const d;
22public:
23 MavenAsynParse();
24 virtual ~MavenAsynParse();
25
26signals:
27 void parsedActions(const dpfservice::ProjectActionInfos &info);
28 void parsedError(const QString &info);
29 void itemsModified(const QList<QStandardItem*> &info);
30
31public slots:
32 void loadPoms(const dpfservice::ProjectInfo &info);
33 void parseProject(const dpfservice::ProjectInfo &info);
34 void parseActions(const dpfservice::ProjectInfo &info);
35
36private slots:
37 void doDirectoryChanged(const QString &path);
38
39private:
40 void createRows(const QString &path);
41 QString itemDisplayName(const QStandardItem *item) const;
42 QStandardItem *findItem(const QString &path, QStandardItem *parent = nullptr) const;
43 QList<QStandardItem *> rows(const QStandardItem *item) const;
44 int separatorSize() const;
45};
46
47#endif // MAVENASYNPARSE_H
48