Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiří Nytra2014-01-22 14:34:38 +0000
committerSergey Prigogin2014-01-22 18:24:07 +0000
commitcd869eeed68b64eb1cd442b497cb1c1b009cf3c4 (patch)
treed63dfa27c342c6ac8eac234cf035bc537757cf27
parentd3a8e639c8dcb6a270d3e140f4e62144203a3c7c (diff)
downloadorg.eclipse.cdt-cd869eeed68b64eb1cd442b497cb1c1b009cf3c4.tar.gz
org.eclipse.cdt-cd869eeed68b64eb1cd442b497cb1c1b009cf3c4.tar.xz
org.eclipse.cdt-cd869eeed68b64eb1cd442b497cb1c1b009cf3c4.zip
Bug 423696 - [New Class Wizard] base classes has a fully qualified name,
even though the new class is in the same namespace Change-Id: I08c2486686b2db540ba321334976a8d5830a2813 Signed-off-by: Jiří Nytra <jiri.nytra@gmail.com> Reviewed-on: https://git.eclipse.org/r/20900 Tested-by: Hudson CI Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java
index 047647fff9c..982f07ca193 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java
@@ -683,7 +683,12 @@ public class NewClassCodeGenerator {
text.append(" : "); //$NON-NLS-1$
for (int i = 0; i < fBaseClasses.length; ++i) {
IBaseClassInfo baseClass = fBaseClasses[i];
- String baseClassName = baseClass.getType().getQualifiedTypeName().getFullyQualifiedName();
+ IQualifiedTypeName qualifiedTypeName = baseClass.getType().getQualifiedTypeName();
+
+ if (fNamespace != null)
+ qualifiedTypeName = qualifiedTypeName.removeFirstSegments(qualifiedTypeName.matchingFirstSegments(fNamespace));
+ String baseClassName = qualifiedTypeName.getFullyQualifiedName();
+
if (i > 0)
text.append(", "); //$NON-NLS-1$
if (baseClass.getAccess() == ASTAccessVisibility.PRIVATE)

Back to the top