/** * Returns a handle denoting the class member identified by its scope. */ public IJavaElement createElement(ClassScope scope, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(scope, scope.referenceContext.sourceStart, unit, existingElements, knownScopes); } /**
/** * Returns a handle denoting the class member identified by its scope. */ public IJavaElement createElement(ClassScope scope, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(scope, scope.referenceContext.sourceStart, unit, existingElements, knownScopes); } /**
/** * Returns a handle denoting the class member identified by its scope. */ public IJavaElement createElement(ClassScope scope, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(scope, scope.referenceContext.sourceStart, unit, existingElements, knownScopes); } /**
/** * Returns a handle denoting the class member identified by its scope. */ public IJavaElement createElement(ClassScope scope, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(scope, scope.referenceContext.sourceStart, unit, existingElements, knownScopes); } /**
/** * Returns a handle denoting the class member identified by its scope. */ public IJavaElement createElement(ClassScope scope, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(scope, scope.referenceContext.sourceStart, unit, existingElements, knownScopes); } /**
/** * Returns a handle denoting the class member identified by its scope. */ public IJavaElement createElement(ClassScope scope, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(scope, scope.referenceContext.sourceStart, unit, existingElements, knownScopes); } /**
/** * Returns a handle denoting the class member identified by its scope. */ public IJavaElement createElement(ClassScope scope, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(scope, scope.referenceContext.sourceStart, unit, existingElements, knownScopes); } /**
/** * Returns a handle denoting the lambda type identified by its scope. */ public IJavaElement createLambdaTypeElement(LambdaExpression expression, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(expression.scope, expression.sourceStart(), unit, existingElements, knownScopes).getParent(); } /**
/** * Returns a handle denoting the lambda type identified by its scope. */ public IJavaElement createLambdaTypeElement(LambdaExpression expression, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(expression.scope, expression.sourceStart(), unit, existingElements, knownScopes).getParent(); } protected void resolveDuplicates(IJavaElement handle) {
/** * Returns a handle denoting the lambda type identified by its scope. */ public IJavaElement createLambdaTypeElement(LambdaExpression expression, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(expression.scope, expression.sourceStart(), unit, existingElements, knownScopes).getParent(); } /**
/** * Returns a handle denoting the lambda type identified by its scope. */ public IJavaElement createLambdaTypeElement(LambdaExpression expression, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(expression.scope, expression.sourceStart(), unit, existingElements, knownScopes).getParent(); } /**
/** * Returns a handle denoting the lambda type identified by its scope. */ public IJavaElement createLambdaTypeElement(LambdaExpression expression, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(expression.scope, expression.sourceStart(), unit, existingElements, knownScopes).getParent(); } protected void resolveDuplicates(IJavaElement handle) {
/** * Returns a handle denoting the lambda type identified by its scope. */ public IJavaElement createLambdaTypeElement(LambdaExpression expression, ICompilationUnit unit, HashSet existingElements, HashMap knownScopes) { return createElement(expression.scope, expression.sourceStart(), unit, existingElements, knownScopes).getParent(); } /**
private void rememberAllTypes(CompilationUnitDeclaration parsedUnit, org.eclipse.jdt.core.ICompilationUnit cu, boolean includeLocalTypes) { TypeDeclaration[] types = parsedUnit.types; if (types != null) { for (int i = 0, length = types.length; i < length; i++) { TypeDeclaration type = types[i]; rememberWithMemberTypes(type, cu.getType(new String(type.name))); } } if (includeLocalTypes && parsedUnit.localTypes != null) { HandleFactory factory = new HandleFactory(); HashSet existingElements = new HashSet(parsedUnit.localTypeCount); HashMap knownScopes = new HashMap(parsedUnit.localTypeCount); for (int i = 0; i < parsedUnit.localTypeCount; i++) { LocalTypeBinding localType = parsedUnit.localTypes[i]; ClassScope classScope = localType.scope; TypeDeclaration typeDecl = classScope.referenceType(); IType typeHandle = (IType)factory.createElement(classScope, cu, existingElements, knownScopes); rememberWithMemberTypes(typeDecl, typeHandle); } } } private void rememberWithMemberTypes(TypeDeclaration typeDecl, IType typeHandle) {
HashSet existingElements = new HashSet(); HashMap knownScopes = new HashMap(); parent = this.handleFactory.createElement(binding.declaringScope, local.sourceStart, (ICompilationUnit) unit, existingElements, knownScopes); } else {
HashSet existingElements = new HashSet(); HashMap knownScopes = new HashMap(); parent = this.handleFactory.createElement(binding.declaringScope, local.sourceStart, (ICompilationUnit) unit, existingElements, knownScopes); } else {
HashSet existingElements = new HashSet(); HashMap knownScopes = new HashMap(); parent = this.handleFactory.createElement(binding.declaringScope, local.sourceStart, (ICompilationUnit) unit, existingElements, knownScopes); } else {
ClassScope classScope = localType.scope; TypeDeclaration typeDecl = classScope.referenceType(); IType typeHandle = (IType)factory.createElement(classScope, cu, existingElements, knownScopes); rememberWithMemberTypes(typeDecl, typeHandle);
ClassScope classScope = localType.scope; TypeDeclaration typeDecl = classScope.referenceType(); IType typeHandle = (IType)factory.createElement(classScope, cu, existingElements, knownScopes); rememberWithMemberTypes(typeDecl, typeHandle);
ClassScope classScope = localType.scope; TypeDeclaration typeDecl = classScope.referenceType(); IType typeHandle = (IType)factory.createElement(classScope, cu, existingElements, knownScopes); rememberWithMemberTypes(typeDecl, typeHandle);