Package org.apache.jorphan.collections

Examples of org.apache.jorphan.collections.ListedHashTree


        String action = e.getActionCommand();
        if (action.equals(SUB_TREE_SAVED)) {
            HashTree subTree = (HashTree) e.getSource();
            subTree.traverse(this);
        } else if (action.equals(SUB_TREE_LOADED)) {
            ListedHashTree addTree = (ListedHashTree) e.getSource();
            addTree.traverse(this);
        } else if (action.equals(ADD_ALL)) {
            previousGuiItems.clear();
            ReportGuiPackage.getInstance().getTreeModel().getReportPlan().traverse(this);
        } else if (action.equals(REMOVE)) {
            ReportGuiPackage guiPackage = ReportGuiPackage.getInstance();
View Full Code Here


    /**
     * Copies the controller's subelements into the execution tree
     *
     */
    public HashTree getReplacementSubTree() {
        HashTree tree = new ListedHashTree();
        if (selectedNode != null) {
            if (!selectedNode.isEnabled()) {
                selectedNode = cloneTreeNode(selectedNode);
                selectedNode.setEnabled(true);
            }
            tree.add(selectedNode);
            createSubTree(tree, selectedNode);
        }
        return tree;
    }
View Full Code Here

        String action = e.getActionCommand();
        if (action.equals(ActionNames.SUB_TREE_SAVED)) {
            HashTree subTree = (HashTree) e.getSource();
            subTree.traverse(this);
        } else if (action.equals(ActionNames.SUB_TREE_LOADED)) {
            ListedHashTree addTree = (ListedHashTree) e.getSource();
            addTree.traverse(this);
        } else if (action.equals(ActionNames.ADD_ALL)) {
            previousGuiItems.clear();
            GuiPackage.getInstance().getTreeModel().getTestPlan().traverse(this);
        } else if (action.equals(ActionNames.CHECK_REMOVE)) {
            GuiPackage guiPackage = GuiPackage.getInstance();
View Full Code Here

        }
        return null;
    }

    public HashTree getCurrentSubTree(JMeterTreeNode node) {
        ListedHashTree hashTree = new ListedHashTree(node);
        Enumeration enumNode = node.children();
        while (enumNode.hasMoreElements()) {
            JMeterTreeNode child = (JMeterTreeNode) enumNode.nextElement();
            hashTree.add(node, getCurrentSubTree(child));
        }
        return hashTree;
    }
View Full Code Here

            element = createTestElement(config.getChild("testelement")); // $NON-NLS-1$
        } catch (Exception e) {
            log.error("Problem loading part of file", e);
            return null;
        }
        HashTree subTree = new ListedHashTree(element);
        Configuration[] subNodes = config.getChildren("node"); // $NON-NLS-1$

        for (int i = 0; i < subNodes.length; i++) {
            HashTree t = generateNode(subNodes[i]);

            if (t != null) {
                subTree.add(element, t);
            }
        }
        return subTree;
    }
View Full Code Here

                log.info("Thread will stop on error");
            } else {
                log.info("Thread will continue on error");
            }

            ListedHashTree threadGroupTree = (ListedHashTree) searcher.getSubTree(group);
            threadGroupTree.add(group, testLevelElements);
            for (int i = 0; running && i < numThreads; i++) {
                final JMeterThread jmeterThread = new JMeterThread(cloneTree(threadGroupTree), this, notifier);
                jmeterThread.setThreadNum(i);
                jmeterThread.setThreadGroup(group);
                jmeterThread.setInitialContext(JMeterContextService.getContext());
View Full Code Here

    public TreeCloner() {
        this(true);
    }

    public TreeCloner(boolean forThread) {
        newTree = new ListedHashTree();
        this.forThread = forThread;
    }
View Full Code Here

            super(name);
        }

        public void testConfigGathering() throws Exception
        {
            ListedHashTree testing = new ListedHashTree();
            GenericController controller = new GenericController();
            ConfigTestElement config1 = new ConfigTestElement();
            config1.setName("config1");
            config1.setProperty("test.property", "A test value");
            TestSampler sampler = new TestSampler();
            sampler.setName("sampler");
            testing.add(controller, config1);
            testing.add(controller, sampler);
            TestCompiler.initialize();

            TestCompiler compiler =
                new TestCompiler(testing, new JMeterVariables());
            testing.traverse(compiler);
            sampler =
                (TestSampler) compiler.configureSampler(sampler).getSampler();
            assertEquals(
                "A test value",
                sampler.getPropertyAsString("test.property"));
View Full Code Here

        catch (Exception e)
        {
            log.error("Problem loading part of file", e);
            return null;
        }
        HashTree subTree = new ListedHashTree(element);
        Configuration[] subNodes = config.getChildren("node");

        for (int i = 0; i < subNodes.length; i++)
        {
            HashTree t = generateNode(subNodes[i]);

            if (t != null)
            {
                subTree.add(element, t);
            }
        }
        return subTree;
    }
View Full Code Here

        this(true);
    }

    public TreeCloner(boolean forThread)
    {
        newTree = new ListedHashTree();
        this.forThread = forThread;
    }
View Full Code Here

TOP

Related Classes of org.apache.jorphan.collections.ListedHashTree

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.