forked from qt-creator/qt-creator
		
	CppEditor: add default RefactoringEngine
..and use it when we don't have refactoring plug-in Change-Id: Ibe317a9728d439b9c5e05271d92a330d22eaacb9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
		@@ -25,18 +25,18 @@
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "cursorineditor.h"
 | 
			
		||||
#include <utils/fileutils.h>
 | 
			
		||||
 | 
			
		||||
#include <clangsupport/sourcelocationscontainer.h>
 | 
			
		||||
#include <clangsupport/refactoringclientinterface.h>
 | 
			
		||||
 | 
			
		||||
QT_BEGIN_NAMESPACE
 | 
			
		||||
class QTextCursor;
 | 
			
		||||
QT_END_NAMESPACE
 | 
			
		||||
namespace TextEditor {
 | 
			
		||||
class TextEditorWidget;
 | 
			
		||||
} // namespace TextEditor
 | 
			
		||||
 | 
			
		||||
namespace CppTools {
 | 
			
		||||
 | 
			
		||||
class CppEditorWidget;
 | 
			
		||||
class ProjectPart;
 | 
			
		||||
 | 
			
		||||
enum class CallType
 | 
			
		||||
@@ -45,19 +45,17 @@ enum class CallType
 | 
			
		||||
    Asynchronous
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// NOTE: This interface is not supposed to be owned as an interface pointer
 | 
			
		||||
class RefactoringEngineInterface
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    using RenameCallback = ClangBackEnd::RefactoringClientInterface::RenameCallback;
 | 
			
		||||
 | 
			
		||||
    virtual void startLocalRenaming(const QTextCursor &textCursor,
 | 
			
		||||
                                    const Utils::FileName &filePath,
 | 
			
		||||
                                    int revision,
 | 
			
		||||
    virtual void startLocalRenaming(const CursorInEditor &data,
 | 
			
		||||
                                    CppTools::ProjectPart *projectPart,
 | 
			
		||||
                                    RenameCallback &&renameSymbolsCallback) = 0;
 | 
			
		||||
 | 
			
		||||
    virtual bool isUsable() const = 0;
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
} // namespace CppTools
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user