Package org.eclipse.php.internal.core.ast.nodes

Examples of org.eclipse.php.internal.core.ast.nodes.ASTNode


    return false;
  }

  @Override
  public IScriptCompletionProposal[] getAssists(IInvocationContext context, IProblemLocation[] locations) throws CoreException {
    final ASTNode coveringNode = context.getCoveringNode();
    if (hasAssists(context)) {
      return new IScriptCompletionProposal[]{
        new AssignToLocalCompletionProposal(context.getCompilationUnit(), coveringNode)
      };
    }
View Full Code Here


      // this is also an indicator, whether this loop was already gone through
      if(createdMethodBody) {
        inlineReplacementEditGroup = additionalInlineReplacementEdit;
      }
     
      ASTNode parent = selectedNodeOccurence.get(0).getParent();
     
      inlineMethodCall = ASTNode.copySubtree(ast, inlineMethodCall);
     
      ListRewrite lrw;
           
View Full Code Here

    if (basic == null || basic.length() < 1) {
      basic = DEFAULT_NAME;
    }
    basic = Character.toLowerCase(basic.charAt(0)) + basic.substring(1);
   
    ASTNode scope = searchScope(node);
    FindVariableVisitor find;
    int num = -1;
    do {
      num++;
      find = new FindVariableVisitor(num == 0 ? basic : basic + num);
      scope.childrenAccept(find);
    } while(find.found);
   
    return new String[] {find.search};
  }
View Full Code Here

    Program program = parser.createAST(new NullProgressMonitor());     
//    program.recordModifications();   
//    AST ast = program.getAST();   

    ISourceRange range = type.getSourceRange();   
    ASTNode node = program.getElementAt(range.getOffset());

    if (!(node instanceof ClassDeclaration)) {
      return ;       
    }
   
View Full Code Here

   * @since 2.1
   */
  public static ASTNode perform(ASTNode root, int start, int length) {
    NodeFinder finder = new NodeFinder(start, length);
    root.accept(finder);
    ASTNode result = finder.getCoveredNode();
    if (result == null || result.getStart() != start
        || result.getLength() != length) {
      return finder.getCoveringNode();
    }
    return result;
  }
View Full Code Here

    assertNotNull(program);

    // select the class name.
    int start = 54;
    ASTNode selectedNode = locateNode(program, start, 0);
    assertNotNull(selectedNode);

    assertEquals(PhpElementConciliator.CONCILIATOR_CLASSNAME,
        PhpElementConciliator.concile(selectedNode));
View Full Code Here

    assertNotNull(program);

    // select the class name.
    int start = 82;
    ASTNode selectedNode = locateNode(program, start, 0);
    assertNotNull(selectedNode);

    assertEquals(PhpElementConciliator.CONCILIATOR_CLASSNAME,
        PhpElementConciliator.concile(selectedNode));
  }
View Full Code Here

    assertNotNull(program);

    // select the class name.
    int start = 59;
    ASTNode selectedNode = locateNode(program, start, 0);
    assertNotNull(selectedNode);

    assertEquals(PhpElementConciliator.CONCILIATOR_CLASSNAME,
        PhpElementConciliator.concile(selectedNode));
View Full Code Here

    assertNotNull(program);

    // select the class name.
    int start = 25;
    ASTNode selectedNode = locateNode(program, start, 0);
    assertNotNull(selectedNode);

    assertEquals(PhpElementConciliator.CONCILIATOR_CLASSNAME,
        PhpElementConciliator.concile(selectedNode));
View Full Code Here

    assertNotNull(program);

    // select the class name.
    int start = 25;
    ASTNode selectedNode = locateNode(program, start, 0);
    assertNotNull(selectedNode);

    assertEquals(PhpElementConciliator.CONCILIATOR_CLASSNAME,
        PhpElementConciliator.concile(selectedNode));
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.core.ast.nodes.ASTNode

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.