openFunction((String) list.getSelectedValue());
openFunction((FunctionItem) list.getSelectedValue());
        public DebugGui(Dim dim, String title) {            super(dim, title);            Container contentPane = getContentPane();            Component main = contentPane.getComponent(1);            contentPane.remove(main);            treeRoot = new DebuggerTreeNode(title);            tree = new JTree(treeRoot);            treeModel = new DefaultTreeModel(treeRoot);            tree.setModel(treeModel);            tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);            tree.addTreeSelectionListener(HelmaDebugger.this);            // tree.setRootVisible(false);            // track double clicks            tree.addMouseListener(new MouseAdapter() {                public void mouseClicked(MouseEvent evt) {                    openScript(tree.getSelectionPath());                }            });            // track enter key            tree.addKeyListener(new KeyAdapter() {                public void keyPressed(KeyEvent evt) {                    if (evt.getKeyCode() == KeyEvent.VK_ENTER)                        openScript(tree.getSelectionPath());                }            });            JScrollPane treeScroller = new JScrollPane(tree);            treeScroller.setPreferredSize(new Dimension(180, 300));            list = new JList();            // no bold font lists for me, thanks            list.setFont(list.getFont().deriveFont(Font.PLAIN));            list.addMouseListener(new MouseAdapter() {                public void mouseClicked(MouseEvent evt) {                    openFunction((String) list.getSelectedValue());                }            });            list.addKeyListener(new KeyAdapter() {                public void keyPressed(KeyEvent evt) {                    if (evt.getKeyCode() == KeyEvent.VK_ENTER)                        openFunction((String) list.getSelectedValue());                }            });            JScrollPane listScroller = new JScrollPane(list);            listScroller.setPreferredSize(new Dimension(180, 200));            JSplitPane split1 = new JSplitPane(JSplitPane.VERTICAL_SPLIT);            split1.setTopComponent(treeScroller);            split1.setBottomComponent(listScroller);            split1.setOneTouchExpandable(true);            split1.setResizeWeight(0.66);            JSplitPane split2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);            split2.setLeftComponent(split1);            split2.setRightComponent(main);            split2.setOneTouchExpandable(true);            contentPane.add(split2, BorderLayout.CENTER);        }