Package com.eviware.soapui.model.tree

Examples of com.eviware.soapui.model.tree.SoapUITreeNode


            testSuiteNodes.add(testSuite.getProject().getIndexOfTestSuite(testSuite), testSuiteNode);
            getTreeModel().notifyNodeInserted(testSuiteNode);
        }

        public void testSuiteRemoved(TestSuite testSuite) {
            SoapUITreeNode treeNode = getTreeModel().getTreeNode(testSuite);
            if (testSuiteNodes.contains(treeNode)) {
                getTreeModel().notifyNodeRemoved(treeNode);
                testSuiteNodes.remove(treeNode);
            } else {
                throw new RuntimeException("Removing unkown testSuite");
View Full Code Here


            mockServiceNodes.add(mockServiceNode);
            getTreeModel().notifyNodeInserted(mockServiceNode);
        }

        public void mockServiceRemoved(MockService mockService) {
            SoapUITreeNode treeNode = getTreeModel().getTreeNode(mockService);
            if (mockServiceNodes.contains(treeNode)) {
                getTreeModel().notifyNodeRemoved(treeNode);
                mockServiceNodes.remove(treeNode);
            } else {
                throw new RuntimeException("Removing unkown mockService");
View Full Code Here

            if (selectionPath == null || mainTree.getSelectionCount() == 0) {
                return;
            }

            if (mainTree.getSelectionCount() == 1) {
                SoapUITreeNode lastPathComponent = (SoapUITreeNode) selectionPath.getLastPathComponent();
                ActionList actions = lastPathComponent.getActions();
                if (actions != null) {
                    actions.dispatchKeyEvent(e);
                }

                if (!e.isConsumed()) {
                    KeyStroke ks = KeyStroke.getKeyStrokeForEvent(e);
                    if (ks.equals(UISupport.getKeyStroke("alt C"))) {
                        mainTree.collapsePath(selectionPath);
                        e.consume();
                    } else if (ks.equals(UISupport.getKeyStroke("alt E"))) {
                        mainTree.collapsePath(selectionPath);
                        int row = mainTree.getSelectionRows()[0];
                        TreePath nextPath = mainTree.getPathForRow(row + 1);

                        TreePath path = mainTree.getPathForRow(row);
                        while (path != null && !path.equals(nextPath)) {
                            mainTree.expandRow(row);
                            path = mainTree.getPathForRow(++row);
                        }

                        e.consume();
                    }
                }
            } else {
                TreePath[] selectionPaths = mainTree.getSelectionPaths();
                List<ModelItem> targets = new ArrayList<ModelItem>();
                for (TreePath treePath : selectionPaths) {
                    SoapUITreeNode node = (SoapUITreeNode) treePath.getLastPathComponent();
                    targets.add(node.getModelItem());
                }

                if (targets.size() > 0) {
                    ActionList actions = ActionListBuilder
                            .buildMultiActions(targets.toArray(new ModelItem[targets.size()]));
View Full Code Here

    public class InternalTreeSelectionListener implements TreeSelectionListener {
        public void valueChanged(TreeSelectionEvent e) {
            Object obj = e.getPath().getLastPathComponent();
            if (obj instanceof SoapUITreeNode) {
                SoapUITreeNode treeNode = (SoapUITreeNode) obj;

                if (!listeners.isEmpty()) {
                    TreePath newPath = e.getNewLeadSelectionPath();
                    NavigatorListener[] array = listeners.toArray(new NavigatorListener[listeners.size()]);
                    for (NavigatorListener listener : array) {
View Full Code Here

                if (path == null || mainTree.getRowForPath(path) != row) {
                    mainTree.setSelectionRow(row);
                }

                SoapUITreeNode node = (SoapUITreeNode) path.getLastPathComponent();
                actions = node.getActions();
                if (actions != null) {
                    SwingUtilities.invokeLater(new Runnable() {
                        public void run() {
                            if (actions != null) {
                                actions.performDefaultAction(new ActionEvent(mainTree, 0, null));
View Full Code Here

                        showToolTipLessPopupMenu(collapsePopup, e.getX(), e.getY());
                    }

                    return;
                }
                SoapUITreeNode node = (SoapUITreeNode) path.getLastPathComponent();

                JPopupMenu popupMenu = node.getPopup();
                if (popupMenu == null) {
                    return;
                }

                mainTree.setSelectionPath(path);

                showToolTipLessPopupMenu(popupMenu, e.getX(), e.getY());
            } else {
                TreePath[] selectionPaths = mainTree.getSelectionPaths();
                List<ModelItem> targets = new ArrayList<ModelItem>();
                for (TreePath treePath : selectionPaths) {
                    SoapUITreeNode node = (SoapUITreeNode) treePath.getLastPathComponent();
                    targets.add(node.getModelItem());
                }

                if (targets.size() > 0) {
                    ActionList actions = ActionListBuilder
                            .buildMultiActions(targets.toArray(new ModelItem[targets.size()]));
View Full Code Here

                ((PropertiesModelItem) getModelItem()).updateName();
            }
        }

        public void propertyRemoved(String name) {
            SoapUITreeNode treeNode = getTreeModel().getTreeNode(propertyMap.get(name).getModelItem());
            if (propertyNodes.contains(treeNode)) {
                getTreeModel().notifyNodeRemoved(treeNode);
                propertyNodes.remove(treeNode);
                propertyMap.remove(name);
View Full Code Here

            return modelItem.getDescription();
        } else {
            String str = modelItem.getName() + " [";

            for (int c = 1; c < treePath.getPathCount(); c++) {
                SoapUITreeNode comp = (SoapUITreeNode) treePath.getPathComponent(c);
                if (comp.getModelItem() instanceof EmptyModelItem) {
                    continue;
                }

                if (c > 1) {
                    str += "/";
                }

                str += comp.toString();
            }

            str += "]";

            return str;
View Full Code Here

    }

    public Component getRenderer(ModelItem modelItem) {
        TreePath treePath = SoapUI.getNavigator().getTreePath(modelItem);
        int row = getTree().getRowForPath(treePath);
        SoapUITreeNode treeNode = (SoapUITreeNode) treePath.getLastPathComponent();

        return getTree().getCellRenderer().getTreeCellRendererComponent(getTree(), treeNode, true,
                getTree().isExpanded(row), treeNode.isLeaf(), row, true);
    }
View Full Code Here

                    label.setToolTipText(null);
                } else {
                    String str = item.getName() + " [";

                    for (int c = 1; c < treePath.getPathCount(); c++) {
                        SoapUITreeNode comp = (SoapUITreeNode) treePath.getPathComponent(c);
                        if (comp.getModelItem() instanceof EmptyModelItem) {
                            continue;
                        }

                        if (c > 1) {
                            str += " - ";
                        }

                        str += comp.toString();
                    }

                    str += "]";

                    label.setText(str);
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.tree.SoapUITreeNode

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.