MethodFinderWindow.st
author Claus Gittinger <cg@exept.de>
Wed, 07 Nov 2001 14:00:00 +0100
changeset 1529 8c1607c0fbe8
parent 1526 8e62e3f56402
child 1530 37b18e9a12fb
permissions -rw-r--r--
pop up menu
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
     1
"{ Package: 'stx:libtool2' }"
f67b97bc683a initial checkin
james
parents:
diff changeset
     2
f67b97bc683a initial checkin
james
parents:
diff changeset
     3
ApplicationModel subclass:#MethodFinderWindow
f67b97bc683a initial checkin
james
parents:
diff changeset
     4
	instanceVariableNames:'argumentsEditor messageAnswerEditor receiverEditor receiver
f67b97bc683a initial checkin
james
parents:
diff changeset
     5
		resultSelectors arg2BoxVisible arg1BoxVisible arg4BoxVisible
f67b97bc683a initial checkin
james
parents:
diff changeset
     6
		arg3BoxVisible argCountHolder argCountList argument1Editor
f67b97bc683a initial checkin
james
parents:
diff changeset
     7
		argument2Editor argument3Editor argument4Editor resultSelected
f67b97bc683a initial checkin
james
parents:
diff changeset
     8
		lookAtResultEditor'
f67b97bc683a initial checkin
james
parents:
diff changeset
     9
	classVariableNames:''
f67b97bc683a initial checkin
james
parents:
diff changeset
    10
	poolDictionaries:''
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    11
	category:'MethodFinder'
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
    12
!
f67b97bc683a initial checkin
james
parents:
diff changeset
    13
f67b97bc683a initial checkin
james
parents:
diff changeset
    14
f67b97bc683a initial checkin
james
parents:
diff changeset
    15
!MethodFinderWindow class methodsFor:'interface specs'!
f67b97bc683a initial checkin
james
parents:
diff changeset
    16
f67b97bc683a initial checkin
james
parents:
diff changeset
    17
windowSpec
f67b97bc683a initial checkin
james
parents:
diff changeset
    18
    "This resource specification was automatically generated
f67b97bc683a initial checkin
james
parents:
diff changeset
    19
     by the UIPainter of ST/X."
f67b97bc683a initial checkin
james
parents:
diff changeset
    20
f67b97bc683a initial checkin
james
parents:
diff changeset
    21
    "Do not manually edit this!! If it is corrupted,
f67b97bc683a initial checkin
james
parents:
diff changeset
    22
     the UIPainter may not be able to read the specification."
f67b97bc683a initial checkin
james
parents:
diff changeset
    23
f67b97bc683a initial checkin
james
parents:
diff changeset
    24
    "
f67b97bc683a initial checkin
james
parents:
diff changeset
    25
     UIPainter new openOnClass:MethodFinderWindow andSelector:#windowSpec
f67b97bc683a initial checkin
james
parents:
diff changeset
    26
     MethodFinderWindow new openInterface:#windowSpec
f67b97bc683a initial checkin
james
parents:
diff changeset
    27
     MethodFinderWindow open
f67b97bc683a initial checkin
james
parents:
diff changeset
    28
    "
f67b97bc683a initial checkin
james
parents:
diff changeset
    29
f67b97bc683a initial checkin
james
parents:
diff changeset
    30
    <resource: #canvas>
f67b97bc683a initial checkin
james
parents:
diff changeset
    31
f67b97bc683a initial checkin
james
parents:
diff changeset
    32
    ^ 
f67b97bc683a initial checkin
james
parents:
diff changeset
    33
     #(#FullSpec
f67b97bc683a initial checkin
james
parents:
diff changeset
    34
        #name: #windowSpec
f67b97bc683a initial checkin
james
parents:
diff changeset
    35
        #window: 
f67b97bc683a initial checkin
james
parents:
diff changeset
    36
       #(#WindowSpec
f67b97bc683a initial checkin
james
parents:
diff changeset
    37
          #label: 'MethodFinder'
f67b97bc683a initial checkin
james
parents:
diff changeset
    38
          #name: 'MethodFinder'
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    39
          #min: #(#Point nil nil)
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    40
          #max: #(#Point nil nil)
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
    41
          #bounds: #(#Rectangle 16 46 566 446)
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    42
          #menu: #menu
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    43
          #forceRecursiveBackground: false
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
    44
        )
f67b97bc683a initial checkin
james
parents:
diff changeset
    45
        #component: 
f67b97bc683a initial checkin
james
parents:
diff changeset
    46
       #(#SpecCollection
f67b97bc683a initial checkin
james
parents:
diff changeset
    47
          #collection: #(
f67b97bc683a initial checkin
james
parents:
diff changeset
    48
           #(#SequenceViewSpec
f67b97bc683a initial checkin
james
parents:
diff changeset
    49
              #name: 'List1'
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
    50
              #layout: #(#LayoutFrame 0 0 0 0.5 0 0.65 0 1)
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
    51
              #hasHorizontalScrollBar: true
f67b97bc683a initial checkin
james
parents:
diff changeset
    52
              #hasVerticalScrollBar: true
f67b97bc683a initial checkin
james
parents:
diff changeset
    53
              #autoHideScrollBars: true
f67b97bc683a initial checkin
james
parents:
diff changeset
    54
              #valueChangeSelector: #updateImplementorsOf:
f67b97bc683a initial checkin
james
parents:
diff changeset
    55
              #useIndex: true
f67b97bc683a initial checkin
james
parents:
diff changeset
    56
              #sequenceList: #resultHolder
f67b97bc683a initial checkin
james
parents:
diff changeset
    57
            )
f67b97bc683a initial checkin
james
parents:
diff changeset
    58
           #(#SequenceViewSpec
f67b97bc683a initial checkin
james
parents:
diff changeset
    59
              #name: 'List2'
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    60
              #layout: #(#LayoutFrame 0 0.65 0 0 0 1 0 1)
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
    61
              #menu: #implementorListMenu
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
    62
              #hasHorizontalScrollBar: true
f67b97bc683a initial checkin
james
parents:
diff changeset
    63
              #hasVerticalScrollBar: true
f67b97bc683a initial checkin
james
parents:
diff changeset
    64
              #autoHideScrollBars: true
f67b97bc683a initial checkin
james
parents:
diff changeset
    65
              #doubleClickSelector: #openBrowserOn:
f67b97bc683a initial checkin
james
parents:
diff changeset
    66
              #useIndex: false
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
    67
              #model: #selectedClassOfResultHolder
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
    68
              #sequenceList: #classOfResultHolder
f67b97bc683a initial checkin
james
parents:
diff changeset
    69
            )
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    70
           #(#ViewSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    71
              #name: 'Box4'
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
    72
              #layout: #(#LayoutFrame 0 0 0 0 0 0.65 -25 0.5)
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
    73
              #component: 
f67b97bc683a initial checkin
james
parents:
diff changeset
    74
             #(#SpecCollection
