1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

toString method.

This commit is contained in:
Sergey Prigogin 2008-04-28 03:25:18 +00:00
parent f0be726ff0
commit 545e4ae027

View file

@ -32,6 +32,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTranslationUnit;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace; import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope;
import org.eclipse.cdt.core.parser.Keywords;
import org.eclipse.cdt.core.parser.util.ArrayUtil; import org.eclipse.cdt.core.parser.util.ArrayUtil;
import org.eclipse.cdt.core.parser.util.CharArrayUtils; import org.eclipse.cdt.core.parser.util.CharArrayUtils;
import org.eclipse.cdt.core.parser.util.ObjectSet; import org.eclipse.cdt.core.parser.util.ObjectSet;
@ -66,12 +67,11 @@ public class CPPNamespace extends PlatformObject implements ICPPNamespace, ICPPI
} }
} }
private static final char[] EMPTY_CHAR_ARRAY = { }; private static final char[] EMPTY_CHAR_ARRAY = {};
IASTName[] namespaceDefinitions = null; IASTName[] namespaceDefinitions;
ICPPNamespaceScope scope = null; ICPPNamespaceScope scope;
ICPPASTTranslationUnit tu;
ICPPASTTranslationUnit tu = null;
public CPPNamespace(ICPPASTNamespaceDefinition nsDef) { public CPPNamespace(ICPPASTNamespaceDefinition nsDef) {
findAllDefinitions(nsDef); findAllDefinitions(nsDef);
@ -357,7 +357,7 @@ public class CPPNamespace extends PlatformObject implements ICPPNamespace, ICPPI
} else { } else {
StringBuilder buf = new StringBuilder(names[0]); StringBuilder buf = new StringBuilder(names[0]);
for (int i = 1; i < names.length; i++) { for (int i = 1; i < names.length; i++) {
buf.append("::"); //$NON-NLS-1$ buf.append(Keywords.cpCOLONCOLON);
buf.append(names[i]); buf.append(names[i]);
} }
return buf.toString(); return buf.toString();