Package org.eclipse.wb.core.eval

Examples of org.eclipse.wb.core.eval.ExecutionFlowDescription


    }
    ASTNode gridCreation = getCreationSupport().getNode();
    List<Expression> arguments = DomGenerics.arguments(gridCreation);
    for (Expression argument : arguments) {
      if (AstNodeUtils.isSuccessorOf(argument, "com.extjs.gxt.ui.client.widget.grid.ColumnModel")) {
        ExecutionFlowDescription flowDescription =
            JavaInfoUtils.getState(this).getFlowDescription();
        while (true) {
          if (argument instanceof ClassInstanceCreation) {
            return (ClassInstanceCreation) argument;
          }
View Full Code Here


    SimpleName possibleName = (SimpleName) possibleExpression;
    if (!columnsList.getIdentifier().equals(possibleName.getIdentifier())) {
      return false;
    }
    // there should be no re-assignment of "columnsList"
    ExecutionFlowDescription flowDescription = JavaInfoUtils.getState(this).getFlowDescription();
    ASTNode columnsAssignment = ExecutionFlowUtils.getLastAssignment(flowDescription, columnsList);
    ASTNode possibleAssignment =
        ExecutionFlowUtils.getLastAssignment(flowDescription, possibleName);
    return columnsAssignment == possibleAssignment;
  }
View Full Code Here

    // check for @wbp.parser.entryPoint
    {
      MethodDeclaration method = ExecutionFlowUtils.getExecutionFlow_entryPoint(typeDeclaration);
      if (method != null) {
        List<MethodDeclaration> rootMethods = Lists.newArrayList(method);
        return new ParseRootContext(null, new ExecutionFlowDescription(rootMethods));
      }
    }
    // support for EntryPoint
    if (AstNodeUtils.isSuccessorOf(typeBinding, "com.google.gwt.core.client.EntryPoint")) {
      MethodDeclaration onModuleLoadMethod =
          AstNodeUtils.getMethodBySignature(typeDeclaration, "onModuleLoad()");
      if (onModuleLoadMethod != null) {
        List<MethodDeclaration> rootMethods = Lists.newArrayList(onModuleLoadMethod);
        return new ParseRootContext(null, new ExecutionFlowDescription(rootMethods));
      }
    }
    // support for com.google.gwt.user.client.ui.UIObject
    if (AstNodeUtils.isSuccessorOf(typeBinding, "com.google.gwt.user.client.ui.UIObject")) {
      ITypeBinding typeBinding_super = typeBinding.getSuperclass();
      // prepare class of component
      Class<?> superClass = getSuperClass(editor, typeBinding_super);
      // prepare creation
      MethodDeclaration constructor = getConstructor(editor, typeDeclaration);
      ThisCreationSupport creationSupport = new ThisCreationSupport(constructor);
      // create JavaInfo
      JavaInfo javaInfo = JavaInfoUtils.createJavaInfo(editor, superClass, creationSupport);
      if (javaInfo != null) {
        javaInfo.setVariableSupport(new ThisVariableSupport(javaInfo, constructor));
        // prepare root context
        List<MethodDeclaration> rootMethods = Lists.newArrayList();
        rootMethods.add(constructor);
        return new ParseRootContext(javaInfo, new ExecutionFlowDescription(rootMethods));
      }
    }
    // no root found
    return null;
  }
View Full Code Here

    if (columnModelCreation == null) {
      return null;
    }
    // "columns" Array usage in "ColumnModel" creation
    Expression columnArray = DomGenerics.arguments(columnModelCreation).get(0);
    ExecutionFlowDescription flowDescription = JavaInfoUtils.getState(this).getFlowDescription();
    while (true) {
      if (columnArray instanceof ArrayCreation) {
        return (ArrayCreation) columnArray;
      }
      if (AstNodeUtils.isVariable(columnArray)) {
View Full Code Here

  private ClassInstanceCreation getColumnModelCreation0(ASTNode node, boolean ensure)
      throws Exception {
    List<Expression> arguments = DomGenerics.arguments(node);
    for (Expression argument : arguments) {
      if (AstNodeUtils.isSuccessorOf(argument, "com.gwtext.client.widgets.grid.ColumnModel")) {
        ExecutionFlowDescription flowDescription =
            JavaInfoUtils.getState(this).getFlowDescription();
        while (true) {
          if (argument instanceof ClassInstanceCreation) {
            return (ClassInstanceCreation) argument;
          }
View Full Code Here

    // process nodes
    if (!nodes.isEmpty()) {
      nodes.add(getCreationSupport().getNode());
      nodes.add(component.getCreationSupport().getNode());
      // sort nodes
      ExecutionFlowDescription flowDescription =
          JavaInfoUtils.getState(getRootJava()).getFlowDescription();
      JavaInfoUtils.sortNodesByFlow(flowDescription, false, nodes);
      ASTNode targetNode = nodes.get(nodes.size() - 1);
      return new StatementTarget(targetNode, false);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.wb.core.eval.ExecutionFlowDescription

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.