f67b97bc683a initial checkin
james
parents:
diff changeset
    75
                #collection: #(
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    76
                 #(#LabelSpec
1526
8e62e3f56402 *** empty log message ***
james
parents: 1525
diff changeset
    77
                    #label: 'Receiver'
8e62e3f56402 *** empty log message ***
james
parents: 1525
diff changeset
    78
                    #name: 'ReceiverLabel'
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
    79
                    #layout: #(#LayoutFrame -4 0.0162791 0 0 -4 0.293023 20 0)
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    80
                    #translateLabel: true
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    81
                    #adjust: #left
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
    82
                  )
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    83
                 #(#ComboListSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    84
                    #name: 'allowedArgments'
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
    85
                    #layout: #(#LayoutFrame 0 0.339535 0 0 0 0.653488 20 0)
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    86
                    #model: #argCountHolder
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    87
                    #comboList: #argCountList
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    88
                    #useIndex: true
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    89
                  )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    90
                 #(#LabelSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    91
                    #label: 'MessageAnswer'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    92
                    #name: 'MessageAnswerLabel'
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
    93
                    #layout: #(#LayoutFrame 0 0.6693 0 0 0 0.99023 20 0)
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    94
                    #translateLabel: true
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    95
                    #adjust: #left
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    96
                  )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    97
                 #(#HorizontalPanelViewSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    98
                    #name: 'HorizontalPanel1'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
    99
                    #layout: #(#LayoutFrame 0 0 20 0 0 1 0 1)
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   100
                    #horizontalLayout: #fit
f67b97bc683a initial checkin
james
parents:
diff changeset
   101
                    #verticalLayout: #fit
f67b97bc683a initial checkin
james
parents:
diff changeset
   102
                    #horizontalSpace: 3
f67b97bc683a initial checkin
james
parents:
diff changeset
   103
                    #verticalSpace: 3
f67b97bc683a initial checkin
james
parents:
diff changeset
   104
                    #component: 
f67b97bc683a initial checkin
james
parents:
diff changeset
   105
                   #(#SpecCollection
f67b97bc683a initial checkin
james
parents:
diff changeset
   106
                      #collection: #(
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   107
                       #(#WorkspaceSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   108
                          #name: 'ReceiverEditor'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   109
                          #tabable: true
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   110
                          #hasHorizontalScrollBar: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   111
                          #hasVerticalScrollBar: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   112
                          #miniScrollerHorizontal: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   113
                          #miniScrollerVertical: true
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   114
                          #autoHideScrollBars: true
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   115
                          #extent: #(#Point 117 155)
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   116
                          #postBuildCallback: #receiverWidgetCreated:
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   117
                        )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   118
                       #(#VerticalPanelViewSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   119
                          #name: 'VerticalPanel1'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   120
                          #horizontalLayout: #fit
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   121
                          #verticalLayout: #fit
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   122
                          #horizontalSpace: 3
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   123
                          #verticalSpace: 3
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   124
                          #component: 
f67b97bc683a initial checkin
james
parents:
diff changeset
   125
                         #(#SpecCollection
f67b97bc683a initial checkin
james
parents:
diff changeset
   126
                            #collection: #(
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   127
                             #(#ViewSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   128
                                #name: 'Box1'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   129
                                #visibilityChannel: #arg1BoxVisible
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   130
                                #component: 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   131
                               #(#SpecCollection
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   132
                                  #collection: #(
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   133
                                   #(#WorkspaceSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   134
                                      #name: 'Arg1Editor'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   135
                                      #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   136
                                      #tabable: true
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   137
                                      #hasHorizontalScrollBar: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   138
                                      #hasVerticalScrollBar: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   139
                                      #miniScrollerHorizontal: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   140
                                      #miniScrollerVertical: true
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   141
                                      #autoHideScrollBars: true
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   142
                                      #postBuildCallback: #argument1WidgetCreated:
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   143
                                    )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   144
                                   )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   145
                                 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   146
                                )
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   147
                                #extent: #(#Point 117 50)
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   148
                              )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   149
                             #(#ViewSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   150
                                #name: 'Box2'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   151
                                #visibilityChannel: #arg2BoxVisible
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   152
                                #component: 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   153
                               #(#SpecCollection
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   154
                                  #collection: #(
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   155
                                   #(#WorkspaceSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   156
                                      #name: 'TextEditor5'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   157
                                      #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   158
                                      #tabable: true
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   159
                                      #hasHorizontalScrollBar: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   160
                                      #hasVerticalScrollBar: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   161
                                      #miniScrollerHorizontal: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   162
                                      #miniScrollerVertical: true
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   163
                                      #autoHideScrollBars: true
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   164
                                      #postBuildCallback: #argument2WidgetCreated:
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   165
                                    )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   166
                                   )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   167
                                 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   168
                                )
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   169
                                #extent: #(#Point 117 49)
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   170
                              )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   171
                             #(#ViewSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   172
                                #name: 'Box3'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   173
                                #visibilityChannel: #arg3BoxVisible
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   174
                                #component: 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   175
                               #(#SpecCollection
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   176
                                  #collection: #(
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   177
                                   #(#WorkspaceSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   178
                                      #name: 'TextEditor6'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   179
                                      #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   180
                                      #tabable: true
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   181
                                      #hasHorizontalScrollBar: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   182
                                      #hasVerticalScrollBar: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   183
                                      #miniScrollerHorizontal: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   184
                                      #miniScrollerVertical: true
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   185
                                      #autoHideScrollBars: true
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   186
                                      #postBuildCallback: #argument3WidgetCreated:
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   187
                                    )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   188
                                   )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   189
                                 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   190
                                )
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   191
                                #extent: #(#Point 117 50)
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   192
                              )
f67b97bc683a initial checkin
james
parents:
diff changeset
   193
                             )
f67b97bc683a initial checkin
james
parents:
diff changeset
   194
                           
f67b97bc683a initial checkin
james
parents:
diff changeset
   195
                          )
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   196
                          #extent: #(#Point 117 155)
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   197
                        )
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   198
                       #(#WorkspaceSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   199
                          #name: 'AnswerEditor'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   200
                          #tabable: true
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   201
                          #hasHorizontalScrollBar: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   202
                          #hasVerticalScrollBar: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   203
                          #miniScrollerHorizontal: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   204
                          #miniScrollerVertical: true
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   205
                          #autoHideScrollBars: true
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   206
                          #extent: #(#Point 118 155)
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   207
                          #postBuildCallback: #messageAnswerWidgetCreated:
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   208
                        )
f67b97bc683a initial checkin
james
parents:
diff changeset
   209
                       )
f67b97bc683a initial checkin
james
parents:
diff changeset
   210
                     
f67b97bc683a initial checkin
james
parents:
diff changeset
   211
                    )
f67b97bc683a initial checkin
james
parents:
diff changeset
   212
                  )
f67b97bc683a initial checkin
james
parents:
diff changeset
   213
                 )
