diff options
author | Sergey Prigogin | 2015-01-15 04:00:57 +0000 |
---|---|---|
committer | Sergey Prigogin | 2015-01-16 18:18:46 +0000 |
commit | 773eb90b41c7cf2a69ce3b7133a6ff4b61b3750d (patch) | |
tree | 333989818ba5b41d7500065bc49884c6170aba1a /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java | |
parent | da85a41850f2b78e9230cb6b7d755f14d90bdee3 (diff) | |
download | org.eclipse.cdt-773eb90b41c7cf2a69ce3b7133a6ff4b61b3750d.tar.gz org.eclipse.cdt-773eb90b41c7cf2a69ce3b7133a6ff4b61b3750d.tar.xz org.eclipse.cdt-773eb90b41c7cf2a69ce3b7133a6ff4b61b3750d.zip |
Cosmetics.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java')
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java index df2e85b9ba5..1aadc892ce2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2014 IBM Corporation and others. + * Copyright (c) 2004, 2015 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * IBM - Initial API and implementation * Markus Schorn (Wind River Systems) + * Sergey Prigogin (Google) *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp; @@ -149,24 +150,24 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST return ParserLanguage.CPP; } - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.IASTTranslationUnit#getLinkage() - */ @Override public ILinkage getLinkage() { return Linkage.CPP_LINKAGE; } - /* (non-Javadoc) - * @see org.eclipse.cdt.internal.core.parser.scanner.ISkippedIndexedFilesListener#skippedFile(org.eclipse.cdt.internal.core.parser.scanner.IncludeFileContent) - */ @Override public void skippedFile(int offset, InternalFileContent fileContent) { super.skippedFile(offset, fileContent); fScopeMapper.registerAdditionalDirectives(offset, fileContent.getUsingDirectives()); } - // Namespace scopes from the index have to be mapped back to the AST (bug 217102). + /** + * Maps an index scope to the AST. + * + * @param scope a scope, possibly from index + * @return the corresponding scope in the AST, or the original scope if it doesn't have + * a counterpart in the AST. + */ public IScope mapToASTScope(IScope scope) { if (scope instanceof IIndexScope) { return fScopeMapper.mapToASTScope((IIndexScope) scope); @@ -174,7 +175,14 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST return scope; } - // Class types from the index have to be mapped back to the AST (bug 262719). + /** + * Maps a class type to the AST. + * + * @param binding a class type, possibly from index + * @param point a lookup point in the AST + * @return the corresponding class in the AST, or the original class type if it doesn't have + * a counterpart in the AST. + */ public ICPPClassType mapToAST(ICPPClassType binding, IASTNode point) { return fScopeMapper.mapToAST(binding, point); } |