Package org.eclipse.jdt.core.dom

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


        if (nodeType == ASTNode.IMPORT_DECLARATION)
          return false;
      }

      // 2: match interfaces
      IBinding binding= token.getBinding();
      return binding instanceof ITypeBinding && ((ITypeBinding) binding).isInterface();
    }
View Full Code Here


        if (nodeType == ASTNode.IMPORT_DECLARATION)
          return false;
      }

      // 2: match annotations
      IBinding binding= token.getBinding();
      return binding instanceof ITypeBinding && ((ITypeBinding) binding).isAnnotation();
    }
View Full Code Here

    /*
     * @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();
    }
View Full Code Here

    public boolean consumes(SemanticToken token) {
      SimpleName node= token.getNode();
      if (node.isDeclaration())
        return false;

      IBinding binding= token.getBinding();
      return binding != null && binding.getKind() == IBinding.METHOD && (binding.getModifiers() & Modifier.STATIC) == Modifier.STATIC;
    }
View Full Code Here

     * @see org.eclipse.jdt.internal.ui.javaeditor.ISemanticHighlighting#isMatched(org.eclipse.jdt.core.dom.ASTNode)
     */
    public boolean consumes(SemanticToken token) {
      SimpleName node= token.getNode();
      if (node.getParent() instanceof MemberValuePair) {
        IBinding binding= token.getBinding();
        boolean isAnnotationElement= binding != null && binding.getKind() == IBinding.METHOD;

        return isAnnotationElement;
      }

      return false;
View Full Code Here

    public boolean consumes(SemanticToken token) {
      SimpleName node= token.getNode();
      if (node.isDeclaration())
        return false;

      IBinding binding= token.getBinding();
      boolean isAbstractMethod= binding != null && binding.getKind() == IBinding.METHOD && (binding.getModifiers() & Modifier.ABSTRACT) == Modifier.ABSTRACT;
      if (!isAbstractMethod)
        return false;

      // filter out annotation value references
      if (binding != null) {
View Full Code Here

    public boolean consumes(SemanticToken token) {
      SimpleName node= token.getNode();
      if (node.isDeclaration())
        return false;

      IBinding binding= token.getBinding();
      if (binding == null || binding.getKind() != IBinding.METHOD)
        return false;

      ITypeBinding currentType= Bindings.getBindingOfParentType(node);
      ITypeBinding declaringType= ((IMethodBinding) binding).getDeclaringClass();
      if (currentType == declaringType || currentType == null)
View Full Code Here

    /*
     * @see org.eclipse.jdt.internal.ui.javaeditor.ISemanticHighlighting#isMatched(org.eclipse.jdt.core.dom.ASTNode)
     */
    public boolean consumes(SemanticToken token) {
      IBinding binding= getMethodBinding(token);
      return binding != null && binding.getKind() == IBinding.METHOD;
    }
View Full Code Here

     *
     * @param token the token to extract the method binding from
     * @return the corresponding method binding, or <code>null</code>
     */
    private IBinding getMethodBinding(SemanticToken token) {
      IBinding binding= null;
      // work around: https://bugs.eclipse.org/bugs/show_bug.cgi?id=62605
      ASTNode node= token.getNode();
      ASTNode parent= node.getParent();
      while (isTypePath(node, parent)) {
        node= parent;
View Full Code Here

    /*
     * @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.FINAL | Modifier.STATIC)) == (Modifier.FINAL | Modifier.STATIC);
    }
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.