Tools__ViewTreeApplication.st
changeset 3034 862cd32dc02f
parent 3017 d971763e5d03
child 3037 876c28de42da
     1.1 --- a/Tools__ViewTreeApplication.st	Thu Jul 25 12:00:17 2013 +0200
     1.2 +++ b/Tools__ViewTreeApplication.st	Thu Jul 25 12:35:01 2013 +0200
     1.3 @@ -432,6 +432,37 @@
     1.4              submenuChannel: middleButtonMenu
     1.5            )
     1.6           (MenuItem
     1.7 +            label: 'Widget'
     1.8 +            submenu: 
     1.9 +           (Menu
    1.10 +              (
    1.11 +               (MenuItem
    1.12 +                  enabled: hasSingleSelectionHolder
    1.13 +                  label: 'Browse'
    1.14 +                  itemValue: doBrowse:
    1.15 +                  argument: view
    1.16 +                )
    1.17 +               (MenuItem
    1.18 +                  enabled: hasSingleSelectionHolder
    1.19 +                  label: 'Inspect'
    1.20 +                  itemValue: doInspect:
    1.21 +                  argument: view
    1.22 +                )
    1.23 +               (MenuItem
    1.24 +                  label: '-'
    1.25 +                )
    1.26 +               (MenuItem
    1.27 +                  enabled: hasTargetWidgetChannel
    1.28 +                  label: 'All Components'
    1.29 +                  startGroup: right
    1.30 +                  submenuChannel: submenuComponents:
    1.31 +                )
    1.32 +               )
    1.33 +              nil
    1.34 +              nil
    1.35 +            )
    1.36 +          )
    1.37 +         (MenuItem
    1.38              label: 'Application'
    1.39              submenu: 
    1.40             (Menu
    1.41 @@ -469,30 +500,22 @@
    1.42              )
    1.43            )
    1.44           (MenuItem
    1.45 -            label: 'Widget'
    1.46 +            label: 'Process'
    1.47              submenu: 
    1.48             (Menu
    1.49                (
    1.50                 (MenuItem
    1.51                    enabled: hasSingleSelectionHolder
    1.52 -                  label: 'Browse'
    1.53 -                  itemValue: doBrowse:
    1.54 -                  argument: view
    1.55 -                )
    1.56 -               (MenuItem
    1.57 -                  enabled: hasSingleSelectionHolder
    1.58                    label: 'Inspect'
    1.59                    itemValue: doInspect:
    1.60 -                  argument: view
    1.61 +                  argument: process
    1.62                  )
    1.63                 (MenuItem
    1.64                    label: '-'
    1.65                  )
    1.66                 (MenuItem
    1.67 -                  enabled: hasTargetWidgetChannel
    1.68 -                  label: 'All Components'
    1.69 -                  startGroup: right
    1.70 -                  submenuChannel: submenuComponents:
    1.71 +                  label: 'Open Process Monitor'
    1.72 +                  itemValue: doOpenProcessMonitor
    1.73                  )
    1.74                 )
    1.75                nil
    1.76 @@ -1578,31 +1601,35 @@
    1.77  
    1.78          process isNil ifTrue:[
    1.79              theProcess := process :=
    1.80 -                Process for:[   |update testModeChannel|
    1.81 -
    1.82 -                                update := false.
    1.83 -                                testModeChannel := model testModeChannel.
    1.84 -
    1.85 -                                [process == theProcess] whileTrue:[
    1.86 -                                    Delay waitForSeconds:0.5.
    1.87 -
    1.88 -                                    (treeView notNil and:[process == theProcess and:[treeView shown]]) ifTrue:[
    1.89 -                                        (testModeChannel value == true and:[followFocusChannel value == true]) ifTrue:[
    1.90 -                                            self selectFocusView.
    1.91 -                                        ].
    1.92 -                                        update ifTrue:[
    1.93 -                                            self updateShownStatus.
    1.94 -                                        ].
    1.95 -                                        update := update not.
    1.96 -                                    ].
    1.97 +                Process 
    1.98 +                    for:[   
    1.99 +                        |update testModeChannel|
   1.100 +
   1.101 +                        update := false.
   1.102 +                        testModeChannel := model testModeChannel.
   1.103 +
   1.104 +                        [process == theProcess] whileTrue:[
   1.105 +                            Delay waitForSeconds:0.5.
   1.106 +
   1.107 +                            (treeView notNil and:[process == theProcess and:[treeView shown]]) ifTrue:[
   1.108 +                                (testModeChannel value == true and:[followFocusChannel value == true]) ifTrue:[
   1.109 +                                    self selectFocusView.
   1.110                                  ].
   1.111 -
   1.112 -                             ] priority:8.
   1.113 -            theProcess name:'ViewTreeInspector - Follow Focus'.
   1.114 +                                update ifTrue:[
   1.115 +                                    self updateShownStatus.
   1.116 +                                ].
   1.117 +                                update := update not.
   1.118 +                            ].
   1.119 +                        ].
   1.120 +                    ] 
   1.121 +                    priority:(Processor userSchedulingPriority).
   1.122 +            theProcess name:'ViewTreeInspector - Focus Follower'.
   1.123              theProcess resume.
   1.124          ].
   1.125      ].
   1.126      model rootItem:aRootItemOrNil.
   1.127 +
   1.128 +    "Modified: / 25-07-2013 / 12:03:44 / cg"
   1.129  !
   1.130  
   1.131  updateShownStatus
   1.132 @@ -1755,6 +1782,7 @@
   1.133          #model          inspect model
   1.134          #application    inspect application
   1.135          #controller     inspect controller
   1.136 +        #process        inspect application's process
   1.137      "
   1.138      |inst|
   1.139  
   1.140 @@ -1764,11 +1792,18 @@
   1.141               what == #group       ifTrue:[ inst := inst windowGroup ]
   1.142      ifFalse:[what == #model       ifTrue:[ inst := inst model ]
   1.143      ifFalse:[what == #application ifTrue:[ inst := inst application ]
   1.144 -    ifFalse:[what == #controller  ifTrue:[ inst := inst controller  ]]]].
   1.145 +    ifFalse:[what == #controller  ifTrue:[ inst := inst controller  ]
   1.146 +    ifFalse:[what == #process     ifTrue:[ inst := inst windowGroup process  ]]]]].
   1.147  
   1.148      inst notNil ifTrue:[ inst inspect ].
   1.149  !
   1.150  
   1.151 +doOpenProcessMonitor
   1.152 +    (ProcessMonitorV2 ? ProcessMonitor) open
   1.153 +
   1.154 +    "Created: / 25-07-2013 / 12:34:23 / cg"
   1.155 +!
   1.156 +
   1.157  doPickView
   1.158      "pick a window's topView"
   1.159