Examples of statements()


Examples of com.adobe.dp.css.CSSStylesheet.statements()

      } else if (lname.endsWith(".ttf") || lname.endsWith(".otf") || lname.endsWith(".ttc")) {
        fonts.add(name);
      }
    }

    Iterator stmts = stylesheet.statements();
    while (stmts.hasNext()) {
      Object stmt = stmts.next();
      if (stmt instanceof FontFaceRule) {
        Object src = ((FontFaceRule) stmt).get("src");
        if (src instanceof CSSURL) {
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Block.statements()

    List statements;
    if (adapter.isRoot()) {
      MethodDeclaration initMethod = getMethodDeclaration(type, INIT_METHOD_NAME);
      if (initMethod != null) {
        Block body = initMethod.getBody();
        statements = body.statements();
      } else {
        initMethod = getMethodDeclaration(type, type.getName().getFullyQualifiedName());
        if (initMethod != null) {
          Block body = initMethod.getBody();
          statements = body.statements();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Block.statements()

  }

 
  private boolean createEventMethodForWidget(TypeDeclaration type, WidgetAdapter adapter, EventSetDescriptor esd, MethodDescriptor mListener, MethodDeclaration md) {
    Block body = md.getBody();
    List statements = body.statements();
    if (!adapter.isRoot()&&!statements.isEmpty()) {
      Object firstStatement = statements.get(0);
      if (firstStatement instanceof IfStatement) {
        IfStatement ifstatement = (IfStatement) firstStatement;
        Statement thenstatement = ifstatement.getThenStatement();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Block.statements()

        statements = body.statements();
      } else {
        initMethod = getMethodDeclaration(type, type.getName().getFullyQualifiedName());
        if (initMethod != null) {
          Block body = initMethod.getBody();
          statements = body.statements();
        } else {
          statements = new ArrayList();
        }
      }
    } else {
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Block.statements()

    } else {
      String getMethodName = NamespaceUtil.getGetMethodName(adapter, adapter.getID());
      MethodDeclaration getMethod = getMethodDeclaration(type, getMethodName);
      if (getMethod != null) {
        Block body = getMethod.getBody();
        statements = body.statements();
        if (!statements.isEmpty()) {
          Object first = statements.get(0);
          if (first instanceof IfStatement) {
            IfStatement ifs = (IfStatement) statements.get(0);
            Statement thenstmt = ifs.getThenStatement();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Block.statements()

          if (first instanceof IfStatement) {
            IfStatement ifs = (IfStatement) statements.get(0);
            Statement thenstmt = ifs.getThenStatement();
            if (thenstmt instanceof Block) {
              Block block = (Block) thenstmt;
              statements = block.statements();
            }
          }
        }
      } else {
        MethodDeclaration initMethod = getMethodDeclaration(type, INIT_METHOD_NAME);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Block.statements()

          }
        }
      } else {
        MethodDeclaration initMethod = getMethodDeclaration(type, INIT_METHOD_NAME);
        Block body = initMethod.getBody();
        statements = body.statements();
      }
    }
    return statements;
  }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Block.statements()

                while (nodesIter.hasNext()) {
                    Block body = (Block) nodesIter.next();
                    AST ast = body.getAST();
                    Statement invocation = _createSetCheckpointInvocation(ast);
                    List<Statement> statements = body.statements();
                    statements.add(statements.size() - 2, invocation);
                    nodesIter.remove();
                }
            }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Block.statements()

        recordInvocation.arguments().add(timestampGetter);

        // The statement of the method call.
        ExpressionStatement recordStatement = ast
                .newExpressionStatement(recordInvocation);
        thenBranch.statements().add(recordStatement);

        ifStatement.setThenStatement(thenBranch);
        block.statements().add(ifStatement);

        // Finally, assign the new value to the field.
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Block.statements()

        timestampGetter.setName(ast.newSimpleName("getTimestamp"));

        // Set the timestamp as the next argument.
        backup.arguments().add(timestampGetter);

        body.statements().add(ast.newExpressionStatement(backup));

        // The second statement: return the array.
        ReturnStatement returnStatement = ast.newReturnStatement();
        returnStatement.setExpression((Expression) ASTNode.copySubtree(ast,
                field));
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.