2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-04-15 16:19:23 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2011-04-15 16:19:23 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-04-15 16:19:23 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2011-04-15 16:19:23 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2011-04-15 16:19:23 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
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 {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2019-05-12 22:20:56 +02:00
|
|
|
class QmlJSEditorWidget;
|
|
|
|
|
|
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;
|
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
|
|
|
|
2015-06-03 15:32:02 +02:00
|
|
|
IAssistProvider::RunType runType() const override;
|
|
|
|
|
TextEditor::IAssistProcessor *createProcessor() const override;
|
2011-04-15 16:19:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // Internal
|
|
|
|
|
} // QmlJSEditor
|