MethodFinderWindow.st
changeset 1529 8c1607c0fbe8
parent 1526 8e62e3f56402
child 1530 37b18e9a12fb
equal deleted inserted replaced
1528:4136505d3cbe 1529:8c1607c0fbe8
    36        #(#WindowSpec
    36        #(#WindowSpec
    37           #label: 'MethodFinder'
    37           #label: 'MethodFinder'
    38           #name: 'MethodFinder'
    38           #name: 'MethodFinder'
    39           #min: #(#Point nil nil)
    39           #min: #(#Point nil nil)
    40           #max: #(#Point nil nil)
    40           #max: #(#Point nil nil)
    41           #bounds: #(#Rectangle 16 47 566 447)
    41           #bounds: #(#Rectangle 16 46 566 446)
    42           #menu: #menu
    42           #menu: #menu
    43           #forceRecursiveBackground: false
    43           #forceRecursiveBackground: false
    44         )
    44         )
    45         #component: 
    45         #component: 
    46        #(#SpecCollection
    46        #(#SpecCollection
    47           #collection: #(
    47           #collection: #(
    48            #(#SequenceViewSpec
    48            #(#SequenceViewSpec
    49               #name: 'List1'
    49               #name: 'List1'
    50               #layout: #(#LayoutFrame 0 0 0 0.5 0 0.7 0 1)
    50               #layout: #(#LayoutFrame 0 0 0 0.5 0 0.65 0 1)
    51               #hasHorizontalScrollBar: true
    51               #hasHorizontalScrollBar: true
    52               #hasVerticalScrollBar: true
    52               #hasVerticalScrollBar: true
    53               #autoHideScrollBars: true
    53               #autoHideScrollBars: true
    54               #valueChangeSelector: #updateImplementorsOf:
    54               #valueChangeSelector: #updateImplementorsOf:
    55               #useIndex: true
    55               #useIndex: true
    56               #sequenceList: #resultHolder
    56               #sequenceList: #resultHolder
    57             )
    57             )
    58            #(#SequenceViewSpec
    58            #(#SequenceViewSpec
    59               #name: 'List2'
    59               #name: 'List2'
    60               #layout: #(#LayoutFrame 0 0.65 0 0 0 1 0 1)
    60               #layout: #(#LayoutFrame 0 0.65 0 0 0 1 0 1)
       
    61               #menu: #implementorListMenu
    61               #hasHorizontalScrollBar: true
    62               #hasHorizontalScrollBar: true
    62               #hasVerticalScrollBar: true
    63               #hasVerticalScrollBar: true
    63               #autoHideScrollBars: true
    64               #autoHideScrollBars: true
    64               #doubleClickSelector: #openBrowserOn:
    65               #doubleClickSelector: #openBrowserOn:
    65               #useIndex: false
    66               #useIndex: false
       
    67               #model: #selectedClassOfResultHolder
    66               #sequenceList: #classOfResultHolder
    68               #sequenceList: #classOfResultHolder
    67             )
    69             )
    68            #(#ViewSpec
    70            #(#ViewSpec
    69               #name: 'Box4'
    71               #name: 'Box4'
    70               #layout: #(#LayoutFrame 0 0 0 0 0 0.65 0 0.43)
    72               #layout: #(#LayoutFrame 0 0 0 0 0 0.65 -25 0.5)
    71               #component: 
    73               #component: 
    72              #(#SpecCollection
    74              #(#SpecCollection
    73                 #collection: #(
    75                 #collection: #(
    74                  #(#LabelSpec
    76                  #(#LabelSpec
    75                     #label: 'Receiver'
    77                     #label: 'Receiver'
    76                     #name: 'ReceiverLabel'
    78                     #name: 'ReceiverLabel'
    77                     #layout: #(#LayoutFrame -4 0.0162791 7 0 -4 0.293023 18 0)
    79                     #layout: #(#LayoutFrame -4 0.0162791 0 0 -4 0.293023 20 0)
    78                     #translateLabel: true
    80                     #translateLabel: true
    79                     #adjust: #left
    81                     #adjust: #left
    80                   )
    82                   )
    81                  #(#ComboListSpec
    83                  #(#ComboListSpec
    82                     #name: 'allowedArgments'
    84                     #name: 'allowedArgments'
    83                     #layout: #(#LayoutFrame 0 0.339535 2 0 0 0.653488 19 0)
    85                     #layout: #(#LayoutFrame 0 0.339535 0 0 0 0.653488 20 0)
    84                     #model: #argCountHolder
    86                     #model: #argCountHolder
    85                     #comboList: #argCountList
    87                     #comboList: #argCountList
    86                     #useIndex: true
    88                     #useIndex: true
    87                   )
    89                   )
    88                  #(#LabelSpec
    90                  #(#LabelSpec
    89                     #label: 'MessageAnswer'
    91                     #label: 'MessageAnswer'
    90                     #name: 'MessageAnswerLabel'
    92                     #name: 'MessageAnswerLabel'
    91                     #layout: #(#LayoutFrame 0 0.6693 5 0 0 0.99023 17 0)
    93                     #layout: #(#LayoutFrame 0 0.6693 0 0 0 0.99023 20 0)
    92                     #translateLabel: true
    94                     #translateLabel: true
    93                     #adjust: #left
    95                     #adjust: #left
    94                   )
    96                   )
    95                  #(#HorizontalPanelViewSpec
    97                  #(#HorizontalPanelViewSpec
    96                     #name: 'HorizontalPanel1'
    98                     #name: 'HorizontalPanel1'
   103                    #(#SpecCollection
   105                    #(#SpecCollection
   104                       #collection: #(
   106                       #collection: #(
   105                        #(#WorkspaceSpec
   107                        #(#WorkspaceSpec
   106                           #name: 'ReceiverEditor'
   108                           #name: 'ReceiverEditor'
   107                           #tabable: true
   109                           #tabable: true
   108                           #hasHorizontalScrollBar: false
   110                           #hasHorizontalScrollBar: true
   109                           #hasVerticalScrollBar: false
   111                           #hasVerticalScrollBar: true
       
   112                           #miniScrollerHorizontal: true
       
   113                           #miniScrollerVertical: true
   110                           #autoHideScrollBars: true
   114                           #autoHideScrollBars: true
   111                           #extent: #(#Point 117 152)
   115                           #extent: #(#Point 117 155)
   112                           #postBuildCallback: #receiverWidgetCreated:
   116                           #postBuildCallback: #receiverWidgetCreated:
   113                         )
   117                         )
   114                        #(#VerticalPanelViewSpec
   118                        #(#VerticalPanelViewSpec
   115                           #name: 'VerticalPanel1'
   119                           #name: 'VerticalPanel1'
   116                           #horizontalLayout: #fit
   120                           #horizontalLayout: #fit
   128                                   #collection: #(
   132                                   #collection: #(
   129                                    #(#WorkspaceSpec
   133                                    #(#WorkspaceSpec
   130                                       #name: 'Arg1Editor'
   134                                       #name: 'Arg1Editor'
   131                                       #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   135                                       #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   132                                       #tabable: true
   136                                       #tabable: true
   133                                       #hasHorizontalScrollBar: false
   137                                       #hasHorizontalScrollBar: true
   134                                       #hasVerticalScrollBar: false
   138                                       #hasVerticalScrollBar: true
       
   139                                       #miniScrollerHorizontal: true
       
   140                                       #miniScrollerVertical: true
   135                                       #autoHideScrollBars: true
   141                                       #autoHideScrollBars: true
   136                                       #postBuildCallback: #argument1WidgetCreated:
   142                                       #postBuildCallback: #argument1WidgetCreated:
   137                                     )
   143                                     )
   138                                    )
   144                                    )
   139                                  
   145                                  
   140                                 )
   146                                 )
   141                                 #extent: #(#Point 117 49)
   147                                 #extent: #(#Point 117 50)
   142                               )
   148                               )
   143                              #(#ViewSpec
   149                              #(#ViewSpec
   144                                 #name: 'Box2'
   150                                 #name: 'Box2'
   145                                 #visibilityChannel: #arg2BoxVisible
   151                                 #visibilityChannel: #arg2BoxVisible
   146                                 #component: 
   152                                 #component: 
   148                                   #collection: #(
   154                                   #collection: #(
   149                                    #(#WorkspaceSpec
   155                                    #(#WorkspaceSpec
   150                                       #name: 'TextEditor5'
   156                                       #name: 'TextEditor5'
   151                                       #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   157                                       #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   152                                       #tabable: true
   158                                       #tabable: true
   153                                       #hasHorizontalScrollBar: false
   159                                       #hasHorizontalScrollBar: true
   154                                       #hasVerticalScrollBar: false
   160                                       #hasVerticalScrollBar: true
       
   161                                       #miniScrollerHorizontal: true
       
   162                                       #miniScrollerVertical: true
   155                                       #autoHideScrollBars: true
   163                                       #autoHideScrollBars: true
   156                                       #postBuildCallback: #argument2WidgetCreated:
   164                                       #postBuildCallback: #argument2WidgetCreated:
   157                                     )
   165                                     )
   158                                    )
   166                                    )
   159                                  
   167                                  
   160                                 )
   168                                 )
   161                                 #extent: #(#Point 117 48)
   169                                 #extent: #(#Point 117 49)
   162                               )
   170                               )
   163                              #(#ViewSpec
   171                              #(#ViewSpec
   164                                 #name: 'Box3'
   172                                 #name: 'Box3'
   165                                 #visibilityChannel: #arg3BoxVisible
   173                                 #visibilityChannel: #arg3BoxVisible
   166                                 #component: 
   174                                 #component: 
   168                                   #collection: #(
   176                                   #collection: #(
   169                                    #(#WorkspaceSpec
   177                                    #(#WorkspaceSpec
   170                                       #name: 'TextEditor6'
   178                                       #name: 'TextEditor6'
   171                                       #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   179                                       #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   172                                       #tabable: true
   180                                       #tabable: true
   173                                       #hasHorizontalScrollBar: false
   181                                       #hasHorizontalScrollBar: true
   174                                       #hasVerticalScrollBar: false
   182                                       #hasVerticalScrollBar: true
       
   183                                       #miniScrollerHorizontal: true
       
   184                                       #miniScrollerVertical: true
   175                                       #autoHideScrollBars: true
   185                                       #autoHideScrollBars: true
   176                                       #postBuildCallback: #argument3WidgetCreated:
   186                                       #postBuildCallback: #argument3WidgetCreated:
   177                                     )
   187                                     )
   178                                    )
   188                                    )
   179                                  
   189                                  
   180                                 )
   190                                 )
   181                                 #extent: #(#Point 117 49)
   191                                 #extent: #(#Point 117 50)
   182                               )
   192                               )
   183                              )
   193                              )
   184                            
   194                            
   185                           )
   195                           )
   186                           #extent: #(#Point 117 152)
   196                           #extent: #(#Point 117 155)
   187                         )
   197                         )
   188                        #(#WorkspaceSpec
   198                        #(#WorkspaceSpec
   189                           #name: 'AnswerEditor'
   199                           #name: 'AnswerEditor'
   190                           #tabable: true
   200                           #tabable: true
   191                           #hasHorizontalScrollBar: false
   201                           #hasHorizontalScrollBar: true
   192                           #hasVerticalScrollBar: false
   202                           #hasVerticalScrollBar: true
       
   203                           #miniScrollerHorizontal: true
       
   204                           #miniScrollerVertical: true
   193                           #autoHideScrollBars: true
   205                           #autoHideScrollBars: true
   194                           #extent: #(#Point 118 152)
   206                           #extent: #(#Point 118 155)
   195                           #postBuildCallback: #messageAnswerWidgetCreated:
   207                           #postBuildCallback: #messageAnswerWidgetCreated:
   196                         )
   208                         )
   197                        )
   209                        )
   198                      
   210                      
   199                     )
   211                     )
   202                
   214                
   203               )
   215               )
   204             )
   216             )
   205            #(#ViewSpec
   217            #(#ViewSpec
   206               #name: 'Box5'
   218               #name: 'Box5'
   207               #layout: #(#LayoutFrame 53 0.224737 0 0.44 0 0.65 0 0.495578)
   219               #layout: #(#LayoutFrame 53 0.224737 -23 0.5 0 0.65 0 0.5)
   208               #component: 
   220               #component: 
   209              #(#SpecCollection
   221              #(#SpecCollection
   210                 #collection: #(
   222                 #collection: #(
   211                  #(#ActionButtonSpec
   223                  #(#ActionButtonSpec
   212                     #label: 'Clear'
   224                     #label: 'Clear'
   232         )
   244         )
   233       )
   245       )
   234 ! !
   246 ! !
   235 
   247 
   236 !MethodFinderWindow class methodsFor:'menu specs'!
   248 !MethodFinderWindow class methodsFor:'menu specs'!
       
   249 
       
   250 implementorListMenu
       
   251     "This resource specification was automatically generated
       
   252      by the MenuEditor of ST/X."
       
   253 
       
   254     "Do not manually edit this!! If it is corrupted,
       
   255      the MenuEditor may not be able to read the specification."
       
   256 
       
   257     "
       
   258      MenuEditor new openOnClass:MethodFinderWindow andSelector:#implementorListMenu
       
   259      (Menu new fromLiteralArrayEncoding:(MethodFinderWindow implementorListMenu)) startUp
       
   260     "
       
   261 
       
   262     <resource: #menu>
       
   263 
       
   264     ^ 
       
   265      #(#Menu
       
   266         #(
       
   267          #(#MenuItem
       
   268             #label: 'Browse'
       
   269             #translateLabel: true
       
   270             #value: #openBrowserOnSelectedItem
       
   271           )
       
   272          )
       
   273         nil
       
   274         nil
       
   275       )
       
   276 !
   237 
   277 
   238 menu
   278 menu
   239     "This resource specification was automatically generated
   279     "This resource specification was automatically generated
   240      by the MenuEditor of ST/X."
   280      by the MenuEditor of ST/X."
   241 
   281 
   436 
   476 
   437 
   477 
   438 "
   478 "
   439 !
   479 !
   440 
   480 
       
   481 openBrowserOnSelectedItem 
       
   482     |sel|
       
   483 
       
   484     sel := self selectedClassOfResultHolder value.
       
   485     sel isNil ifTrue:[^ self].
       
   486     self openBrowserOn:sel
       
   487 !
       
   488 
   441 receiverEditorContents
   489 receiverEditorContents
   442    "Return a cleaned up version of receiver taken from the receiverEditor
   490    "Return a cleaned up version of receiver taken from the receiverEditor
   443     as an association. The association has aCleanedRecieverString as a key and the 
   491     as an association. The association has aCleanedRecieverString as a key and the 
   444     compiledReceiver as value."
   492     compiledReceiver as value."
   445 
   493 
   604     (holder := builder bindingAt:#resultHolder) isNil ifTrue:[
   652     (holder := builder bindingAt:#resultHolder) isNil ifTrue:[
   605         holder := ValueHolder new.
   653         holder := ValueHolder new.
   606         builder aspectAt:#resultHolder put:holder.
   654         builder aspectAt:#resultHolder put:holder.
   607     ].
   655     ].
   608     ^ holder.
   656     ^ holder.
       
   657 !
       
   658 
       
   659 selectedClassOfResultHolder
       
   660     "Return a valueHolder which contains the index of the selected result class
       
   661      (right list)"
       
   662 
       
   663     |holder|
       
   664     (holder := builder bindingAt:#selectedClassOfResultHolder) isNil ifTrue:[
       
   665         holder := ValueHolder new.
       
   666         builder aspectAt:#selectedClassOfResultHolder put:holder
       
   667     ].
       
   668     ^ holder
   609 ! !
   669 ! !
   610 
   670 
   611 !MethodFinderWindow methodsFor:'callBacks'!
   671 !MethodFinderWindow methodsFor:'callBacks'!
   612 
   672 
   613 argument1WidgetCreated: aWidget
   673 argument1WidgetCreated: aWidget