comment/format in:8 methods
authorClaus Gittinger <cg@exept.de>
Thu, 04 Feb 2010 11:31:44 +0100
changeset 2758c61fe917957a
parent 2757 6c83d6b487b2
child 2759 d9a8fc3f0dc7
comment/format in:8 methods
changed:
#processEvent:
#selectionChanged
Tools__ViewTreeApplication.st
     1.1 --- a/Tools__ViewTreeApplication.st	Thu Feb 04 11:18:16 2010 +0100
     1.2 +++ b/Tools__ViewTreeApplication.st	Thu Feb 04 11:31:44 2010 +0100
     1.3 @@ -753,8 +753,6 @@
     1.4  !ViewTreeInspectorApplication methodsFor:'change & update'!
     1.5  
     1.6  selectionChanged
     1.7 -    "called if the selection changed"
     1.8 -
     1.9      |info view item|
    1.10  
    1.11      item := model selectedItem.
    1.12 @@ -802,8 +800,6 @@
    1.13  !ViewTreeInspectorApplication methodsFor:'event processing'!
    1.14  
    1.15  processButtonMotionEvent:ev
    1.16 -    "handle a button motion event"
    1.17 -
    1.18      |click rootView|
    1.19  
    1.20      motionAction isNil ifTrue:[^ self].
    1.21 @@ -826,8 +822,6 @@
    1.22  !
    1.23  
    1.24  processButtonPressEvent:ev
    1.25 -    "handle a buttopn press event"
    1.26 -
    1.27      |rootView sensor lastRectangle|
    1.28  
    1.29      rootView    := model rootView.
    1.30 @@ -870,8 +864,6 @@
    1.31  !
    1.32  
    1.33  processButtonReleaseEvent:anEvent
    1.34 -    "handle a button release event"
    1.35 -
    1.36      |rootView rectangle newItems widget origin|
    1.37  
    1.38      (rootView := model rootView) isNil ifTrue:[
    1.39 @@ -898,11 +890,9 @@
    1.40  !
    1.41  
    1.42  processEvent:anEvent
    1.43 -    "process an event"
    1.44 -
    1.45      |button menu|
    1.46  
    1.47 -    anEvent isKeyPressEvent ifTrue:[ ^ self processKeyPressEvent:anEvent ].
    1.48 +    anEvent isKeyPressEvent ifTrue:[ self processKeyPressEvent:anEvent. ^ self  ].
    1.49      anEvent isButtonEvent  ifFalse:[ ^ self ].
    1.50  
    1.51      button := anEvent button.
    1.52 @@ -913,8 +903,9 @@
    1.53                  self selectOnClickHolder value ifTrue:[
    1.54                      menu := self middleButtonMenu value.
    1.55                      menu notNil ifTrue:[
    1.56 -                        menu := MenuPanel menu:(Menu new fromLiteralArrayEncoding:menu)
    1.57 -                                      receiver:self.
    1.58 +                        menu := MenuPanel 
    1.59 +                                    menu:(Menu new fromLiteralArrayEncoding:menu)
    1.60 +                                    receiver:self.
    1.61                          menu startUp.
    1.62                      ]
    1.63                  ].
    1.64 @@ -924,8 +915,8 @@
    1.65          ^ self
    1.66      ].
    1.67  
    1.68 -    anEvent isButtonPressEvent  ifTrue:[ ^ self processButtonPressEvent:anEvent  ].
    1.69 -    anEvent isButtonMotionEvent ifTrue:[ ^ self processButtonMotionEvent:anEvent ].
    1.70 +    anEvent isButtonPressEvent  ifTrue:[ self processButtonPressEvent:anEvent. ^ self ].
    1.71 +    anEvent isButtonMotionEvent ifTrue:[ self processButtonMotionEvent:anEvent. ^ self ].
    1.72  
    1.73      anEvent isButtonReleaseEvent ifTrue:[
    1.74          self selectOnClickHolder value ifTrue:[
    1.75 @@ -942,8 +933,6 @@
    1.76  !
    1.77  
    1.78  processKeyPressEvent:anEvent
    1.79 -    "process an key press event"
    1.80 -
    1.81      |item prnt idx key max next|
    1.82  
    1.83      key := anEvent key.
    1.84 @@ -971,14 +960,14 @@
    1.85          (key == #CursorUp or:[key == #CursorLeft]) ifTrue:[item := model listOfItems last]
    1.86                                                    ifFalse:[item := item at:1 ifAbsent:item].
    1.87  
    1.88 -      ^ model selectedItem:item
    1.89 +        ^ model selectedItem:item
    1.90      ].
    1.91      key == #CursorLeft ifTrue:[ ^ model selectedItem:prnt ].
    1.92  
    1.93      key == #CursorRight ifTrue:[
    1.94          next := item at:1 ifAbsent:nil.
    1.95          next notNil ifTrue:[ model selectedItem:next ].
    1.96 -      ^ self
    1.97 +        ^ self
    1.98      ].
    1.99  
   1.100      max := prnt size.
   1.101 @@ -987,20 +976,18 @@
   1.102          idx := prnt identityIndexOf:item.
   1.103          idx == 1 ifTrue:[idx := max + 1].
   1.104          model selectedItem:(prnt at:idx - 1).
   1.105 -      ^ self.
   1.106 +        ^ self.
   1.107      ].
   1.108  
   1.109      key == #CursorDown ifTrue:[
   1.110          idx := prnt identityIndexOf:item.
   1.111          idx == max ifTrue:[idx := 0].
   1.112          model selectedItem:(prnt at:idx + 1).
   1.113 -      ^ self.
   1.114 +        ^ self.
   1.115      ].
   1.116  !
   1.117  
   1.118  processMappedView:aView
   1.119 -    "process a mapped event"
   1.120 -
   1.121      |parent anchor|
   1.122  
   1.123      parent := self listOfItems detectItemRespondsToView:aView.
   1.124 @@ -1093,8 +1080,10 @@
   1.125  middleButtonMenu
   1.126      "returns the middleButton menu for the single selected item or nil"
   1.127  
   1.128 -    ^ [ model selectedItem notNil ifTrue:[self class middleButtonMenu]
   1.129 -                                 ifFalse:[nil]
   1.130 +    ^ [ 
   1.131 +        model selectedItem notNil 
   1.132 +            ifTrue:[self class middleButtonMenu]
   1.133 +            ifFalse:[nil]
   1.134        ]
   1.135  !
   1.136  
   1.137 @@ -1282,10 +1271,12 @@
   1.138      inst isNil ifTrue:[
   1.139          label := nil
   1.140      ] ifFalse:[
   1.141 -        inst == view ifTrue:[ label := '== view itself' ]
   1.142 -                    ifFalse:[ label := inst displayString.
   1.143 -                              value := [view controller inspect].
   1.144 -                            ].
   1.145 +        inst == view ifTrue:[ 
   1.146 +            label := '== view itself' 
   1.147 +        ] ifFalse:[ 
   1.148 +            label := inst displayString.
   1.149 +            value := [view controller inspect].
   1.150 +        ].
   1.151      ].
   1.152      list add:(MenuDesc title:'controller' value:label action:value).
   1.153  
   1.154 @@ -1296,7 +1287,9 @@
   1.155  
   1.156      inst := view application.
   1.157  
   1.158 -    inst notNil ifTrue:[ |topAppl|
   1.159 +    inst notNil ifTrue:[ 
   1.160 +        |topAppl|
   1.161 +
   1.162          list add:(MenuDesc title:'application' value:inst action:[ view application inspect ]).
   1.163  
   1.164          topAppl := inst topApplication.
   1.165 @@ -1396,8 +1389,7 @@
   1.166                            action:[view visibilityChannel inspect]).
   1.167      ].
   1.168  
   1.169 -        
   1.170 -  ^ MenuDesc buildFromList:list onGC:aMenu
   1.171 +    ^ MenuDesc buildFromList:list onGC:aMenu
   1.172  ! !
   1.173  
   1.174  !ViewTreeInspectorApplication methodsFor:'private'!
   1.175 @@ -1770,8 +1762,9 @@
   1.176          array at:2 put:(value printString, ' ')
   1.177      ].
   1.178  
   1.179 -  ^ MenuItem label:(MultiColListEntry fromStrings:array tabulatorSpecification:aTabSpec)
   1.180 -             value:action
   1.181 +   ^ MenuItem 
   1.182 +        label:(MultiColListEntry fromStrings:array tabulatorSpecification:aTabSpec)
   1.183 +        value:action
   1.184  ! !
   1.185  
   1.186  !ViewTreeInspectorApplication::MenuDesc methodsFor:'instance creation'!
   1.187 @@ -1800,7 +1793,7 @@
   1.188  
   1.189  widthOn:aGC
   1.190      title isNil ifTrue:[^ 5].  "/ separator
   1.191 -  ^ title widthOn:aGC
   1.192 +    ^ title widthOn:aGC
   1.193  ! !
   1.194  
   1.195  !ViewTreeInspectorApplication::ViewTreeItem class methodsFor:'building'!