Package net.sourceforge.marathon.api.module

Examples of net.sourceforge.marathon.api.module.Function


        Module modForSingleMethodFile = modForFilesAndDirsInModDir.get(0);
        Assert.assertTrue(modForSingleMethodFile.isFile());
        List<Function> functionsInFile = modForSingleMethodFile.getFunctions();
        Assert.assertEquals(1, functionsInFile.size());

        Function function = functionsInFile.get(0);
        Assert.assertTrue(function.getName().equals("firstMethod"));
    }
View Full Code Here


        Module modForSingleMethodFile = modForFilesAndDirsInModDir.get(0);
        Assert.assertTrue(modForSingleMethodFile.isFile());
        List<Function> functionsInFile = modForSingleMethodFile.getFunctions();
        Assert.assertEquals(2, functionsInFile.size());

        Function function = functionsInFile.get(0);
        Assert.assertTrue(function.getName().equals("firstMethod"));
        function = functionsInFile.get(1);
        Assert.assertTrue(function.getName().equals("secondMethod"));
    }
View Full Code Here

        Module modForSingleMethodFile = modForFilesAndDirsInModDir.get(0);
        Assert.assertTrue(modForSingleMethodFile.isFile());
        List<Function> functionsInFile = modForSingleMethodFile.getFunctions();
        Assert.assertEquals(1, functionsInFile.size());

        Function function = functionsInFile.get(0);
        Assert.assertEquals(function.getName(), "methodWithOneArg");

        List<Argument> arguments = function.getArguments();
        Assert.assertEquals(1, arguments.size());

    }
View Full Code Here

        Module modForSingleMethodFile = modForFilesAndDirsInModDir.get(0);
        Assert.assertTrue(modForSingleMethodFile.isFile());
        List<Function> functionsInFile = modForSingleMethodFile.getFunctions();
        Assert.assertEquals(1, functionsInFile.size());

        Function function = functionsInFile.get(0);
        Assert.assertEquals(function.getName(), "methodWithArgs");

        List<Argument> arguments = function.getArguments();
        Assert.assertEquals(7, arguments.size());
        Assert.assertEquals("", function.getDocumentation());

        int constant = 0;
        Argument argument;

        argument = arguments.get(constant++);
View Full Code Here

        Module modForSingleMethodFile = modForFilesAndDirsInModDir.get(0);
        Assert.assertTrue(modForSingleMethodFile.isFile());
        List<Function> functionsInFile = modForSingleMethodFile.getFunctions();
        Assert.assertEquals(1, functionsInFile.size());

        Function function = functionsInFile.get(0);
        Assert.assertEquals("methodWithDoc", function.getName());

        Assert.assertEquals("This is the documentation", function.getDocumentation());
    }
View Full Code Here

        Module modForSingleMethodFile = modForFilesAndDirsInModDir.get(0);
        Assert.assertTrue(modForSingleMethodFile.isFile());
        List<Function> functionsInFile = modForSingleMethodFile.getFunctions();
        Assert.assertEquals(1, functionsInFile.size());

        Function function = functionsInFile.get(0);
        Assert.assertEquals(function.getName(), "methodWithWindow");

        Assert.assertEquals("Window Name", function.getWindow());

    }
View Full Code Here

        Module modForSingleMethodFile = modForFilesAndDirsInModDir.get(0);
        Assert.assertTrue(modForSingleMethodFile.isFile());
        List<Function> functionsInFile = modForSingleMethodFile.getFunctions();
        Assert.assertEquals(1, functionsInFile.size());

        Function function = functionsInFile.get(0);
        Assert.assertEquals(function.getName(), "methodWithWindow");

        Assert.assertNull(function.getWindow());

    }
View Full Code Here

        Module modForSingleMethodFile = modForFilesAndDirsInModDir.get(0);
        Assert.assertTrue(modForSingleMethodFile.isFile());
        List<Function> functionsInFile = modForSingleMethodFile.getFunctions();
        Assert.assertEquals(1, functionsInFile.size());

        Function function = functionsInFile.get(0);
        Assert.assertEquals(function.getName(), "methodWithWindow");

        Assert.assertEquals("Window Name", function.getWindow());

    }
View Full Code Here

        String doc = "";
        if (docNode.startsWith("'''") && docNode.endsWith("'''")) {
            doc = docNode.substring(3, docNode.length() - 3);
        }

        Function function = module.addFunction(functionName, argsList, doc);
        // Get the window name for this function.
        function.setWindow(getWindowName(defn));
    }
View Full Code Here

                final String[] args;
                Component root = SwingUtilities.getRoot(tree);
                Window parent = null;
                if (root instanceof Window)
                    parent = (Window) root;
                Function f = (Function) functionNode.getUserObject();
                if (f.getArguments().size() == 0)
                    args = new String[0];
                else {
                    ParameterDialog dialog = new ParameterDialog(parent, f);
                    if (dialog.showDialog() != ParameterDialog.OK)
                        return;
View Full Code Here

TOP

Related Classes of net.sourceforge.marathon.api.module.Function

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.