Examples of ReferenceContext


Examples of org.eclipse.jdt.internal.compiler.impl.ReferenceContext

  private int computeRelevanceForSuper(MethodBinding method, Scope scope, InvocationSite site) {
    if (site instanceof CompletionOnMemberAccess) {
      CompletionOnMemberAccess access = (CompletionOnMemberAccess) site;
      if (access.isSuperAccess() && this.parser.assistNodeParent == null) {
        ReferenceContext referenceContext = scope.referenceContext();
        if (referenceContext instanceof AbstractMethodDeclaration) {  // LE is anonymous.
          MethodBinding binding = ((AbstractMethodDeclaration) referenceContext).binding;
          if (binding != null) {
            if (CharOperation.equals(binding.selector, method.selector)) {
              if (binding.areParameterErasuresEqual(method)) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.impl.ReferenceContext

          CompletionEngine.this.acceptUnresolvedName(name);
          proposedNames.add(name);
        }
      };

    ReferenceContext referenceContext = scope.referenceContext();
    if (referenceContext instanceof AbstractMethodDeclaration) {
      AbstractMethodDeclaration md = (AbstractMethodDeclaration)referenceContext;

      UnresolvedReferenceNameFinder nameFinder = new UnresolvedReferenceNameFinder(this);
      nameFinder.findAfter(
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.impl.ReferenceContext

    BlockScope upperScope = scope;
    while (upperScope.enclosingMethodScope() != null) {
      upperScope = upperScope.enclosingMethodScope();
    }

    ReferenceContext referenceContext = upperScope.referenceContext();
    if (referenceContext instanceof AbstractMethodDeclaration) {
      AbstractMethodDeclaration md = (AbstractMethodDeclaration)referenceContext;

      UnresolvedReferenceNameFinder nameFinder = new UnresolvedReferenceNameFinder(this);
      nameFinder.findBefore(
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.impl.ReferenceContext

            }
            proposedNames.add(name);
          }
        };

      ReferenceContext referenceContext = scope.referenceContext();
      if (referenceContext instanceof AbstractMethodDeclaration) {
        AbstractMethodDeclaration md = (AbstractMethodDeclaration)referenceContext;

        UnresolvedReferenceNameFinder nameFinder = new UnresolvedReferenceNameFinder(this);
        nameFinder.find(
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.impl.ReferenceContext

        if (node == null) {
          if (this.binding instanceof LocalVariableBinding) {
            LocalVariableBinding localVariableBinding = (LocalVariableBinding) this.binding;
            BlockScope blockScope = localVariableBinding.declaringScope;
            if (blockScope != null) {
              ReferenceContext referenceContext = blockScope.referenceContext();
              if (referenceContext instanceof Initializer) {
                return null;
              }
              if (referenceContext instanceof AbstractMethodDeclaration) {
                return this.resolver.getMethodBinding(((AbstractMethodDeclaration) referenceContext).binding);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.impl.ReferenceContext

    char[] typeSig = this.binding.type.genericTypeSignature();
    JavaElement parent = null;
    IMethodBinding declaringMethod = getDeclaringMethod();
    final LocalVariableBinding localVariableBinding = (LocalVariableBinding) this.binding;
    if (declaringMethod == null) {
      ReferenceContext referenceContext = localVariableBinding.declaringScope.referenceContext();
      if (referenceContext instanceof TypeDeclaration){
        // Local variable is declared inside an initializer
        TypeDeclaration typeDeclaration = (TypeDeclaration) referenceContext;
        JavaElement typeHandle = null;
        typeHandle = Util.getUnresolvedJavaElement(
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.impl.ReferenceContext

  int priority = 10000 - problem.getSourceLineNumber(); // early problems first
  if (priority < 0) priority = 0;
  if (problem.isError()){
    priority += P_ERROR;
  }
  ReferenceContext context = this.problemsMap == null ? null : (ReferenceContext) this.problemsMap.get(problem);
  if (context != null){
    if (context instanceof AbstractMethodDeclaration){
      AbstractMethodDeclaration method = (AbstractMethodDeclaration) context;
      if (method.isStatic()) {
        priority += P_STATIC;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.impl.ReferenceContext

  int priority = 10000 - problem.getSourceLineNumber(); // early problems first
  if (priority < 0) priority = 0;
  if (problem.isError()){
    priority += P_ERROR;
  }
  ReferenceContext context = this.problemsMap == null ? null : (ReferenceContext) this.problemsMap.get(problem);
  if (context != null){
    if (context instanceof AbstractMethodDeclaration){
      AbstractMethodDeclaration method = (AbstractMethodDeclaration) context;
      if (method.isStatic()) {
        priority += P_STATIC;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.impl.ReferenceContext

    BlockScope scope = this.declaringScope;
    int occurenceCount = 0;
    if (scope != null) {
      // the scope can be null. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=185129
      MethodScope methodScope = scope instanceof MethodScope ? (MethodScope) scope : scope.enclosingMethodScope();
      ReferenceContext referenceContext = methodScope.referenceContext;
      if (referenceContext instanceof AbstractMethodDeclaration) {
        MethodBinding methodBinding = ((AbstractMethodDeclaration) referenceContext).binding;
        if (methodBinding != null) {
          buffer.append(methodBinding.computeUniqueKey(false/*not a leaf*/));
        }
 
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.impl.ReferenceContext

      }
    }
    this.resolvedType = returnType;
  }
  if (this.receiver.isSuper() && compilerOptions.getSeverity(CompilerOptions.OverridingMethodWithoutSuperInvocation) != ProblemSeverities.Ignore) {
    final ReferenceContext referenceContext = scope.methodScope().referenceContext;
    if (referenceContext instanceof AbstractMethodDeclaration) {
      final AbstractMethodDeclaration abstractMethodDeclaration = (AbstractMethodDeclaration) referenceContext;
      MethodBinding enclosingMethodBinding = abstractMethodDeclaration.binding;
      if (enclosingMethodBinding.isOverriding()
          && CharOperation.equals(this.binding.selector, enclosingMethodBinding.selector)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.