aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/todo/qmljstodoitemsscanner.h
blob: 018c2993dec767c38dde554e3827c239d73461e7 (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
// Copyright (C) 2016 Dmitry Savchenko
// Copyright (C) 2016 Vasiliy Sorokin
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include "todoitemsscanner.h"

#include <utils/filepath.h>
#include <qmljs/qmljsmodelmanagerinterface.h>

namespace Todo {
namespace Internal {

class QmlJsTodoItemsScanner : public TodoItemsScanner
{
public:
    explicit QmlJsTodoItemsScanner(const KeywordList &keywordList, QObject *parent = nullptr);

protected:
    bool shouldProcessFile(const Utils::FilePath &fileName);
    void scannerParamsChanged() override;

private:
    void documentUpdated(QmlJS::Document::Ptr doc);
    void processDocument(QmlJS::Document::Ptr doc);
};

}
}