Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.IBinding


    /*
     * @see org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlighting#consumes(org.eclipse.jdt.internal.ui.javaeditor.SemanticToken)
     */
    public boolean consumes(SemanticToken token) {
      IBinding binding= token.getBinding();
      return binding != null && binding.getKind() == IBinding.VARIABLE && ((IVariableBinding)binding).isField() && (binding.getModifiers() & Modifier.STATIC) == Modifier.STATIC;
    }
View Full Code Here


                    argumentType =
                            getInvocationHandler().convertParameterTypeBindingForMethodSignature(expressionBinding);
                } else if (expression instanceof Name) {
                    // manually resolving the type of the argument
                    Name castedName = (Name) expression;
                    IBinding binding = castedName.resolveBinding();
                    if ((binding != null) && (binding.getKind() == IBinding.VARIABLE)) {
                        IVariableBinding varBinding = (IVariableBinding) binding;
                        ITypeBinding varTypeBinding = varBinding.getType();
                        argumentType = getInvocationHandler().convert(varTypeBinding);
                    }
                    if (argumentType.equals(AbstractASTNodeHandler.UNDEFINED_BINDING)) {
View Full Code Here

     */
    @Override
    protected String convertFieldID() {
        String lFieldID = null;

        IBinding binding = getASTNode().resolveBinding();
        if (binding != null) {
            if (binding.getKind() == IBinding.VARIABLE) {
                if (((IVariableBinding) binding).isField()) {
                    IVariableBinding lVariableBinding = (IVariableBinding) binding;
                    if (lVariableBinding.getDeclaringClass() == null) {
                        // This is most likely an access to the length
                        // field of an array.
View Full Code Here

      methodHandle.addAccess(fieldHandle, location);
    }
  }

  private void createAccessFrom(Name node, SourceCodeLocationHelper location) {
    IBinding binding = node.resolveBinding();
    if(binding instanceof IVariableBinding) {
      IVariableBinding varBinding = (IVariableBinding) binding;
     
      if(varBinding.isField()) {
        createAccessFrom(varBinding, location);
View Full Code Here

   * @param node
   *            the node to visit
   */
  public boolean visit(Assignment node) {
    if (node.getLeftHandSide() instanceof SimpleName) {
      IBinding binding = ((SimpleName) node.getLeftHandSide())
          .resolveBinding();
      if (localVariableManagers.containsKey(binding)) {
        // contains key -> it is an assignment ot a local variable

        VariableBindingManager manager = localVariableManagers
View Full Code Here

   *
   * @param node
   *            the node to visit
   */
  public boolean visit(SimpleName node) {
    IBinding binding = node.resolveBinding();
    if (localVariableManagers.containsKey(binding)) {
      VariableBindingManager manager = localVariableManagers.get(binding);
      manager.variableRefereneced(node);
    }
    return true;
View Full Code Here

   * @param node
   *            the node to visit
   */
  public boolean visit(Assignment node) {
    if (node.getLeftHandSide() instanceof SimpleName) {
      IBinding binding = ((SimpleName) node.getLeftHandSide())
          .resolveBinding();
      if (localVariableManagers.containsKey(binding)) {
        // contains key -> it is an assignment ot a local variable

        VariableBindingManager manager = localVariableManagers
View Full Code Here

   *
   * @param node
   *            the node to visit
   */
  public boolean visit(SimpleName node) {
    IBinding binding = node.resolveBinding();
    if (localVariableManagers.containsKey(binding)) {
      VariableBindingManager manager = localVariableManagers.get(binding);
      manager.variableRefereneced(node);
    }
    return true;
View Full Code Here

    // no need to do a search if this is the same AST.
    if (compilationUnit.getAST() == searchDeclaration.getAST()) {
      return searchDeclaration;
    }

    IBinding binding = null;
    if (searchDeclaration instanceof MethodDeclaration) {
      binding = ((MethodDeclaration)searchDeclaration).resolveBinding();
    }
    if (searchDeclaration instanceof TypeDeclaration) {
      binding = ((TypeDeclaration)searchDeclaration).resolveBinding();
    }
    if (searchDeclaration instanceof SingleVariableDeclaration) {
      binding = ((SingleVariableDeclaration)searchDeclaration).resolveBinding();
    }
   
    return Generics.asT(
        binding != null?
          findDeclaration(compilationUnit, binding.getKey()):
          null);
  }
View Full Code Here

        }
      }

      if (node instanceof Name) {
        Name name = ((Name) node);
        IBinding b = name.resolveBinding();
        if (b instanceof IVariableBinding) {
          IVariableBinding vb = (IVariableBinding) b;
          castName(node, name, vb);
        }
      }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.IBinding

Copyright © 2018 www.massapicom. 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.