mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +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:
parent
ccc1cbe5ce
commit
768e0a0ed9
3 changed files with 37 additions and 3 deletions
|
@ -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_ */
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ public class NodeContainer {
|
||||||
.getArrayModifiers();
|
.getArrayModifiers();
|
||||||
for (IASTArrayModifier arrayModifier : arrayModifiers) {
|
for (IASTArrayModifier arrayModifier : arrayModifiers) {
|
||||||
((IASTArrayDeclarator) declarator)
|
((IASTArrayDeclarator) declarator)
|
||||||
.addArrayModifier(arrayModifier);
|
.addArrayModifier(arrayModifier.copy());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -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
|
* Rapperswil, University of applied sciences and others
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* 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) {
|
private static boolean checkFileNameAndLocation(final IFile insertFile, final int offset, IASTNode namespace) {
|
||||||
return namespace.getFileLocation().getFileName().endsWith(insertFile.getFullPath().toOSString())
|
return namespace.getFileLocation().getFileName().endsWith(insertFile.getFullPath().toOSString())
|
||||||
&& offset >= namespace.getNodeLocations()[0].getNodeOffset()
|
&& 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) {
|
private static IASTName createNameWithTemplates(IASTNode declarationParent) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue