MethodFinderWindow.st
author Claus Gittinger <cg@exept.de>
Sun, 24 Jun 2012 18:42:06 +0200
changeset 2892 a1349bc5e2fe
parent 2891 d4f1cd8626e6
child 2927 558cd901ebce
permissions -rw-r--r--
changed: #updateImplementorsOf: #updateListAfterPatternSearch:
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
2891
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
     8
		lookAtResultEditor codeHolder searchProcess'
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
     9
	classVariableNames:''
f67b97bc683a initial checkin
james
parents:
diff changeset
    10
	poolDictionaries:''
1538
a1de7a668cad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1534
diff changeset
    11
	category:'Interface-MethodFinder'
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
    12
!
f67b97bc683a initial checkin
james
parents:
diff changeset
    13
1530
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
    14
!MethodFinderWindow class methodsFor:'documentation'!
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
    15
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
    16
documentation
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
    17
"
1531
9d4f8cd101fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1530
diff changeset
    18
  [author:]
9d4f8cd101fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1530
diff changeset
    19
    ported from Squeak and GUI enhanced by James Hayes james@exept.de
1530
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
    20
"
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
    21
! !
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
    22
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
    23
!MethodFinderWindow class methodsFor:'constants'!
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
    24
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
    25
defaultIcon
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
    26
    ^ ToolbarIconLibrary methodFinder24x24Icon
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
    27
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
    28
    "Created: / 01-06-2012 / 13:05:11 / cg"
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
    29
!
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
    30
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
    31
markerForImplementingClass
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
    32
    ^ '=> '.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
    33
    ^ '*'
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
    34
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
    35
    "Created: / 13.11.2001 / 12:09:52 / cg"
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
    36
    "Modified: / 13.11.2001 / 12:11:57 / cg"
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
    37
! !
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
    38
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
    39
!MethodFinderWindow class methodsFor:'interface specs'!
f67b97bc683a initial checkin
james
parents:
diff changeset
    40
f67b97bc683a initial checkin
james
parents:
diff changeset
    41
windowSpec
f67b97bc683a initial checkin
james
parents:
diff changeset
    42
    "This resource specification was automatically generated
f67b97bc683a initial checkin
james
parents:
diff changeset
    43
     by the UIPainter of ST/X."
f67b97bc683a initial checkin
james
parents:
diff changeset
    44
f67b97bc683a initial checkin
james
parents:
diff changeset
    45
    "Do not manually edit this!! If it is corrupted,
f67b97bc683a initial checkin
james
parents:
diff changeset
    46
     the UIPainter may not be able to read the specification."
f67b97bc683a initial checkin
james
parents:
diff changeset
    47
f67b97bc683a initial checkin
james
parents:
diff changeset
    48
    "
f67b97bc683a initial checkin
james
parents:
diff changeset
    49
     UIPainter new openOnClass:MethodFinderWindow andSelector:#windowSpec
f67b97bc683a initial checkin
james
parents:
diff changeset
    50
     MethodFinderWindow new openInterface:#windowSpec
f67b97bc683a initial checkin
james
parents:
diff changeset
    51
     MethodFinderWindow open
f67b97bc683a initial checkin
james
parents:
diff changeset
    52
    "
f67b97bc683a initial checkin
james
parents:
diff changeset
    53
f67b97bc683a initial checkin
james
parents:
diff changeset
    54
    <resource: #canvas>
f67b97bc683a initial checkin
james
parents:
diff changeset
    55
f67b97bc683a initial checkin
james
parents:
diff changeset
    56
    ^ 
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    57
     #(FullSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    58
        name: windowSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    59
        window: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    60
       (WindowSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    61
          label: 'MethodFinder'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    62
          name: 'MethodFinder'
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
    63
          bounds: (Rectangle 0 0 798 595)
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    64
          menu: menu
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
    65
          icon: defaultIcon
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
    66
        )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    67
        component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    68
       (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    69
          collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    70
           (VariableHorizontalPanelSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    71
              name: 'VariableHorizontalPanel1'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    72
              layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    73
              snapMode: both
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    74
              component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    75
             (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    76
                collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    77
                 (ViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    78
                    name: 'LeftBox'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    79
                    level: 1
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    80
                    component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    81
                   (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    82
                      collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    83
                       (ViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    84
                          name: 'ReceiverArgBox'
2887
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
    85
                          layout: (LayoutFrame 0 0 0 0 0 1 -100 0.5)
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    86
                          component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    87
                         (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    88
                            collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    89
                             (LabelSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    90
                                label: 'Receiver'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    91
                                name: 'ReceiverLabel'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    92
                                layout: (LayoutFrame 0 0 0 0 0 0.34 24 0)
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    93
                                translateLabel: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    94
                              )
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    95
                             (ComboListSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    96
                                name: 'allowedArgments'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    97
                                layout: (LayoutFrame 0 0.34 1 0 0 0.64 23 0)
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    98
                                model: argCountHolder
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
    99
                                comboList: argCountList
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   100
                                useIndex: true
1530
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
   101
                              )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   102
                             (LabelSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   103
                                label: 'Answer'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   104
                                name: 'MessageAnswerLabel'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   105
                                layout: (LayoutFrame 0 0.64 0 0 0 1 24 0)
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   106
                                translateLabel: true
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   107
                              )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   108
                             (HorizontalPanelViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   109
                                name: 'HorizontalPanel1'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   110
                                layout: (LayoutFrame 0 0 25 0 0 1 0 1)
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   111
                                horizontalLayout: fit
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   112
                                verticalLayout: fit
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   113
                                horizontalSpace: 3
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   114
                                verticalSpace: 3
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   115
                                component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   116
                               (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   117
                                  collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   118
                                   (WorkspaceSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   119
                                      name: 'ReceiverEditor'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   120
                                      tabable: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   121
                                      hasHorizontalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   122
                                      hasVerticalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   123
                                      miniScrollerHorizontal: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   124
                                      miniScrollerVertical: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   125
                                      autoHideScrollBars: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   126
                                      hasKeyboardFocusInitially: false
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   127
                                      extent: (Point 113 172)
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   128
                                      postBuildCallback: receiverWidgetCreated:
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   129
                                    )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   130
                                   (VerticalPanelViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   131
                                      name: 'VerticalPanel1'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   132
                                      horizontalLayout: fit
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   133
                                      verticalLayout: fit
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   134
                                      horizontalSpace: 3
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   135
                                      verticalSpace: 3
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   136
                                      component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   137
                                     (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   138
                                        collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   139
                                         (ViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   140
                                            name: 'Box1'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   141
                                            visibilityChannel: arg1BoxVisible
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   142
                                            component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   143
                                           (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   144
                                              collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   145
                                               (WorkspaceSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   146
                                                  name: 'Arg1Editor'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   147
                                                  layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   148
                                                  tabable: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   149
                                                  hasHorizontalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   150
                                                  hasVerticalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   151
                                                  miniScrollerHorizontal: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   152
                                                  miniScrollerVertical: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   153
                                                  autoHideScrollBars: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   154
                                                  hasKeyboardFocusInitially: false
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   155
                                                  postBuildCallback: argument1WidgetCreated:
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   156
                                                )
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   157
                                               )
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   158
                                             
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   159
                                            )
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   160
                                            extent: (Point 114 55)
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   161
                                          )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   162
                                         (ViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   163
                                            name: 'Box2'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   164
                                            visibilityChannel: arg2BoxVisible
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   165
                                            component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   166
                                           (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   167
                                              collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   168
                                               (WorkspaceSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   169
                                                  name: 'TextEditor5'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   170
                                                  layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   171
                                                  tabable: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   172
                                                  hasHorizontalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   173
                                                  hasVerticalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   174
                                                  miniScrollerHorizontal: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   175
                                                  miniScrollerVertical: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   176
                                                  autoHideScrollBars: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   177
                                                  hasKeyboardFocusInitially: false
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   178
                                                  postBuildCallback: argument2WidgetCreated:
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   179
                                                )
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   180
                                               )
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   181
                                             
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   182
                                            )
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   183
                                            extent: (Point 114 56)
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   184
                                          )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   185
                                         (ViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   186
                                            name: 'Box3'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   187
                                            visibilityChannel: arg3BoxVisible
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   188
                                            component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   189
                                           (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   190
                                              collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   191
                                               (WorkspaceSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   192
                                                  name: 'TextEditor6'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   193
                                                  layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   194
                                                  tabable: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   195
                                                  hasHorizontalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   196
                                                  hasVerticalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   197
                                                  miniScrollerHorizontal: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   198
                                                  miniScrollerVertical: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   199
                                                  autoHideScrollBars: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   200
                                                  hasKeyboardFocusInitially: false
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   201
                                                  postBuildCallback: argument3WidgetCreated:
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   202
                                                )
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   203
                                               )
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   204
                                             
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   205
                                            )
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   206
                                            extent: (Point 114 55)
1530
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
   207
                                          )
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
   208
                                         )
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
   209
                                       
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
   210
                                      )
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   211
                                      extent: (Point 114 172)
1530
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
   212
                                    )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   213
                                   (WorkspaceSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   214
                                      name: 'AnswerEditor'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   215
                                      tabable: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   216
                                      hasHorizontalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   217
                                      hasVerticalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   218
                                      miniScrollerHorizontal: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   219
                                      miniScrollerVertical: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   220
                                      autoHideScrollBars: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   221
                                      hasKeyboardFocusInitially: false
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   222
                                      extent: (Point 114 172)
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   223
                                      postBuildCallback: messageAnswerWidgetCreated:
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   224
                                    )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   225
                                   )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   226
                                 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   227
                                )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   228
                              )
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   229
                             )
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   230
                           
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   231
                          )
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   232
                        )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   233
                       (ViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   234
                          name: 'ReceiverArgBoxActionBox'
2887
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
   235
                          layout: (LayoutFrame 0 0 -98 0.5 0 1 -75 0.5)
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   236
                          component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   237
                         (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   238
                            collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   239
                             (ActionButtonSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   240
                                label: 'Clear'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   241
                                name: 'Button2'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   242
                                layout: (LayoutFrame 5 0 0 0 -5 0.5 0 1)
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   243
                                translateLabel: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   244
                                model: clear
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   245
                              )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   246
                             (ActionButtonSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   247
                                label: 'Search'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   248
                                name: 'Button1'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   249
                                layout: (LayoutFrame 5 0.5 0 0 -5 1 0 1)
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   250
                                translateLabel: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   251
                                tabable: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   252
                                model: search
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   253
                              )
f67b97bc683a initial checkin
james
parents:
diff changeset
   254
                             )
f67b97bc683a initial checkin
james
parents:
diff changeset
   255
                           
f67b97bc683a initial checkin
james
parents:
diff changeset
   256
                          )
f67b97bc683a initial checkin
james
parents:
diff changeset
   257
                        )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   258
                       (ViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   259
                          name: 'MatchActionBox'
2887
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
   260
                          layout: (LayoutFrame 0 0 -70 0.5 0 1 -20 0.5)
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   261
                          component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   262
                         (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   263
                            collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   264
                             (LabelSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   265
                                label: 'Selector Pattern:'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   266
                                name: 'Label1'
2887
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
   267
                                layout: (LayoutFrame 0 0 0 0 0 0.5 25 0)
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   268
                                translateLabel: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   269
                                adjust: left
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   270
                              )
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   271
                             (InputFieldSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   272
                                name: 'EntryField1'
2887
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
   273
                                layout: (LayoutFrame 0 0 -25 1 0 0.5 -5 1)
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   274
                                model: selectorPattern
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   275
                                immediateAccept: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   276
                                acceptOnReturn: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   277
                                acceptOnTab: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   278
                                acceptOnPointerLeave: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   279
                              )
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   280
                             (ActionButtonSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   281
                                label: 'Search'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   282
                                name: 'Button4'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   283
                                layout: (LayoutFrame 5 0.5 -25 1 -5 1 0 1)
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   284
                                translateLabel: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   285
                                tabable: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   286
                                model: searchPatternMatches
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   287
                              )
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   288
                             )
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   289
                           
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   290
                          )
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   291
                        )
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   292
                       (SequenceViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   293
                          name: 'ResultList'
2887
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
   294
                          layout: (LayoutFrame 0 0 -15 0.5 0 1 0 1)
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   295
                          hasHorizontalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   296
                          hasVerticalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   297
                          autoHideScrollBars: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   298
                          valueChangeSelector: updateImplementorsOf:
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   299
                          useIndex: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   300
                          sequenceList: resultHolder
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   301
                        )
1530
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
   302
                       )
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
   303
                     
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
   304
                    )
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
   305
                  )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   306
                 (VariableVerticalPanelSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   307
                    name: 'VariableVerticalPanel1'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   308
                    component: 
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   309
                   (SpecCollection
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   310
                      collection: (
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   311
                       (SequenceViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   312
                          name: 'List2'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   313
                          model: selectedClassOfResultHolder
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   314
                          menu: implementorListMenu
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   315
                          hasHorizontalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   316
                          hasVerticalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   317
                          autoHideScrollBars: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   318
                          doubleClickSelector: openBrowserOn:
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   319
                          valueChangeSelector: selectedClassOfResultHolderChanged
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   320
                          useIndex: false
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   321
                          sequenceList: classOfResultHolder
1530
37b18e9a12fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1529
diff changeset
   322
                        )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   323
                       (CodeViewSpec
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   324
                          name: 'CodeView'
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   325
                          model: codeHolder
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   326
                          hasHorizontalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   327
                          hasVerticalScrollBar: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   328
                          autoHideScrollBars: true
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   329
                          hasKeyboardFocusInitially: false
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   330
                          postBuildCallback: sourceCodeWidgetCreated:
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   331
                        )
f67b97bc683a initial checkin
james
parents:
diff changeset
   332
                       )
f67b97bc683a initial checkin
james
parents:
diff changeset
   333
                     
f67b97bc683a initial checkin
james
parents:
diff changeset
   334
                    )
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   335
                    handles: (Any 0.5 1.0)
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   336
                  )
f67b97bc683a initial checkin
james
parents:
diff changeset
   337
                 )
f67b97bc683a initial checkin
james
parents:
diff changeset
   338
               
f67b97bc683a initial checkin
james
parents:
diff changeset
   339
              )
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   340
              handles: (Any 0.443786982248521 1.0)
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   341
            )
f67b97bc683a initial checkin
james
parents:
diff changeset
   342
           )
f67b97bc683a initial checkin
james
parents:
diff changeset
   343
         
f67b97bc683a initial checkin
james
parents:
diff changeset
   344
        )
f67b97bc683a initial checkin
james
parents:
diff changeset
   345
      )
f67b97bc683a initial checkin
james
parents:
diff changeset
   346
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
   347
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   348
!MethodFinderWindow class methodsFor:'menu specs'!
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   349
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   350
implementorListMenu
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   351
    "This resource specification was automatically generated
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   352
     by the MenuEditor of ST/X."
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   353
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   354
    "Do not manually edit this!! If it is corrupted,
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   355
     the MenuEditor may not be able to read the specification."
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   356
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   357
    "
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   358
     MenuEditor new openOnClass:MethodFinderWindow andSelector:#implementorListMenu
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   359
     (Menu new fromLiteralArrayEncoding:(MethodFinderWindow implementorListMenu)) startUp
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   360
    "
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   361
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   362
    <resource: #menu>
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   363
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   364
    ^ 
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   365
     #(#Menu
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   366
        #(
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   367
         #(#MenuItem
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   368
            #label: 'Browse'
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   369
            #translateLabel: true
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   370
            #value: #openBrowserOnSelectedItem
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   371
          )
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   372
         )
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   373
        nil
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   374
        nil
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   375
      )
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   376
!
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   377
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   378
menu
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   379
    "This resource specification was automatically generated
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   380
     by the MenuEditor of ST/X."
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   381
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   382
    "Do not manually edit this!! If it is corrupted,
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   383
     the MenuEditor may not be able to read the specification."
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   384
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   385
    "
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   386
     MenuEditor new openOnClass:MethodFinderWindow andSelector:#menu
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   387
     (Menu new fromLiteralArrayEncoding:(MethodFinderWindow menu)) startUp
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   388
    "
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   389
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   390
    <resource: #menu>
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   391
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   392
    ^ 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   393
     #(#Menu
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   394
        #(
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   395
         #(#MenuItem
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   396
            #label: '&File'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   397
            #activeHelpKey: #file
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   398
            #submenu: 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   399
           #(#Menu
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   400
              #(
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   401
               #(#MenuItem
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   402
                  #label: 'Exit'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   403
                  #value: #closeRequest
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   404
                  #activeHelpKey: #fileExit
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   405
                )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   406
               )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   407
              nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   408
              nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   409
            )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   410
          )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   411
         #(#MenuItem
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   412
            #label: 'Help'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   413
            #startGroup: #right
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   414
            #submenu: 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   415
           #(#Menu
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   416
              #(
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   417
               #(#MenuItem
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   418
                  #label: 'Documentation'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   419
                  #value: #openHTMLDocumentation
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   420
                  #activeHelpKey: #helpTutorial
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   421
                )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   422
               #(#MenuItem
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   423
                  #label: 'About MethodFinder...'
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   424
                  #value: #openAboutThisApplication
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   425
                  #activeHelpKey: #aboutThisAppliaction
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   426
                )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   427
               )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   428
              nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   429
              nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   430
            )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   431
          )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   432
         )
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   433
        nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   434
        nil
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   435
      )
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   436
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   437
    "Modified: / 13.11.2001 / 12:36:39 / cg"
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   438
! !
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   439
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   440
!MethodFinderWindow methodsFor:'accessing'!
f67b97bc683a initial checkin
james
parents:
diff changeset
   441
f67b97bc683a initial checkin
james
parents:
diff changeset
   442
receiver
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   443
    "Return a copy of the value of the instance variable 'receiver' "
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   444
f67b97bc683a initial checkin
james
parents:
diff changeset
   445
    ^ receiver copy
f67b97bc683a initial checkin
james
parents:
diff changeset
   446
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
   447
f67b97bc683a initial checkin
james
parents:
diff changeset
   448
!MethodFinderWindow methodsFor:'actions'!
f67b97bc683a initial checkin
james
parents:
diff changeset
   449
f67b97bc683a initial checkin
james
parents:
diff changeset
   450
argumentEditorsContents
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   451
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   452
"Determine how many text editors of the arguments are used and store the result
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   453
as argCounter. The result being the minimum between how many editors have
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   454
expressions in and how many are displayed.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   455
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   456
Add each argument string (key)and the evaluated version (value) to an Ordered Dictionary
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   457
from each of the text editors.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   458
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   459
Return the OrderedDictionary with the expressions from all the text editors. "
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   460
2165
a5ff995ed0d7 cleanup
sr
parents: 2046
diff changeset
   461
     | tempArguments argCounter tempArgument1Editor tempArgument2Editor tempArgument3Editor
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   462
associationKey associationValue|
f67b97bc683a initial checkin
james
parents:
diff changeset
   463
f67b97bc683a initial checkin
james
parents:
diff changeset
   464
argCounter:=0.
f67b97bc683a initial checkin
james
parents:
diff changeset
   465
f67b97bc683a initial checkin
james
parents:
diff changeset
   466
tempArgument1Editor:= (self cleanInputs: argument1Editor contents).
f67b97bc683a initial checkin
james
parents:
diff changeset
   467
tempArgument2Editor:=  (self cleanInputs: argument2Editor contents).
f67b97bc683a initial checkin
james
parents:
diff changeset
   468
tempArgument3Editor:= (self cleanInputs: argument3Editor contents).
f67b97bc683a initial checkin
james
parents:
diff changeset
   469
f67b97bc683a initial checkin
james
parents:
diff changeset
   470
tempArgument1Editor = '' ifFalse:[argCounter:=argCounter +1].
f67b97bc683a initial checkin
james
parents:
diff changeset
   471
tempArgument2Editor = '' ifFalse:[argCounter:=argCounter +1].
f67b97bc683a initial checkin
james
parents:
diff changeset
   472
tempArgument3Editor = '' ifFalse:[argCounter:=argCounter +1].
f67b97bc683a initial checkin
james
parents:
diff changeset
   473
f67b97bc683a initial checkin
james
parents:
diff changeset
   474
f67b97bc683a initial checkin
james
parents:
diff changeset
   475
argCounter:= (argCounter min: (self argCountHolder value -1)).
f67b97bc683a initial checkin
james
parents:
diff changeset
   476
tempArguments:= OrderedDictionary new:argCounter. 
f67b97bc683a initial checkin
james
parents:
diff changeset
   477
f67b97bc683a initial checkin
james
parents:
diff changeset
   478
(argCounter value >= 1) 
f67b97bc683a initial checkin
james
parents:
diff changeset
   479
                ifTrue:[associationValue:= (Compiler evaluate: tempArgument1Editor).
f67b97bc683a initial checkin
james
parents:
diff changeset
   480
                        ((self isExpression:tempArgument1Editor) or:[ associationValue isNil]) ifTrue:[                  "looks if an expression is typed in"
f67b97bc683a initial checkin
james
parents:
diff changeset
   481
                                        associationKey:=associationValue printString]
f67b97bc683a initial checkin
james
parents:
diff changeset
   482
                                                          ifFalse:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   483
                                        associationKey:=tempArgument1Editor].
f67b97bc683a initial checkin
james
parents:
diff changeset
   484
f67b97bc683a initial checkin
james
parents:
diff changeset
   485
                        tempArguments add: associationKey-> associationValue.
f67b97bc683a initial checkin
james
parents:
diff changeset
   486
                        ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   487
(argCounter value >= 2) 
f67b97bc683a initial checkin
james
parents:
diff changeset
   488
                ifTrue:[ associationValue:= (Compiler evaluate: tempArgument2Editor).
f67b97bc683a initial checkin
james
parents:
diff changeset
   489
                        (((self isExpression:tempArgument2Editor) or:[ associationValue isNil])) ifTrue:[                  "looks if an expression is typed in"
f67b97bc683a initial checkin
james
parents:
diff changeset
   490
                                        associationKey:=associationValue printString]
f67b97bc683a initial checkin
james
parents:
diff changeset
   491
                                                          ifFalse:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   492
                                        associationKey:=tempArgument2Editor].
f67b97bc683a initial checkin
james
parents:
diff changeset
   493
f67b97bc683a initial checkin
james
parents:
diff changeset
   494
                        tempArguments add: associationKey-> associationValue].
f67b97bc683a initial checkin
james
parents:
diff changeset
   495
f67b97bc683a initial checkin
james
parents:
diff changeset
   496
(argCounter value >= 3)
f67b97bc683a initial checkin
james
parents:
diff changeset
   497
                ifTrue:[ associationValue:= (Compiler evaluate: tempArgument3Editor).
f67b97bc683a initial checkin
james
parents:
diff changeset
   498
                        ((self isExpression:tempArgument3Editor) or:[ associationValue isNil]) ifTrue:[                  "looks if an expression is typed in"
f67b97bc683a initial checkin
james
parents:
diff changeset
   499
                                        associationKey:=associationValue printString]
f67b97bc683a initial checkin
james
parents:
diff changeset
   500
                                                          ifFalse:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   501
                                        associationKey:=tempArgument3Editor].
f67b97bc683a initial checkin
james
parents:
diff changeset
   502
f67b97bc683a initial checkin
james
parents:
diff changeset
   503
                        tempArguments add: associationKey-> associationValue].
f67b97bc683a initial checkin
james
parents:
diff changeset
   504
f67b97bc683a initial checkin
james
parents:
diff changeset
   505
f67b97bc683a initial checkin
james
parents:
diff changeset
   506
^tempArguments
f67b97bc683a initial checkin
james
parents:
diff changeset
   507
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   508
f67b97bc683a initial checkin
james
parents:
diff changeset
   509
clear
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   510
    "Reset the contents of all the outputs. Return the receiver."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   511
f67b97bc683a initial checkin
james
parents:
diff changeset
   512
    receiverEditor contents:nil.
f67b97bc683a initial checkin
james
parents:
diff changeset
   513
    argument1Editor contents:nil.
f67b97bc683a initial checkin
james
parents:
diff changeset
   514
    argument2Editor contents:nil.
f67b97bc683a initial checkin
james
parents:
diff changeset
   515
    argument3Editor contents:nil.
f67b97bc683a initial checkin
james
parents:
diff changeset
   516
    messageAnswerEditor contents:nil.
f67b97bc683a initial checkin
james
parents:
diff changeset
   517
    self resultHolder value:nil.
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   518
    self classOfResultHolder value: nil.
2730
abcb0402d5ba changed: #clear
Claus Gittinger <cg@exept.de>
parents: 2459
diff changeset
   519
    codeHolder value:nil.
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   520
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   521
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   522
extractClassAndSelectorFrom:anArgument 
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   523
    "Opens browser on theArgument of a specific class. anArgument being a string with the
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   524
       Class and the selector upon which the browser is to be opened. Return the receiver."
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   525
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   526
    |aClass aSelector x theArgument marker|
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   527
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   528
    anArgument isNil ifTrue:[
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   529
        ^ nil
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   530
    ].
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   531
    marker := self class markerForImplementingClass.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   533
    theArgument := anArgument string.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   534
    (theArgument startsWith:marker) ifTrue:[
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   535
        theArgument := theArgument copyFrom:marker size+1
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   536
    ].
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   537
    aClass := theArgument copyUpTo:(Character space).
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   538
    x := aClass size + 2.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   539
    aSelector := theArgument copyFrom:x.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   540
    aClass := Smalltalk classNamed:aClass.
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   541
    (aSelector startsWith:'class ') ifTrue:[
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   542
        aSelector := aSelector copyFrom:'class 'size+1.
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   543
        aClass := aClass class.
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   544
    ].
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   545
    ^ aClass -> aSelector asSymbol
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   546
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   547
"
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   548
MethodFinderWindow new extractClassAndSelectorFrom: '*SmallInteger +'
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   549
MethodFinderWindow new extractClassAndSelectorFrom: 'String ,'       
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   550
MethodFinderWindow new extractClassAndSelectorFrom: 'Number detentBy:atMultiplesOf:snap:' 
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   551
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   552
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   553
"
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   554
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   555
    "Modified: / 27-04-2012 / 15:05:53 / cg"
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   556
!
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   557
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   558
isExpression: aString
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   559
      "Return true or false depending on if the subString includes certain characters"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   560
(aString includesSubString:': ') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   561
(aString includesSubString:'+') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   562
(aString includesSubString:'-') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   563
(aString includesSubString:'*') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   564
(aString includesSubString:'/') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   565
(aString includesSubString:'>') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   566
(aString includesSubString:'<') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   567
(aString includesSubString:' new') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   568
(aString includesSubString:'[') &  (aString includesSubString:']') & (aString includesSubString:'.')
f67b97bc683a initial checkin
james
parents:
diff changeset
   569
                                ifTrue:[^false].
f67b97bc683a initial checkin
james
parents:
diff changeset
   570
(aString includesSubString:'.') ifTrue:[^true].
f67b97bc683a initial checkin
james
parents:
diff changeset
   571
f67b97bc683a initial checkin
james
parents:
diff changeset
   572
 ^false
f67b97bc683a initial checkin
james
parents:
diff changeset
   573
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   574
f67b97bc683a initial checkin
james
parents:
diff changeset
   575
messageAnswerEditorContents
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   576
   "Return a cleaned up version of message answer taken from the messageAnswerEditor
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   577
    as an association. The association has cleanedAnswerString as a key and the 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   578
    compiledAnswer as value."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   579
f67b97bc683a initial checkin
james
parents:
diff changeset
   580
    |   aCleanedAnswerString   compiledAnswer  |
f67b97bc683a initial checkin
james
parents:
diff changeset
   581
f67b97bc683a initial checkin
james
parents:
diff changeset
   582
aCleanedAnswerString:=self cleanInputs: (messageAnswerEditor contents). 
f67b97bc683a initial checkin
james
parents:
diff changeset
   583
compiledAnswer:=Compiler evaluate: aCleanedAnswerString.
f67b97bc683a initial checkin
james
parents:
diff changeset
   584
((self isExpression:aCleanedAnswerString) or:[compiledAnswer isNil]) ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   585
                        aCleanedAnswerString:=compiledAnswer printString].
f67b97bc683a initial checkin
james
parents:
diff changeset
   586
f67b97bc683a initial checkin
james
parents:
diff changeset
   587
^aCleanedAnswerString->compiledAnswer.
f67b97bc683a initial checkin
james
parents:
diff changeset
   588
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   589
f67b97bc683a initial checkin
james
parents:
diff changeset
   590
openBrowserOn:anArgument 
f67b97bc683a initial checkin
james
parents:
diff changeset
   591
    "Opens browser on theArgument of a specific class. anArgument being a string with the
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   592
       Class and the selector upon which the browser is to be opened. Return the receiver."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   593
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   594
    |classAndSelector|
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   595
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   596
    classAndSelector := self extractClassAndSelectorFrom:anArgument.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   597
    classAndSelector isNil ifTrue:[
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   598
        ^ self
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   599
    ].
2459
dc2cc94d9444 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
   600
    UserPreferences current systemBrowserClass
dc2cc94d9444 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
   601
        openInClass:classAndSelector key 
dc2cc94d9444 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
   602
        selector:classAndSelector value   
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   603
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   604
"
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   605
MethodFinderWindow new openBrowserOn: '*SmallInteger +'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   606
MethodFinderWindow new openBrowserOn: 'String ,'
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   607
MethodFinderWindow new openBrowserOn: 'Number detentBy:atMultiplesOf:snap:' 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   608
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   609
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   610
"
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   611
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   612
    "Modified: / 13.11.2001 / 12:46:17 / cg"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   613
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   614
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   615
openBrowserOnSelectedItem 
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   616
    |sel|
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   617
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   618
    sel := self selectedClassOfResultHolder value.
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   619
    self openBrowserOn:sel
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   620
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   621
    "Modified: / 13.11.2001 / 12:47:39 / cg"
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   622
!
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   623
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   624
receiverEditorContents
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   625
   "Return a cleaned up version of receiver taken from the receiverEditor
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   626
    as an association. The association has aCleanedRecieverString as a key and the 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   627
    compiledReceiver as value."
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   628
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   629
    |   aCleanedRecieverString   compiledReceiver  |
f67b97bc683a initial checkin
james
parents:
diff changeset
   630
f67b97bc683a initial checkin
james
parents:
diff changeset
   631
aCleanedRecieverString:=self cleanInputs: (receiverEditor contents). 
f67b97bc683a initial checkin
james
parents:
diff changeset
   632
f67b97bc683a initial checkin
james
parents:
diff changeset
   633
compiledReceiver:=Compiler evaluate: aCleanedRecieverString.
f67b97bc683a initial checkin
james
parents:
diff changeset
   634
f67b97bc683a initial checkin
james
parents:
diff changeset
   635
((self isExpression:aCleanedRecieverString) or:[compiledReceiver isNil]) ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   636
                        aCleanedRecieverString:=compiledReceiver printString].
f67b97bc683a initial checkin
james
parents:
diff changeset
   637
^aCleanedRecieverString->compiledReceiver.
f67b97bc683a initial checkin
james
parents:
diff changeset
   638
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   639
f67b97bc683a initial checkin
james
parents:
diff changeset
   640
search
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   641
"Do a search based on the input in the various text editors. Return the receiver."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   642
| tempReceiver tempAnswer tempArguments anArray resultArray receiverWithArgument mf|
1534
b38fd0e5254d comment
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   643
b38fd0e5254d comment
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   644
self resultHolder value: nil.                "reset the result list"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   645
self classOfResultHolder value: nil.        "reset the implementorOf list"
1534
b38fd0e5254d comment
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   646
self codeHolder value: nil.                  "reset the source"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   647
f67b97bc683a initial checkin
james
parents:
diff changeset
   648
tempArguments:=self argumentEditorsContents.
f67b97bc683a initial checkin
james
parents:
diff changeset
   649
tempReceiver :=self receiverEditorContents .  
f67b97bc683a initial checkin
james
parents:
diff changeset
   650
tempAnswer:= self messageAnswerEditorContents.   
f67b97bc683a initial checkin
james
parents:
diff changeset
   651
f67b97bc683a initial checkin
james
parents:
diff changeset
   652
"self cleanInputRec:tempReceiver arg:tempArguments ans:tempAnswer."
f67b97bc683a initial checkin
james
parents:
diff changeset
   653
f67b97bc683a initial checkin
james
parents:
diff changeset
   654
f67b97bc683a initial checkin
james
parents:
diff changeset
   655
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
   656
f67b97bc683a initial checkin
james
parents:
diff changeset
   657
receiverWithArgument:=self mergReciever: (tempReceiver value) WithArgument: (tempArguments values).
f67b97bc683a initial checkin
james
parents:
diff changeset
   658
f67b97bc683a initial checkin
james
parents:
diff changeset
   659
anArray at:1 put:receiverWithArgument;
f67b97bc683a initial checkin
james
parents:
diff changeset
   660
        at:2 put: tempAnswer value.             
f67b97bc683a initial checkin
james
parents:
diff changeset
   661
f67b97bc683a initial checkin
james
parents:
diff changeset
   662
"an array now holds the following array #(#(receiver argument) answer) or #(#(reciever) answer). which should
f67b97bc683a initial checkin
james
parents:
diff changeset
   663
be suitable input for the method finder."
1534
b38fd0e5254d comment
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   664
self withCursor:Cursor execute do:[
b38fd0e5254d comment
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   665
    mf:= MethodFinder new.
b38fd0e5254d comment
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   666
    resultArray:= mf load: anArray; findMessage. 
b38fd0e5254d comment
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   667
].
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   668
f67b97bc683a initial checkin
james
parents:
diff changeset
   669
((resultArray at:  1 )includesSubString: 'no single') ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   670
                                self warn: (resultArray at:  1 ).
f67b97bc683a initial checkin
james
parents:
diff changeset
   671
                                ^self
f67b97bc683a initial checkin
james
parents:
diff changeset
   672
                                                              ].  
f67b97bc683a initial checkin
james
parents:
diff changeset
   673
"the following then replaces data1 and data2 created by the method finder to the appropriate arguments"
2859
118c4294d9cd changed: #search
Claus Gittinger <cg@exept.de>
parents: 2775
diff changeset
   674
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   675
resultArray keysAndValuesDo:[:key :value |   | newValue | 
f67b97bc683a initial checkin
james
parents:
diff changeset
   676
      newValue:= value replString: 'data1' withString:(tempReceiver key).
f67b97bc683a initial checkin
james
parents:
diff changeset
   677
(tempArguments size) >= 1 ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   678
      newValue:= newValue replString: 'data2' withString:(tempArguments keyAt:1)].
f67b97bc683a initial checkin
james
parents:
diff changeset
   679
f67b97bc683a initial checkin
james
parents:
diff changeset
   680
(tempArguments size) > 1 ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   681
      newValue:= newValue replString: 'data3' withString:(tempArguments keyAt:2).].
f67b97bc683a initial checkin
james
parents:
diff changeset
   682
f67b97bc683a initial checkin
james
parents:
diff changeset
   683
(tempArguments size) > 2 ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   684
      newValue:= newValue replString: 'data4' withString:(tempArguments keyAt:3).].
f67b97bc683a initial checkin
james
parents:
diff changeset
   685
2859
118c4294d9cd changed: #search
Claus Gittinger <cg@exept.de>
parents: 2775
diff changeset
   686
(tempArguments size) > 3 ifTrue:[ self halt:'unimplemented'. ].
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   687
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   688
f67b97bc683a initial checkin
james
parents:
diff changeset
   689
                        "    newValue:= value replString: 'data3' withString:(self messageAnswer key). " 
f67b97bc683a initial checkin
james
parents:
diff changeset
   690
f67b97bc683a initial checkin
james
parents:
diff changeset
   691
      newValue:=newValue, ' --> ', (tempAnswer key).
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   692
      newValue replaceAll:Character cr with:Character space.
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   693
f67b97bc683a initial checkin
james
parents:
diff changeset
   694
      resultArray at: key put: newValue.
f67b97bc683a initial checkin
james
parents:
diff changeset
   695
f67b97bc683a initial checkin
james
parents:
diff changeset
   696
              ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   697
f67b97bc683a initial checkin
james
parents:
diff changeset
   698
self resultHolder value: resultArray.
f67b97bc683a initial checkin
james
parents:
diff changeset
   699
resultSelectors:= mf selectors.   "used to find implementors so we do not have to "
f67b97bc683a initial checkin
james
parents:
diff changeset
   700
receiver:=tempReceiver            "search the string for the selector found. Stored as an ordered collection"
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   701
2859
118c4294d9cd changed: #search
Claus Gittinger <cg@exept.de>
parents: 2775
diff changeset
   702
    "Modified: / 26-09-2011 / 12:42:28 / cg"
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   703
!
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   704
2891
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   705
searchPatternChanged
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   706
    "/ self searchPatternMatches
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   707
    self searchPatternMatchesInBackground
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   708
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   709
    "Created: / 01-06-2012 / 13:18:16 / cg"
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   710
!
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   711
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   712
searchPatternMatches
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   713
    "Do a search based on the pattern match"
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   714
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   715
    | pattern list selectors counts|
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   716
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   717
    pattern := self selectorPattern value.
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   718
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   719
    self resultHolder value: nil.                "reset the result list"
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   720
    self classOfResultHolder value: nil.        "reset the implementorOf list"
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   721
    self codeHolder value: nil.                  "reset the source"
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   722
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   723
    self withCursor:Cursor execute do:[
2889
e17b2eacfe84 changed: #searchPatternMatches
Claus Gittinger <cg@exept.de>
parents: 2887
diff changeset
   724
        pattern includesMatchCharacters ifFalse:[   
e17b2eacfe84 changed: #searchPatternMatches
Claus Gittinger <cg@exept.de>
parents: 2887
diff changeset
   725
            pattern := '*',pattern,'*'
e17b2eacfe84 changed: #searchPatternMatches
Claus Gittinger <cg@exept.de>
parents: 2887
diff changeset
   726
        ].
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   727
        list := SystemBrowser findImplementorsMatching:pattern in:Smalltalk allClasses ignoreCase:true.
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   728
    ].
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   729
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   730
    counts := IdentityDictionary new.
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   731
    selectors := IdentitySet new.
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   732
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   733
    list do:[:eachMethod |
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   734
        selectors add: eachMethod selector.
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   735
        (counts at:(eachMethod selector) ifAbsentPut:[0 asValue]) increment
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   736
    ].
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   737
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   738
    resultSelectors := selectors asOrderedCollection sort.
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   739
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   740
    self resultHolder value: (resultSelectors collect:[:sel | sel,' --> ',(counts at:sel) value printString,' implementor(s)']).
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   741
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   742
    "Created: / 27-04-2012 / 14:46:35 / cg"
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   743
!
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   744
2891
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   745
searchPatternMatchesInBackground
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   746
    "Do a search based on the pattern match"
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   747
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   748
    | p pattern list|
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   749
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   750
    (p := searchProcess) notNil ifTrue:[
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   751
        searchProcess := nil.
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   752
        p terminate.
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   753
    ].
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   754
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   755
    searchProcess := 
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   756
        [
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   757
            pattern := self selectorPattern value.
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   758
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   759
            self withCursor:Cursor execute do:[
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   760
                pattern includesMatchCharacters ifFalse:[   
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   761
                    pattern := '*',pattern,'*'
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   762
                ].
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   763
                list := SystemBrowser findImplementorsMatching:pattern in:Smalltalk allClasses ignoreCase:true.
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   764
            ].
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   765
            self enqueueDelayedAction:[ self updateListAfterPatternSearch: list ]
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   766
        ] fork.
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   767
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   768
    "Created: / 01-06-2012 / 13:16:54 / cg"
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   769
!
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   770
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   771
selectedClassOfResultHolderChanged
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   772
    |sel classAndSelector mthd|
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   773
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   774
    sel := self selectedClassOfResultHolder value.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   775
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   776
    classAndSelector := self extractClassAndSelectorFrom:sel.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   777
    classAndSelector isNil ifTrue:[
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   778
        ^ self
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   779
    ].
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   780
    mthd := classAndSelector key >> classAndSelector value.   
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   781
    mthd notNil ifTrue:[
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   782
        self withWaitCursorDo:[
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   783
            self codeHolder value:mthd source
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   784
        ]
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   785
    ] ifFalse:[
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   786
        self codeHolder value:nil
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   787
    ].
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   788
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   789
    "Created: / 13.11.2001 / 12:43:43 / cg"
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   790
    "Modified: / 13.11.2001 / 12:48:56 / cg"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   791
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   792
f67b97bc683a initial checkin
james
parents:
diff changeset
   793
updateImplementorsOf:anInteger 
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   794
    "Request the implementors of the selected argument provided by aNumber.
2892
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   795
     Return the receiver."
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   796
    
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   797
    |methods classList aNumber|
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   798
2892
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   799
    (anInteger isNil) ifTrue:[
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   800
        ^ self
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   801
    ].
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   802
    anInteger isNil ifTrue:[
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   803
        aNumber := 1
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   804
    ] ifFalse:[
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   805
        aNumber := anInteger
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   806
    ].
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   807
    methods := SystemBrowser 
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   808
            findImplementorsOf:(resultSelectors at:aNumber)
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   809
            in:Smalltalk allClasses
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   810
            ignoreCase:false.
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   811
    classList := methods asOrderedCollection 
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   812
            collect:[:m | m mclass name , ' ' , m selector ].
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   813
    classList := (self markMatchingClasses:(resultSelectors at:aNumber)
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   814
            classesWithSelector:classList).
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   815
    self classOfResultHolder value:classList.
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   816
    classList size > 0 ifTrue:[
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   817
        self selectedClassOfResultHolder value:(classList first).
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   818
        self selectedClassOfResultHolderChanged.
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   819
    ] ifFalse:[
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   820
        self selectedClassOfResultHolder value:nil.
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   821
    ].
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   822
2892
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   823
    "Modified (comment): / 24-06-2012 / 18:41:45 / cg"
2891
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   824
!
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   825
2892
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   826
updateListAfterPatternSearch:list 
2891
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   827
    "Do a search based on the pattern match"
2892
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   828
    
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   829
    |selectors counts firsts|
2891
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   830
2892
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   831
    self resultHolder value:nil.
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   832
    self classOfResultHolder value:nil.
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   833
    self codeHolder value:nil.
2891
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   834
    counts := IdentityDictionary new.
2892
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   835
    firsts := IdentityDictionary new.
2891
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   836
    selectors := IdentitySet new.
2892
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   837
    list do:[:eachMethod | 
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   838
        selectors add:eachMethod selector.
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   839
        (counts at:(eachMethod selector) ifAbsentPut:[ 0 asValue ]) increment.
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   840
        firsts at:(eachMethod selector) ifAbsentPut:[ eachMethod mclass ].
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   841
    ].
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   842
    resultSelectors := selectors asOrderedCollection sort.
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   843
    self resultHolder value:(resultSelectors 
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   844
                collect:[:sel | 
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   845
                    |cnt|
2891
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   846
2892
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   847
                    cnt := (counts at:sel) value.
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   848
                    cnt == 1 ifTrue:[
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   849
                        sel , ' --> ' , (firsts at:sel) name
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   850
                    ] ifFalse:[
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   851
                        sel , ' --> ' , cnt printString , ' implementor(s)'
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   852
                    ].
a1349bc5e2fe changed:
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
   853
                ]).
2891
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   854
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   855
    "Created: / 01-06-2012 / 13:17:34 / cg"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   856
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
   857
f67b97bc683a initial checkin
james
parents:
diff changeset
   858
!MethodFinderWindow methodsFor:'aspects'!
f67b97bc683a initial checkin
james
parents:
diff changeset
   859
f67b97bc683a initial checkin
james
parents:
diff changeset
   860
arg1BoxVisible
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   861
"Determines if the box should be visble or not. Return true or false"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   862
    arg1BoxVisible isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   863
        arg1BoxVisible := BlockValue
f67b97bc683a initial checkin
james
parents:
diff changeset
   864
                              with:[:vh | vh value >= 2 ]
f67b97bc683a initial checkin
james
parents:
diff changeset
   865
                              argument:(self argCountHolder)
f67b97bc683a initial checkin
james
parents:
diff changeset
   866
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   867
    ^ arg1BoxVisible.
f67b97bc683a initial checkin
james
parents:
diff changeset
   868
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   869
f67b97bc683a initial checkin
james
parents:
diff changeset
   870
arg2BoxVisible
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   871
"Determines if the box should be visble or not. Return true or false"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   872
    arg2BoxVisible isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   873
        arg2BoxVisible := BlockValue
f67b97bc683a initial checkin
james
parents:
diff changeset
   874
                              with:[:vh | vh value >= 3 ]
f67b97bc683a initial checkin
james
parents:
diff changeset
   875
                              argument:(self argCountHolder)
f67b97bc683a initial checkin
james
parents:
diff changeset
   876
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   877
    ^ arg2BoxVisible.
f67b97bc683a initial checkin
james
parents:
diff changeset
   878
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   879
f67b97bc683a initial checkin
james
parents:
diff changeset
   880
arg3BoxVisible
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   881
"Determines if the box should be visble or not. Return true or false"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   882
    arg3BoxVisible isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   883
        arg3BoxVisible := BlockValue
f67b97bc683a initial checkin
james
parents:
diff changeset
   884
                              with:[:vh | vh value >= 4 ]
f67b97bc683a initial checkin
james
parents:
diff changeset
   885
                              argument:(self argCountHolder)
f67b97bc683a initial checkin
james
parents:
diff changeset
   886
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   887
    ^ arg3BoxVisible.
f67b97bc683a initial checkin
james
parents:
diff changeset
   888
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   889
f67b97bc683a initial checkin
james
parents:
diff changeset
   890
arg4BoxVisible
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   891
"Determines if the box should be visble or not. Return true or false"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   892
    arg4BoxVisible isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   893
        arg4BoxVisible := BlockValue
f67b97bc683a initial checkin
james
parents:
diff changeset
   894
                              with:[:vh | vh value >= 5 ]
f67b97bc683a initial checkin
james
parents:
diff changeset
   895
                              argument:(self argCountHolder)
f67b97bc683a initial checkin
james
parents:
diff changeset
   896
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   897
    ^ arg4BoxVisible.
f67b97bc683a initial checkin
james
parents:
diff changeset
   898
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   899
f67b97bc683a initial checkin
james
parents:
diff changeset
   900
argCountHolder
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   901
"Return the value of argCounterHolder which is initialized at 2."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   902
    argCountHolder isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   903
        argCountHolder := 2 asValue.
f67b97bc683a initial checkin
james
parents:
diff changeset
   904
    ].     
f67b97bc683a initial checkin
james
parents:
diff changeset
   905
    ^ argCountHolder.
f67b97bc683a initial checkin
james
parents:
diff changeset
   906
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   907
f67b97bc683a initial checkin
james
parents:
diff changeset
   908
argCountList
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   909
"Return the argCountList"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   910
    argCountList isNil ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
   911
        argCountList := #('0 arguments' '1 argument' '2 arguments' '3 arguments') asValue  
f67b97bc683a initial checkin
james
parents:
diff changeset
   912
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   913
    ^ argCountList.
f67b97bc683a initial checkin
james
parents:
diff changeset
   914
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   915
f67b97bc683a initial checkin
james
parents:
diff changeset
   916
classOfResultHolder
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   917
    "Return a valueHolder which contains a collection with the names of the 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   918
     implementors of a specific message.   "
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   919
f67b97bc683a initial checkin
james
parents:
diff changeset
   920
    |holder|
