// Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #pragma once #include #include #include #include #include #include #include #include #include namespace QmlJSEditor { namespace Internal { class QmlTaskManager : public QObject { Q_OBJECT public: QmlTaskManager(); void extensionsInitialized(); void updateMessages(); void updateSemanticMessagesNow(); void documentsRemoved(const Utils::FilePaths &path); private: void displayResults(int begin, int end); void displayAllResults(); void updateMessagesNow(bool updateSemantic = false); void insertTask(const ProjectExplorer::Task &task); void removeTasksForFile(const Utils::FilePath &fileName); void removeAllTasks(bool clearSemantic); private: class FileErrorMessages { public: Utils::FilePath fileName; ProjectExplorer::Tasks tasks; }; static void collectMessages(QFutureInterface &future, QmlJS::Snapshot snapshot, const QList &projectInfos, QmlJS::ViewerContext vContext, bool updateSemantic); private: QHash m_docsWithTasks; QFutureWatcher m_messageCollector; QTimer m_updateDelay; bool m_updatingSemantic = false; }; } // Internal } // QmlJSEditor