f67b97bc683a initial checkin
james
parents:
diff changeset
   214
               
f67b97bc683a initial checkin
james
parents:
diff changeset
   215
              )
f67b97bc683a initial checkin
james
parents:
diff changeset
   216
            )
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   217
           #(#ViewSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   218
              #name: 'Box5'
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   219
              #layout: #(#LayoutFrame 53 0.224737 -23 0.5 0 0.65 0 0.5)
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   220
              #component: 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   221
             #(#SpecCollection
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   222
                #collection: #(
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   223
                 #(#ActionButtonSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   224
                    #label: 'Clear'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   225
                    #name: 'Button2'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   226
                    #layout: #(#LayoutFrame 0 0 0 0 -5 0.5 0 1)
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   227
                    #translateLabel: true
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   228
                    #model: #clear
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   229
                  )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   230
                 #(#ActionButtonSpec
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   231
                    #label: 'Search'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   232
                    #name: 'Button1'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   233
                    #layout: #(#LayoutFrame 5 0.5 0 0 0 1 0 1)
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   234
                    #translateLabel: true
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   235
                    #tabable: true
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   236
                    #model: #search
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   237
                  )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   238
                 )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   239
               
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   240
              )
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   241
            )
f67b97bc683a initial checkin
james
parents:
diff changeset
   242
           )
f67b97bc683a initial checkin
james
parents:
diff changeset
   243
         
f67b97bc683a initial checkin
james
parents:
diff changeset
   244
        )
f67b97bc683a initial checkin
james
parents:
diff changeset
   245
      )
f67b97bc683a initial checkin
james
parents:
diff changeset
   246
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
   247
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   248
!MethodFinderWindow class methodsFor:'menu specs'!
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   249
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   250
implementorListMenu
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   251
    "This resource specification was automatically generated
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   252
     by the MenuEditor of ST/X."
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   253
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   254
    "Do not manually edit this!! If it is corrupted,
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   255
     the MenuEditor may not be able to read the specification."
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   256
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   257
    "
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   258
     MenuEditor new openOnClass:MethodFinderWindow andSelector:#implementorListMenu
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   259
     (Menu new fromLiteralArrayEncoding:(MethodFinderWindow implementorListMenu)) startUp
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   260
    "
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   261
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   262
    <resource: #menu>
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   263
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   264
    ^ 
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   265
     #(#Menu
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   266
        #(
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   267
         #(#MenuItem
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   268
            #label: 'Browse'
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   269
            #translateLabel: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   270
            #value: #openBrowserOnSelectedItem
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   271
          )
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   272
         )
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   273
        nil
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   274
        nil
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   275
      )
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   276
!
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   277
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   278
menu
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   279
    "This resource specification was automatically generated
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   280
     by the MenuEditor of ST/X."
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   281
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   282
    "Do not manually edit this!! If it is corrupted,
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   283
     the MenuEditor may not be able to read the specification."
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   284
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   285
    "
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   286
     MenuEditor new openOnClass:MethodFinderWindow andSelector:#menu
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   287
     (Menu new fromLiteralArrayEncoding:(MethodFinderWindow menu)) startUp
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   288
    "
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   289
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   290
    <resource: #menu>
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   291
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   292
    ^ 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   293
     #(#Menu
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   294
        #(
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   295
         #(#MenuItem
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   296
            #label: '&File'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   297
            #activeHelpKey: #file
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   298
            #submenu: 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   299
           #(#Menu
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   300
              #(
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   301
               #(#MenuItem
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   302
                  #label: 'Exit'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   303
                  #value: #closeRequest
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   304
                  #activeHelpKey: #fileExit
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   305
                )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   306
               )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   307
              nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   308
              nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   309
            )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   310
          )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   311
         #(#MenuItem
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   312
            #label: 'Help'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   313
            #startGroup: #right
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   314
            #submenu: 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   315
           #(#Menu
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   316
              #(
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   317
               #(#MenuItem
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   318
                  #label: 'Documentation'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   319
                  #value: #openHTMLDocumentation
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   320
                  #activeHelpKey: #helpTutorial
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   321
                )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   322
               #(#MenuItem
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   323
                  #label: 'About MenuEditor...'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   324
                  #value: #openAboutThisApplication
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   325
                  #activeHelpKey: #aboutThisAppliaction
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   326
                )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   327
               )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   328
              nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   329
              nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   330
            )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   331
          )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   332
         )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   333
        nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   334
        nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   335
      )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   336
! !
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   337
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   338
!MethodFinderWindow methodsFor:'accessing'!
f67b97bc683a initial checkin
james
parents:
diff changeset
   339
f67b97bc683a initial checkin
james
parents:
diff changeset
   340
receiver
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   341
    "Return a copy of the value of the instance variable 'receiver' "
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   342
f67b97bc683a initial checkin
james
parents:
diff changeset
   343
    ^ receiver copy
f67b97bc683a initial checkin
james
parents:
diff changeset
   344
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
   345
f67b97bc683a initial checkin
james
parents:
diff changeset
   346
!MethodFinderWindow methodsFor:'actions'!
f67b97bc683a initial checkin
james
parents:
diff changeset
   347
f67b97bc683a initial checkin
james
parents:
diff changeset
   348
argumentEditorsContents
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   349
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   350
"Determine how many text editors of the arguments are used and store the result
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   351
as argCounter. The result being the minimum between how many editors have
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   352
expressions in and how many are displayed.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   353
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   354
Add each argument string (key)and the evaluated version (value) to an Ordered Dictionary
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   355
from each of the text editors.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   356
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   357
Return the OrderedDictionary with the expressions from all the text editors. "
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   358
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   359
     | tempArguments argCounter tempArgument1Editor tempArgument2Editor tempArgument3Editor tempArgument4Editor
f67b97bc683a initial checkin
james
parents:
diff changeset
   360
associationKey associationValue|
f67b97bc683a initial checkin
james
parents:
diff changeset
   361
f67b97bc683a initial checkin
james
parents:
diff changeset
   362
argCounter:=0.
f67b97bc683a initial checkin
james
parents:
diff changeset
   363
f67b97bc683a initial checkin
james
parents:
diff changeset
   364
tempArgument1Editor:= (self cleanInputs: argument1Editor contents).
f67b97bc683a initial checkin
james
parents:
diff changeset
   365
tempArgument2Editor:=  (self cleanInputs: argument2Editor contents).
f67b97bc683a initial checkin
james
parents:
diff changeset
   366
tempArgument3Editor:= (self cleanInputs: argument3Editor contents).
f67b97bc683a initial checkin
james
parents:
diff changeset
   367
f67b97bc683a initial checkin
james
parents:
diff changeset
   368
tempArgument1Editor = '' ifFalse:[argCounter:=argCounter +1].
f67b97bc683a initial checkin
james
parents:
diff changeset
   369
tempArgument2Editor = '' ifFalse:[argCounter:=argCounter +1].
f67b97bc683a initial checkin
james
parents:
diff changeset
   370
tempArgument3Editor = '' ifFalse:[argCounter:=argCounter +1].
f67b97bc683a initial checkin
james
parents:
diff changeset
   371
f67b97bc683a initial checkin
james
parents:
diff changeset
   372
f67b97bc683a initial checkin
james
parents:
diff changeset
   373
argCounter:= (argCounter min: (self argCountHolder value -1)).
f67b97bc683a initial checkin
james
parents:
diff changeset
   374
tempArguments:= OrderedDictionary new:argCounter. 
f67b97bc683a initial checkin
james
parents:
diff changeset
   375
f67b97bc683a initial checkin
james
parents:
diff changeset
   376
(argCounter value >= 1) 
f67b97bc683a initial checkin
james
parents:
diff changeset
   377
                ifTrue:[associationValue:= (Compiler evaluate: tempArgument1Editor).
f67b97bc683a initial checkin
james
parents:
diff changeset
   378
                        ((self isExpression:tempArgument1Editor) or:[ associationValue isNil]) ifTrue:[                  "looks if an expression is typed in"
f67b97bc683a initial checkin
james
parents:
diff changeset
   379
                                        associationKey:=associationValue printString]
f67b97bc683a initial checkin
james
parents:
diff changeset
   380
                                                          ifFalse:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   381
                                        associationKey:=tempArgument1Editor].
f67b97bc683a initial checkin
james
parents:
diff changeset
   382
f67b97bc683a initial checkin
james
parents:
diff changeset
   383
                        tempArguments add: associationKey-> associationValue.
f67b97bc683a initial checkin
james
parents:
diff changeset
   384
                        ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   385
(argCounter value >= 2) 
f67b97bc683a initial checkin
james
parents:
diff changeset
   386
                ifTrue:[ associationValue:= (Compiler evaluate: tempArgument2Editor).
f67b97bc683a initial checkin
james
parents:
diff changeset
   387
                        (((self isExpression:tempArgument2Editor) or:[ associationValue isNil])) ifTrue:[                  "looks if an expression is typed in"
f67b97bc683a initial checkin
james
parents:
diff changeset
   388
                                        associationKey:=associationValue printString]
f67b97bc683a initial checkin
james
parents:
diff changeset
   389
                                                          ifFalse:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   390
                                        associationKey:=tempArgument2Editor].
f67b97bc683a initial checkin
james
parents:
diff changeset
   391
f67b97bc683a initial checkin
james
parents:
diff changeset
   392
                        tempArguments add: associationKey-> associationValue].
f67b97bc683a initial checkin
james
parents:
diff changeset
   393
f67b97bc683a initial checkin
james
parents:
diff changeset
   394
(argCounter value >= 3)
f67b97bc683a initial checkin
james
parents:
diff changeset
   395
                ifTrue:[ associationValue:= (Compiler evaluate: tempArgument3Editor).
f67b97bc683a initial checkin
james
parents:
diff changeset
   396
                        ((self isExpression:tempArgument3Editor) or:[ associationValue isNil]) ifTrue:[                  "looks if an expression is typed in"
f67b97bc683a initial checkin
james
parents:
diff changeset
   397
                                        associationKey:=associationValue printString]
f67b97bc683a initial checkin
james
parents:
diff changeset
   398
                                                          ifFalse:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   399
                                        associationKey:=tempArgument3Editor].
f67b97bc683a initial checkin
james
parents:
diff changeset
   400
f67b97bc683a initial checkin
james
parents:
diff changeset
   401
                        tempArguments add: associationKey-> associationValue].
f67b97bc683a initial checkin
james
parents:
diff changeset
   402
f67b97bc683a initial checkin
james
parents:
diff changeset
   403
f67b97bc683a initial checkin
james
parents:
diff changeset
   404
^tempArguments
f67b97bc683a initial checkin
james
parents:
diff changeset
   405
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   406
f67b97bc683a initial checkin
james
parents:
diff changeset
   407
clear
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   408
    "Reset the contents of all the outputs. Return the receiver."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   409
f67b97bc683a initial checkin
james
parents:
diff changeset
   410
    receiverEditor contents:nil.
f67b97bc683a initial checkin
james
parents:
diff changeset
   411
    argument1Editor contents:nil.
f67b97bc683a initial checkin
james
parents:
diff changeset
   412
    argument2Editor contents:nil.
f67b97bc683a initial checkin
james
parents:
diff changeset
   413
    argument3Editor contents:nil.
f67b97bc683a initial checkin
james
parents:
diff changeset
   414
    messageAnswerEditor contents:nil.
f67b97bc683a initial checkin
james
parents:
diff changeset
   415
    self resultHolder value:nil.
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   416
    self classOfResultHolder value: nil.
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   417
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   418
f67b97bc683a initial checkin
james
parents:
diff changeset
   419
isExpression: aString
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   420
      "Return true or false depending on if the subString includes certain characters"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   421
(aString includesSubString:': ') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   422
(aString includesSubString:'+') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   423
(aString includesSubString:'-') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   424
(aString includesSubString:'*') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   425
(aString includesSubString:'/') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   426
(aString includesSubString:'>') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   427
(aString includesSubString:'<') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   428
(aString includesSubString:' new') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   429
(aString includesSubString:'[') &  (aString includesSubString:']') & (aString includesSubString:'.')
f67b97bc683a initial checkin
james
parents:
diff changeset
   430
                                ifTrue:[^false].
f67b97bc683a initial checkin
james
parents:
diff changeset
   431
(aString includesSubString:'.') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   432
f67b97bc683a initial checkin
james
parents:
diff changeset
   433
 ^false
f67b97bc683a initial checkin
james
parents:
diff changeset
   434
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   435
f67b97bc683a initial checkin
james
parents:
diff changeset
   436
messageAnswerEditorContents
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   437
   "Return a cleaned up version of message answer taken from the messageAnswerEditor
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   438
    as an association. The association has cleanedAnswerString as a key and the 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   439
    compiledAnswer as value."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   440
f67b97bc683a initial checkin
james
parents:
diff changeset
   441
    |   aCleanedAnswerString   compiledAnswer  |
f67b97bc683a initial checkin
james
parents:
diff changeset
   442
f67b97bc683a initial checkin
james
parents:
diff changeset
   443
aCleanedAnswerString:=self cleanInputs: (messageAnswerEditor contents). 
f67b97bc683a initial checkin
james
parents:
diff changeset
   444
f67b97bc683a initial checkin
james
parents:
diff changeset
   445
compiledAnswer:=Compiler evaluate: aCleanedAnswerString.
f67b97bc683a initial checkin
james
parents:
diff changeset
   446
((self isExpression:aCleanedAnswerString) or:[compiledAnswer isNil]) ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   447
                        aCleanedAnswerString:=compiledAnswer printString].
f67b97bc683a initial checkin
james
parents:
diff changeset
   448
f67b97bc683a initial checkin
james
parents:
diff changeset
   449
^aCleanedAnswerString->compiledAnswer.
f67b97bc683a initial checkin
james
parents:
diff changeset
   450
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   451
f67b97bc683a initial checkin
james
parents:
diff changeset
   452
openBrowserOn:anArgument 
f67b97bc683a initial checkin
james
parents:
diff changeset
   453
    "Opens browser on theArgument of a specific class. anArgument being a string with the
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   454
       Class and the selector upon which the browser is to be opened. Return the receiver."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   455
f67b97bc683a initial checkin
james
parents:
diff changeset
   456
    |aClass aSelector x theArgument|
f67b97bc683a initial checkin
james
parents:
diff changeset
   457
f67b97bc683a initial checkin
james
parents:
diff changeset
   458
    anArgument isNil ifTrue:[
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   459
        ^ self
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   460
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   461
    (anArgument at:1) == $* ifTrue:[
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   462
        theArgument := anArgument copyFrom:2
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   463
    ] ifFalse:[
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   464
        theArgument := anArgument
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   465
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   466
    aClass := theArgument copyUpTo:(Character space).
f67b97bc683a initial checkin
james
parents:
diff changeset
   467
    x := aClass size + 2.
f67b97bc683a initial checkin
james
parents:
diff changeset
   468
    aSelector := theArgument copyFrom:x.
f67b97bc683a initial checkin
james
parents:
diff changeset
   469
    aClass := Smalltalk classNamed:aClass.
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   470
    SystemBrowser openInClass:(aClass) selector:(aSelector asSymbol)   
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   471
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   472
"
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   473
MethodFinderWindow new openBrowserOn: '*SmallInteger +'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   474
MethodFinderWindow new openBrowserOn: 'String ,'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   475
MethodFinderWindow new openBrowserOn: 'Number detentBy:atMultiplesOf:snap:' 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   476
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   477
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   478
"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   479
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   480
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   481
openBrowserOnSelectedItem 
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   482
    |sel|
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   483
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   484
    sel := self selectedClassOfResultHolder value.
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   485
    sel isNil ifTrue:[^ self].
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   486
    self openBrowserOn:sel
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   487
!
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   488
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   489
receiverEditorContents
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   490
   "Return a cleaned up version of receiver taken from the receiverEditor
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   491
    as an association. The association has aCleanedRecieverString as a key and the 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   492
    compiledReceiver as value."
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   493
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   494
    |   aCleanedRecieverString   compiledReceiver  |
f67b97bc683a initial checkin
james
parents:
diff changeset
   495
f67b97bc683a initial checkin
james
parents:
diff changeset
   496
aCleanedRecieverString:=self cleanInputs: (receiverEditor contents). 
f67b97bc683a initial checkin
james
parents:
diff changeset
   497
f67b97bc683a initial checkin
james
parents:
diff changeset
   498
compiledReceiver:=Compiler evaluate: aCleanedRecieverString.
f67b97bc683a initial checkin
james
parents:
diff changeset
   499
f67b97bc683a initial checkin
james
parents:
diff changeset
   500
((self isExpression:aCleanedRecieverString) or:[compiledReceiver isNil]) ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   501
                        aCleanedRecieverString:=compiledReceiver printString].
f67b97bc683a initial checkin
james
parents:
diff changeset
   502
^aCleanedRecieverString->compiledReceiver.
f67b97bc683a initial checkin
james
parents:
diff changeset
   503
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   504
f67b97bc683a initial checkin
james
parents:
diff changeset
   505
search
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   506
"Do a search based on the input in the various text editors. Return the receiver."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   507
| tempReceiver tempAnswer tempArguments anArray resultArray receiverWithArgument mf|
f67b97bc683a initial checkin
james
parents:
diff changeset
   508
self resultHolder value: nil.               "reset the result list"
f67b97bc683a initial checkin
james
parents:
diff changeset
   509
self classOfResultHolder value: nil.        "reset the implementorOf list"
f67b97bc683a initial checkin
james
parents:
diff changeset
   510
f67b97bc683a initial checkin
james
parents:
diff changeset
   511
tempArguments:=self argumentEditorsContents.
f67b97bc683a initial checkin
james
parents:
diff changeset
   512
tempReceiver :=self receiverEditorContents .  
f67b97bc683a initial checkin
james
parents:
diff changeset
   513
tempAnswer:= self messageAnswerEditorContents.   
f67b97bc683a initial checkin
james
parents:
diff changeset
   514
f67b97bc683a initial checkin
james
parents:
diff changeset
   515
"self cleanInputRec:tempReceiver arg:tempArguments ans:tempAnswer."
f67b97bc683a initial checkin
james
parents:
diff changeset
   516
f67b97bc683a initial checkin
james
parents:
diff changeset
   517
f67b97bc683a initial checkin
james
parents:
diff changeset
   518
anArray:=Array new:2.  "creates an array which is to be used as input for the method finder."
f67b97bc683a initial checkin
james
parents:
diff changeset
   519
f67b97bc683a initial checkin
james
parents:
diff changeset
   520
receiverWithArgument:=self mergReciever: (tempReceiver value) WithArgument: (tempArguments values).
f67b97bc683a initial checkin
james
parents:
diff changeset
   521
f67b97bc683a initial checkin
james
parents:
diff changeset
   522
anArray at:1 put:receiverWithArgument;
f67b97bc683a initial checkin
james
parents:
diff changeset
   523
        at:2 put: tempAnswer value.             
f67b97bc683a initial checkin
james
parents:
diff changeset
   524
f67b97bc683a initial checkin
james
parents:
diff changeset
   525
"an array now holds the following array #(#(receiver argument) answer) or #(#(reciever) answer). which should
f67b97bc683a initial checkin
james
parents:
diff changeset
   526
be suitable input for the method finder."
f67b97bc683a initial checkin
james
parents:
diff changeset
   527
mf:= MethodFinder new.
f67b97bc683a initial checkin
james
parents:
diff changeset
   528
resultArray:= mf load: anArray; findMessage. 
f67b97bc683a initial checkin
james
parents:
diff changeset
   529
f67b97bc683a initial checkin
james
parents:
diff changeset
   530
((resultArray at:  1 )includesSubString: 'no single') ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   531
                                self warn: (resultArray at:  1 ).
f67b97bc683a initial checkin
james
parents:
diff changeset
   532
                                ^self
f67b97bc683a initial checkin
james
parents:
diff changeset
   533
                                                              ].  
f67b97bc683a initial checkin
james
parents:
diff changeset
   534
f67b97bc683a initial checkin
james
parents:
diff changeset
   535
"the following then replaces data1 and data2 created by the method finder to the appropriate arguments"
f67b97bc683a initial checkin
james
parents:
diff changeset
   536
resultArray keysAndValuesDo:[:key :value |   | newValue | 
f67b97bc683a initial checkin
james
parents:
diff changeset
   537
      newValue:= value replString: 'data1' withString:(tempReceiver key).
f67b97bc683a initial checkin
james
parents:
diff changeset
   538
(tempArguments size) >= 1 ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   539
      newValue:= newValue replString: 'data2' withString:(tempArguments keyAt:1)].
f67b97bc683a initial checkin
james
parents:
diff changeset
   540
f67b97bc683a initial checkin
james
parents:
diff changeset
   541
(tempArguments size) > 1 ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   542
      newValue:= newValue replString: 'data3' withString:(tempArguments keyAt:2).].
f67b97bc683a initial checkin
james
parents:
diff changeset
   543
f67b97bc683a initial checkin
james
parents:
diff changeset
   544
(tempArguments size) > 2 ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   545
      newValue:= newValue replString: 'data4' withString:(tempArguments keyAt:3).].
f67b97bc683a initial checkin
james
parents:
diff changeset
   546
f67b97bc683a initial checkin
james
parents:
diff changeset
   547
f67b97bc683a initial checkin
james
parents:
diff changeset
   548
                        "    newValue:= value replString: 'data3' withString:(self messageAnswer key). " 
f67b97bc683a initial checkin
james
parents:
diff changeset
   549
f67b97bc683a initial checkin
james
parents:
diff changeset
   550
      newValue:=newValue, ' --> ', (tempAnswer key).
f67b97bc683a initial checkin
james
parents:
diff changeset
   551
f67b97bc683a initial checkin
james
parents:
diff changeset
   552
      resultArray at: key put: newValue.
f67b97bc683a initial checkin
james
parents:
diff changeset
   553
f67b97bc683a initial checkin
james
parents:
diff changeset
   554
              ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   555
f67b97bc683a initial checkin
james
parents:
diff changeset
   556
self resultHolder value: resultArray.
f67b97bc683a initial checkin
james
parents:
diff changeset
   557
resultSelectors:= mf selectors.   "used to find implementors so we do not have to "
f67b97bc683a initial checkin
james
parents:
diff changeset
   558
receiver:=tempReceiver            "search the string for the selector found. Stored as an ordered collection"
f67b97bc683a initial checkin
james
parents:
diff changeset
   559
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   560
f67b97bc683a initial checkin
james
parents:
diff changeset
   561
updateImplementorsOf:anInteger 
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   562
    "Request the implementors of the selected argument provided by aNumber.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   563
     Return the receiver. "
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   564
      |methods classList aNumber|
f67b97bc683a initial checkin
james
parents:
diff changeset
   565
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   566
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   567
       (anInteger isNil) ifTrue:[^self].
f67b97bc683a initial checkin
james
parents:
diff changeset
   568
      anInteger isNil ifTrue:[aNumber:=1]
f67b97bc683a initial checkin
james
parents:
diff changeset
   569
                      ifFalse:[aNumber:=anInteger].  
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   570
      methods:=SystemBrowser findImplementorsOf: (resultSelectors at:aNumber) in:Smalltalk allClasses ignoreCase:false.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   571
      classList:=methods asOrderedCollection collect:[:m | m mclass name , ' ' , m selector].
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   572
f67b97bc683a initial checkin
james
parents:
diff changeset
   573
      classList:=(self markMatchingClasses:(resultSelectors at:aNumber) classesWithSelector:classList).
f67b97bc683a initial checkin
james
parents:
diff changeset
   574
f67b97bc683a initial checkin
james
parents:
diff changeset
   575
    self classOfResultHolder value: classList.
f67b97bc683a initial checkin
james
parents:
diff changeset
   576
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
   577
f67b97bc683a initial checkin
james
parents:
diff changeset
   578
!MethodFinderWindow methodsFor:'aspects'!
f67b97bc683a initial checkin
james
parents:
diff changeset
   579
f67b97bc683a initial checkin
james
parents:
diff changeset
   580
arg1BoxVisible
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   581
"Determines if the box should be visble or not. Return true or false"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   582
    arg1BoxVisible isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   583
        arg1BoxVisible := BlockValue
f67b97bc683a initial checkin
james
parents:
diff changeset
   584
                              with:[:vh | vh value >= 2 ]
f67b97bc683a initial checkin
james
parents:
diff changeset
   585
                              argument:(self argCountHolder)
f67b97bc683a initial checkin
james
parents:
diff changeset
   586
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   587
    ^ arg1BoxVisible.
f67b97bc683a initial checkin
james
parents:
diff changeset
   588
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   589
f67b97bc683a initial checkin
james
parents:
diff changeset
   590
arg2BoxVisible
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   591
"Determines if the box should be visble or not. Return true or false"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   592
    arg2BoxVisible isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   593
        arg2BoxVisible := BlockValue
f67b97bc683a initial checkin
james
parents:
diff changeset
   594
                              with:[:vh | vh value >= 3 ]
f67b97bc683a initial checkin
james
parents:
diff changeset
   595
                              argument:(self argCountHolder)
f67b97bc683a initial checkin
james
parents:
diff changeset
   596
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   597
    ^ arg2BoxVisible.
f67b97bc683a initial checkin
james
parents:
diff changeset
   598
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   599
f67b97bc683a initial checkin
james
parents:
diff changeset
   600
arg3BoxVisible
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   601
"Determines if the box should be visble or not. Return true or false"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   602
    arg3BoxVisible isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   603
        arg3BoxVisible := BlockValue
f67b97bc683a initial checkin
james
parents:
diff changeset
   604
                              with:[:vh | vh value >= 4 ]
f67b97bc683a initial checkin
james
parents:
diff changeset
   605
                              argument:(self argCountHolder)
f67b97bc683a initial checkin
james
parents:
diff changeset
   606
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   607
    ^ arg3BoxVisible.
f67b97bc683a initial checkin
james
parents:
diff changeset
   608
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   609
f67b97bc683a initial checkin
james
parents:
diff changeset
   610
arg4BoxVisible
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   611
"Determines if the box should be visble or not. Return true or false"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   612
    arg4BoxVisible isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   613
        arg4BoxVisible := BlockValue
f67b97bc683a initial checkin
james
parents:
diff changeset
   614
                              with:[:vh | vh value >= 5 ]
f67b97bc683a initial checkin
james
parents:
diff changeset
   615
                              argument:(self argCountHolder)
f67b97bc683a initial checkin
james
parents:
diff changeset
   616
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   617
    ^ arg4BoxVisible.
f67b97bc683a initial checkin
james
parents:
diff changeset
   618
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   619
f67b97bc683a initial checkin
james
parents:
diff changeset
   620
argCountHolder
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   621
"Return the value of argCounterHolder which is initialized at 2."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   622
    argCountHolder isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   623
        argCountHolder := 2 asValue.
f67b97bc683a initial checkin
james
parents:
diff changeset
   624
    ].     
f67b97bc683a initial checkin
james
parents:
diff changeset
   625
    ^ argCountHolder.
