Examples of BlockNode


Examples of org.apache.airavata.workflow.model.graph.system.BlockNode

    /**
     * @see org.apache.airavata.workflow.model.component.Component#createNode(org.apache.airavata.workflow.model.graph.Graph)
     */
    @Override
    public Node createNode(Graph graph) {
        BlockNode node = new BlockNode(graph);

        node.setName(NAME);
        node.setComponent(this);

        // Creates a unique ID for the node. This has to be after setName().
        node.createID();

        createPorts(node);

        return node;
    }
View Full Code Here

Examples of org.apache.airavata.xbaya.graph.system.BlockNode

    /**
     * @see org.apache.airavata.xbaya.component.Component#createNode(org.apache.airavata.xbaya.graph.Graph)
     */
    @Override
    public Node createNode(Graph graph) {
        BlockNode node = new BlockNode(graph);

        node.setName(NAME);
        node.setComponent(this);

        // Creates a unique ID for the node. This has to be after setName().
        node.createID();

        createPorts(node);

        return node;
    }
View Full Code Here

Examples of org.apache.airavata.xbaya.graph.system.BlockNode

        } else if (GraphSchema.NODE_TYPE_MEMO.equals(type)) {
            node = new MemoNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_RECEIVE.equals(type)) {
            node = new ReceiveNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_BLOCK.equals(type)) {
            node = new BlockNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_ENDBLOCK.equals(type)) {
            node = new EndBlockNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_INSTANCE.equals(type)) {
            node = new InstanceNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_TERMINATE.equals(type)) {
View Full Code Here

Examples of org.apache.flex.compiler.internal.tree.as.BlockNode

        IfNode ifStmt = new IfNode(null);
        ConditionalNode cNode = new ConditionalNode(null);
        cNode.setConditionalExpression(nullCheck);
        ifStmt.addBranch(cNode);
        movieClipDataContents.addItem(ifStmt);
        BlockNode ifContents = cNode.getContentsNode();

        // generate: bytes = ByteArray(new $assetByteArray());
        ASToken newToken = new ASToken(ASTokenTypes.TOKEN_KEYWORD_NEW, -1, -1, -1, -1, IASKeywordConstants.NEW);
        FunctionCallNode newBytes = new FunctionCallNode(newToken, new IdentifierNode(byteArrayClassName));
        FunctionCallNode byteArrayCall = new FunctionCallNode(new IdentifierNode("ByteArray"));
        ContainerNode args = byteArrayCall.getArgumentsNode();
        args.addItem(newBytes);
        BinaryOperatorNodeBase assignmentBytes = BinaryOperatorNodeBase.create(assignToken, new IdentifierNode("bytes"), byteArrayCall);
        ifContents.addItem(assignmentBytes);

        // generate: return bytes;
        ReturnNode returnStmt = new ReturnNode(null);
        returnStmt.setStatementExpression(new IdentifierNode("bytes"));
        movieClipDataContents.addItem(returnStmt);
View Full Code Here

Examples of org.apache.flex.compiler.internal.tree.as.BlockNode

            if (parent instanceof BlockNode)
            {
                IASNode node = parent.getParent();
                if (node instanceof MemberedNode)
                {
                    BlockNode contents = ((MemberedNode)node).getScopedNode();
                    int childCount = contents.getChildCount();
                    boolean found = false;
                    for (int i = 0; i < childCount; i++)
                    {
                        IASNode child = contents.getChild(i);
                        if (found)
                        {
                            if (child instanceof IDefinitionNode)
                            {
                                decoratedNode = (IDefinitionNode)child;
                                if (child instanceof ClassNode)
                                {
                                    analyze(EnumSet.of(PostProcessStep.POPULATE_SCOPE), ((ClassNode)child).getScopedNode().getASScope(), new ArrayList<ICompilerProblem>(0));
                                }
                                if (child instanceof BaseDefinitionNode)
                                {
                                    ((BaseDefinitionNode)child).setMetaTags(this);
                                }
                                break;
                            }
                        }
                        else
                        {
                            if (child == this)
                            {
                                found = true;
                            }
                        }
                    }
                    //we're still null, so let's loop through backwards to see if we can find the node we are decorating
                    //this could happen in MXML land when the mx:MetaData block comes after a script/event block
                    if (decoratedNode == null && found)
                    {
                        for (int i = childCount - 1; i >= 0; i--)
                        {
                            IASNode child = contents.getChild(i);
                            if (child instanceof IDefinitionNode)
                            {
                                decoratedNode = (IDefinitionNode)child;
                                if (child instanceof ClassNode)
                                {
View Full Code Here

Examples of org.jruby.ast.BlockNode

    public void compileBignum(Node node, BodyCompiler context) {
        context.createNewBignum(((BignumNode) node).getValue());
    }

    public void compileBlock(Node node, BodyCompiler context) {
        BlockNode blockNode = (BlockNode) node;

        for (Iterator<Node> iter = blockNode.childNodes().iterator(); iter.hasNext();) {
            Node n = iter.next();

            compile(n, context);

            if (iter.hasNext()) {
View Full Code Here

Examples of org.jruby.ast.BlockNode

        Node nextNode = rootNode.getBodyNode();
        if (nextNode != null) {
            if (nextNode.nodeId == NodeType.BLOCKNODE) {
                // it's a multiple-statement body, iterate over all elements in turn and chain if it get too long
                BlockNode blockNode = (BlockNode) nextNode;

                for (int i = 0; i < blockNode.size(); i++) {
                    if ((i + 1) % RubyInstanceConfig.CHAINED_COMPILE_LINE_COUNT == 0) {
                        methodCompiler = methodCompiler.chainToMethod("__file__from_line_" + (i + 1));
                    }
                    compile(blockNode.get(i), methodCompiler);

                    if (i + 1 < blockNode.size()) {
                        // clear result from previous line
                        methodCompiler.consumeCurrentValue();
                    }
                }
            } else {
View Full Code Here

Examples of org.jruby.ast.BlockNode

        case REGEXPNODE:
            break;
        case ROOTNODE:
            inspect(((RootNode)node).getBodyNode());
            if (((RootNode)node).getBodyNode() instanceof BlockNode) {
                BlockNode blockNode = (BlockNode)((RootNode)node).getBodyNode();
                if (blockNode.size() > 500) {
                    // method has more than 500 lines; we'll need to split it
                    // and therefore need to use a heap-based scope
                    setFlag(SCOPE_AWARE);
                }
            }
View Full Code Here

Examples of org.jruby.ast.BlockNode

              }
  break;
case 451:
          // line 1702 "DefaultRubyParser.y"
  {
                  yyVal = new BlockNode(getPosition(((Node)yyVals[0+yyTop]))).add(((Node)yyVals[0+yyTop]));
              }
  break;
case 452:
          // line 1705 "DefaultRubyParser.y"
  {
View Full Code Here

Examples of org.jruby.ast.BlockNode

            if (topOfAST == null) topOfAST = NilImplicitNode.NIL;
           
            return new RootNode(position, result.getScope(), topOfAST);
        }
       
        BlockNode newTopOfAST = new BlockNode(position);
        for (Node beginNode: result.getBeginNodes()) {
            appendToBlock(newTopOfAST, beginNode);
        }
       
        // Add real top to new top (unless this top is empty [only begin/end nodes or truly empty])
        if (topOfAST != null) newTopOfAST.add(topOfAST);
       
        return new RootNode(position, result.getScope(), newTopOfAST);
    }
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.