Changeset 1559

Show
Ignore:
Timestamp:
07/26/08 21:49:03 (5 months ago)
Author:
Chuck.Esterbrook
Message:

Add top level / global declarations to the tree's root nodes for faster browsing.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Source/CobraMain-ObjectExplorer-WinForms.cobra

    r1515 r1559  
    3636                                pass 
    3737 
     38                        compiler = commandLine.compiler 
     39 
    3840                        # Now explore the results: 
    3941                        Application.enableVisualStyles 
     
    4244                        if exc, form.addKeyValue('Exception', exc) 
    4345                        form.addKeyValue('CommandLine', commandLine) 
    44                         form.addKeyValue('Compiler', commandLine.compiler) 
    45                         form.addKeyValue('Messages', commandLine.compiler.messages) 
     46                        form.addKeyValue('Compiler', compiler) 
     47 
     48                        topDecls = List<of INode>() 
     49                        for decl in compiler.globalNS.declsInOrder 
     50                                topDecls.add(decl) 
     51                        form.addKeyValue('Declarations (Global)', topDecls) 
     52 
     53                        form.addKeyValue('Messages', compiler.messages) 
    4654 
    4755                        topNameSpaces = List<of NameSpace>() 
    48                         for module in commandLine.compiler.modules 
     56                        topNameSpaces.add(compiler.globalNS) 
     57                        for module in compiler.modules 
    4958                                if module inherits CobraModule 
    5059                                        if not module.isCobraLibrary