f67b97bc683a initial checkin
james
parents:
diff changeset
   626
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   627
f67b97bc683a initial checkin
james
parents:
diff changeset
   628
argCountList
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   629
"Return the argCountList"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   630
    argCountList isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   631
        argCountList := #('0 arguments' '1 argument' '2 arguments' '3 arguments') asValue  
f67b97bc683a initial checkin
james
parents:
diff changeset
   632
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   633
    ^ argCountList.
f67b97bc683a initial checkin
james
parents:
diff changeset
   634
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   635
f67b97bc683a initial checkin
james
parents:
diff changeset
   636
classOfResultHolder
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   637
    "Return a valueHolder which contains a collection with the names of the 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   638
     implementors of a specific message.   "
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   639
f67b97bc683a initial checkin
james
parents:
diff changeset
   640
    |holder|
f67b97bc683a initial checkin
james
parents:
diff changeset
   641
    (holder := builder bindingAt:#classOfResultHolder) isNil ifTrue:[
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   642
        holder := ValueHolder new.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   643
        builder aspectAt:#classOfResultHolder put:holder
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   644
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   645
    ^ holder
f67b97bc683a initial checkin
james
parents:
diff changeset
   646
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   647
f67b97bc683a initial checkin
james
parents:
diff changeset
   648
resultHolder
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   649
    "Return a value holder which contains the results of a search as a collection."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   650
f67b97bc683a initial checkin
james
parents:
diff changeset
   651
    |holder|
f67b97bc683a initial checkin
james
parents:
diff changeset
   652
    (holder := builder bindingAt:#resultHolder) isNil ifTrue:[
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   653
        holder := ValueHolder new.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   654
        builder aspectAt:#resultHolder put:holder.
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   655
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   656
    ^ holder.
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   657
!
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   658
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   659
selectedClassOfResultHolder
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   660
    "Return a valueHolder which contains the index of the selected result class
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   661
     (right list)"
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   662
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   663
    |holder|
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   664
    (holder := builder bindingAt:#selectedClassOfResultHolder) isNil ifTrue:[
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   665
        holder := ValueHolder new.
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   666
        builder aspectAt:#selectedClassOfResultHolder put:holder
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   667
    ].
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   668
    ^ holder
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   669
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
   670
f67b97bc683a initial checkin
james
parents:
diff changeset
   671
!MethodFinderWindow methodsFor:'callBacks'!
f67b97bc683a initial checkin
james
parents:
diff changeset
   672
f67b97bc683a initial checkin
james
parents:
diff changeset
   673
argument1WidgetCreated: aWidget
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   674
"Store the widget as an instance variable. Return the receiver"
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   675
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   676
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   677
        argument1Editor := aWidget scrolledView.
f67b97bc683a initial checkin
james
parents:
diff changeset
   678
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   679
f67b97bc683a initial checkin
james
parents:
diff changeset
   680
argument2WidgetCreated: aWidget
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   681
"Store the widget as an instance variable. Return the receiver"
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   682
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   683
f67b97bc683a initial checkin
james
parents:
diff changeset
   684
        argument2Editor := aWidget scrolledView.
f67b97bc683a initial checkin
james
parents:
diff changeset
   685
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   686
f67b97bc683a initial checkin
james
parents:
diff changeset
   687
argument3WidgetCreated: aWidget
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   688
"Store the widget as an instance variable. Return the receiver"
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   689
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   690
f67b97bc683a initial checkin
james
parents:
diff changeset
   691
        argument3Editor := aWidget scrolledView.
f67b97bc683a initial checkin
james
parents:
diff changeset
   692
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   693
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   694
messageAnswerWidgetCreated: aWidget
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   695
"Store the widget as an instance variable. Return the receiver"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   696
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   697
        messageAnswerEditor := aWidget scrolledView.
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   698
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   699
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   700
openHTMLDocumentation
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   701
    HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#METHODFINDER'
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   702
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   703
f67b97bc683a initial checkin
james
parents:
diff changeset
   704
receiverWidgetCreated: aWidget
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   705
"Store the widget as an instance variable. Return the receiver"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   706
f67b97bc683a initial checkin
james
parents:
diff changeset
   707
        receiverEditor := aWidget scrolledView.
f67b97bc683a initial checkin
james
parents:
diff changeset
   708
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
   709
f67b97bc683a initial checkin
james
parents:
diff changeset
   710
!MethodFinderWindow methodsFor:'controlInput'!
f67b97bc683a initial checkin
james
parents:
diff changeset
   711
f67b97bc683a initial checkin
james
parents:
diff changeset
   712
cleanInputs: aDirtyString
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   713
     "Find and remove common mistakes made by the user. Return the 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   714
     'aStringToBeCleaned' variable"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   715
       | aStringToBeCleaned rs position|
f67b97bc683a initial checkin
james
parents:
diff changeset
   716
f67b97bc683a initial checkin
james
parents:
diff changeset
   717
   aStringToBeCleaned:=aDirtyString.
f67b97bc683a initial checkin
james
parents:
diff changeset
   718
f67b97bc683a initial checkin
james
parents:
diff changeset
   719
(aStringToBeCleaned endsWith:(Character cr)) ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   720
                        aStringToBeCleaned:=aStringToBeCleaned copyFrom:1 to: (aStringToBeCleaned size -1).].
f67b97bc683a initial checkin
james
parents:
diff changeset
   721
aStringToBeCleaned:= aStringToBeCleaned withoutSeparators.
f67b97bc683a initial checkin
james
parents:
diff changeset
   722
f67b97bc683a initial checkin
james
parents:
diff changeset
   723
f67b97bc683a initial checkin
james
parents:
diff changeset
   724
rs:=ReadStream on: aStringToBeCleaned.
f67b97bc683a initial checkin
james
parents:
diff changeset
   725
[rs upToAll: '#true'.  rs atEnd] whileFalse: [
f67b97bc683a initial checkin
james
parents:
diff changeset
   726
                        position:= rs position. 
f67b97bc683a initial checkin
james
parents:
diff changeset
   727
                        aStringToBeCleaned:=aStringToBeCleaned copyReplaceFrom: position to: position with: ''. "remove #"
f67b97bc683a initial checkin
james
parents:
diff changeset
   728
                        rs:=ReadStream on: aStringToBeCleaned.
f67b97bc683a initial checkin
james
parents:
diff changeset
   729
                        ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   730
f67b97bc683a initial checkin
james
parents:
diff changeset
   731
rs:=ReadStream on: aStringToBeCleaned.
f67b97bc683a initial checkin
james
parents:
diff changeset
   732
[rs upToAll: '#false'.  rs atEnd] whileFalse: [
f67b97bc683a initial checkin
james
parents:
diff changeset
   733
                        position:= rs position. 
f67b97bc683a initial checkin
james
parents:
diff changeset
   734
                        aStringToBeCleaned:=aStringToBeCleaned copyReplaceFrom: position to: position with: ''. "remove #"
f67b97bc683a initial checkin
james
parents:
diff changeset
   735
                        rs:=ReadStream on: aStringToBeCleaned.
f67b97bc683a initial checkin
james
parents:
diff changeset
   736
                        rs:=ReadStream on: aStringToBeCleaned. ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   737
f67b97bc683a initial checkin
james
parents:
diff changeset
   738
[rs upToAll: '#nil'.  rs atEnd] whileFalse: [
f67b97bc683a initial checkin
james
parents:
diff changeset
   739
                        position:= rs position. 
f67b97bc683a initial checkin
james
parents:
diff changeset
   740
                        aStringToBeCleaned:=aStringToBeCleaned copyReplaceFrom: position to: position with: ''. "remove #"
f67b97bc683a initial checkin
james
parents:
diff changeset
   741
                        rs:=ReadStream on: aStringToBeCleaned.  ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   742
                   ^aStringToBeCleaned    
f67b97bc683a initial checkin
james
parents:
diff changeset
   743
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   744
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   745
markMatchingClasses: aSelector  classesWithSelector:anOrderedCollection
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   746
   " Matches the class of the receiver with all the elements in anOrderedCollection
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   747
    (which are classes with selectors). If a match is found it is marked with an asterisk. 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   748
    The classes are then sorted so the the asterisk appears first. Return the 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   749
    markedClassList."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   750
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   751
        | unmarkedClassList firstPartOfSelector markedClassList|
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   752
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   753
        unmarkedClassList:=anOrderedCollection copy.
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   754
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   755
        unmarkedClassList do:
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   756
                [:classAndMethod | | class |
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   757
                class:=Compiler evaluate:
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   758
                                ((ReadStream on: classAndMethod) upToAll: aSelector).
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   759
                (receiver value class == class) ifTrue:
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   760
                        [unmarkedClassList add: '*', classAndMethod.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   761
                        unmarkedClassList remove: classAndMethod]].
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   762
f67b97bc683a initial checkin
james
parents:
diff changeset
   763
      unmarkedClassList sort:[:a :b | |rawA rawB|
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   764
                    rawA := (a startsWith:'*') ifTrue:[a copyFrom:2] ifFalse:[a].
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   765
                    rawB := (b startsWith:'*') ifTrue:[b copyFrom:2] ifFalse:[b].
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   766
                    rawA > rawB.  ].
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   767
      markedClassList:= unmarkedClassList. 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   768
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   769
         ^markedClassList
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   770
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   771
f67b97bc683a initial checkin
james
parents:
diff changeset
   772
mergReciever: aReceiver WithArgument: arguments
f67b97bc683a initial checkin
james
parents:
diff changeset
   773
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   774
"Puts the receiver and arguments into an array so it can be of a suitable input for the
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   775
 MethodFinder. Return an array."
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   776
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   777
| tempReceiver tempArguments receiverWithArgument|
f67b97bc683a initial checkin
james
parents:
diff changeset
   778
f67b97bc683a initial checkin
james
parents:
diff changeset
   779
  tempReceiver:= aReceiver.
f67b97bc683a initial checkin
james
parents:
diff changeset
   780
 tempArguments :=  arguments.
f67b97bc683a initial checkin
james
parents:
diff changeset
   781
f67b97bc683a initial checkin
james
parents:
diff changeset
   782
(tempArguments isEmpty or:[(tempArguments) isNil])
f67b97bc683a initial checkin
james
parents:
diff changeset
   783
                ifTrue:[  receiverWithArgument:=Array new:1."no argument"
f67b97bc683a initial checkin
james
parents:
diff changeset
   784
                          receiverWithArgument at:1 put: tempReceiver.     
f67b97bc683a initial checkin
james
parents:
diff changeset
   785
                        ]
f67b97bc683a initial checkin
james
parents:
diff changeset
   786
                ifFalse:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   787
        (tempArguments size = 1)
f67b97bc683a initial checkin
james
parents:
diff changeset
   788
                        ifTrue:[ receiverWithArgument:=Array new:2.
f67b97bc683a initial checkin
james
parents:
diff changeset
   789
                                  receiverWithArgument at:1 put: tempReceiver.      
f67b97bc683a initial checkin
james
parents:
diff changeset
   790
                                  receiverWithArgument at:2 put: (tempArguments at:1)
f67b97bc683a initial checkin
james
parents:
diff changeset
   791
                                ].  "a receiver with an argument"
f67b97bc683a initial checkin
james
parents:
diff changeset
   792
f67b97bc683a initial checkin
james
parents:
diff changeset
   793
        (tempArguments size = 2)
f67b97bc683a initial checkin
james
parents:
diff changeset
   794
                        ifTrue:[ receiverWithArgument:=Array new:3.
f67b97bc683a initial checkin
james
parents:
diff changeset
   795
                                  receiverWithArgument at:1 put: tempReceiver.      
f67b97bc683a initial checkin
james
parents:
diff changeset
   796
                                  (receiverWithArgument at:2 put: (tempArguments at:1)).
f67b97bc683a initial checkin
james
parents:
diff changeset
   797
                                  (receiverWithArgument at:3 put: (tempArguments at:2))
f67b97bc683a initial checkin
james
parents:
diff changeset
   798
                                ].  "a receiver with an argument"
f67b97bc683a initial checkin
james
parents:
diff changeset
   799
        (tempArguments size = 3)
f67b97bc683a initial checkin
james
parents:
diff changeset
   800
                        ifTrue:[ receiverWithArgument:=Array new:4.
f67b97bc683a initial checkin
james
parents:
diff changeset
   801
                                  receiverWithArgument at:1 put: tempReceiver.      
f67b97bc683a initial checkin
james
parents:
diff changeset
   802
                                  (receiverWithArgument at:2 put: (tempArguments at:1)).
f67b97bc683a initial checkin
james
parents:
diff changeset
   803
                                  (receiverWithArgument at:3 put: (tempArguments at:2)).
f67b97bc683a initial checkin
james
parents:
diff changeset
   804
                                  (receiverWithArgument at:4 put: (tempArguments at:3)).
f67b97bc683a initial checkin
james
parents:
diff changeset
   805
f67b97bc683a initial checkin
james
parents:
diff changeset
   806
                                ].  "a receiver with an argument"
f67b97bc683a initial checkin
james
parents:
diff changeset
   807
f67b97bc683a initial checkin
james
parents:
diff changeset
   808
                        ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   809
^receiverWithArgument
f67b97bc683a initial checkin
james
parents:
diff changeset
   810
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
   811
f67b97bc683a initial checkin
james
parents:
diff changeset
   812
!MethodFinderWindow class methodsFor:'documentation'!
f67b97bc683a initial checkin
james
parents:
diff changeset
   813
f67b97bc683a initial checkin
james
parents:
diff changeset
   814
version
f67b97bc683a initial checkin
james
parents:
diff changeset
   815
    ^ '$Header$'
f67b97bc683a initial checkin
james
parents:
diff changeset
   816
! !