Commit 91eff020 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Moved CppRefactoringChanges.

parent a19f8025
......@@ -14,7 +14,8 @@ HEADERS += cppplugin.h \
cppeditorenums.h \
cppeditor_global.h \
cppclasswizard.h \
cppquickfix.h
cppquickfix.h \
cpprefactoringchanges.h
SOURCES += cppplugin.cpp \
cppeditor.cpp \
......@@ -22,7 +23,8 @@ SOURCES += cppplugin.cpp \
cpphoverhandler.cpp \
cppfilewizard.cpp \
cppclasswizard.cpp \
cppquickfix.cpp
cppquickfix.cpp \
cpprefactoringchanges.cpp
RESOURCES += cppeditor.qrc
......
......@@ -47,7 +47,7 @@
#include <Name.h>
#include <Literals.h>
#include <cpptools/cpprefactoringchanges.h>
#include <cppeditor/cpprefactoringchanges.h>
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/cppmodelmanagerinterface.h>
......@@ -944,7 +944,7 @@ int CppQuickFixOperation::match(TextEditor::QuickFixState *state)
if (_refactoringChanges)
delete _refactoringChanges;
CPPEditor *cppEditor = qobject_cast<CPPEditor*>(editor());
_refactoringChanges = new CppTools::CppRefactoringChanges(s->info.snapshot, cppEditor->modelManager());
_refactoringChanges = new CppRefactoringChanges(s->info.snapshot, cppEditor->modelManager());
return match(s->path);
}
......@@ -956,7 +956,7 @@ void CppQuickFixOperation::apply()
cppRefactoringChanges()->apply();
}
CppTools::CppRefactoringChanges *CppQuickFixOperation::cppRefactoringChanges() const
CppEditor::CppRefactoringChanges *CppQuickFixOperation::cppRefactoringChanges() const
{ return _refactoringChanges; }
TextEditor::RefactoringChanges *CppQuickFixOperation::refactoringChanges() const
......
......@@ -43,10 +43,11 @@
namespace CppTools {
class CppModelManagerInterface;
class CppRefactoringChanges;
} // end of namespace CppTools
namespace CppEditor {
class CppRefactoringChanges;
namespace Internal {
class CppQuickFixOperation: public TextEditor::QuickFixOperation
......@@ -68,7 +69,7 @@ protected:
QString fileName() const;
virtual void apply();
virtual CppTools::CppRefactoringChanges *cppRefactoringChanges() const;
virtual CppRefactoringChanges *cppRefactoringChanges() const;
virtual TextEditor::RefactoringChanges *refactoringChanges() const;
const CPlusPlus::Token &tokenAt(unsigned index) const;
......@@ -101,7 +102,7 @@ protected:
QString textOf(const CPlusPlus::AST *ast) const;
private:
CppTools::CppRefactoringChanges *_refactoringChanges;
CppRefactoringChanges *_refactoringChanges;
CPlusPlus::Document::Ptr _document;
CPlusPlus::AST *_topLevelNode;
};
......
......@@ -32,6 +32,7 @@
using namespace CPlusPlus;
using namespace CppTools;
using namespace TextEditor;
using namespace CppEditor;
CppRefactoringChanges::CppRefactoringChanges(const Snapshot &snapshot,
CppModelManagerInterface *modelManager)
......
......@@ -33,16 +33,16 @@
#include <cplusplus/CppDocument.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <cpptools/cpptools_global.h>
#include <cppeditor/cppeditor_global.h>
#include <texteditor/refactoringchanges.h>
namespace CppTools {
namespace CppEditor {
class CPPTOOLS_EXPORT CppRefactoringChanges: public TextEditor::RefactoringChanges
class CPPEDITOR_EXPORT CppRefactoringChanges: public TextEditor::RefactoringChanges
{
public:
CppRefactoringChanges(const CPlusPlus::Snapshot &snapshot, CppModelManagerInterface *modelManager);
CppRefactoringChanges(const CPlusPlus::Snapshot &snapshot, CppTools::CppModelManagerInterface *modelManager);
virtual QStringList apply();
......@@ -53,10 +53,10 @@ public:
private:
CPlusPlus::Snapshot m_snapshot;
CppModelManagerInterface *m_modelManager;
CppModelManagerInterface::WorkingCopy m_workingCopy;
CppTools::CppModelManagerInterface *m_modelManager;
CppTools::CppModelManagerInterface::WorkingCopy m_workingCopy;
};
} // namespace CppTools
} // namespace CppEditor
#endif // CPPREFACTORINGCHANGES_H
......@@ -23,8 +23,7 @@ HEADERS += completionsettingspage.h \
searchsymbols.h \
cppdoxygen.h \
cppfilesettingspage.h \
cppfindreferences.h \
cpprefactoringchanges.h
cppfindreferences.h
SOURCES += completionsettingspage.cpp \
cppclassesfilter.cpp \
......@@ -39,8 +38,7 @@ SOURCES += completionsettingspage.cpp \
cppdoxygen.cpp \
cppfilesettingspage.cpp \
abstracteditorsupport.cpp \
cppfindreferences.cpp \
cpprefactoringchanges.cpp
cppfindreferences.cpp
FORMS += completionsettingspage.ui \
cppfilesettingspage.ui
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment