1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

FIXED - bug 290110: Source-> Implement Method

https://bugs.eclipse.org/bugs/show_bug.cgi?id=290110
This commit is contained in:
Emanuel Graf 2009-11-03 13:52:32 +00:00
parent e620619660
commit 1b08bd261f
3 changed files with 66 additions and 2 deletions

View file

@ -747,3 +747,67 @@ inline void nspace::TestClass::testMethod()
#endif /* TESTCLASS_H_ */
//!Bug 290110 Source-> Implement Method
//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
//@.config
filename=A.h
//@A.h
#ifndef A_H_
#define A_H_
namespace n1 {
namespace n2 {
class A {
public:
A();
~A();
void testmethod(int x);
protected:
class B {
public:
void /*$*/testmethod2()/*$$*/;
};
};
}
}
#endif /* A_H_ */
//@A.cpp
#include "A.h"
namespace n1 {
namespace n2 {
A::A() {
}
A::~A() {
}
}
}
//=
#include "A.h"
namespace n1 {
namespace n2 {
A::A() {
}
A::~A() {
}
}
}
void n1::n2::A::B::testmethod2()
{
}

View file

@ -244,7 +244,7 @@ public class ImplementMethodRefactoring extends CRefactoring {
private ICPPASTQualifiedName createQualifiedNameFor(IASTFunctionDeclarator functionDeclarator, IASTNode declarationParent)
throws CoreException {
int insertOffset = insertLocation.getInsertPosition();
return NameHelper.createQualifiedNameFor(functionDeclarator.getName(), file, region.getOffset(), insertLocation.getInsertFile(), insertOffset);
return NameHelper.createQualifiedNameFor(functionDeclarator.getName(), file, functionDeclarator.getFileLocation().getNodeOffset(), insertLocation.getInsertFile(), insertOffset);
}
public ImplementMethodData getRefactoringData() {

View file

@ -97,7 +97,7 @@ public class RenameCSourceFolderChange extends Change {
entries = renameEntry(entries);
cfg.setSourceEntries(entries);
}
CCorePlugin.getDefault().setProjectDescription(project, des, false, new NullProgressMonitor());//TODO Add PM
CCorePlugin.getDefault().setProjectDescription(project, des, false, new NullProgressMonitor());
}
private ICSourceEntry[] renameEntry(ICSourceEntry[] entries){