mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
Start of Scope2 and cleaned up ASTNode a little.
This commit is contained in:
parent
4108c84536
commit
d11105a29b
2 changed files with 16 additions and 10 deletions
|
@ -16,4 +16,6 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
*/
|
||||
public interface IScope2 {
|
||||
|
||||
public IBinding getBinding(IASTName name);
|
||||
|
||||
}
|
||||
|
|
|
@ -35,21 +35,25 @@ public class CASTName extends CASTNode implements IASTName {
|
|||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public CASTName() {
|
||||
name = EMPTY_CHAR_ARRAY;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.cdt.core.dom.ast.IASTName#resolveBinding()
|
||||
*/
|
||||
private static boolean inited = false;
|
||||
private static boolean useScope2 = false;
|
||||
|
||||
public IBinding resolveBinding() {
|
||||
if (binding == null)
|
||||
CVisitor.createBinding(this);
|
||||
if (binding == null) {
|
||||
if (!inited) {
|
||||
useScope2 = System.getProperty("doug.useScope2") != null ? true : false;
|
||||
inited = true;
|
||||
}
|
||||
|
||||
if (useScope2)
|
||||
binding = getScope(this, getPropertyInParent()).getBinding(this);
|
||||
else
|
||||
CVisitor.createBinding(this);
|
||||
}
|
||||
|
||||
return binding;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue