added: expeccoNET_1_8_0_0
authorClaus Gittinger <cg@exept.de>
Fri, 21 Sep 2012 11:23:43 +0200
changeset 2927558cd901ebce
parent 2926 c18d456bb5b3
child 2928 74762eba597e
added:
#openBrowserOnSelectedResultItem
#resultListMenu
#selectedImplementorsHolder
comment/format in: #openBrowserOnSelectedItem
changed:
#selectedClassOfResultHolder
added browse implementors function
#windowSpec
MethodFinderWindow.st
     1.1 --- a/MethodFinderWindow.st	Mon Sep 10 14:43:41 2012 +0200
     1.2 +++ b/MethodFinderWindow.st	Fri Sep 21 11:23:43 2012 +0200
     1.3 @@ -292,6 +292,8 @@
     1.4                         (SequenceViewSpec
     1.5                            name: 'ResultList'
     1.6                            layout: (LayoutFrame 0 0 -15 0.5 0 1 0 1)
     1.7 +                          model: selectedImplementorsHolder
     1.8 +                          menu: resultListMenu
     1.9                            hasHorizontalScrollBar: true
    1.10                            hasVerticalScrollBar: true
    1.11                            autoHideScrollBars: true
    1.12 @@ -343,6 +345,8 @@
    1.13           
    1.14          )
    1.15        )
    1.16 +
    1.17 +    "Modified: / 21-09-2012 / 11:09:44 / cg"
    1.18  ! !
    1.19  
    1.20  !MethodFinderWindow class methodsFor:'menu specs'!
    1.21 @@ -435,6 +439,36 @@
    1.22        )
    1.23  
    1.24      "Modified: / 13.11.2001 / 12:36:39 / cg"
    1.25 +!
    1.26 +
    1.27 +resultListMenu
    1.28 +    "This resource specification was automatically generated
    1.29 +     by the MenuEditor of ST/X."
    1.30 +
    1.31 +    "Do not manually edit this!! If it is corrupted,
    1.32 +     the MenuEditor may not be able to read the specification."
    1.33 +
    1.34 +    "
    1.35 +     MenuEditor new openOnClass:MethodFinderWindow andSelector:#implementorListMenu
    1.36 +     (Menu new fromLiteralArrayEncoding:(MethodFinderWindow implementorListMenu)) startUp
    1.37 +    "
    1.38 +
    1.39 +    <resource: #menu>
    1.40 +
    1.41 +    ^ 
    1.42 +     #(#Menu
    1.43 +        #(
    1.44 +         #(#MenuItem
    1.45 +            #label: 'Browse Implementors'
    1.46 +            #translateLabel: true
    1.47 +            #value: #openBrowserOnSelectedResultItem
    1.48 +          )
    1.49 +         )
    1.50 +        nil
    1.51 +        nil
    1.52 +      )
    1.53 +
    1.54 +    "Created: / 21-09-2012 / 11:05:15 / cg"
    1.55  ! !
    1.56  
    1.57  !MethodFinderWindow methodsFor:'accessing'!
    1.58 @@ -613,12 +647,30 @@
    1.59  !
    1.60  
    1.61  openBrowserOnSelectedItem 
    1.62 +    "on the selected implementor"
    1.63 +
    1.64      |sel|
    1.65  
    1.66      sel := self selectedClassOfResultHolder value.
    1.67      self openBrowserOn:sel
    1.68  
    1.69 -    "Modified: / 13.11.2001 / 12:47:39 / cg"
    1.70 +    "Modified: / 13-11-2001 / 12:47:39 / cg"
    1.71 +    "Modified (comment): / 21-09-2012 / 11:08:33 / cg"
    1.72 +!
    1.73 +
    1.74 +openBrowserOnSelectedResultItem 
    1.75 +    "on an item in the lower left list,
    1.76 +     on all implementors of that message"
    1.77 +
    1.78 +    |selIndex selector|
    1.79 +
    1.80 +    selIndex := self selectedImplementorsHolder value.
    1.81 +    selIndex isNil ifTrue:[^ self].
    1.82 +
    1.83 +    selector := resultSelectors at:selIndex.
    1.84 +    UserPreferences browserClass browseImplementorsOf:selector.
    1.85 +
    1.86 +    "Created: / 21-09-2012 / 11:05:46 / cg"
    1.87  !
    1.88  
    1.89  receiverEditorContents
    1.90 @@ -955,15 +1007,31 @@
    1.91  !
    1.92  
    1.93  selectedClassOfResultHolder
    1.94 -    "Return a valueHolder which contains the index of the selected result class
    1.95 -     (right list)"
    1.96 +    "valueHolder which contains the index of the selected result class (right list)"
    1.97  
    1.98      |holder|
    1.99 +
   1.100      (holder := builder bindingAt:#selectedClassOfResultHolder) isNil ifTrue:[
   1.101          holder := ValueHolder new.
   1.102          builder aspectAt:#selectedClassOfResultHolder put:holder
   1.103      ].
   1.104      ^ holder
   1.105 +
   1.106 +    "Modified (comment): / 21-09-2012 / 11:10:29 / cg"
   1.107 +!
   1.108 +
   1.109 +selectedImplementorsHolder
   1.110 +    "valueHolder which contains the index of the selected implementors list (left list)"
   1.111 +
   1.112 +    |holder|
   1.113 +
   1.114 +    (holder := builder bindingAt:#selectedImplementorsHolder) isNil ifTrue:[
   1.115 +        holder := ValueHolder new.
   1.116 +        builder aspectAt:#selectedImplementorsHolder put:holder
   1.117 +    ].
   1.118 +    ^ holder
   1.119 +
   1.120 +    "Created: / 21-09-2012 / 11:10:13 / cg"
   1.121  !
   1.122  
   1.123  selectorPattern