Package net.cakenet.jsaton.script.debug

Examples of net.cakenet.jsaton.script.debug.DebugFrame


                    String[] names = sScope.getVariables();
                    IRubyObject[] values = scope.getValues();
                    assert names.length == values.length : "Scope name and value length mismatch";
                    for (int j = 0; j < names.length; j++)
                        var.put(names[j], values[j]);
                    DebugFrame created = info.pushFrame(stackElement.getClassName() + "." + stackElement.getMethodName(),
                            stackElement.getFileName(), stackElement.getLineNumber(), s, var);
                    created.self.setName("self");
                }

                // Restore scopes and frames
View Full Code Here


    public void valueChanged(ListSelectionEvent e) {
        Object selected = frameList.getSelectedValue();
        if (selected == null || !(selected instanceof DebugFrame))
            return;
        DebugFrame frame = (DebugFrame) selected;
        if (frame.source.equals(editor.script.getName())) {
            variableTree.setModel(new FrameTreeModel(frame));
            editor.highlightBreakpoint(frame);
        } else {
            editor.unhighlightLastHighlightedBreakpoint();
View Full Code Here

    }

    private static class FrameListCellRenderer extends DefaultListCellRenderer {
        public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
            if (value instanceof DebugFrame) {
                DebugFrame frame = (DebugFrame) value;
                JLabel label = new JLabel(frame.name + ":" + frame.line);
                label.setOpaque(true);
                if (isSelected) {
                    label.setBackground(list.getSelectionBackground());
                    label.setForeground(list.getSelectionForeground());
View Full Code Here

        }

        private int getActualChildCount(Object parent) {
            int count = 0;
            if (parent instanceof DebugFrame) {
                DebugFrame frame = (DebugFrame) parent;
                count = frame.variables.size();
                if (frame.self != null)
                    count++;
            } else if (parent instanceof DebugObject) {
                count = ((DebugObject) parent).size();
View Full Code Here

        public Object getChild(Object parent, int index) {
            int max = getMax(parent);
            if (index >= max)
                return EXPAND_OBJ;
            if (parent instanceof DebugFrame) {
                DebugFrame frame = (DebugFrame) parent;
                if (frame.self != null) {
                    if (index == 0)
                        return frame.self;
                    return frame.variables.get(index - 1);
                }
View Full Code Here

        public void valueForPathChanged(TreePath path, Object newValue) {
        }

        public int getIndexOfChild(Object parent, Object child) {
            if (parent instanceof DebugFrame) {
                DebugFrame frame = (DebugFrame) parent;
                if (frame.self != null) {
                    if (child == frame.self)
                        return 0;
                    return frame.variables.indexOf(child) + 1;
                }
View Full Code Here

TOP

Related Classes of net.cakenet.jsaton.script.debug.DebugFrame

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.