Package org.eclipse.jdt.core.dom

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


      if (node.getSuperclass() != null) {
        extendsClass.add(resolveBinding(node.getSuperclass()));
      }
      if (!node.superInterfaces().isEmpty()) {
        for (Iterator it = node.superInterfaces().iterator(); it.hasNext();) {
          Name n = (Name) it.next();
          implementsInterfaces.add(resolveBinding(n));
        }
      }
    }
    else if (node.getAST().apiLevel() >= AST.JLS3) {
View Full Code Here


 
    IValueList possibleExceptions = new IValueList(values);
    if (!node.thrownExceptions().isEmpty()) {
 
      for (Iterator it = node.thrownExceptions().iterator(); it.hasNext();) {
        Name n = (Name) it.next();
        possibleExceptions.add(visitChild(n));
      }
    }
 
    IValue body = node.getBody() == null ? null : visitChild(node.getBody());
View Full Code Here

      if (node.getSuperclass() != null) {
        extendsClass.add(visitChild(node.getSuperclass()));
      }
      if (!node.superInterfaces().isEmpty()) {
        for (Iterator it = node.superInterfaces().iterator(); it.hasNext();) {
          Name n = (Name) it.next();
          implementsInterfaces.add(visitChild(n));
        }
      }
    } else if (node.getAST().apiLevel() >= AST.JLS3) {
      if (node.getSuperclassType() != null) {
View Full Code Here

    private void handleUndefinedName(ISigilProjectModel project,
        IInvocationContext context, IProblemLocation problem,
        HashMap<Object, IJavaCompletionProposal> results)
    {
        Name node = findNode(context, problem);

        if (node == null)
        {
            return;
        }
View Full Code Here

    private void handleUndefinedType(ISigilProjectModel project,
        IInvocationContext context, IProblemLocation problem,
        HashMap<Object, IJavaCompletionProposal> results) throws CoreException
    {
        Name node = findNode(context, problem);

        if (node == null)
        {
            return;
        }
View Full Code Here

        // happens if import package is already added but exported package has been removed
        if (selectedNode instanceof ClassInstanceCreation)
        {
            ClassInstanceCreation c = (ClassInstanceCreation) selectedNode;
            Type t = c.getType();
            Name node = findName(t);
            if (node != null)
            {
                addSearchResults(node, project, results);
            }
        }
View Full Code Here

        while (selectedNode.getLocationInParent() == QualifiedName.NAME_PROPERTY)
        {
            selectedNode = selectedNode.getParent();
        }

        Name node = null;

        if (selectedNode instanceof Type)
        {
            node = findName((Type) selectedNode);
        }
View Full Code Here

      CompilationUnit cunit = (CompilationUnit) parser.createAST(null);
      cunit.recordModifications();
      AST ast = cunit.getAST();
      TypeDeclaration typeDec = (TypeDeclaration) cunit.types().get(0);
      List list = typeDec.superInterfaceTypes();
      Name name = ast.newName(cName);
      Type interfaceType = ast.newSimpleType(name);
      list.add(interfaceType);
      TextEdit edits = cunit.rewrite(document, icunit.getJavaProject()
          .getOptions(true));
      edits.apply(document);
View Full Code Here

  /**
   * Example: (2 in 1)  java.lang.System.out.println("Hello");
   */
  public boolean visit(QualifiedName node) {
    SimpleName name = node.getName();
    Name qualifier = node.getQualifier();
    IBinding nameBinding = name.resolveBinding();
    // If this is a Field access, then add children to CFG
    if(nameBinding.getKind() == IBinding.VARIABLE) {
      IVariableBinding variableBinding = (IVariableBinding) nameBinding;
      if(variableBinding.isField()) {
View Full Code Here

   * @param node
   * @return the {@link ThisVariable} for the given <code>this</code>
   * expression.
   */
  private ThisVariable getThisVariable(ThisExpression node) {
    Name qualifier = node.getQualifier();
    /**
     * The rule is that the declared, generic type, is the single canonical type.
     * Parameterized types are actually different type bindings.
     * @see org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment#createParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType)
     */
 
View Full Code Here

TOP

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

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.