f67b97bc683a initial checkin
james
parents:
diff changeset
   921
    (holder := builder bindingAt:#classOfResultHolder) isNil ifTrue:[
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   922
        holder := ValueHolder new.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   923
        builder aspectAt:#classOfResultHolder put:holder
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   924
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   925
    ^ holder
f67b97bc683a initial checkin
james
parents:
diff changeset
   926
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   927
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   928
codeHolder
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   929
    codeHolder isNil ifTrue:[
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   930
        codeHolder := '' asValue.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   931
    ].
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   932
    ^ codeHolder.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   933
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   934
    "Created: / 13.11.2001 / 12:44:11 / cg"
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   935
!
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   936
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   937
resultHolder
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   938
    "Return a value holder which contains the results of a search as a collection."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   939
f67b97bc683a initial checkin
james
parents:
diff changeset
   940
    |holder|
f67b97bc683a initial checkin
james
parents:
diff changeset
   941
    (holder := builder bindingAt:#resultHolder) isNil ifTrue:[
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   942
        holder := ValueHolder new.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   943
        builder aspectAt:#resultHolder put:holder.
2887
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
   944
        holder value:{
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
   945
                        'Please enter combination of' .
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
   946
                        '    ',('receiver, arg and result' allBold) .
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
   947
                        'or a'.
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
   948
                        '    ',('selector search pattern' allBold) .
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   949
                        'into the above fields, then click on either ',('"search"' allBold),'-button.'
2887
01e4c1a45e35 changed:
Claus Gittinger <cg@exept.de>
parents: 2886
diff changeset
   950
                     }
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   951
    ].
f67b97bc683a initial checkin
james
parents:
diff changeset
   952
    ^ holder.
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   953
2890
3d8556368fe9 added: #defaultIcon
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   954
    "Modified: / 01-06-2012 / 13:06:02 / cg"
1529
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   955
!
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   956
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   957
selectedClassOfResultHolder
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   958
    "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
   959
     (right list)"
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   960
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   961
    |holder|
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   962
    (holder := builder bindingAt:#selectedClassOfResultHolder) isNil ifTrue:[
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   963
        holder := ValueHolder new.
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   964
        builder aspectAt:#selectedClassOfResultHolder put:holder
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   965
    ].
8c1607c0fbe8 pop up menu
Claus Gittinger <cg@exept.de>
parents: 1526
diff changeset
   966
    ^ holder
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   967
!
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   968
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   969
selectorPattern
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   970
    |holder|
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   971
    (holder := builder bindingAt:#selectorPattern) isNil ifTrue:[
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   972
        holder := ValueHolder new.
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   973
        builder aspectAt:#selectorPattern put:holder.
2891
d4f1cd8626e6 class definition
Claus Gittinger <cg@exept.de>
parents: 2890
diff changeset
   974
        holder onChangeSend:#searchPatternChanged to:self.
2886
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   975
    ].
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   976
    ^ holder
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   977
ba035714bf27 added search by pattern;
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
   978
    "Created: / 27-04-2012 / 14:44:01 / cg"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   979
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
   980
f67b97bc683a initial checkin
james
parents:
diff changeset
   981
!MethodFinderWindow methodsFor:'callBacks'!
f67b97bc683a initial checkin
james
parents:
diff changeset
   982
f67b97bc683a initial checkin
james
parents:
diff changeset
   983
argument1WidgetCreated: aWidget
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   984
"Store the widget as an instance variable. Return the receiver"
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   985
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   986
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   987
        argument1Editor := aWidget scrolledView.
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   988
        aWidget tabMeansNextField:true.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   989
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   990
    "Modified: / 13.11.2001 / 12:21:41 / cg"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   991
!
f67b97bc683a initial checkin
james
parents:
diff changeset
   992
f67b97bc683a initial checkin
james
parents:
diff changeset
   993
argument2WidgetCreated: aWidget
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   994
"Store the widget as an instance variable. Return the receiver"
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
   995
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
   996
f67b97bc683a initial checkin
james
parents:
diff changeset
   997
        argument2Editor := aWidget scrolledView.
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   998
        aWidget tabMeansNextField:true.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
   999
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1000
    "Modified: / 13.11.2001 / 12:21:45 / cg"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1001
!
f67b97bc683a initial checkin
james
parents:
diff changeset
  1002
f67b97bc683a initial checkin
james
parents:
diff changeset
  1003
argument3WidgetCreated: aWidget
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1004
"Store the widget as an instance variable. Return the receiver"
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1005
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1006
f67b97bc683a initial checkin
james
parents:
diff changeset
  1007
        argument3Editor := aWidget scrolledView.
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1008
        aWidget tabMeansNextField:true.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1009
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1010
    "Modified: / 13.11.2001 / 12:21:49 / cg"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1011
!
f67b97bc683a initial checkin
james
parents:
diff changeset
  1012
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1013
messageAnswerWidgetCreated: aWidget
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1014
"Store the widget as an instance variable. Return the receiver"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1015
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1016
        messageAnswerEditor := aWidget scrolledView.
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1017
        aWidget tabMeansNextField:true.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1018
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1019
    "Modified: / 13.11.2001 / 12:24:55 / cg"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1020
!
f67b97bc683a initial checkin
james
parents:
diff changeset
  1021
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1022
openHTMLDocumentation
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1023
    HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#METHODFINDER'
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1024
!
f67b97bc683a initial checkin
james
parents:
diff changeset
  1025
f67b97bc683a initial checkin
james
parents:
diff changeset
  1026
receiverWidgetCreated: aWidget
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1027
"Store the widget as an instance variable. Return the receiver"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1028
f67b97bc683a initial checkin
james
parents:
diff changeset
  1029
        receiverEditor := aWidget scrolledView.
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1030
        aWidget tabMeansNextField:true.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1031
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1032
    "Modified: / 13.11.2001 / 12:24:49 / cg"
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1033
!
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1034
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1035
sourceCodeWidgetCreated: aWidget
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1036
        aWidget acceptAction:nil.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1037
        aWidget readOnly:true
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1038
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1039
    "Created: / 13.11.2001 / 12:50:27 / cg"
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1040
    "Modified: / 13.11.2001 / 12:51:23 / cg"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1041
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
  1042
f67b97bc683a initial checkin
james
parents:
diff changeset
  1043
!MethodFinderWindow methodsFor:'controlInput'!
f67b97bc683a initial checkin
james
parents:
diff changeset
  1044
f67b97bc683a initial checkin
james
parents:
diff changeset
  1045
cleanInputs: aDirtyString
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1046
     "Find and remove common mistakes made by the user. Return the 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1047
     'aStringToBeCleaned' variable"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1048
       | aStringToBeCleaned rs position|
f67b97bc683a initial checkin
james
parents:
diff changeset
  1049
f67b97bc683a initial checkin
james
parents:
diff changeset
  1050
   aStringToBeCleaned:=aDirtyString.
f67b97bc683a initial checkin
james
parents:
diff changeset
  1051
f67b97bc683a initial checkin
james
parents:
diff changeset
  1052
(aStringToBeCleaned endsWith:(Character cr)) ifTrue:[
f67b97bc683a initial checkin
james
parents:
diff changeset
  1053
                        aStringToBeCleaned:=aStringToBeCleaned copyFrom:1 to: (aStringToBeCleaned size -1).].
f67b97bc683a initial checkin
james
parents:
diff changeset
  1054
aStringToBeCleaned:= aStringToBeCleaned withoutSeparators.
f67b97bc683a initial checkin
james
parents:
diff changeset
  1055
f67b97bc683a initial checkin
james
parents:
diff changeset
  1056
f67b97bc683a initial checkin
james
parents:
diff changeset
  1057
rs:=ReadStream on: aStringToBeCleaned.
f67b97bc683a initial checkin
james
parents:
diff changeset
  1058
[rs upToAll: '#true'.  rs atEnd] whileFalse: [
f67b97bc683a initial checkin
james
parents:
diff changeset
  1059
                        position:= rs position. 
f67b97bc683a initial checkin
james
parents:
diff changeset
  1060
                        aStringToBeCleaned:=aStringToBeCleaned copyReplaceFrom: position to: position with: ''. "remove #"
f67b97bc683a initial checkin
james
parents:
diff changeset
  1061
                        rs:=ReadStream on: aStringToBeCleaned.
f67b97bc683a initial checkin
james
parents:
diff changeset
  1062
                        ].
f67b97bc683a initial checkin
james
parents:
diff changeset
  1063
f67b97bc683a initial checkin
james
parents:
diff changeset
  1064
rs:=ReadStream on: aStringToBeCleaned.
f67b97bc683a initial checkin
james
parents:
diff changeset
  1065
[rs upToAll: '#false'.  rs atEnd] whileFalse: [
f67b97bc683a initial checkin
james
parents:
diff changeset
  1066
                        position:= rs position. 
f67b97bc683a initial checkin
james
parents:
diff changeset
  1067
                        aStringToBeCleaned:=aStringToBeCleaned copyReplaceFrom: position to: position with: ''. "remove #"
f67b97bc683a initial checkin
james
parents:
diff changeset
  1068
                        rs:=ReadStream on: aStringToBeCleaned.
f67b97bc683a initial checkin
james
parents:
diff changeset
  1069
                        rs:=ReadStream on: aStringToBeCleaned. ].
f67b97bc683a initial checkin
james
parents:
diff changeset
  1070
f67b97bc683a initial checkin
james
parents:
diff changeset
  1071
[rs upToAll: '#nil'.  rs atEnd] whileFalse: [
f67b97bc683a initial checkin
james
parents:
diff changeset
  1072
                        position:= rs position. 
f67b97bc683a initial checkin
james
parents:
diff changeset
  1073
                        aStringToBeCleaned:=aStringToBeCleaned copyReplaceFrom: position to: position with: ''. "remove #"
f67b97bc683a initial checkin
james
parents:
diff changeset
  1074
                        rs:=ReadStream on: aStringToBeCleaned.  ].
f67b97bc683a initial checkin
james
parents:
diff changeset
  1075
                   ^aStringToBeCleaned    
f67b97bc683a initial checkin
james
parents:
diff changeset
  1076
!
f67b97bc683a initial checkin
james
parents:
diff changeset
  1077
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1078
markMatchingClasses: aSelector  classesWithSelector:anOrderedCollection
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1079
   " Matches the class of the receiver with all the elements in anOrderedCollection
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1080
    (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
  1081
    The classes are then sorted so the the asterisk appears first. Return the 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1082
    markedClassList."
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1083
2165
a5ff995ed0d7 cleanup
sr
parents: 2046
diff changeset
  1084
        | marker recClass unmarkedClassList markedClassList|
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1085
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1086
        marker := self class markerForImplementingClass.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1087
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1088
        recClass := receiver value class.
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1089
        unmarkedClassList:=anOrderedCollection copy.
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1090
        unmarkedClassList do:
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1091
                [:classAndMethod | | class |
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1092
                class:=Compiler evaluate:
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1093
                                ((ReadStream on: classAndMethod) upToAll: aSelector).
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1094
                "/ (recClass == class)
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1095
                (recClass whichClassImplements:aSelector) == class
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1096
                ifTrue:
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1097
                        ["/ unmarkedClassList add: marker, classAndMethod.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1098
                        unmarkedClassList add: classAndMethod allBold.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1099
                        unmarkedClassList remove: classAndMethod.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1100
                        ].
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1101
        ].
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1102
f67b97bc683a initial checkin
james
parents:
diff changeset
  1103
      unmarkedClassList sort:[:a :b | |rawA rawB|
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1104
                    rawA := a string.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1105
                    (rawA startsWith:marker) ifTrue:[rawA := rawA copyFrom:marker size+1].
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1106
                    rawB := b string.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1107
                    (rawB startsWith:marker) ifTrue:[rawB := rawB copyFrom:marker size+1].
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1108
                    rawA < rawB.  ].
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1109
      markedClassList:= unmarkedClassList. 
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1110
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1111
         ^markedClassList
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1112
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1113
    "Modified: / 13.11.2001 / 12:16:05 / cg"
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1114
!
f67b97bc683a initial checkin
james
parents:
diff changeset
  1115
f67b97bc683a initial checkin
james
parents:
diff changeset
  1116
mergReciever: aReceiver WithArgument: arguments
f67b97bc683a initial checkin
james
parents:
diff changeset
  1117
1525
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1118
"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
  1119
 MethodFinder. Return an array."
c91fbd9f8338 checkin from browser
james
parents: 1522
diff changeset
  1120
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1121
| tempReceiver tempArguments receiverWithArgument|
f67b97bc683a initial checkin
james
parents:
diff changeset
  1122
f67b97bc683a initial checkin
james
parents:
diff changeset
  1123
  tempReceiver:= aReceiver.
f67b97bc683a initial checkin
james
parents:
diff changeset
  1124
 tempArguments :=  arguments.
f67b97bc683a initial checkin
james
parents:
diff changeset
  1125
f67b97bc683a initial checkin
james
parents:
diff changeset
  1126
(tempArguments isEmpty or:[(tempArguments) isNil])
f67b97bc683a initial checkin
james
parents:
diff changeset
  1127
                ifTrue:[  receiverWithArgument:=Array new:1."no argument"
f67b97bc683a initial checkin
james
parents:
diff changeset
  1128
                          receiverWithArgument at:1 put: tempReceiver.     
f67b97bc683a initial checkin
james
parents:
diff changeset
  1129
                        ]
f67b97bc683a initial checkin
james
parents:
diff changeset
  1130
                ifFalse:[
f67b97bc683a initial checkin
james
parents:
diff changeset
  1131
        (tempArguments size = 1)
f67b97bc683a initial checkin
james
parents:
diff changeset
  1132
                        ifTrue:[ receiverWithArgument:=Array new:2.
f67b97bc683a initial checkin
james
parents:
diff changeset
  1133
                                  receiverWithArgument at:1 put: tempReceiver.      
f67b97bc683a initial checkin
james
parents:
diff changeset
  1134
                                  receiverWithArgument at:2 put: (tempArguments at:1)
f67b97bc683a initial checkin
james
parents:
diff changeset
  1135
                                ].  "a receiver with an argument"
f67b97bc683a initial checkin
james
parents:
diff changeset
  1136
f67b97bc683a initial checkin
james
parents:
diff changeset
  1137
        (tempArguments size = 2)
f67b97bc683a initial checkin
james
parents:
diff changeset
  1138
                        ifTrue:[ receiverWithArgument:=Array new:3.
f67b97bc683a initial checkin
james
parents:
diff changeset
  1139
                                  receiverWithArgument at:1 put: tempReceiver.      
f67b97bc683a initial checkin
james
parents:
diff changeset
  1140
                                  (receiverWithArgument at:2 put: (tempArguments at:1)).
f67b97bc683a initial checkin
james
parents:
diff changeset
  1141
                                  (receiverWithArgument at:3 put: (tempArguments at:2))
f67b97bc683a initial checkin
james
parents:
diff changeset
  1142
                                ].  "a receiver with an argument"
f67b97bc683a initial checkin
james
parents:
diff changeset
  1143
        (tempArguments size = 3)
f67b97bc683a initial checkin
james
parents:
diff changeset
  1144
                        ifTrue:[ receiverWithArgument:=Array new:4.
f67b97bc683a initial checkin
james
parents:
diff changeset
  1145
                                  receiverWithArgument at:1 put: tempReceiver.      
f67b97bc683a initial checkin
james
parents:
diff changeset
  1146
                                  (receiverWithArgument at:2 put: (tempArguments at:1)).
f67b97bc683a initial checkin
james
parents:
diff changeset
  1147
                                  (receiverWithArgument at:3 put: (tempArguments at:2)).
f67b97bc683a initial checkin
james
parents:
diff changeset
  1148
                                  (receiverWithArgument at:4 put: (tempArguments at:3)).
f67b97bc683a initial checkin
james
parents:
diff changeset
  1149
f67b97bc683a initial checkin
james
parents:
diff changeset
  1150
                                ].  "a receiver with an argument"
f67b97bc683a initial checkin
james
parents:
diff changeset
  1151
f67b97bc683a initial checkin
james
parents:
diff changeset
  1152
                        ].
f67b97bc683a initial checkin
james
parents:
diff changeset
  1153
^receiverWithArgument
f67b97bc683a initial checkin
james
parents:
diff changeset
  1154
! !
f67b97bc683a initial checkin
james
parents:
diff changeset
  1155
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1156
!MethodFinderWindow methodsFor:'misc'!
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1157
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1158
aboutThisApplicationText
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1159
    |msg|
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1160
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1161
    msg := super aboutThisApplicationText.
2412
3e2395ff3b75 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2165
diff changeset
  1162
    msg := msg , '\\Ported from Squeak to ST/X by James Hayes (james@exept.de).
3e2395ff3b75 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2165
diff changeset
  1163
Original written by Ted Kaehler, Scott Wallace and Dan Ingalls.'.
1532
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1164
    ^msg withCRs.
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1165
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1166
    "Modified: / 13.11.2001 / 12:56:44 / cg"
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1167
! !
318c295490c1 GUI enhanced
Claus Gittinger <cg@exept.de>
parents: 1531
diff changeset
  1168
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1169
!MethodFinderWindow class methodsFor:'documentation'!
f67b97bc683a initial checkin
james
parents:
diff changeset
  1170
f67b97bc683a initial checkin
james
parents:
diff changeset
  1171
version
f67b97bc683a initial checkin
james
parents:
diff changeset
  1172
    ^ '$Header$'
2730
abcb0402d5ba changed: #clear
Claus Gittinger <cg@exept.de>
parents: 2459
diff changeset
  1173
!
abcb0402d5ba changed: #clear
Claus Gittinger <cg@exept.de>
parents: 2459
diff changeset
  1174
abcb0402d5ba changed: #clear
Claus Gittinger <cg@exept.de>
parents: 2459
diff changeset
  1175
version_CVS
abcb0402d5ba changed: #clear
Claus Gittinger <cg@exept.de>
parents: 2459
diff changeset
  1176
    ^ '$Header$'
1522
f67b97bc683a initial checkin
james
parents:
diff changeset
  1177
! !