mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Minor API improvement.
Change-Id: Ie0b6ab44139c080dc5200c0a9c01cca0bbb9ca04
This commit is contained in:
parent
5d37fc84c6
commit
e091732356
2 changed files with 16 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2011 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
|
||||
|
@ -18,15 +18,19 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPASTTranslationUnit extends IASTTranslationUnit {
|
||||
/**
|
||||
* Returns the global namespace of the translation unit.
|
||||
*
|
||||
* @since 5.11
|
||||
*/
|
||||
public ICPPNamespace getGlobalNamespace();
|
||||
|
||||
/**
|
||||
* Resolve the binding for translation unit.
|
||||
*
|
||||
* @return <code>IBinding</code>
|
||||
* @deprecated Use {@link #getGlobalNamespace()}
|
||||
*/
|
||||
@Deprecated
|
||||
public IBinding resolveBinding();
|
||||
|
||||
|
||||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
|
|
|
@ -139,14 +139,18 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST
|
|||
}
|
||||
|
||||
@Override
|
||||
public IBinding resolveBinding() {
|
||||
public ICPPNamespace getGlobalNamespace() {
|
||||
if (fBinding == null)
|
||||
fBinding = new CPPNamespace(this);
|
||||
return fBinding;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
@Override @Deprecated
|
||||
public IBinding resolveBinding() {
|
||||
return getGlobalNamespace();
|
||||
}
|
||||
|
||||
@Override @Deprecated
|
||||
public ParserLanguage getParserLanguage() {
|
||||
return ParserLanguage.CPP;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue