2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2011-04-15 16:19:23 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2011-04-15 16:19:23 +02:00
|
|
|
|
|
|
|
|
#include <qmljstools/qmljsrefactoringchanges.h>
|
2019-05-12 22:20:56 +02:00
|
|
|
#include <qmljstools/qmljssemanticinfo.h>
|
2011-04-15 16:19:23 +02:00
|
|
|
|
2014-09-04 00:04:18 +02:00
|
|
|
#include <texteditor/codeassist/assistinterface.h>
|
2017-12-15 09:46:29 +01:00
|
|
|
#include <texteditor/codeassist/iassistprovider.h>
|
2014-02-17 19:23:20 +02:00
|
|
|
|
2011-04-15 16:19:23 +02:00
|
|
|
namespace QmlJSEditor {
|
|
|
|
|
|
2019-05-12 22:20:56 +02:00
|
|
|
class QmlJSEditorWidget;
|
|
|
|
|
|
2019-08-07 17:04:47 +02:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2014-09-04 00:04:18 +02:00
|
|
|
class QmlJSQuickFixAssistInterface : public TextEditor::AssistInterface
|
2011-04-15 16:19:23 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2014-08-25 20:01:46 +02:00
|
|
|
QmlJSQuickFixAssistInterface(QmlJSEditorWidget *editor, TextEditor::AssistReason reason);
|
2018-11-24 02:45:30 +01:00
|
|
|
~QmlJSQuickFixAssistInterface() override;
|
2011-04-15 16:19:23 +02:00
|
|
|
|
2012-04-12 15:51:56 +02:00
|
|
|
const QmlJSTools::SemanticInfo &semanticInfo() const;
|
2011-08-17 11:35:57 +02:00
|
|
|
QmlJSTools::QmlJSRefactoringFilePtr currentFile() const;
|
2022-06-20 12:57:23 +02:00
|
|
|
bool isBaseObject() const override { return false; }
|
2011-04-15 16:19:23 +02:00
|
|
|
|
|
|
|
|
private:
|
2012-04-12 15:51:56 +02:00
|
|
|
QmlJSTools::SemanticInfo m_semanticInfo;
|
2011-08-17 11:35:57 +02:00
|
|
|
QmlJSTools::QmlJSRefactoringFilePtr m_currentFile;
|
2011-04-15 16:19:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2017-12-15 09:46:29 +01:00
|
|
|
class QmlJSQuickFixAssistProvider : public TextEditor::IAssistProvider
|
2011-04-15 16:19:23 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2018-02-15 09:50:02 +01:00
|
|
|
QmlJSQuickFixAssistProvider() = default;
|
2018-11-24 02:45:30 +01:00
|
|
|
~QmlJSQuickFixAssistProvider() override = default;
|
2011-04-15 16:19:23 +02:00
|
|
|
|
2021-09-15 07:04:12 +02:00
|
|
|
TextEditor::IAssistProcessor *createProcessor(const TextEditor::AssistInterface *) const override;
|
2011-04-15 16:19:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // Internal
|
|
|
|
|
} // QmlJSEditor
|