Examples of traverse()


Examples of org.eclipse.jdt.internal.compiler.ast.Initializer.traverse()

                if (newLinesBeforeFirstClassBodyDeclaration > 0) {
                  this.scribe.printEmptyLines(newLinesBeforeFirstClassBodyDeclaration);
                }
              }
              Initializer initializer = (Initializer) member;
              initializer.traverse(this, null);
            } else {
              FieldDeclaration field = (FieldDeclaration) member;
              format(field, this, null, isChunkStart, i == 0);
            }
          } else if (member instanceof AbstractMethodDeclaration) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse()

      int from,
      char[][] discouragedNames,
      UnresolvedReferenceNameRequestor nameRequestor) {
    MethodDeclaration fakeMethod =
      this.findAfter(startWith, scope, from, initializer.bodyEnd, MAX_LINE_COUNT, false, discouragedNames, nameRequestor);
    if (fakeMethod != null) fakeMethod.traverse(this, scope);
  }

  public void find(
      char[] startWith,
      AbstractMethodDeclaration methodDeclaration,
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.NameReference.traverse()

    } else {
      if (argument.isReceiver()) {
        this.scribe.space();
        NameReference qualifyingName = ((Receiver) argument).qualifyingName;
        if (qualifyingName != null) {
          qualifyingName.traverse(this, scope);
          this.scribe.printNextToken(TerminalTokens.TokenNameDOT, false);
        }
        this.scribe.printNextToken(TerminalTokens.TokenNamethis, false);
      } else {
        /*
 
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.Statement.traverse()

    for (int i = 0; i < statementsLength; i++) {
      final Statement statement = statements[i];
      if (i > 0 && (statements[i - 1] instanceof EmptyStatement) && !(statement instanceof EmptyStatement)) {
        this.scribe.printNewLine();
      }
      statement.traverse(this, scope);
      if (statement instanceof Expression) {
        this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
        this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
        if (i != statementsLength - 1) {
          if (!(statement instanceof EmptyStatement) && !(statements[i + 1] instanceof EmptyStatement)) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse()

        Node root = new Node(JavaEntityType.CLASS, className);
        root.setEntity(new SourceCodeEntity(className, JavaEntityType.CLASS, new SourceRange(
                type.declarationSourceStart,
                type.declarationSourceEnd)));
        sDeclarationConverter.initialize(root, compilation.getScanner());
        type.traverse(sDeclarationConverter, (ClassScope) null);
        return root;
    }

    private void extractClassDeclarationChanges(String className) {
        Node leftDeclaration = convertClassDeclaration(className, fLeftSnippet);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.TypeReference.traverse()

        try {
          this.scribe.alignFragment(superclassAlignment, 0);
          this.scribe.printNextToken(TerminalTokens.TokenNameextends, true);
          this.scribe.alignFragment(superclassAlignment, 1);
          this.scribe.space();
          superclass.traverse(this, typeDeclaration.scope);
          ok = true;
        } catch (AlignmentException e) {
          this.scribe.redoAlignment(e);
        }
      } while (!ok);
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.PHPMethodDeclaration.traverse()

            PHPMethodDeclaration phpMethod = (PHPMethodDeclaration) s;

            if (inTwigExtension&& phpMethod.getName().equals(TwigCoreConstants.GET_FILTERS)) {

                phpMethod.traverse(new PHPASTVisitor()
                {

                    @Override
                    public boolean visit(ArrayElement s) throws Exception
                    {
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.PHPModuleDeclaration.traverse()

   
    try {
     
      PHPModuleDeclaration module = (PHPModuleDeclaration) SourceParserUtil.parse(field.getSourceModule(), null);         
      FieldReferenceParser typeParser = new FieldReferenceParser(field);
      module.traverse(typeParser);
     
      if (typeParser.getReference() != null) {     
        SimpleReference ref = typeParser.getReference();     
        type = ref.getName();
       
View Full Code Here

Examples of org.eclipse.swt.widgets.Control.traverse()

            if (verboseTraverseOut) {
                trace("SWT: current focus control is null; using=" + focusControl);
            }
        }
        if (focusControl != null) {
            boolean traverse = focusControl.traverse(direction);
           
            Control newFocusControl = display.getFocusControl();
            if (traverse && (newFocusControl == focusControl) && (newFocusControl == activeBorderless)) {
                // We were unable to traverse anywhere else.
                if (verboseTraverseOut) {
View Full Code Here

Examples of org.eclipse.swt.widgets.Shell.traverse()

  public void portsTextTraversesOnTab() throws Exception {
    KeyEvent e = initPortsTextListener();
    e.keyCode = SWT.TAB;
    Shell shell = mock(Shell.class);
    when(((Control)e.getSource()).getShell()).thenReturn(shell);
    when(shell.traverse(SWT.TRAVERSE_TAB_NEXT)).thenReturn(true);

    portsTextListener.keyPressed(e);
    assertFalse(e.doit);
  }
 
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.