Search in sources :

Example 1 with PerlXMainGroup

use of com.perl5.lang.perl.idea.run.debugger.values.PerlXMainGroup in project Perl5-IDEA by Camelcade.

the class PerlStackFrame method computeChildren.

@Override
public void computeChildren(@NotNull XCompositeNode node) {
    PerlValueDescriptor[] lexicals = myFrameDescriptor.getLexicals();
    PerlValueDescriptor[] globals = myFrameDescriptor.getGlobals();
    PerlValueDescriptor[] args = myFrameDescriptor.getArgs();
    int mainSize = myFrameDescriptor.getMainSize();
    boolean fallback = true;
    XValueChildrenList list = new XValueChildrenList();
    if (globals != null && globals.length > 0) {
        list.addTopGroup(new PerlXValueGroup("Global variables", "our", PerlIcons.OUR_GUTTER_ICON, globals, this, false));
        fallback = false;
    }
    if (mainSize > 0) {
        list.addTopGroup(new PerlXMainGroup(this, mainSize));
        fallback = false;
    }
    if (args != null && args.length > 0) {
        list.addTopGroup(new PerlXValueGroup("Arguments", null, PerlIcons.ARGS_GUTTER_ICON, args, this, true));
        fallback = false;
    }
    if (lexicals != null && lexicals.length > 0) {
        list.addTopGroup(new PerlXValueGroup("Lexical variables", "my/state", PerlIcons.MY_GUTTER_ICON, lexicals, this, true));
        fallback = false;
    }
    if (fallback) {
        super.computeChildren(node);
    } else {
        node.addChildren(list, true);
    }
}
Also used : XValueChildrenList(com.intellij.xdebugger.frame.XValueChildrenList) PerlXMainGroup(com.perl5.lang.perl.idea.run.debugger.values.PerlXMainGroup) PerlXValueGroup(com.perl5.lang.perl.idea.run.debugger.values.PerlXValueGroup)

Aggregations

XValueChildrenList (com.intellij.xdebugger.frame.XValueChildrenList)1 PerlXMainGroup (com.perl5.lang.perl.idea.run.debugger.values.PerlXMainGroup)1 PerlXValueGroup (com.perl5.lang.perl.idea.run.debugger.values.PerlXValueGroup)1