1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

FIXED - bug 282989: Refactor->Implement method option doesn't qualify the name in the method definition with a fully qualified container class name

https://bugs.eclipse.org/bugs/show_bug.cgi?id=282989
This commit is contained in:
Emanuel Graf 2009-07-13 13:46:59 +00:00
parent ccc1cbe5ce
commit 768e0a0ed9
3 changed files with 37 additions and 3 deletions

View file

@ -713,3 +713,37 @@ void Test::doNothing(void)
//! Bug 282989 Refactor->Implement method option doesn't qualify the name in the method definition with a fully qualified container class name
//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
//@.config
filename=TestClass.h
//@TestClass.h
#ifndef TESTCLASS_H_
#define TESTCLASS_H_
namespace nspace{
class TestClass {
void /*$*/testMethod()/*$$*/;
};
}
#endif /* TESTCLASS_H_ */
//=
#ifndef TESTCLASS_H_
#define TESTCLASS_H_
namespace nspace{
class TestClass {
void testMethod();
};
}
inline void nspace::TestClass::testMethod()
{
}
#endif /* TESTCLASS_H_ */

View file

@ -152,7 +152,7 @@ public class NodeContainer {
.getArrayModifiers();
for (IASTArrayModifier arrayModifier : arrayModifiers) {
((IASTArrayDeclarator) declarator)
.addArrayModifier(arrayModifier);
.addArrayModifier(arrayModifier.copy());
}
} else {

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik
* Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@ -74,7 +74,7 @@ public class NamespaceHelper {
private static boolean checkFileNameAndLocation(final IFile insertFile, final int offset, IASTNode namespace) {
return namespace.getFileLocation().getFileName().endsWith(insertFile.getFullPath().toOSString())
&& offset >= namespace.getNodeLocations()[0].getNodeOffset()
&& offset <= namespace.getNodeLocations()[0].getNodeOffset() + namespace.getNodeLocations()[0].getNodeLength();
&& offset < namespace.getNodeLocations()[0].getNodeOffset() + namespace.getNodeLocations()[0].getNodeLength();
}
private static IASTName createNameWithTemplates(IASTNode declarationParent) {