# HG changeset patch # User Claus Gittinger # Date 1374748501 -7200 # Node ID 862cd32dc02fe518c8b24bc44bc028ce79e78aa9 # Parent 0204d248271cc8d469e2f59071d4443808d3e736 class: Tools::ViewTreeInspectorApplication added: #doOpenProcessMonitor changed: #doInspect: #menu #setRootItem: diff -r 0204d248271c -r 862cd32dc02f Tools__ViewTreeApplication.st --- a/Tools__ViewTreeApplication.st Thu Jul 25 12:00:17 2013 +0200 +++ b/Tools__ViewTreeApplication.st Thu Jul 25 12:35:01 2013 +0200 @@ -432,6 +432,37 @@ submenuChannel: middleButtonMenu ) (MenuItem + label: 'Widget' + submenu: + (Menu + ( + (MenuItem + enabled: hasSingleSelectionHolder + label: 'Browse' + itemValue: doBrowse: + argument: view + ) + (MenuItem + enabled: hasSingleSelectionHolder + label: 'Inspect' + itemValue: doInspect: + argument: view + ) + (MenuItem + label: '-' + ) + (MenuItem + enabled: hasTargetWidgetChannel + label: 'All Components' + startGroup: right + submenuChannel: submenuComponents: + ) + ) + nil + nil + ) + ) + (MenuItem label: 'Application' submenu: (Menu @@ -469,30 +500,22 @@ ) ) (MenuItem - label: 'Widget' + label: 'Process' submenu: (Menu ( (MenuItem enabled: hasSingleSelectionHolder - label: 'Browse' - itemValue: doBrowse: - argument: view - ) - (MenuItem - enabled: hasSingleSelectionHolder label: 'Inspect' itemValue: doInspect: - argument: view + argument: process ) (MenuItem label: '-' ) (MenuItem - enabled: hasTargetWidgetChannel - label: 'All Components' - startGroup: right - submenuChannel: submenuComponents: + label: 'Open Process Monitor' + itemValue: doOpenProcessMonitor ) ) nil @@ -1578,31 +1601,35 @@ process isNil ifTrue:[ theProcess := process := - Process for:[ |update testModeChannel| - - update := false. - testModeChannel := model testModeChannel. - - [process == theProcess] whileTrue:[ - Delay waitForSeconds:0.5. - - (treeView notNil and:[process == theProcess and:[treeView shown]]) ifTrue:[ - (testModeChannel value == true and:[followFocusChannel value == true]) ifTrue:[ - self selectFocusView. - ]. - update ifTrue:[ - self updateShownStatus. - ]. - update := update not. - ]. + Process + for:[ + |update testModeChannel| + + update := false. + testModeChannel := model testModeChannel. + + [process == theProcess] whileTrue:[ + Delay waitForSeconds:0.5. + + (treeView notNil and:[process == theProcess and:[treeView shown]]) ifTrue:[ + (testModeChannel value == true and:[followFocusChannel value == true]) ifTrue:[ + self selectFocusView. ]. - - ] priority:8. - theProcess name:'ViewTreeInspector - Follow Focus'. + update ifTrue:[ + self updateShownStatus. + ]. + update := update not. + ]. + ]. + ] + priority:(Processor userSchedulingPriority). + theProcess name:'ViewTreeInspector - Focus Follower'. theProcess resume. ]. ]. model rootItem:aRootItemOrNil. + + "Modified: / 25-07-2013 / 12:03:44 / cg" ! updateShownStatus @@ -1755,6 +1782,7 @@ #model inspect model #application inspect application #controller inspect controller + #process inspect application's process " |inst| @@ -1764,11 +1792,18 @@ what == #group ifTrue:[ inst := inst windowGroup ] ifFalse:[what == #model ifTrue:[ inst := inst model ] ifFalse:[what == #application ifTrue:[ inst := inst application ] - ifFalse:[what == #controller ifTrue:[ inst := inst controller ]]]]. + ifFalse:[what == #controller ifTrue:[ inst := inst controller ] + ifFalse:[what == #process ifTrue:[ inst := inst windowGroup process ]]]]]. inst notNil ifTrue:[ inst inspect ]. ! +doOpenProcessMonitor + (ProcessMonitorV2 ? ProcessMonitor) open + + "Created: / 25-07-2013 / 12:34:23 / cg" +! + doPickView "pick a window's topView"