}
}
}
}
public void acceptLocalVariable(LocalVariableBinding binding, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unit) {
LocalDeclaration local = binding.declaration;
IJavaElement parent = null;
if (binding.declaringScope.isLambdaSubscope() && unit instanceof ICompilationUnit) {
HashSet existingElements = new HashSet();
HashMap knownScopes = new HashMap();
parent = this.handleFactory.createElement(binding.declaringScope, local.sourceStart, (ICompilationUnit) unit, existingElements, knownScopes);
} else {
parent = findLocalElement(local.sourceStart, binding.declaringScope.methodScope()); // findLocalElement() cannot find local variable
}
LocalVariable localVar = null;
if(parent != null) {
localVar = new LocalVariable(
(JavaElement)parent,
new String(local.name),
local.declarationSourceStart,
local.declarationSourceEnd,
local.sourceStart,
local.sourceEnd,
local.type == null ? Signature.createTypeSignature(binding.type.readableName(), true) : Util.typeSignature(local.type),
local.annotations,
local.modifiers,
local.getKind() == AbstractVariableDeclaration.PARAMETER);
}
if (localVar != null) {
addElement(localVar);
if(SelectionEngine.DEBUG){
System.out.print("SELECTION - accept local variable("); //$NON-NLS-1$