Examples of FunctionNode


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

    }

    @Override
    public void emitMethod(IFunctionNode node)
    {
        FunctionNode fn = (FunctionNode) node;
        fn.parseFunctionBody(new ArrayList<ICompilerProblem>());

        ICompilerProject project = getWalker().getProject();

        getDoc().emitMethodDoc(node, project);

        boolean isConstructor = node.isConstructor();

        String qname = getTypeDefinition(node).getQualifiedName();
        if (qname != null && !qname.equals(""))
        {
            write(qname);
            if (!isConstructor)
            {
                write(ASEmitterTokens.MEMBER_ACCESS);
                if (!fn.hasModifier(ASModifier.STATIC))
                {
                    write(JSEmitterTokens.PROTOTYPE);
                    write(ASEmitterTokens.MEMBER_ACCESS);
                }
            }
View Full Code Here

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

            {get: function() {return -1;},
            configurable: true}
         );
        */

        FunctionNode fn = (FunctionNode) node;
        fn.parseFunctionBody(getProblems());

        // head
        write(JSGoogEmitterTokens.OBJECT);
        write(ASEmitterTokens.MEMBER_ACCESS);
        write(JSEmitterTokens.DEFINE_PROPERTY);
View Full Code Here

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

        packageContents.addItem(classNodePbj);

        // build the constructor
        IdentifierNode constructorNameNode = new IdentifierNode(pbjClassName);
        constructorNameNode.setReferenceValue(classNodePbj.getDefinition());
        FunctionNode constructorNode = new FunctionNode(null, constructorNameNode);
        constructorNode.setNamespace(new NamespaceIdentifierNode(INamespaceConstants.public_));
        ScopedBlockNode constructorContents = constructorNode.getScopedNode();

        // generate: super();
        FunctionCallNode superCall = new FunctionCallNode(LanguageIdentifierNode.buildSuper());
        constructorContents.addItem(superCall);
View Full Code Here

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

            String baseName = null;
            if (!(definition instanceof FunctionDefinition))
                return null;

            FunctionDefinition functionDefinition = (FunctionDefinition)definition;
            FunctionNode functionNode = (FunctionNode)functionDefinition.getNode();
            if (functionNode == null)
                return null;

            if (functionNode.isConstructor())
            {
                baseName = "$construct/";
            }
            else if (functionNode.getParent() instanceof FunctionObjectNode)
            {
                String functionName = functionDefinition.getBaseName();
                if (functionName.isEmpty())
                    baseName = "anonymous/";
                else
View Full Code Here

Examples of org.cfeclipse.cfml.views.packageview.objects.FunctionNode

        funcCreateObject = new Action()
        {
            public void run()
            {
                ISelection selection = viewer.getSelection();
                FunctionNode obj = (FunctionNode) ((IStructuredSelection) selection).getFirstElement();
                insert(obj.getCreateObjectSnippet());
            }
        };
        funcCreateObject.setText("Insert CreateObject");
        funcCreateObject.setToolTipText("Inserts CreateObject code");

        funcInvokeObject = new Action()
        {
            public void run()
            {
                ISelection selection = viewer.getSelection();
                FunctionNode obj = (FunctionNode) ((IStructuredSelection) selection).getFirstElement();
                insert(obj.getInvokeSnippet());
            }
        };
        funcInvokeObject.setText("Insert Invoke");
        funcInvokeObject.setToolTipText("Inserts cfinvoke code");

        getFunctionDetails = new Action()
        {
            public void run()
            {
                ISelection selection = viewer.getSelection();
                FunctionNode obj = (FunctionNode) ((IStructuredSelection) selection).getFirstElement();
                showMessage(obj.getDetails());

            }
        };
        getFunctionDetails.setText("Get Details");

        getComponentDetails = new Action()
        {
            public void run()
            {
                ISelection selection = viewer.getSelection();
                ComponentNode obj = (ComponentNode) ((IStructuredSelection) selection).getFirstElement();
                showMessage(obj.getDetails());
            }
        };
        getComponentDetails.setText("Get Details");

        getDescription = new Action()
        {
            public void run()
            {
                ISelection selection = viewer.getSelection();
                ComponentNode obj = (ComponentNode) ((IStructuredSelection) selection).getFirstElement();
                //showMessage(obj.getDetails());
                CFMLPropertyManager propMan = new CFMLPropertyManager();

                try
                {
                    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                    BrowserView browser = (BrowserView) page.showView(BrowserView.ID_BROWSER);
                    String rootURL = propMan.defaultProjectURL();

                    URL projURL = new URL(rootURL);

                    //todo
                    //browser.setUrl("http://" + projURL.getHost() + "/CFIDE/componentutils/cfcexplorer.cfc?METHOD=getcfcinhtml&NAME=" + obj.getPackageName());
                    //browser.setFocus();
                }
                catch (PartInitException e)
                {
                    e.printStackTrace();
                }
                catch (MalformedURLException mue)
                {
                    mue.printStackTrace();
                }

            }
        };
        getDescription.setText("Get Description");

        /*
        action1 = new Action()
        {
            public void run()
            {
                ISelection selection = viewer.getSelection();
                FunctionNode obj = (FunctionNode) ((IStructuredSelection) selection).getFirstElement();
                showMessage(obj.getCreateObjectSnippet());
            }
        };
        action1.setText("Insert CreateObject");
        action1.setToolTipText("Inserts CreateObject code");
        action1.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
        */

        doubleClickAction = new Action()
        {
            public void run()
            {
                ISelection selection = viewer.getSelection();
                Object obj = ((IStructuredSelection) selection).getFirstElement();

                if (obj instanceof ComponentNode)
                {
                    ComponentNode component = (ComponentNode) obj;
                    GenericOpenFileAction openAction = new GenericOpenFileAction(component.getFile());
                    openAction.run();
                }
                else if (obj instanceof FunctionNode)
                {
                    FunctionNode fnode = (FunctionNode) obj;
                    insert(fnode.getInvokeSnippet());
                }
                else {
                  viewer.expandToLevel(obj, 1);
                }

View Full Code Here

Examples of org.chromium.debug.ui.liveedit.LiveEditDiffViewer.FunctionNode

          oldSourceComment.length(), newSourceComment.length(), wrapperMatch.getPrefixLength(),
          wrapperMatch.getSuffixLength(), oldSourceRaw.length(), newSourceRaw.length());
    }

    TreeBuilder builder = new TreeBuilder(previewMode, oldPositionOffset, newPositionOffset);
    final FunctionNode rootFunction = builder.build(changeDescription);

    return new InputBase(newSource, oldSource) {
      @Override public FunctionNode getRootFunction() {
        return rootFunction;
      }
View Full Code Here

Examples of org.chromium.debug.ui.liveedit.LiveEditDiffViewer.FunctionNode

        return Arrays.asList(
            0L, (long) oldSource.length(), (long) newSource.length());
      }
    };

    final FunctionNode fakeFunctionNode = new FunctionNode() {
      @Override public String getName() {
        return compileError.getCompilerMessage();
      }
      @Override public String getStatus() {
        return Messages.PushResultParser_COMPILE_ERROR;
View Full Code Here

Examples of org.erlide.tracing.core.mvc.model.treenodes.FunctionNode

            // module name node
            final TreeNode moduleNameNode = new ModuleNode(moduleName.atomValue());
            moduleNameNode.setLabel("module: " + moduleName);

            // function name node
            final TreeNode functionNameNode = new FunctionNode(moduleName.atomValue(),
                    functionName.atomValue(), arityValue);
            functionNameNode.setLabel("function: " + functionName);

            node.addChildren(moduleNameNode, functionNameNode, argsNode);
            lastFunctionDescription = label + moduleName + ":" + functionName + "/"
                    + arityValue;
View Full Code Here

Examples of org.erlide.tracing.core.mvc.model.treenodes.FunctionNode

        final IStructuredSelection selection = (IStructuredSelection) event
                .getSelection();
        final ITreeNode treeNode = (ITreeNode) selection.getFirstElement();
        try {
            if (treeNode instanceof FunctionNode) {
                final FunctionNode functionNode = (FunctionNode) treeNode;
                ErlModelUtils.openMFA(functionNode.getModuleName(),
                        functionNode.getFunctionName(), functionNode.getArity());
            } else if (treeNode instanceof ModuleNode) {
                final ModuleNode moduleNode = (ModuleNode) treeNode;
                ErlModelUtils.openModule(moduleNode.getModuleName());
            }
        } catch (final CoreException e) {
View Full Code Here

Examples of org.geppetto.core.model.runtime.FunctionNode

   
    URLMetadataNode url = new URLMetadataNode("URL");
    url.setValue(new DoubleValue(2));
    url.setURL("hhtp://url.com");
   
    FunctionNode function = new FunctionNode("Function");
    function.setExpression("x=y^2");
    function.setName("hello");
   
    con1.getCustomNodes().add(text);
    con1.getCustomNodes().add(url);
    con1.getCustomNodes().add(function);
    con1.getVisualReferences().add(visObj);
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.