/* * @see org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor#visit(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition) */ @Override public int visit(ICPPASTNamespaceDefinition namespace) { push( ICElement.C_NAMESPACE, ASTStringUtil.getQualifiedName(namespace.getName()), getStartOffset(namespace)); return super.visit(namespace); }
@Override public int visit(ICPPASTNamespaceDefinition namespaceDefinition) { IASTName name = namespaceDefinition.getName(); try { IASTFileLocation location = namespaceDefinition.getFileLocation(); int endLoc = location.getNodeOffset() + location.getNodeLength() - 1; int startLoc = location.getNodeOffset(); _container.add( new Hint("namespace", startLoc, endLoc, "namespace " + name.toString())); // $NON-NLS-1$ } catch (BadLocationException e) { _cancelProcessing.set(true); } return shouldContinue(); }