Package net.sourceforge.marathon.api.module

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


        assertEquals(1, top.getChildren().size());
        assertEquals(0, top.getFunctions().size());
        Module module = top.getChildren().get(0);
        assertEquals(1, module.getFunctions().size());
        assertEquals(0, module.getChildren().size());
        Function f = module.getFunctions().get(0);
        assertEquals("module_function_1", f.getName());
        assertEquals("f", f.getArguments().get(0).getName());
        assertEquals("s", f.getArguments().get(1).getName());
        assertEquals(null, f.getArguments().get(0).getDefault());
        assertEquals("Hello", f.getArguments().get(1).getDefault());
    }
View Full Code Here


        assertEquals(1, modules.size());
        Module login = modules.get(0);
        assertEquals("login", login.getName());
        List<Function> functions = login.getFunctions();
        assertEquals(2, functions.size());
        Function loginFunction = functions.get(0);
        String lineSepearator = System.getProperty("line.separator");
        assertEquals(convert2code(new String[] { "=begin", "This is an example with with_window call and comments", "=end" })
                .trim(), loginFunction.getDocumentation().trim().replaceAll("\n", lineSepearator));
        assertEquals("Login", loginFunction.getWindow());
        Function loginFunction2 = functions.get(1);
        assertEquals("", loginFunction2.getDocumentation());
        assertNull(loginFunction2.getWindow());
    }
View Full Code Here

        assertEquals(1, modules.size());
        Module arrays = modules.get(0);
        assertEquals("arrays", arrays.getName());
        List<Function> functions = arrays.getFunctions();
        assertEquals(3, functions.size());
        Function selectOneFunction = functions.get(0);
        assertEquals("select_one", selectOneFunction.getName());
        List<Argument> arguments = selectOneFunction.getArguments();
        assertEquals(2, arguments.size());
        Argument arg = arguments.get(0);
        assertEquals("integers", arg.getName());
        assertNull(arg.getDefault());
        assertNotNull(arg.getDefaultList());
View Full Code Here

                    return;
                }
            }
        }
        String name = defn.getName();
        Function f = module.addFunction(name, args, docNodes.getProperty(name));
        f.setWindow(getWindowName(defn));
        return;
    }
View Full Code Here

            argumentPanel.setBorder(new EtchedBorder());
            argumentPanel.updateUI();
        }

        private void createArgumentPanel(DefaultMutableTreeNode node) {
            Function f = (Function) node.getUserObject();
            argumentPanel.setLayout(new GridBagLayout());
            GridBagConstraints constraints = new GridBagConstraints();
            constraints.insets = new Insets(2, 2, 2, 2);
            constraints.gridwidth = 2;
            List<Argument> arguments = f.getArguments();
            int index = 0;
            for (Argument argument : arguments) {
                constraints.gridy = index++;
                constraints.gridx = 0;
                constraints.fill = GridBagConstraints.HORIZONTAL;
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.