BrowserView.st
author Claus Gittinger <cg@exept.de>
Wed, 23 Aug 2000 18:18:43 +0200
changeset 2733 d14737c26fca
parent 2716 8451e7057f00
child 2739 1b0b1520670b
permissions -rw-r--r--
fixed checkIn * all *
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     1
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
     3
	      All Rights Reserved
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     4
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    11
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    12
2649
e4b2bcafaf2f no package info in class definition
Claus Gittinger <cg@exept.de>
parents: 2648
diff changeset
    13
"{ Package: 'stx:libtool' }"
e4b2bcafaf2f no package info in class definition
Claus Gittinger <cg@exept.de>
parents: 2648
diff changeset
    14
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    15
StandardSystemView subclass:#BrowserView
1763
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    16
	instanceVariableNames:'classCategoryListView classListView methodCategoryListView
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    17
		methodListView classMethodListView codeView classToggle
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    18
		instanceToggle currentNamespace currentClassCategory
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    19
		currentClassHierarchy currentClass currentMethodCategory
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    20
		currentMethod currentSelector showInstance actualClass fullClass
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    21
		lastMethodCategory aspect variableListView fullProtocol
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    22
		lockUpdates autoSearch myLabel acceptClass lastSourceLogMessage
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    23
		lastCategory lastModule lastPackage lastMethodMoveClass
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    24
		namespaceList allNamespaces gotClassList classList selectorList
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    25
		showAllNamespaces classInstVarsInVarList coloringProcess
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    26
		codeModified autoSearchIgnoreCase icons'
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    27
	classVariableNames:'CheckForInstancesWhenRemovingClasses RememberAspect DefaultIcon
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    28
		StopIcon TraceIcon TimeIcon CanvasIcon MenuIcon ImageIcon
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    29
		TabListIcon HierarchicalListIcon TableColumnsIcon HelpIcon
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    30
		ShowResourceIcons ClassHistory LastSearchPatterns
2586
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
    31
		ShowMethodCategoryInClassMethodList LastRenames'
1763
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    32
	poolDictionaries:''
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    33
	category:'Interface-Browsers'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    34
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    35
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    36
!BrowserView class methodsFor:'documentation'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    37
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    38
copyright
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    39
"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    40
 COPYRIGHT (c) 1989 by Claus Gittinger
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
    41
	      All Rights Reserved
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    42
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    43
 This software is furnished under a license and may be used
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    44
 only in accordance with the terms of that license and with the
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    45
 inclusion of the above copyright notice.   This software may not
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    46
 be provided or otherwise made available to, or used by, any
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    47
 other person.  No title to or ownership of the software is
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    48
 hereby transferred.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    49
"
165
df29ee4514c1 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 161
diff changeset
    50
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    51
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    52
documentation
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    53
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    54
    this class implements all kinds of class browsers.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    55
    Typically, it is started with 'SystemBrowser open', but there are many other 
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    56
    startup messages, to launch special browsers.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    57
    See the categories 'startup' and 'special search startup' in the classes
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    58
    protocol.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    59
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    60
    Alse, see the extra document 'doc/misc/sbrowser.doc' or the HTML online doc
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    61
    for how to use the browser.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    62
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    63
    written winter 89 by claus
106
claus
parents: 105
diff changeset
    64
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    65
    Notice: 
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    66
        SystemBrowser is currently being rewritten to be an instance
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    67
        of ApplicationModel - this transition is not yet complete and you see
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    68
        here intermediate versions of BrowserView/SystemBrowser. 
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    69
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    70
        All action is (currently) still done here in BrowserView, although the
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    71
        SystemBrowsers class methods are used to startup a browser.
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    72
        (which is done to make the upcoming switch transparent)
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    73
        This will certainly change ...
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    74
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    75
    PS:
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    76
        why did we add more and more here, instead of rewriting ?
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    77
        - because nobody pays us for it ;-),
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    78
        and the browser is not too bad to use, as long as you do not look into code.
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    79
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    80
    [author:]
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    81
        Claus Gittinger
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    82
"
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
    83
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    84
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    85
!BrowserView class methodsFor:'initialization'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    86
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    87
initialize
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    88
    "Browser configuration;
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    89
     (values can be changed from your private startup file)"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    90
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    91
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    92
    "
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    93
     setting 'ShowMethodCategoryInClassMethodList' to false will suppress the display
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    94
     of a methods category in the search-result browsers..
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    95
    "
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    96
    ShowMethodCategoryInClassMethodList := true.
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    97
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    98
    "
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    99
     setting 'ShowResourceIcons' to false will suppress the display
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
   100
     of image-, menu-, canvas- etc. icons beside the method name in
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
   101
     the method list.
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
   102
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   103
    ShowResourceIcons := true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   104
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   105
    "
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
   106
     setting 'CheckForInstancesWhenRemovingClasses' to false, the removeClass function will remove
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   107
     classes WITHOUT checking for instances. Otherwise,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   108
     it will check and let you confirm in case there are instances.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   109
     Checking for instances may be a bit time consuming, though.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   110
     The default is true - therefore, it will check
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   111
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   112
    CheckForInstancesWhenRemovingClasses := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   113
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   114
    "
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
   115
     setting 'RememberAspect' to true makes the browser remember the aspect shown
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   116
     in the classList and show this aspect when a new class is selected.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   117
     If false, it always switches to the classes definition
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   118
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   119
    RememberAspect := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   120
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   121
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   122
     CheckForInstancesWhenRemovingClasses := true
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   123
     CheckForInstancesWhenRemovingClasses := false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   124
     RememberAspect := true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   125
     RememberAspect := false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   126
     ShowResourceIcons := true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   127
     ShowResourceIcons := false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   128
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   129
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   130
    "Created: / 23.11.1995 / 11:35:58 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   131
    "Modified: / 27.10.1997 / 17:34:25 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   132
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   133
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   134
!BrowserView class methodsFor:'cleanup'!
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   135
1575
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   136
checkClassHistory
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
   137
    "checks the class history for non-existing classes"
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
   138
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
   139
    "/ reverse, since we might modify while enumerating
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
   140
    self classHistory reverseDo:[:histEntry|
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
   141
        (Smalltalk at: (histEntry upTo: $ ) asSymbol) isBehavior
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
   142
        ifFalse:[
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
   143
            ClassHistory remove: histEntry
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
   144
        ]
1575
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   145
    ]
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   146
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   147
!
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   148
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   149
lowSpaceCleanup
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   150
    DefaultIcon := StopIcon := TraceIcon := TimeIcon := nil.
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   151
    CanvasIcon := MenuIcon := ImageIcon := TabListIcon := nil.
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   152
    HierarchicalListIcon := TableColumnsIcon := HelpIcon := nil.
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   153
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   154
    "
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   155
     self lowSpaceCleanup
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   156
    "
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   157
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   158
    "Modified: / 26.7.1998 / 14:12:23 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   159
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   160
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   161
preSnapshot
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   162
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   163
    StopIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   164
    TraceIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   165
    TimeIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   166
    CanvasIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   167
    MenuIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   168
    ImageIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   169
    TabListIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   170
    HierarchicalListIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   171
    TableColumnsIcon :=
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   172
    HelpIcon :=
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   173
    nil
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   174
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   175
! !
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   176
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   177
!BrowserView class methodsFor:'defaults'!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   178
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   179
changeHistoryMaxSize
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   180
    "returns maximum size of the change history"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   181
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   182
    Screen current height < 768 ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   183
        ^ 15
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   184
    ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   185
    ^ 20 "/ 15
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   186
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   187
    "Created: / 10.2.2000 / 14:03:27 / cg"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   188
    "Modified: / 10.2.2000 / 14:07:01 / cg"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   189
!
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   190
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   191
classHistory
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   192
    "returns the class history"
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   193
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   194
    ClassHistory isNil ifTrue: [ClassHistory := OrderedCollection new].
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   195
    ^ClassHistory
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   196
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   197
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   198
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   199
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   200
classHistoryMaxSize
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   201
    "returns maximum size of the visited class history"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   202
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   203
    Screen current height < 768 ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   204
        ^ 15
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   205
    ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   206
    ^ 20 "/ 15
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   207
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   208
    "Modified: / 10.2.2000 / 14:07:07 / cg"
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   209
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   210
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   211
defaultIcon
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   212
    "return the browsers default window icon"
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   213
1288
9f6e0e8c3ab8 fixed icon
Claus Gittinger <cg@exept.de>
parents: 1282
diff changeset
   214
    <resource: #style (#SYSTEMBROWSER_ICON #SYSTEMBROWSER_ICON_FILE)>
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   215
2127
67083916cc02 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
   216
    |nm i resources|
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   217
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   218
    (i := DefaultIcon) isNil ifTrue:[
2342
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   219
        resources := self classResources.
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   220
        i := resources at:'SYSTEMBROWSER_ICON' default:nil.
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   221
        i isNil ifTrue:[
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   222
            nm := resources at:'SYSTEMBROWSER_ICON_FILE' default:'SBrowser.xbm'.
2478
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
   223
            i := Smalltalk imageFromFileNamed:nm inPackage:#'stx:libtool'.
2342
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   224
            i isNil ifTrue:[
2451
2a01088e75d3 try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
   225
                i := StandardSystemView defaultIcon
2342
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   226
            ]
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   227
        ].
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   228
        i notNil ifTrue:[
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   229
            DefaultIcon := i := i onDevice:Display
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   230
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   231
    ].
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   232
    ^ i
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   233
2127
67083916cc02 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
   234
    "Modified: / 19.3.1997 / 20:48:34 / ca"
67083916cc02 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
   235
    "Modified: / 27.4.1999 / 17:16:24 / cg"
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   236
!
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   237
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   238
fileImageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   239
    "answer an icon to mark file-loading image  methods"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   240
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   241
    ^ self imageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   242
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   243
    "Created: / 29.10.1997 / 03:32:43 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   244
! !
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   245
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   246
!BrowserView class methodsFor:'image specs'!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   247
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   248
canvasIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   249
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   250
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   251
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   252
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   253
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   254
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   255
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   256
     ImageEditor openOnClass:self andSelector:#canvasIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   257
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   258
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   259
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   260
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   261
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   262
	constantNamed:#'BrowserView canvasIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   263
	ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@.;.;.;.0@@@@@@@@@@C.;/C.;/@@9&XP9&XP@NY&DNY&D@C&Y!!C&Y!!@@9&XP9&XP@NY&DNY&D@C1DQC1DQ@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself]!
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   264
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   265
helpIcon
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   266
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   267
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   268
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   269
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   270
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   271
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   272
    "
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   273
     ImageEditor openOnClass:self andSelector:#helpIcon
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   274
    "
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   275
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   276
    <resource: #image>
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   277
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   278
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   279
	constantNamed:#'BrowserView helpIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   280
	ifAbsentPut:[(Depth2Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@AUUUP@UZ%T@EYVU@AUU%S UU%T@EU%U@AUUUP@UVUT@EUUUN@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 127 0 127 255 0 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself]!
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   281
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   282
hierarchicalListIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   283
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   284
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   285
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   286
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   287
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   288
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   289
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   290
     ImageEditor openOnClass:self andSelector:#hierarchicalListIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   291
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   292
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   293
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   294
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   295
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   296
	constantNamed:#'BrowserView hierarchicalListIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   297
	ifAbsentPut:[(Depth2Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@NAUUU0@R??8@GO?>@A0@C @\??88G@@N@A3?? @^@@8@N***@@@@@C b') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself]!
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   298
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   299
imageIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   300
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   301
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   302
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   303
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   304
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   305
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   306
    "
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   307
     self imageIcon inspect
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   308
     ImageEditor openOnClass:self andSelector:#imageIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   309
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   310
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   311
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   312
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   313
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   314
	constantNamed:#'BrowserView imageIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   315
	ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@CPUUUUUUUP@EDUUTQUTHAQEUUDUU@@UUUUQDUP@EUUUDP%T@AUUUQBUU@@L3L3P#L0@CL3L4H3L@@3L3L3L3@@@@@@@@@@Db') ; colorMapFromArray:#[0 0 0 255 255 0 0 127 0 255 153 0 51 153 153 51 255 255 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself]
1802
a654f429bc28 some obsolete code in #methodDoubleClick:
tz
parents: 1789
diff changeset
   316
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   317
!
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   318
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   319
menuIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   320
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   321
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   322
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   323
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   324
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   325
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   326
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   327
     ImageEditor openOnClass:self andSelector:#menuIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   328
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   329
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   330
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   331
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   332
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   333
	constantNamed:#'BrowserView menuIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   334
	ifAbsentPut:[(Depth2Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@AUUU DZ**(@@@@@@AUUU @Z**(8@@@@@AUUU @Z**(@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8?? @@@@a') ; yourself); yourself]!
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   335
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   336
programMenuIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   337
    "This resource specification was automatically generated
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   338
     by the ImageEditor of ST/X."
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   339
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   340
    "Do not manually edit this!! If it is corrupted,
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   341
     the ImageEditor may not be able to read the specification."
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   342
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   343
    "
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   344
     self programMenuIcon inspect
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   345
     ImageEditor openOnClass:self andSelector:#programMenuIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   346
    "
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   347
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   348
    <resource: #image>
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   349
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   350
    ^ Icon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   351
        constantNamed:#'BrowserView programMenuIcon'
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   352
        ifAbsentPut:[(Depth2Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@B*** D***(@@@@@@B*** @***(8@@@@@B*** @***(@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8?? @@@@a') ; yourself); yourself]
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   353
!
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
   354
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   355
stopIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   356
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   357
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   358
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   359
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   360
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   361
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   362
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   363
     ImageEditor openOnClass:self andSelector:#stopIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   364
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   365
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   366
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   367
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   368
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   369
	constantNamed:#'BrowserView stopIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   370
	ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@B*(@@J**(@J*V* J*%**B*)Z*"**V****%****)Z****V****%*******(****(J*%**@*)Z*@B***@@B*(@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A>@_>C?<_?9??/???????????????7?>_?8??A?8A>@b') ; yourself); yourself]!
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   371
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   372
tabListIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   373
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   374
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   375
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   376
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   377
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   378
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   379
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   380
     ImageEditor openOnClass:self andSelector:#tabListIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   381
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   382
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   383
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   384
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   385
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   386
	constantNamed:#'BrowserView tabListIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   387
	ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@G0; ; @@@A<@@@@@@A@_??????@@G?????? DA??????8@@_?????>C@G?????? @A??????8OC>;.;.;.@@@@@@@@@@Db') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?8C?0O?0??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself]!
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   388
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   389
tableColumnsIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   390
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   391
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   392
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   393
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   394
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   395
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   396
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   397
     ImageEditor openOnClass:self andSelector:#tableColumnsIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   398
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   399
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   400
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   401
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   402
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   403
	constantNamed:#'BrowserView tableColumnsIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   404
	ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@DQDQDQG0@A<O<O<O8A@P@@@@@N@@G0?0?0? DA@@@@@@8@@_C?C?C>C@D@@@@@C @A<O<O<O8OC>;.;.;.@@@@@@@@@@Db') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself]!
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   405
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   406
timeIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   407
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   408
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   409
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   410
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   411
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   412
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   413
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   414
     ImageEditor openOnClass:self andSelector:#timeIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   415
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   416
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   417
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   418
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   419
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   420
	constantNamed:#'BrowserView timeIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   421
	ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@FXA?8O''0>_G9>_''8>AC8D_?9??#?<O?0_>@Y @@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A>@_>C?<_?9??/???????????????7?>_?8??A?8A>@b') ; yourself); yourself]!
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   422
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   423
traceIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   424
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   425
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   426
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   427
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   428
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   429
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   430
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   431
     ImageEditor openOnClass:self andSelector:#traceIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   432
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   433
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   434
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   435
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   436
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   437
	constantNamed:#'BrowserView traceIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   438
	ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@B**** ****(B%UU(@)UUZ@B%UZ@@)UV @B%V @@)U(@@B%(@@@)Z@@@B*@@@@* @@@B @@@@(@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@A??''?>O?0??A?8G? O<@?0A>@G8@O@@<@A @F@@@@b') ; yourself); yourself]! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   439
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   440
!BrowserView class methodsFor:'interface specs'!
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   441
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   442
methodFilterSpec
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   443
    "This resource specification was automatically generated
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   444
     by the UIPainter of ST/X."
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   445
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   446
    "Do not manually edit this!! If it is corrupted,
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   447
     the UIPainter may not be able to read the specification."
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   448
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   449
    "
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   450
     UIPainter new openOnClass:BrowserView andSelector:#methodFilterSpec
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   451
    "
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   452
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   453
    <resource: #canvas>
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   454
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   455
    ^ 
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   456
     #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   457
	#name: #methodFilterSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   458
	#window: 
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   459
       #(#WindowSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   460
	  #label: 'Method Filter:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   461
	  #name: 'Method Filter:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   462
	  #layout: #(#LayoutFrame 41 0 142 0 556 0 320 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   463
	  #level: 0
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   464
	  #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   465
	  #max: #(#Point 1280 1024)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   466
	  #bounds: #(#Rectangle 41 142 557 321)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   467
	  #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   468
	  #returnIsOKInDialog: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   469
	  #escapeIsCancelInDialog: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   470
	)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   471
	#component: 
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   472
       #(#SpecCollection
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   473
	  #collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   474
	   #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   475
	      #label: 'Browse methods from list, which:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   476
	      #name: 'Label1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   477
	      #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 38 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   478
	      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   479
	      #adjust: #left
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   480
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   481
	   #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   482
	      #name: 'HorizontalPanel2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   483
	      #layout: #(#LayoutFrame 0 0 44 0 -2 1 84 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   484
	      #horizontalLayout: #leftFit
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   485
	      #verticalLayout: #center
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   486
	      #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   487
	      #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   488
	      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   489
	     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   490
		#collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   491
		 #(#ToggleSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   492
		    #label: 'Do not'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   493
		    #name: 'Toggle1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   494
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   495
		    #model: #notContainingMessage
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   496
		    #isTriggerOnDown: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   497
		    #showLamp: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   498
		    #lampColor: #(#Color 100.0 100.0 0.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   499
		    #extent: #(#Point 70 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   500
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   501
		 #(#CheckBoxSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   502
		    #label: 'Send the message:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   503
		    #name: 'CheckBox1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   504
		    #model: #doFilterMessage
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   505
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   506
		    #extent: #(#Point 200 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   507
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   508
		 #(#InputFieldSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   509
		    #name: 'EntryField1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   510
		    #enableChannel: #doFilterMessage
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   511
		    #model: #filteredMessageSelector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   512
		    #extent: #(#Point 238 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   513
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   514
		 )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   515
               
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   516
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   517
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   518
	   #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   519
	      #name: 'HorizontalPanel3'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   520
	      #layout: #(#LayoutFrame 0 0 84 0 -2 1 124 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   521
	      #horizontalLayout: #leftFit
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   522
	      #verticalLayout: #center
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   523
	      #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   524
	      #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   525
	      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   526
	     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   527
		#collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   528
		 #(#ToggleSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   529
		    #label: 'Do not'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   530
		    #name: 'Toggle2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   531
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   532
		    #model: #notContainingString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   533
		    #isTriggerOnDown: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   534
		    #showLamp: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   535
		    #lampColor: #(#Color 100.0 100.0 0.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   536
		    #extent: #(#Point 70 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   537
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   538
		 #(#CheckBoxSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   539
		    #label: 'Contain the String:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   540
		    #name: 'CheckBox2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   541
		    #model: #doFilterString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   542
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   543
		    #extent: #(#Point 200 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   544
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   545
		 #(#InputFieldSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   546
		    #name: 'EntryField2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   547
		    #enableChannel: #doFilterString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   548
		    #model: #filteredString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   549
		    #extent: #(#Point 238 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   550
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   551
		 )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   552
               
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   553
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   554
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   555
	   #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   556
	      #name: 'HorizontalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   557
	      #layout: #(#LayoutFrame 0 0.0 -48 1.0 0 1.0 0 1.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   558
	      #horizontalLayout: #fitSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   559
	      #verticalLayout: #centerMax
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   560
	      #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   561
	      #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   562
	      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   563
	     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   564
		#collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   565
		 #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   566
		    #label: 'Cancel'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   567
		    #name: 'Button1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   568
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   569
		    #model: #cancel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   570
		    #extent: #(#Point 253 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   571
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   572
		 #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   573
		    #label: 'Browse'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   574
		    #name: 'Button2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   575
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   576
		    #model: #accept
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   577
		    #isDefault: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   578
		    #actionValue: ''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   579
		    #extent: #(#Point 254 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   580
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   581
		 )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   582
               
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   583
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   584
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   585
	   )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   586
         
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   587
	)
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   588
      )
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   589
!
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   590
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   591
methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   592
    "This resource specification was automatically generated
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   593
     by the UIPainter of ST/X."
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   594
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   595
    "Do not manually edit this!! If it is corrupted,
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   596
     the UIPainter may not be able to read the specification."
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   597
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   598
    "
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   599
     UIPainter new openOnClass:BrowserView andSelector:#methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   600
     BrowserView new openInterface:#methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   601
    "
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   602
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   603
    <resource: #canvas>
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   604
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   605
    ^
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   606
     
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   607
       #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   608
	  #window: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   609
	   #(#WindowSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   610
	      #name: 'Move method to:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   611
	      #layout: #(#LayoutFrame 290 0 207 0 628 0 334 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   612
	      #label: 'Move method to:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   613
	      #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   614
	      #max: #(#Point 1280 1024)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   615
	      #bounds: #(#Rectangle 290 207 629 335)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   616
	      #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   617
	  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   618
	  #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   619
	   #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   620
	      #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   621
	       #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   622
		 #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   623
		    #name: 'Label1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   624
		    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 38 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   625
		    #label: 'Move method to which class:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   626
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   627
		    #adjust: #left
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   628
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   629
		 #(#ComboBoxSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   630
		    #name: 'ComboBox1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   631
		    #layout: #(#LayoutFrame 0 0.0 41 0 0 1.0 66 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   632
		    #model: #className
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   633
		    #comboList: #classList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   634
		    #useIndex: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   635
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   636
		 #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   637
		    #name: 'HorizontalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   638
		    #layout: #(#LayoutFrame 0 0.0 -48 1.0 0 1.0 0 1.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   639
		    #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   640
		     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   641
			#collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   642
			 #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   643
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   644
			      #name: 'Button1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   645
			      #label: 'Cancel'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   646
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   647
			      #model: #cancel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   648
			      #extent: #(#Point 165 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   649
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   650
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   651
			      #name: 'Button2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   652
			      #label: 'Move'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   653
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   654
			      #model: #accept
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   655
			      #isDefault: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   656
			      #extent: #(#Point 165 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   657
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   658
			)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   659
		    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   660
		    #horizontalLayout: #fitSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   661
		    #verticalLayout: #centerMax
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   662
		    #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   663
		    #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   664
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   665
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   666
	  )
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   667
      )
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   668
!
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   669
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   670
repositoryLoadSpec
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   671
    "This resource specification was automatically generated
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   672
     by the UIPainter of ST/X."
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   673
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   674
    "Do not manually edit this!! If it is corrupted,
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   675
     the UIPainter may not be able to read the specification."
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   676
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   677
    "
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   678
     UIPainter new openOnClass:BrowserView andSelector:#repositoryLoadSpec
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   679
     BrowserView new openInterface:#repositoryLoadSpec
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   680
    "
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   681
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   682
    <resource: #canvas>
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   683
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   684
    ^
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   685
     
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   686
       #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   687
	  #window: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   688
	   #(#WindowSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   689
	      #name: 'Load from repository'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   690
	      #layout: #(#LayoutFrame 216 0 173 0 618 0 737 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   691
	      #label: 'Load from repository'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   692
	      #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   693
	      #max: #(#Point 1280 1024)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   694
	      #bounds: #(#Rectangle 216 173 619 738)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   695
	      #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   696
	  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   697
	  #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   698
	   #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   699
	      #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   700
	       #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   701
		 #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   702
		    #name: 'Label1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   703
		    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 20 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   704
		    #label: 'Load class(es) from the repository ...'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   705
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   706
		    #adjust: #left
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   707
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   708
		 #(#VariableVerticalPanelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   709
		    #name: 'VariableVerticalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   710
		    #layout: #(#LayoutFrame 0 0.0 20 0.0 0 1.0 -30 1.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   711
		    #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   712
		     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   713
			#collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   714
			 #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   715
			   #(#ViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   716
			      #name: 'Box1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   717
			      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   718
			       #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   719
				  #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   720
				   #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   721
				     #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   722
					#name: 'Label6'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   723
					#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 20 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   724
					#label: 'Modules'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   725
					#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   726
					#adjust: #right
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   727
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   728
				     #(#SequenceViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   729
					#name: 'moduleSelectionList'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   730
					#layout: #(#LayoutFrame 0 0.0 20 0 0 1.0 0 1.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   731
					#model: #moduleSelection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   732
					#hasHorizontalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   733
					#hasVerticalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   734
					#miniScrollerHorizontal: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   735
					#useIndex: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   736
					#sequenceList: #moduleList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   737
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   738
				  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   739
			      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   740
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   741
			   #(#ViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   742
			      #name: 'Box2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   743
			      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   744
			       #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   745
				  #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   746
				   #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   747
				     #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   748
					#name: 'Label5'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   749
					#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 20 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   750
					#label: 'Packages'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   751
					#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   752
					#adjust: #right
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   753
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   754
				     #(#SequenceViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   755
					#name: 'packageSelectionList'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   756
					#layout: #(#LayoutFrame 0 0.0 20 0 0 1.0 0 1)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   757
					#model: #packageSelection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   758
					#hasHorizontalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   759
					#hasVerticalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   760
					#miniScrollerHorizontal: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   761
					#useIndex: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   762
					#sequenceList: #packageList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   763
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   764
				  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   765
			      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   766
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   767
			   #(#ViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   768
			      #name: 'Box3'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   769
			      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   770
			       #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   771
				  #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   772
				   #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   773
				     #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   774
					#name: 'Label4'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   775
					#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 20 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   776
					#label: 'Containers'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   777
					#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   778
					#adjust: #right
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   779
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   780
				     #(#SequenceViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   781
					#name: 'containerList'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   782
					#layout: #(#LayoutFrame 0 0.0 20 0 0 1.0 0 1)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   783
					#model: #containerSelection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   784
					#hasHorizontalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   785
					#hasVerticalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   786
					#miniScrollerHorizontal: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   787
					#isMultiSelect: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   788
					#useIndex: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   789
					#sequenceList: #containerList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   790
					#doubleClickChannel: #containerDoubleClicked
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   791
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   792
				  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   793
			      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   794
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   795
			)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   796
		    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   797
		    #handles: #(#Any 0.21165 0.539806 1.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   798
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   799
		 #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   800
		    #name: 'HorizontalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   801
		    #layout: #(#LayoutFrame 0 0.0 -35 1 0 1.0 0 1.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   802
		    #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   803
		     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   804
			#collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   805
			 #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   806
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   807
			      #name: 'loadButton'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   808
			      #label: 'Load'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   809
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   810
			      #model: #load
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   811
			      #enableChannel: #loadEnabled
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   812
			      #extent: #(#Point 100 25)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   813
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   814
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   815
			      #name: 'dismissButton'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   816
			      #label: 'Dismiss'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   817
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   818
			      #model: #close
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   819
			      #extent: #(#Point 100 25)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   820
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   821
			)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   822
		    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   823
		    #horizontalLayout: #spreadSpaceMax
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   824
		    #verticalLayout: #center
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   825
		    #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   826
		    #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   827
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   828
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   829
	  )
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   830
      )
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   831
1674
60baa8cba008 load from repository spec. geometry
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   832
    "Modified: / 28.5.1998 / 12:22:58 / cg"
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   833
! !
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   834
2588
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   835
!BrowserView class methodsFor:'utilities'!
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   836
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   837
extractClassAndSelectorFrom:aString into:aBlock
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   838
    "given a string which can be either 'class>>sel' or
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   839
     'class sel', extract className and selector, and call aBlock with
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   840
     the result.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   841
     Useful to open browser on a method as selected in some documentation."
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   842
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   843
    |sel clsName isMeta sep s|
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   844
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   845
    sel := aString.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   846
    sel notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   847
        sel := sel asString withoutSeparators.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   848
        ('*>>*' match:sel) ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   849
            sep := $>
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   850
        ] ifFalse:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   851
            ('* *' match:sel) ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   852
                sep := Character space
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   853
            ]
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   854
        ].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   855
        sep notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   856
            "
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   857
             extract class/sel from selection
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   858
            "
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   859
            s := ReadStream on:sel.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   860
            clsName := s upTo:sep.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   861
            [s peek == sep] whileTrue:[s next].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   862
            sel := s upToEnd.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   863
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   864
            (clsName endsWith:' class') ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   865
                isMeta := true.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   866
                clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)"
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   867
            ] ifFalse:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   868
                isMeta := false
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   869
            ].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   870
        ]
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   871
    ].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   872
    aBlock value:clsName value:sel value:isMeta
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   873
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   874
    "Modified: / 17.6.1996 / 16:52:14 / stefan"
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   875
    "Created: / 6.2.2000 / 00:51:51 / cg"
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   876
    "Modified: / 6.2.2000 / 00:56:43 / cg"
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   877
!
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   878
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   879
extractSelectorFrom:aString
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   880
    "given an arbitrary string, try to extract a useful selector.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   881
     Useful to open browser on a selected code fragment."
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   882
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   883
    |s sel t|
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   884
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   885
    aString isNil ifTrue:[^ nil].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   886
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   887
    s := aString asString string.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   888
    s := s withoutSeparators.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   889
    sel := s.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   890
    sel knownAsSymbol ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   891
        "/ might be already correct ...
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   892
        ^ sel
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   893
    ].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   894
    (sel startsWith:'#') ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   895
        t := Symbol readFrom:sel.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   896
        t knownAsSymbol ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   897
            ^ t
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   898
        ]
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   899
    ].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   900
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   901
    t := Parser selectorInExpression:sel.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   902
    t notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   903
        sel := t
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   904
    ].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   905
    (sel = s or:[sel isNil or:[t == #>>]]) ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   906
        "oops - thats probably not what we want here ..."
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   907
        self extractClassAndSelectorFrom:s into:[:c :s :m |
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   908
            sel := s
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   909
        ]
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   910
    ].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   911
    ^ sel
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   912
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   913
    "
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   914
     self extractSelectorFrom:'at:put:'      
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   915
     self extractSelectorFrom:'#at:put:'                       
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   916
     self extractSelectorFrom:'at:something put:someValue'     
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   917
     self extractSelectorFrom:'self at:something put:someValue'
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   918
     self extractSelectorFrom:'(self at:something put:someValue)' 
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   919
     self extractSelectorFrom:'[self at:something put:someValue] value' 
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   920
     self extractSelectorFrom:'Array>>at:put:' 
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   921
    "
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   922
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   923
    "Created: / 6.2.2000 / 00:49:44 / cg"
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   924
    "Modified: / 6.2.2000 / 00:57:08 / cg"
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   925
! !
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
   926
132
claus
parents: 131
diff changeset
   927
!BrowserView methodsFor:'change & update'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   928
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   929
delayedUpdate:something with:someArgument from:changedObject
273
0fc84937f240 check oldMethod in method-update notification
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   930
    |list selector oldMethod|
93
claus
parents: 92
diff changeset
   931
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   932
    (changedObject == Smalltalk) ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   933
        something == #methodInClassRemoved ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   934
            "/ ignored; I am dependent of individual class update messages
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   935
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   936
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   937
        something == #methodInClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   938
            "/ ignored; I am dependent of individual class update messages
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   939
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   940
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   941
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   942
        self updateNamespaceList.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   943
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   944
        something == #newClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   945
            (currentClass notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   946
            and:[someArgument name = currentClass name
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   947
                 or:[someArgument == currentClass]]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   948
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   949
                 the current class has changed
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   950
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   951
                (aspect == #definition
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   952
                and:[codeView modified not]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   953
                    self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   954
                    self classSelectionChanged.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   955
                ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   956
                    self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   957
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   958
                currentClass wasAutoloaded ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   959
                    self warnLabel:'the selected class has changed'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   960
                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   961
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   962
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   963
            ((someArgument category = currentClassCategory)
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   964
            or:[currentClassCategory notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   965
                and:[currentClassCategory startsWith:$*]]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   966
                self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   967
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   968
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   969
            someArgument category ~= currentClassCategory ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   970
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   971
                 category new ?
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   972
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   973
                (classCategoryListView notNil 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   974
                and:[(list := classCategoryListView list) notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   975
                and:[(list includes:someArgument category) not]])
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   976
                ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   977
                    self updateClassCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   978
                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   979
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   980
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   981
            "/ restart a highlight process, in case some variable
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   982
            "/ is now defined which was not before.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   983
            self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   984
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   985
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   986
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   987
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   988
        something == #classRemove ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   989
            someArgument == currentClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   990
                self warnLabel:'the selected class was removed'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   991
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   992
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   993
            " fall into general update "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   994
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   995
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   996
        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   997
         any other (unknown) change 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   998
         with the Smalltalk dictionary ...
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   999
        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1000
        self updateClassCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1001
        self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1002
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1003
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1004
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1005
    changedObject isBehavior ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1006
        "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1007
        "/ its a class, that has changed
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1008
        "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1009
        fullClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1010
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1011
            "/ full-class browser ...
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1012
            "/ (must check for both class and metaclass changes)
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1013
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1014
            (currentClass == changedObject
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1015
            or:[currentClass class == changedObject]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1016
                self warnLabel:'class was changed - the code shown may be obsolete'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1017
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1018
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1019
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1020
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1021
        (currentClass notNil 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1022
        and:[changedObject name = currentClass name
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1023
             or:[changedObject == currentClass]]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1024
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1025
            "/ its the current class that has changed
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1026
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1027
            ((something == #methodDictionary)
2337
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
  1028
            or:[something == #methodPackage
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1029
            or:[something == #methodTrap
2337
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
  1030
            or:[something == #methodPrivacy]]]) ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1031
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1032
                "/ new feature: changeArg may be an array consisting of
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1033
                "/ the selector and the oldMethod
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1034
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1035
                someArgument isArray ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1036
                    oldMethod := someArgument at:2.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1037
                    selector := someArgument at:1.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1038
                ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1039
                    selector := someArgument
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1040
                ].
2685
ed1e3d861cf5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2684
diff changeset
  1041
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1042
                (selector isSymbol) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1043
                    |changedMethod s1 s2 oldMethodSelection oldMethodCategorySelection|
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1044
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1045
                    "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1046
                     the method with selector was changed or removed
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1047
                    "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1048
                    methodListView notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1049
                        oldMethodSelection := methodListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1050
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1051
                    (something ~~ #methodTrap
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1052
                    and:[something ~~ #methodPrivacy]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1053
                        methodCategoryListView notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1054
                            oldMethodCategorySelection := methodCategoryListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1055
                            self updateMethodCategoryListWithScroll:false.
2684
c4507a0a9517 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
  1056
                            oldMethodCategorySelection size > 0 ifTrue:[
c4507a0a9517 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
  1057
                                codeView modified ifFalse:[
c4507a0a9517 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
  1058
                                    methodCategoryListView selection:oldMethodCategorySelection.
c4507a0a9517 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
  1059
                                ]
c4507a0a9517 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
  1060
                            ]
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1061
                        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1062
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1063
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1064
                    self updateMethodListWithScroll:false keepSelection:true.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  1065
"/                    methodListView notNil ifTrue:[
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  1066
"/                        methodListView setSelection:oldMethodSelection.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  1067
"/                    ].
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  1068
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1069
                    (something == #methodTrap
2337
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
  1070
                    or:[something == #methodPackage
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
  1071
                    or:[something == #methodPrivacy]]) ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1072
                        selector == currentSelector ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1073
                            self refetchMethod.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1074
                        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1075
                        ^ self.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1076
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1077
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1078
                    classMethodListView notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1079
                        oldMethodSelection := classMethodListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1080
                        self updateMethodCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1081
                        classMethodListView selection:oldMethodSelection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1082
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1083
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1084
                    selector == currentSelector ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1085
                        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1086
                         special care here: the currently shown method has been
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1087
                         changed somehow in another browser (or via fileIn)
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1088
                        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1089
                        changedMethod := currentClass compiledMethodAt:currentSelector.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1090
                        changedMethod isNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1091
                            self warnObsoleteCode:'the method shown was removed'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1092
                            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1093
                        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1094
                        "compare the source codes"
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1095
                        currentMethod notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1096
                            s1 := self compressedCodeLinesFor:changedMethod source.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1097
                            s2 := self compressedCodeLinesFor:codeView contents.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1098
                            s1 = s2 ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1099
                                codeModified ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1100
                                    self warnObsoleteCode:'method has changed - your modified code may be obsolete'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1101
                                ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1102
                                    self warnObsoleteCode:'method has changed - the code shown may be obsolete'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1103
                                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1104
                            ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1105
                        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1106
                        ^ self    
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1107
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1108
                    "/ some other method has changed;
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1109
                    "/ restart a highlight process, in case some variable
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1110
                    "/ is now defined which was not before.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1111
                    self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1112
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1113
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1114
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1115
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1116
            something == #comment ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1117
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1118
                 the class has changed its comment; we dont care, except if
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1119
                 currently showing the comment
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1120
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1121
                aspect == #comment ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1122
                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1123
                        self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1124
                        self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1125
                    ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1126
                        self warnObsoleteCode:'the comment has changed - reselect to update'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1127
                    ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1128
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1129
                self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1130
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1131
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1132
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1133
            something == #definition ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1134
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1135
                 the class has changed its definition.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1136
                 Warn, except if showing a method.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1137
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1138
                aspect notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1139
                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1140
                        self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1141
                        self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1142
                    ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1143
                        self warnObsoleteCode:'the classes definition has changed - reselect to update'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1144
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1145
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1146
                    "/ restart a highlight process, in case some variable
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1147
                    "/ is now defined which was not before.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1148
                    self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1149
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1150
                    ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1151
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1152
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1153
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1154
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1155
            "/ if I am not showing code update if unmodified,
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1156
            "/ warn if modified
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1157
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1158
            aspect notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1159
                codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1160
                    self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1161
                    self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1162
                ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1163
                    self warnObsoleteCode:'the classes has changed - reselect to update'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1164
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1165
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1166
            ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1167
        
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1168
            "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1169
             get the class again - in case of a changed class definition,
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1170
             we are otherwise refering to the obsolete old class
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1171
            "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1172
            self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1173
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1174
            self updateMethodCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1175
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1176
            "dont update codeView ...."
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1177
            "self update"
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1178
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1179
            self warnLabel:'the class has changed'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1180
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1181
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1182
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1183
        (currentClass notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1184
        and:[changedObject == currentClass superclass]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1185
            something == #definition ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1186
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1187
                 the superclass has changed its definition.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1188
                 We are only interested, if showing the definition,
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1189
                 and the superclasses name has changed.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1190
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1191
                aspect notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1192
                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1193
                        self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1194
                        self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1195
                    ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1196
                        self warnObsoleteCode:'the classes definition has changed - reselect to update'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1197
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1198
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1199
                    "/ restart a highlight process, in case some variable
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1200
                    "/ is now defined which was not before.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1201
                    self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1202
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1203
                    ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1204
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1205
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1206
        ].
2062
8c72522dd4f2 update if superclass of current changes its name.
Claus Gittinger <cg@exept.de>
parents: 2061
diff changeset
  1207
        
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1208
        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1209
         any other class has changed (but not its organization, since
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1210
         that is caught in the above case).
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1211
         We are not interested in it - except, if showing fullProtocol
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1212
         or hierarchy ...
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1213
        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1214
        currentClassHierarchy notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1215
            fullProtocol ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1216
                (currentClass isSubclassOf:changedObject) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1217
                    self warnLabel:'some superclass has changed - reselect to update'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1218
                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1219
            ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1220
                ((currentClass isSubclassOf:changedObject)
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1221
                or:[changedObject isSubclassOf:currentClass]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1222
                    self warnLabel:'some superclass has changed - reselect to update'.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1223
                ]                
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1224
            ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1225
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1226
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1227
        (currentClassCategory = '* hierarchy *' 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1228
        or:[ currentClassCategory = '* all *' ]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1229
            self updateClassCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1230
            self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1231
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1232
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1233
        (something == #methodDictionary) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1234
            "/ restart a highlight process, in case some method
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1235
            "/ is now implemented which was not before.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1236
            self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1237
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1238
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1239
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1240
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1241
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  1242
    something == #statistics ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1243
        currentMethod notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1244
            changedObject isMethod ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1245
                (changedObject == currentMethod 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1246
                or:[currentMethod isWrapped 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1247
                    and:[currentMethod originalMethod == changedObject]]) 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1248
                ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1249
                    self refetchMethod.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1250
                    "/ just in case, this is a method which is used during
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1251
                    "/ the update ...
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1252
                    changedObject removeDependent:self.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1253
                    self updateMethodListWithScroll:false keepSelection:true.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1254
                    changedObject addDependent:self.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1255
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1256
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1257
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1258
    ]
236
d94505a6f697 release currentMethod when compiling or change notification arrives
Claus Gittinger <cg@exept.de>
parents: 229
diff changeset
  1259
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  1260
    "Created: / 4.1.1997 / 13:54:00 / cg"
1768
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  1261
    "Modified: / 30.7.1998 / 17:33:03 / cg"
1949
d6eb2a4f5e29 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1262
    "Modified: / 27.10.1998 / 12:02:05 / ps"
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1263
!
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1264
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1265
refetchClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1266
    "after a class definition change in another browser,
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1267
     this is sent to update (otherwise, we'd still refer to the obsolete class)"
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1268
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1269
"/    currentClass := Smalltalk at:(currentClass name asSymbol).
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1270
    self changeCurrentClass:(Smalltalk at:(currentClass name asSymbol)).
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1271
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1272
"/    showInstance ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1273
"/        actualClass := currentClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1274
"/    ] ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1275
"/        actualClass := currentClass class
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1276
"/    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1277
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1278
    "Created: / 8.2.1996 / 13:22:27 / cg"
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
  1279
    "Modified: / 17.6.1998 / 16:51:14 / cg"
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1280
!
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1281
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1282
update:something with:someArgument from:changedObject
909
ccbc84af922c oops - dont delay update if occurring during startup;
Claus Gittinger <cg@exept.de>
parents: 908
diff changeset
  1283
    |argList sensor|
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1284
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1285
    (changedObject == ObjectMemory) ifTrue:[
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1286
        (something == #earlyRestart 
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1287
        or:[something == #restarted
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1288
        or:[something == #returnFromSnapshot]]) ifTrue:[
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1289
            "/ those are to be ignored.
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1290
            ^ self
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1291
        ]
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1292
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1293
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1294
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1295
    "/ avoid update/warn after my own changes
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1296
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1297
    lockUpdates == true ifTrue:[
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1298
        ^ self
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1299
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1300
927
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  1301
    "/
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  1302
    "/ quick hack: delayed update fails, if I autoload
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  1303
    "/ LabelAndIcon in the update, and another browser
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  1304
    "/ gets a chance to do an update as well, trying to
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  1305
    "/ access the (temporarily nil) LabelAndIcon.
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1306
    "/ To get that beast out, do it synchronous for now.
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1307
    "/ also do it immediately, if not yet realized (no sensor)
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1308
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1309
    (LabelAndIcon isLoaded not
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1310
    or:[(sensor := self sensor) isNil]) ifTrue:[
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1311
        ^ self delayedUpdate:something with:someArgument from:changedObject
909
ccbc84af922c oops - dont delay update if occurring during startup;
Claus Gittinger <cg@exept.de>
parents: 908
diff changeset
  1312
    ].
ccbc84af922c oops - dont delay update if occurring during startup;
Claus Gittinger <cg@exept.de>
parents: 908
diff changeset
  1313
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1314
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1315
    "/ if such an update is already in the queue, ignore it.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1316
    "/ Otherwise push it as an event, to be handled when I am back
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1317
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1318
    argList := Array with:something 
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1319
                     with:someArgument 
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1320
                     with:changedObject.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1321
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1322
    (sensor 
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1323
        hasEvent:#delayedUpdate:with:from:
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1324
        for:self
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1325
        withArguments:argList) ifTrue:[
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1326
        ^ self
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1327
    ].
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1328
    sensor
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1329
        pushUserEvent:#delayedUpdate:with:from:
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1330
        for:self
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1331
        withArguments:argList
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1332
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1333
    "Modified: 26.3.1997 / 18:29:51 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1334
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1335
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1336
!BrowserView methodsFor:'class category list menu'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1337
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1338
classCategoryClone
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1339
    "open a new SystemBrowser showing the same method as I do"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1340
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1341
    SystemBrowser openInClass:actualClass selector:currentSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1342
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1343
    "Created: 14.9.1995 / 10:55:20 / claus"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1344
    "Modified: 14.9.1995 / 10:59:31 / claus"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1345
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1346
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1347
classCategoryFileOut
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1348
    "create a file 'categoryName.st' consisting of all classes in current category
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1349
     into the current projects defaultDirectory."
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1350
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1351
    self classCategoryFileOutAsk:false
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1352
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1353
    "Modified: 11.10.1997 / 16:47:46 / cg"
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1354
!
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1355
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1356
classCategoryFileOutAs
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1357
    "create a file consisting of all classes in the current category
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1358
     into a file as user-specified."
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1359
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1360
    self classCategoryFileOutAsk:true
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1361
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1362
    "Modified: 11.10.1997 / 16:38:56 / cg"
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1363
    "Created: 11.10.1997 / 16:44:35 / cg"
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1364
!
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1365
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1366
classCategoryFileOutAsk:doAsk
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1367
    "create a file 'categoryName' consisting of all classes in current category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1368
1510
ec5dd071b570 when filing out a class category, place all class-init expressions
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
  1369
    |aStream fileName classesToInitialize|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1370
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1371
    self checkClassCategorySelected ifFalse:[^ self].
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  1372
    (currentClassCategory startsWith:$*) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1373
	self warn:(resources string:'try a real category').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1374
	^ self
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1375
    ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1376
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1377
    fileName := currentClassCategory asString , '.st'.
1316
3fefcc2e9b16 mostly filename changes
Claus Gittinger <cg@exept.de>
parents: 1313
diff changeset
  1378
    fileName replaceAll:Character space with:$_.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1379
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1380
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1381
	|saveName fileBox dir|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1382
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1383
	doAsk ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1384
	    fileBox := FileSelectionBox
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1385
			    title:(resources string:'fileOut %1 as:' with:currentClassCategory)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1386
			    okText:(resources string:'fileOut')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1387
			    abortText:(resources string:'cancel')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1388
			    action:[:fileName |saveName := fileName.].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1389
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1390
	    fileBox initialText:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1391
	    dir := FileSelectionBox lastFileSelectionDirectory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1392
	    dir isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1393
		"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1394
		 this test allows a smalltalk to be built without Projects/ChangeSets
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1395
		"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1396
		Project notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1397
		    dir := Project currentProjectDirectory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1398
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1399
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1400
	    dir notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1401
		fileBox directory:dir.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1402
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1403
	    fileBox showAtPointer.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1404
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1405
	    fileBox destroy.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1406
	    fileBox := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1407
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1408
	    saveName isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1409
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1410
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1411
	    saveName isEmpty ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1412
		self warn:'bad name given'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1413
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1414
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1415
	    FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1416
	    fileName := saveName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1417
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1418
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1419
	     this test allows a smalltalk to be built without Projects/ChangeSets
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1420
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1421
	    Project notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1422
		fileName := Project currentProjectDirectory asFilename constructString: fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1423
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1424
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1425
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1426
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1427
	 if file exists, save original in a .sav file
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1428
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1429
	fileName asFilename exists ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1430
	    self busyLabel:'saving existing %1' with:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1431
	    fileName asFilename copyTo:(fileName , '.sav')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1432
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1433
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1434
	aStream := FileStream newFileNamed:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1435
	aStream isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1436
	    self warn:'cannot create: %1' with:fileName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1437
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1438
	    self busyLabel:'writing: %1' with:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1439
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1440
	    classesToInitialize := OrderedCollection new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1441
	    self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1442
		aClass isPrivate ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1443
		    (self listOfNamespaces includesIdentical:aClass nameSpace)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1444
		    ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1445
			self busyLabel:'writing: %1' with:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1446
			aClass isLoaded ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1447
			    self warn:'cannot fileOut unloaded class: %1\\skipped.' with:aClass name asText allBold.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1448
			] ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1449
			    aClass fileOutOn:aStream withTimeStamp:true withInitialize:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1450
			    (aClass class implements:#initialize) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1451
				classesToInitialize add:aClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1452
			    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1453
			    aStream cr.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1454
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1455
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1456
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1457
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1458
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1459
	    "/ all class-inits at the end
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1460
	    "/ (this makes certain, that all classes have been loaded
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1461
	    "/  before possibly used/needed in an initializer
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1462
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1463
	    classesToInitialize do:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1464
		aClass printClassNameOn:aStream. aStream nextPutAll:' initialize'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1465
		aStream nextPutChunkSeparator.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1466
		aStream cr
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1467
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1468
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1469
	    aStream close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1470
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1471
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1472
    self normalLabel.
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1473
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  1474
    "Created: / 11.10.1997 / 16:38:29 / cg"
1826
a454566e3b55 fixed warning when filing out unloaded class in fileOut-each.
Claus Gittinger <cg@exept.de>
parents: 1816
diff changeset
  1475
    "Modified: / 12.8.1998 / 11:04:11 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1476
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1477
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1478
classCategoryFileOutBinaryEach
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1479
    "fileOut each class in the current category as binary bytecode."
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1480
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1481
    |mode|
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1482
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  1483
    (currentClassCategory startsWith:$*) ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1484
        self warn:(resources string:'try a real category').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1485
        ^ self
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1486
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1487
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1488
    mode := Dialog choose:(resources string:'save including sources ?')
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1489
                   labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1490
                   values:#(nil #discard #reference #keep)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1491
                   default:#keep.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1492
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1493
    mode isNil ifTrue:[^ self].
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1494
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1495
    self withBusyCursorDo:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1496
        self allClassesInCategory:currentClassCategory do:[:aClass |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1497
            aClass isPrivate ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1498
                (self listOfNamespaces includesIdentical:aClass nameSpace)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1499
                ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1500
                    self busyLabel:'saving binary of: %1' with:aClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1501
                    Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1502
                        self warn:'cannot create: %1' with:ex parameter.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1503
                        self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1504
                        ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1505
                    ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1506
                        aClass binaryFileOutWithSourceMode:mode.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1507
                    ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1508
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1509
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1510
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1511
        self normalLabel.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1512
    ]
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1513
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  1514
    "Created: / 25.1.1996 / 17:27:45 / cg"
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  1515
    "Modified: / 5.3.1998 / 02:45:30 / cg"
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1516
!
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1517
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1518
classCategoryFileOutEach
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1519
    self classCategoryFileOutEachAsk:false.
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1520
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1521
    "Modified: / 7.8.1998 / 17:11:25 / cg"
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1522
!
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1523
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1524
classCategoryFileOutEachAsk:doAsk
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1525
    |fileBox dir dirName|
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1526
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  1527
    (currentClassCategory startsWith:$*) ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1528
        self warn:(resources string:'try a real category').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1529
        ^ self
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1530
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1531
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1532
    doAsk ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1533
        fileBox := FileSelectionBox
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1534
                        title:(resources string:'fileOut %1 in:' with:currentClassCategory)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1535
                        okText:(resources string:'fileOut')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1536
                        abortText:(resources string:'cancel')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1537
                        action:[:fileName |dirName := fileName.].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1538
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1539
        dir := FileSelectionBox lastFileSelectionDirectory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1540
        dir isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1541
            "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1542
             this test allows a smalltalk to be built without Projects/ChangeSets
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1543
            "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1544
            Project notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1545
                dir := Project currentProjectDirectory
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1546
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1547
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1548
        dir notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1549
            fileBox directory:dir.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1550
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1551
        fileBox selectingDirectory:true.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1552
        fileBox showAtPointer.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1553
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1554
        fileBox destroy.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1555
        fileBox := nil.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1556
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1557
        dirName isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1558
            ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1559
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1560
        FileSelectionBox lastFileSelectionDirectory:dirName.
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1561
    ] ifFalse:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1562
        "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1563
         this test allows a smalltalk to be built without Projects/ChangeSets
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1564
        "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1565
        Project notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1566
            dirName := Project currentProjectDirectory asFilename.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1567
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1568
            dirName := Filename currentDirectory
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1569
        ]
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1570
    ].
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1571
    self withBusyCursorDo:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1572
        self allClassesInCategory:currentClassCategory do:[:aClass |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1573
            |fn|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1574
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1575
            aClass isPrivate ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1576
                (self listOfNamespaces includesIdentical:aClass nameSpace)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1577
                ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1578
                    self busyLabel:'saving: %1' with:aClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1579
                    Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1580
                        self warn:'cannot fileOut: %1\(%2)\\skipped.' with:(aClass name asText allBold) with:ex errorString.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1581
                        self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1582
                        ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1583
                    ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1584
                        fn := (Smalltalk fileNameForClass:aClass) , '.st'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1585
                        aClass fileOutAs:(dirName asFilename constructString:fn).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1586
                    ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1587
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1588
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1589
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1590
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1591
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1592
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1593
    "Created: / 7.8.1998 / 17:10:59 / cg"
1826
a454566e3b55 fixed warning when filing out unloaded class in fileOut-each.
Claus Gittinger <cg@exept.de>
parents: 1816
diff changeset
  1594
    "Modified: / 12.8.1998 / 11:13:26 / cg"
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1595
!
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1596
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1597
classCategoryFileOutEachIn
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1598
    self classCategoryFileOutEachAsk:true.
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1599
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1600
    "Created: / 7.8.1998 / 17:20:01 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1601
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1602
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1603
classCategoryFindClass
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1604
    "find a class - and switch by default"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1605
599
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1606
    self classCategoryFindClassOpen:false
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1607
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1608
    "Modified: 15.1.1997 / 22:55:20 / cg"
599
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1609
!
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1610
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1611
classCategoryFindClassOpen:doOpen
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1612
    "common code for both opening a new browser on a class and
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1613
     to search for a class in this browser"
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1614
2050
5ef6404d6172 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2048
diff changeset
  1615
    <resource: #style (#'dialogBox.okAtLeft')>
5ef6404d6172 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2048
diff changeset
  1616
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1617
    |box openButton title open okText okText2 className brwsr|
599
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1618
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1619
    open := doOpen.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1620
    open ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1621
        title := 'class to browse (Tab to complete or use matchPattern):'.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1622
        okText := 'open'.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1623
        okText2 := 'find here'.
599
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1624
    ] ifFalse:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1625
        title := 'class to find (Tab to complete or use matchPattern):'.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1626
        okText := 'find'.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1627
        okText2 := 'open new'.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1628
    ].
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1629
    box := self 
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1630
                enterBoxForCodeSelectionTitle:title 
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1631
                withList:(ClassHistory collect: [:clsName| clsName upTo: $ ])
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1632
                okText:okText.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1633
    box label:(resources string:'browse or search class').
2047
bb2070a26bd2 care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents: 2036
diff changeset
  1634
    openButton := Button label:(resources string:okText2).
2050
5ef6404d6172 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2048
diff changeset
  1635
    (DialogBox styleSheet at:'dialogBox.okAtLeft' default:false) ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1636
        box addButton:openButton before:(box okButton).
2047
bb2070a26bd2 care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents: 2036
diff changeset
  1637
    ] ifFalse:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1638
        box addButton:openButton after:(box okButton).
2047
bb2070a26bd2 care for styleSheets right-to-left button order.
Claus Gittinger <cg@exept.de>
parents: 2036
diff changeset
  1639
    ].
599
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1640
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1641
    openButton action:[
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1642
       open := open not.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1643
       box doAccept.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1644
       box okPressed.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1645
    ].
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1646
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1647
    box entryCompletionBlock:[:contents |
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1648
        |s what m|
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1649
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1650
        s := contents withoutSpaces.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1651
        what := Smalltalk classnameCompletion:s.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1652
        box contents:what first.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1653
        (what at:2) size ~~ 1 ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1654
            self beep
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1655
        ]
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1656
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1657
    box action:[:aString | className := aString].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1658
    box showAtPointer.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1659
1550
a1c0d6cb1954 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1543
diff changeset
  1660
    className notNil ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1661
        open ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1662
            brwsr := SystemBrowser open.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1663
            "/ brwsr topView waitUntilVisible.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1664
        ] ifFalse:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1665
            brwsr := self
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1666
        ].
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1667
        brwsr switchToClassNameMatching:className.
1550
a1c0d6cb1954 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1543
diff changeset
  1668
    ]
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1669
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1670
    "Created: / 1.6.1996 / 16:03:15 / cg"
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  1671
    "Modified: / 7.8.1998 / 18:06:44 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1672
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1673
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1674
classCategoryFindMethod
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1675
    |box restart matchBlock|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1676
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1677
    box := self 
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1678
                listBoxForCodeSelectionTitle:'selector to find:\\(Tab for completion or use matchPattern)' withCRs 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1679
                okText:'find'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1680
    box label:(resources string:'find method').
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1681
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1682
    matchBlock := [ |s l|
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1683
                        s := box contents.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1684
                        s includesMatchCharacters ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1685
                            l := Set new.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1686
                            Smalltalk allClassesDo:[:cls |
2654
0c16243d7958 use #allSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 2652
diff changeset
  1687
                                cls allSelectorsAndMethodsDo:[:sel :mthd | |info|
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1688
                                    (s match:sel) ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1689
                                        l add:sel.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1690
                                    ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1691
                                ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1692
                            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1693
                            box list:(l asOrderedCollection sort).
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1694
                            false.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1695
                        ] ifFalse:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1696
                            true
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1697
                        ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1698
                      ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1699
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1700
    box entryCompletionBlock:[:contents |
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1701
        |s what m longest matching|
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1702
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1703
        box topView withWaitCursorDo:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1704
            s := contents withoutSpaces.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1705
            s includesMatchCharacters ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1706
                matchBlock value
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1707
            ] ifFalse:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1708
                what := Smalltalk selectorCompletion:s.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1709
                longest := what first.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1710
                matching := what last.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1711
                box list:matching.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1712
                box contents:longest.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1713
                matching size ~~ 1 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1714
                    self beep
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1715
                ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1716
            ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1717
        ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1718
    ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1719
    box acceptCheck:matchBlock.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1720
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1721
    [:restart |
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1722
        box action:[:aString | 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1723
                        aString includesMatchCharacters ifFalse:[
2690
b791d50868d6 findMethod fixed
Claus Gittinger <cg@exept.de>
parents: 2687
diff changeset
  1724
                            self switchToAnyMethod:aString string.
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1725
                        ] ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1726
                            restart value
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1727
                        ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1728
                    ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1729
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1730
        box showAtPointer.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1731
    ] valueWithRestart
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1732
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1733
    "Modified: / 25.1.2000 / 21:51:59 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1734
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1735
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1736
classCategoryMenu
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1737
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1738
    <resource: #keyboard ( #Find #Cmdn) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  1739
    <resource: #programMenu >
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1740
2610
cda4830c40a6 checkin from browser
ca
parents: 2605
diff changeset
  1741
    |specialMenu m items labels selectors shorties subMenu|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1742
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1743
    currentClassCategory notNil ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1744
        items :=  #(
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1745
                    ('fileOut each binary...'    classCategoryFileOutBinaryEach      )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1746
                    ('-'                         nil                                 )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1747
                    ('repository history...'     classCategoryRepositoryHistory      )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1748
                    ('validate class revisions'  classCategoryValidateClassRevisions )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1749
                    ('-'                         nil                                 )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1750
                    ('checkin each...'           classCategoryCheckinEach            )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1751
                    ('-'                         nil                                 )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1752
                    ('load from repository...'   classCategoryLoadFromRepository     )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1753
                   ).
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1754
    ] ifFalse:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1755
        items :=  #(
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1756
                    ('repository history...'    classCategoryRepositoryHistory )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1757
                    ('-'                         nil                            )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1758
                    ('load from repository...'  classCategoryLoadFromRepository)
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1759
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1760
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1761
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1762
    specialMenu := PopUpMenu 
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1763
                        itemList:items
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1764
                        resources:resources.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1765
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1766
    (Smalltalk sourceCodeManager isNil) ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1767
        specialMenu disableAll:#(classCategoryRepositoryHistory  
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1768
                                 classCategoryCheckinEach
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1769
                                 classCategoryValidateClassRevisions
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1770
                                 classCategoryLoadFromRepository
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1771
                                ).
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
  1772
    ].
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1773
    (currentClassCategory = '* hierarchy *'
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1774
    or:[currentClassCategory = '* obsolete *']) ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1775
        specialMenu disableAll:#(classCategoryFileOutBinaryEach
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1776
                                 classCategoryCheckinEach
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1777
                                 classCategoryValidateClassRevisions
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1778
                                ).
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1779
    ].
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
  1780
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1781
    device ctrlDown ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1782
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1783
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1784
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1785
    currentClassCategory isNil ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1786
        items := #(
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1787
"/                    ('namespace...'           namespaceDialog               )
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  1788
"/                    ('-'                       nil                           )
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  1789
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1790
                    ('clone'                   classCategoryClone            )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1791
                    ('open for class...'       classCategoryOpenInClass      )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1792
                    ('spawn full class'        classCategorySpawnFullClass   )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1793
                    ('-'                       nil                           )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1794
                    ('update'                  classCategoryUpdate           )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1795
                    ('find class...'           classCategoryFindClass      #Find )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1796
                    ('find method...'          classCategoryFindMethod       )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1797
                    ('visited history'         classHistoryMenu              )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1798
                    ('changed history'         changeHistoryMenu             )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1799
                    ('-'                       nil                           )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1800
                    ('new class category...'  classCategoryNewCategory    #Cmdn )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1801
                    ('='                       nil                           )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1802
                    ('others'                  otherMenu                   #Ctrl )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1803
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1804
    ] ifFalse:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1805
        items := #(
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1806
                    ('fileOut'                 classCategoryFileOut            )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1807
                    ('fileOut as...'           classCategoryFileOutAs          )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1808
                    ('fileOut each'            classCategoryFileOutEach        )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1809
                    ('fileOut each in...'      classCategoryFileOutEachIn      )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1810
                    ('printOut'                classCategoryPrintOut           )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1811
                    ('printOut protocol'       classCategoryPrintOutProtocol   )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1812
                    ('-'                       nil                             )
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1813
"/                    ('namespace...'           namespaceDialog                 )
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  1814
"/                    ('-'                       nil                             )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1815
                    ('clone'                   classCategoryClone            Cmdc )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1816
                    ('open for class...'       classCategoryOpenInClass      Cmdo )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1817
                    ('SPAWN_CATEGORY'          classCategorySpawn              )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1818
                    ('spawn full class'        classCategorySpawnFullClass     )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1819
                    ('-'                       nil                             )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1820
                    ('update'                  classCategoryUpdate             )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1821
                    ('find class...'           classCategoryFindClass        Find )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1822
                    ('find method...'          classCategoryFindMethod         )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1823
                    ('visited history'         classHistoryMenu                )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1824
                    ('changed history'         changeHistoryMenu               )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1825
                    ('-'                       nil                             )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1826
                    ('new class category...'   classCategoryNewCategory      Cmdn )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1827
                    ('rename...'               classCategoryRename             )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1828
                    ('remove...'               classCategoryRemove             )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1829
                    ('='                       nil                             )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1830
                    ('others'                  otherMenu                     Ctrl )
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1831
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1832
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1833
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1834
    m := PopUpMenu 
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1835
                itemList:items
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1836
                resources:resources.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1837
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1838
    m subMenuAt:#otherMenu put:specialMenu.
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  1839
    m subMenuAt:#classHistoryMenu put:self classHistoryMenu.
2610
cda4830c40a6 checkin from browser
ca
parents: 2605
diff changeset
  1840
    ((ChangeSet current size == 0) or:[(subMenu := self changeHistoryMenu) isNil]) ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1841
        m disable:#changeHistoryMenu
2602
acb63d8895b9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2600
diff changeset
  1842
    ] ifFalse:[
2610
cda4830c40a6 checkin from browser
ca
parents: 2605
diff changeset
  1843
        m subMenuAt:#changeHistoryMenu put:subMenu.
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1844
    ].
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1845
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1846
    ((currentClassCategory = '* hierarchy *') 
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1847
    or:[currentClassCategory = '* obsolete *']) ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1848
        m disableAll:#(classCategoryFileOut classCategoryFileOutAs classCategoryFileOutEach
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1849
                       classCategoryFileOutEachIn
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1850
                       classCategoryPrintOut classCategoryPrintOutProtocol      
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1851
                       classCategoryRename classCategoryRemove)
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1852
    ].
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1853
    (currentClassCategory = '* obsolete *') ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  1854
        m disableAll:#(classCategorySpawn classCategorySpawnFullClass)
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1855
    ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1856
    ^ m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1857
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  1858
    "Created: / 14.9.1995 / 10:50:17 / claus"
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  1859
    "Modified: / 16.1.1998 / 17:16:28 / stefan"
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  1860
    "Modified: / 7.8.1998 / 18:39:46 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1861
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1862
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1863
classCategoryNewCategory
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1864
    |box|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1865
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1866
    box := self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1867
		enterBoxTitle:'name of new class category:' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1868
		okText:'create'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1869
		label:'create category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1870
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1871
    box action:[:aString |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1872
	|categories|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1873
	categories := classCategoryListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1874
	(categories includes:aString) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1875
	    categories add:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1876
	    categories sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1877
	    classCategoryListView setContents:categories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1878
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1879
	currentClassCategory := aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1880
	classCategoryListView setSelectElement:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1881
	self changeCurrentClass:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1882
	actualClass := acceptClass := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1883
	self classCategorySelectionChanged
79
d78f92a07d5d *** empty log message ***
claus
parents: 74
diff changeset
  1884
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1885
    box showAtPointer
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1886
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1887
    "Modified: / 19.8.1996 / 18:25:41 / stefan"
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1888
    "Modified: / 10.4.1998 / 12:25:29 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1889
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1890
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  1891
classCategoryOpenInClass
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1892
    "find a class - and open a browser (by default)"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1893
599
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1894
    self classCategoryFindClassOpen:true
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
  1895
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1896
    "Modified: 15.1.1997 / 22:55:32 / cg"
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  1897
!
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  1898
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1899
classCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1900
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1901
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1902
    self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1903
	(self listOfNamespaces includesIdentical:aClass nameSpace)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1904
	ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1905
	    printStream := Printer new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1906
	    aClass printOutOn:printStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1907
	    printStream close
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1908
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1909
    ]
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1910
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1911
    "Modified: 16.1.1997 / 20:22:23 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1912
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1913
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1914
classCategoryPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1915
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1916
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1917
    Smalltalk allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1918
	(self listOfNamespaces includesIdentical:aClass nameSpace)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1919
	ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1920
	    printStream := Printer new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1921
	    aClass printOutProtocolOn:printStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1922
	    printStream close
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1923
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1924
    ]
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1925
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1926
    "Modified: 16.1.1997 / 20:22:12 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1927
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1928
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1929
classCategoryRemove
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1930
    "remove all classes in current category"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1931
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1932
    |count overallCount t classesToRemove subclassesRemoved box t2|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1933
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1934
    self checkClassCategorySelected ifFalse:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1935
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1936
    classesToRemove := IdentitySet new.
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1937
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1938
    self allClassesInSelectedNamespacesDo:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1939
	aClass category = currentClassCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1940
	    classesToRemove add:aClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1941
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1942
    ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1943
    subclassesRemoved := IdentitySet new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1944
    classesToRemove do:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1945
	aClass allSubclassesDo:[:aSubclass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1946
	    (classesToRemove includes:aSubclass) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1947
		(subclassesRemoved includes:aSubclass) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1948
		    subclassesRemoved add:aSubclass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1949
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1950
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1951
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1952
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1953
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1954
    count := overallCount := classesToRemove size.
1946
d942281c3222 added 'yes-to-all' in multi-remove-category confirmation dialog.
Claus Gittinger <cg@exept.de>
parents: 1936
diff changeset
  1955
    t := resources 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1956
	    string:'remove all classes in ''%1'' ?' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1957
	    with:currentClassCategory asText allBold.
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1958
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1959
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1960
       count == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1961
	   t2 := '(with %1 class)'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1962
       ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1963
	   t2 := '(with %1 classes)'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1964
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1965
       t := t , '\' , (resources string:t2 with:count printString)
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1966
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1967
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1968
    count := subclassesRemoved size.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1969
    overallCount := overallCount + count.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1970
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1971
       count == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1972
	   t2 := '(and %1 subclass)'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1973
       ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1974
	   t2 := '(and %1 subclasses)'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1975
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1976
       t := t , '\' , (resources string:t2 with:count printString)
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1977
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1978
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1979
    t := t withCRs.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1980
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1981
    box := YesNoBox 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1982
	       title:t
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1983
	       yesText:(resources at:'remove')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1984
	       noText:(resources at:'cancel').
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1985
    box label:(resources at:'remove category').
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1986
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1987
    overallCount ~~ 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1988
	"/ should we disable the returnDefault here ?
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1989
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1990
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1991
    box confirm ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1992
	"after querying user - do really remove classes in list1 and list2"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1993
	|keep idx oldPosition doRemoveThis yesToAll|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1994
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1995
	yesToAll := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1996
	keep := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1997
	(subclassesRemoved asOrderedCollection , classesToRemove asOrderedCollection) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1998
	do:[:aClassToRemove |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1999
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2000
	    doRemoveThis := CheckForInstancesWhenRemovingClasses not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2001
			    or:[yesToAll
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2002
			    or:[aClassToRemove hasInstances not]].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2003
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2004
	    doRemoveThis ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2005
		doRemoveThis := Dialog
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2006
			    confirmWithCancel:(resources string:'%1 has instances - remove anyway ?' with:aClassToRemove name asText allBold) withCRs
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2007
			    labels:#('cancel' 'no' 'remove all' 'remove')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2008
			    values:#(nil false #removeAll true) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2009
			    default:4.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2010
		doRemoveThis isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2011
		    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2012
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2013
		doRemoveThis == #removeAll ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2014
		    doRemoveThis := yesToAll := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2015
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2016
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2017
	    doRemoveThis ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2018
		aClassToRemove removeFromSystem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2019
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2020
		keep := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2021
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2022
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2023
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2024
	"/ self updateClassCategoryList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2025
	self updateClassCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2026
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2027
	(classCategoryListView list includes:currentClassCategory) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2028
	    currentClassCategory := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2029
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2030
	self classCategorySelectionChanged.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2031
        
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2032
	self changeCurrentClass:nil.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2033
"/        keep ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2034
"/            idx := classCategoryListView list indexOf:currentClassCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2035
"/            currentClassCategory := nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2036
"/            idx ~= 0 ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2037
"/                classCategoryListView removeIndex:idx.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2038
"/            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2039
"/        ].
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  2040
    ].
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  2041
    box destroy
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
  2042
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2043
    "Modified: / 19.8.1996 / 23:22:35 / stefan"
1946
d942281c3222 added 'yes-to-all' in multi-remove-category confirmation dialog.
Claus Gittinger <cg@exept.de>
parents: 1936
diff changeset
  2044
    "Modified: / 21.10.1998 / 17:18:46 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2045
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2046
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2047
classCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2048
    "launch an enterBox to rename current class category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2049
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2050
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2051
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2052
    self checkClassCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2053
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2054
    box := self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2055
		enterBoxTitle:(resources 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2056
				string:'rename category ''%1'' to:' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2057
				  with:currentClassCategory asText allBold) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2058
		okText:'rename'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2059
		label:'rename category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2060
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2061
    box initialText:currentClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2062
    box action:[:aString | self renameCurrentClassCategoryTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2063
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2064
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  2065
    "Modified: / 7.8.1998 / 17:41:18 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2066
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2067
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2068
classCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2069
    "create a new SystemBrowser browsing current classCategory"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2070
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2071
    currentClassCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2072
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2073
	    SystemBrowser browseClassCategory:currentClassCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2074
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2075
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2076
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2077
    "Modified: 18.8.1997 / 15:42:58 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2078
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2079
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2080
classCategorySpawnFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2081
    "create a new SystemBrowser browsing full class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2082
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2083
    |newBrowser|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2084
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2085
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2086
	newBrowser := SystemBrowser browseFullClasses
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2087
" "
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2088
	.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2089
	currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2090
	    newBrowser switchToClassNamed:(currentClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2091
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2092
" "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2093
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2094
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2095
    "Modified: 18.8.1997 / 15:43:01 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2096
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2097
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2098
classCategoryUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2099
    "update class category list and dependants"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2100
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2101
    |oldClass oldClassName oldMethodCategory newClass|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2102
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2103
    classCategoryListView notNil ifTrue:[
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2104
        self setListOfNamespaces.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2105
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2106
        (oldClass := currentClass) notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2107
            oldClassName := currentClass name.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2108
            (oldClassName endsWith:'-old') ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2109
                oldClassName := oldClassName copyWithoutLast:4 "copyTo:(oldClassName size - 4)"
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2110
            ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2111
        ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2112
        oldMethodCategory := currentMethodCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2113
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2114
        classCategoryListView setContents:(self listOfAllClassCategories).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2115
        currentClassCategory notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2116
            classCategoryListView setSelectElement:currentClassCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2117
            self classCategorySelectionChanged.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2118
            oldClassName notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2119
                classListView setSelectElement:oldClassName.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2120
                oldClass isJavaClass ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2121
                    newClass := (Java at:oldClassName).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2122
                ] ifFalse:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2123
                    newClass := (Smalltalk at:oldClassName asSymbol).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2124
                ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2125
                newClass isNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2126
                    self warn:'oops - ' , oldClassName , ' is gone.'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2127
                ] ifFalse:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2128
                    self changeCurrentClass:newClass.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2129
                    self classSelectionChanged.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2130
                    oldMethodCategory notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2131
                        methodCategoryListView setSelectElement:oldMethodCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2132
                        currentMethodCategory := oldMethodCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2133
                        self methodCategorySelectionChanged
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2134
                    ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2135
                ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2136
            ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2137
        ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2138
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2139
        self updateNamespaceList
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2140
    ]
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2141
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2142
    "Modified: / 10.4.1998 / 12:25:38 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2143
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2144
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2145
!BrowserView methodsFor:'class category source administration'!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2146
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2147
classCategoryCheckinEach
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2148
    (self checkSelectionChangeAllowedWithCompare:false) ifFalse:[^ self].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2149
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2150
    self withBusyCursorDo:[
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2151
        |logMessage classes allSelected|
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2152
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2153
        allSelected := (currentClassCategory = '* all *'
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2154
                        or:[currentClassCategory = '* hierarchy *']).
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2155
2529
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
  2156
        logMessage := SourceCodeManagerUtilities 
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
  2157
                        getLogMessageFor:(resources
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2158
                                             string:(allSelected ifTrue:['all classes'] ifFalse:[' any in classCategory ''%1'''])
2529
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
  2159
                                             with:currentClassCategory).
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2160
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2161
        logMessage notNil ifTrue:[
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2162
            allSelected ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2163
                classes := self allClasses
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2164
            ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2165
                classes := self allClassesInCategory:currentClassCategory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2166
            ].
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2167
            classes := classes select:[:eachClass | eachClass isPrivate not].
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2168
self halt.
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2169
            SourceCodeManagerUtilities checkinClasses:classes withLog:logMessage.
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2170
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2171
        self normalLabel.
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2172
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2173
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2174
    "Created: 23.11.1995 / 11:41:38 / cg"
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  2175
    "Modified: 15.6.1996 / 00:25:58 / stefan"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2176
    "Modified: 18.8.1997 / 15:42:21 / cg"
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2177
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2178
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2179
classCategoryLoadFromRepository
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2180
    "mini-browser into the repository, showing modules & packages.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2181
     Allows load of a containers contents"
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2182
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2183
    |bindings m
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2184
     moduleList packageList containerList fileNameList
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2185
     moduleSelection packageSelection containerSelection
1671
cc16fd031dcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2186
     loadEnabled loadAction dialog|
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2187
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2188
    loadAction := [:dummy |
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2189
            |aStream module package container list packageID|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2190
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2191
            module := moduleSelection value.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2192
            package := packageSelection value.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2193
            list := containerSelection value.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2194
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2195
            packageID := module , ':' , package.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2196
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2197
            dialog window withWaitCursorDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2198
                list do:[:container |
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2199
                    "/
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2200
                    "/ special: if its a 'loadAll' file,
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2201
                    "/ or a project-file, extract all from the repository
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2202
                    "/ and perform some special load action.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2203
                    "/
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2204
                    ((container = 'loadAll') 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2205
                    or:[container asLowercase asFilename hasSuffix:'prj']) ifTrue:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2206
                        SourceCodeManager
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2207
                            checkoutModule:module 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2208
                            package:package 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2209
                            andDo:[:tempDir |
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2210
                                |oldPath wasLazy|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2211
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2212
                                self activityNotification:'loading ' , container , ' ...'.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2213
                                (container = 'loadAll') ifTrue:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2214
                                    [
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2215
                                        Class withoutUpdatingChangesDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2216
                                            oldPath := Smalltalk systemPath.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2217
                                            Smalltalk systemPath:(oldPath copy addFirst:tempDir pathName; yourself).
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2218
                                            wasLazy := Compiler compileLazy:false.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2219
                                            Class packageQuerySignal answer:packageID do:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2220
                                                (tempDir construct:container) fileIn.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2221
                                            ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2222
                                        ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2223
                                    ] valueNowOrOnUnwindDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2224
                                        Compiler compileLazy:wasLazy.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2225
                                        Smalltalk systemPath:oldPath.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2226
                                    ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2227
                                ] ifFalse:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2228
                                    self halt:'unimplemented: project-loading'.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2229
                                ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2230
                            ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2231
                    ] ifFalse:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2232
                        aStream := SourceCodeManager 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2233
                                streamForClass:nil 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2234
                                fileName:container 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2235
                                revision:#newest
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2236
                                directory:package
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2237
                                module:module
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2238
                                cache:false.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2239
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2240
                        self activityNotification:'loading ' , container , ' ...'.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2241
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2242
                        aStream isNil ifTrue:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2243
                            self warn:'could not load ' , container , ' from repository'.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2244
                        ] ifFalse:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2245
                            self busyLabel:'loading from %1' with:(module , '/' , package , '/' , container).
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2246
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2247
                            Class withoutUpdatingChangesDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2248
                                [
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2249
                                    Class packageQuerySignal answer:packageID do:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2250
                                        aStream fileIn.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2251
                                    ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2252
                                ] valueNowOrOnUnwindDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2253
                                    aStream close.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2254
                                    self normalLabel.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2255
                                    Smalltalk changed.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2256
                                ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2257
                            ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2258
                        ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2259
                    ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2260
                ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2261
                self activityNotification:nil
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2262
            ]
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2263
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2264
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2265
    bindings := IdentityDictionary new.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2266
    bindings at:#moduleSelection put:(moduleSelection := nil asValue).
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2267
    bindings at:#packageSelection put:(packageSelection := nil asValue).
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2268
    bindings at:#containerSelection put:(containerSelection := #() asValue).
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2269
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2270
    bindings at:#moduleList put:(moduleList := nil asValue).
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2271
    bindings at:#packageList put:(packageList := nil asValue).
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2272
    bindings at:#containerList put:(containerList := nil asValue).
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2273
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2274
    bindings at:#loadEnabled put:(loadEnabled := false asValue).
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2275
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2276
    bindings at:#load                   put:[loadAction value:nil].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2277
    bindings at:#containerDoubleClicked put:loadAction.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2278
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2279
    packageSelection 
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2280
        onChangeEvaluate:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2281
             |list|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2282
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2283
             dialog window withWaitCursorDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2284
                 list := SourceCodeManager 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2285
                            getExistingContainersInModule:(moduleSelection value)
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2286
                            package:(packageSelection value).
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2287
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2288
                 list := list select:[:nm | |lcName f|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2289
                                            lcName := nm asLowercase.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2290
                                            ((f := lcName asFilename) hasSuffix:'st')
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2291
                                            or:[false "/ (f hasSuffix:'prj')
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2292
                                            or:[lcName = 'loadall']]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2293
                                     ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2294
                 fileNameList := list.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2295
                 list := list collect:[:nm | |lcName f|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2296
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2297
                                             lcName := nm asLowercase.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2298
                                             ((f := lcName asFilename) hasSuffix:'st') ifTrue:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2299
                                                nm asFilename withoutSuffix name
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2300
                                             ] ifFalse:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2301
                                                nm
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2302
                                             ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2303
                                      ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2304
                 containerList value:list.
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2305
"/
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2306
"/ do not auto-select the first item
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2307
"/                 list notEmpty ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2308
"/                    containerSelection value:(Array with:list first)
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2309
"/                 ]
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2310
             ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2311
             self activityNotification:nil
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2312
           ].
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2313
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2314
    moduleSelection 
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2315
        onChangeEvaluate:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2316
             |list|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2317
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2318
             dialog window withWaitCursorDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2319
                 list := SourceCodeManager getExistingPackagesInModule:(moduleSelection value).
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2320
                 packageList value:list.
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2321
"/
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2322
"/ do not auto-select the first item
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2323
"/                 list notEmpty ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2324
"/                     packageSelection value:list first
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2325
"/                 ]
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2326
             ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2327
             self activityNotification:nil
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2328
           ].
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2329
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2330
    containerSelection
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2331
        onChangeEvaluate:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2332
             loadEnabled value:(containerSelection value notEmpty).
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2333
           ].
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2334
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2335
    self withWaitCursorDo:[
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2336
        |list|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2337
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2338
        moduleList value:(list := SourceCodeManager getExistingModules).
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2339
"/        list notEmpty ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2340
"/            "/ if there is a module named after the user, use that one.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2341
"/            (list includes:(m := OperatingSystem getLoginName)) ifFalse:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2342
"/                "/ if there is a module named 'stx', use that one.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2343
"/                (list includes:'stx') ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2344
"/                    m := 'stx'
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2345
"/                ] ifFalse:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2346
"/                    m := list first
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2347
"/                ]
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2348
"/             ].
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2349
"/             moduleSelection setValue:m.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2350
"/             list := SourceCodeManager getExistingPackagesInModule:m.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2351
"/             packageList value:list.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2352
"/        ].
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2353
    ].
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2354
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2355
    self activityNotification:nil.
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2356
1671
cc16fd031dcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2357
    dialog := SimpleDialog new.
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2358
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2359
    Object activityNotificationSignal handle:[:ex |
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2360
        |msg|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2361
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2362
        msg := 'Load from repository'.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2363
        ex errorString size > 0 ifTrue:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2364
            msg := msg , ' - ' , ex errorString
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2365
        ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2366
        dialog window topView label:msg.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2367
        ex proceed.
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2368
    ] do:[
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2369
        dialog
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2370
            openFor:self
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2371
            spec:self class repositoryLoadSpec 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  2372
            withBindings:bindings
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2373
    ]
1671
cc16fd031dcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2374
    "Modified: / 21.5.1998 / 17:17:56 / cg"
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2375
!
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2376
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2377
classCategoryRepositoryHistory
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2378
    (self checkSelectionChangeAllowedWithCompare:false) ifFalse:[^ self].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2379
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2380
    self withBusyCursorDo:[
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2381
        |timeGoal repositoryFilter aStream box y component 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2382
         timeGoalListPop repositoryFilterPop|
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2383
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2384
        box := Dialog new.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2385
        (box addTextLabel:(resources string:'repository change report')) adjust:#left.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2386
        box addVerticalSpace:20.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2387
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2388
        timeGoal := 'yesterday' asValue. 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2389
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2390
        y := box yPosition.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2391
        component := box addTextLabel:(resources string:'list changes since (mm/dd):').
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2392
        component width:0.5; adjust:#right; borderWidth:0.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2393
        box yPosition:y.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2394
        timeGoalListPop := box addComboBoxOn:timeGoal tabable:true.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2395
        timeGoalListPop width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2396
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2397
        timeGoalListPop list:#('yesterday'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2398
                               'a week ago'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2399
                               'a month ago'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2400
                               'a year ago'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2401
                               'all'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2402
                              ).
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2403
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2404
        y := box yPosition.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2405
        component := box addTextLabel:(resources string:'For repository (empty for all):').
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2406
        component width:0.5; adjust:#right; borderWidth:0.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2407
        box yPosition:y.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2408
        repositoryFilterPop := box addComboBoxOn:repositoryFilter tabable:true.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2409
        repositoryFilterPop width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2410
        repositoryFilterPop list:#(
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2411
                                "/ to do - get list of available repositories ...
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2412
                                'stx'
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2413
                                'exept'
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2414
                                ''
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2415
                               ).
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2416
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2417
        box addAbortAndOkButtons.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2418
        box open.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2419
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2420
        box accepted ifTrue:[
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2421
            repositoryFilter := repositoryFilter value.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2422
            repositoryFilter size == 0 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2423
                ifTrue:[repositoryFilter := nil]
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2424
                ifFalse:[repositoryFilter := Array with:repositoryFilter].
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2425
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2426
            timeGoal := timeGoal value.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2427
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2428
"/        timeGoal := Dialog 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2429
"/                         request:'list changed repository containers since (mm/dd):
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2430
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2431
"/You can also specify the date as 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2432
"/''yesterday'', ''a week ago'' or ''a month ago''
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2433
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2434
"/'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2435
"/                         initialAnswer:'yesterday'  
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2436
"/                         onCancel:nil.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2437
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2438
"/        timeGoal notNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2439
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2440
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2441
            self busyLabel:'extracting history ...' with:nil.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2442
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2443
            aStream := WriteStream on:(String new:200).
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2444
            Processor activeProcess 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2445
                withPriority:Processor activePriority-1 to:Processor activePriority
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2446
            do:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2447
                SourceCodeManager notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2448
                    SourceCodeManager
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2449
                        writeHistoryLogSince:timeGoal 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2450
                        filterSTSources:true 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2451
                        filterUser:nil 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2452
                        filterRepository:repositoryFilter
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2453
                        to:aStream.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2454
                ] ifFalse:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2455
                    aStream nextPutLine:'no history available (no SourceCodeManagement installed)'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2456
                ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2457
            ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2458
            codeView contents:(aStream contents).
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2459
            codeView modified:false.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2460
            self clearAcceptAction.
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2461
            self clearExplainAction.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2462
            methodListView notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2463
                methodListView setSelection:nil
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2464
            ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2465
            aspect := nil.      
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2466
            self normalLabel
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2467
        ].
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2468
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2469
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2470
    "Created: / 23.11.1995 / 11:41:38 / cg"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2471
    "Modified: / 10.2.2000 / 14:13:46 / cg"
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2472
!
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2473
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2474
classCategoryValidateClassRevisions
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2475
    "for all classes, ask the sourceCodeManager for the most recent version
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  2476
     and compare this to the actual version. Send mismatch info to the Transcript.
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  2477
     Use this, to find classes, which need to be reloaded from the repository."
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2478
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2479
    self withBusyCursorDo:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2480
        |logMessage classes repVersion clsVersion binVersion
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2481
         count unloadedCount badCount cat needCheckIn|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2482
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2483
        cat := currentClassCategory.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2484
        (cat = '* hierarchy *') ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2485
            cat := '* all *'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2486
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2487
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2488
        classes := self listOfAllClassesInCategory:cat names:false.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2489
        classes isNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2490
            Transcript showCR:'no classes to validate'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2491
            ^ self
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2492
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2493
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2494
        count := unloadedCount := badCount := needCheckIn := 0.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2495
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2496
        Transcript cr.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2497
        Transcript showCR:'-------------------------------------------------'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2498
        Transcript showCR:'checking class revisions vs. repository ...'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2499
        Transcript cr.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2500
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2501
        classes do:[:aClass |
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2502
            |clsName msg sourceCodeManager repSource currentSource aStream|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2503
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2504
            count := count + 1.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2505
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2506
            "/ ignore autoloaded and private classes here
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  2507
                
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2508
            clsName := aClass name.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2509
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2510
            aClass isLoaded ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2511
                unloadedCount := unloadedCount + 1.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2512
                (currentClassCategory ~= '* all *'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2513
                and:[currentClassCategory ~= '* hierarchy *']) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2514
                    msg := '?? ''' , clsName , ''' is not loaded - skipped check'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2515
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2516
            ] ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2517
                ((aClass isNameSpace not or:[aClass == Smalltalk])
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2518
                and:[aClass topOwningClass isNil]) ifTrue:[
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  2519
                
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  2520
"/                    self busyLabel:'validating %1 ...' with:aClass name.
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  2521
                
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2522
                    sourceCodeManager := aClass sourceCodeManager.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2523
                    sourceCodeManager isNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2524
                        msg := '?? ''' , clsName , ''' has no sourceCodeManager - skipped check'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2525
                    ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2526
                        repVersion := sourceCodeManager newestRevisionOf:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2527
                        repVersion isNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2528
                            msg := '-- ' , clsName 
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2529
                                    , ' not in repository'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2530
                        ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2531
                            clsVersion := aClass revision.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2532
                            binVersion := aClass binaryRevision.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2533
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2534
                            clsName := aClass name.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2535
                            msg := nil.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2536
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2537
                            clsVersion ~= repVersion ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2538
                                badCount := badCount + 1.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2539
                                msg := '** ' , clsName 
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2540
                                        , ' is not up-to-date (this: '
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2541
                                        , clsVersion printString
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2542
                                        , ' repository: '
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2543
                                        , repVersion printString
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2544
                                        , ').'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2545
                                msg := msg asText allBold.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2546
                            ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2547
                                clsVersion ~= binVersion ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2548
                                    binVersion notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2549
                                        msg := clsName
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2550
                                               , ' up-to-date (but should be stc-recompiled)'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2551
                                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2552
                                ] ifFalse:[
1096
3e3af3c70de1 handle no-sourceCodeManager case when validating classes.
Claus Gittinger <cg@exept.de>
parents: 1095
diff changeset
  2553
    "/                              msg := clsName , ' is up-to-date.'
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2554
                                ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2555
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2556
                                "/ compare the sources;
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2557
                                "/ to find classes which need a checkin.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2558
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2559
                                aStream := sourceCodeManager getMostRecentSourceStreamForClassNamed:aClass name.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2560
                                repSource := aStream contents asString.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2561
                                aStream close.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2562
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2563
                                aStream := '' writeStream.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2564
                                Method flushSourceStreamCache.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2565
                                aClass fileOutOn:aStream withTimeStamp:false.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2566
                                currentSource := aStream contents asString.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2567
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2568
                                repSource ~= currentSource ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2569
                                    msg := '-- ' , clsName , ' should be checked into the repository'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2570
                                    needCheckIn := needCheckIn + 1.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2571
                                ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2572
                            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2573
                        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2574
                    ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2575
                ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2576
            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2577
            msg notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2578
                Transcript showCR:msg
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2579
            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2580
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2581
        Transcript cr.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2582
        Transcript showCR:'----------------------------------------------------------'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2583
        Transcript showCR:('%1 classes / %2 unloaded / %3 need checkout / %4 need checkin.'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2584
                           bindWith:count with:unloadedCount with:badCount with:needCheckIn).
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2585
        Transcript showCR:'----------------------------------------------------------'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2586
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2587
        self normalLabel.
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2588
    ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2589
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2590
    "Modified: 15.6.1996 / 00:25:58 / stefan"
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2591
    "Created: 29.10.1996 / 13:21:08 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2592
    "Modified: 18.8.1997 / 15:43:04 / cg"
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2593
! !
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2594
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2595
!BrowserView methodsFor:'class category stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2596
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2597
checkClassCategorySelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2598
    currentClassCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2599
	self warn:'select a class category first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2600
	^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2601
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2602
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2603
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2604
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2605
classCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2606
    "user clicked on a class category line - show classes.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2607
     If switching to hierarchy or all, keep current selections"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2608
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2609
    |newCategory oldClass oldName classIndex list|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2610
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2611
    newCategory := classCategoryListView selectionValue.
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
  2612
    (newCategory = '* all *'
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  2613
     or:[newCategory = '* hierarchy *'
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  2614
     or:[currentClass notNil and:[newCategory = currentClass category]]]
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  2615
    ) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2616
	"switch to all or hierarchy:
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2617
	 remember current class and reselect it        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2618
	 after showing the updated class list
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2619
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2620
	oldClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2621
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2622
    currentClassCategory := newCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2623
    oldClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2624
	self classCategorySelectionChanged
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2625
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2626
	oldName := oldClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2627
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2628
	    self updateClassList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2629
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2630
	"stupid - search for class name in (indented) list"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2631
	list := classListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2632
	list notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2633
	    classIndex := list findFirst:[:elem | elem withoutSpaces = oldName asString].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2634
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2635
	    classIndex := 0
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2636
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2637
	classIndex ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2638
	    classListView setSelection:classIndex.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2639
	    self changeCurrentClass:(Smalltalk at:(oldName asSymbol))
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2640
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2641
	    self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2642
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2643
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2644
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  2645
    "Modified: / 16.1.1998 / 17:12:24 / stefan"
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2646
    "Modified: / 10.4.1998 / 12:25:34 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2647
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2648
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2649
classCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2650
    "class category has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2651
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2652
    self withBusyCursorDo:[
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2653
        self changeCurrentClass:nil.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2654
        aspect := nil.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2655
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2656
        actualClass := acceptClass := nil.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2657
        currentMethodCategory := nil.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2658
        self releaseMethod.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2659
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2660
        self updateClassList.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2661
        self updateMethodCategoryList.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2662
        self updateMethodList.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2663
        self updateCodeView.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2664
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2665
        self clearExplainAction.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2666
        self clearAcceptAction.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2667
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2668
        (currentClassCategory = '* removed *') ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2669
            codeView contents:'these classes have been removed (i.e. they are no longer accessable as globals),
1363
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2670
but there are still referenced instances of them around.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2671
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2672
They will vanish later (be garbage collected) when the instances are no longer referenced.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2673
'
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2674
        ]
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2675
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2676
    ]
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2677
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2678
    "Modified: / 10.2.2000 / 14:13:52 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2679
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2680
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2681
listOfAllClassCategories
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2682
    "return a list of all class categories"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2683
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2684
    |nameSpaceList newList cat allNameSpaces|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2685
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  2686
    newList := Set new.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  2687
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2688
    currentNamespace = '* all *' ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2689
        nameSpaceList := Array with:Smalltalk.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2690
        allNameSpaces := true.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2691
    ] ifFalse:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2692
        nameSpaceList := self listOfNamespaces.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2693
        allNameSpaces := false.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2694
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2695
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2696
    nameSpaceList do:[:aNamespace |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2697
        aNamespace allBehaviorsDo:[:aClass |
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2698
            aClass isMeta ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2699
                (aClass isNameSpace not 
2646
bb22d1b835e6 renamed Namespace to NameSpace
Claus Gittinger <cg@exept.de>
parents: 2645
diff changeset
  2700
                or:[aClass == NameSpace 
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2701
                or:[aClass == Smalltalk]]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2702
                    (allNameSpaces or:[aClass nameSpace == aNamespace]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2703
                        cat := aClass category.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2704
                        cat isNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2705
                            cat := '* no category *'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2706
                        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2707
                        cat ~= 'obsolete' ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2708
                            newList add:cat
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2709
                        ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2710
                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2711
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2712
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2713
        ]
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  2714
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  2715
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  2716
    newList notEmpty ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  2717
        newList add:'* all *'; add:'* hierarchy *'.
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  2718
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  2719
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2720
    ^ newList asOrderedCollection sort.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  2721
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2722
    "Modified: 5.1.1997 / 17:12:01 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2723
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2724
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2725
renameCurrentClassCategoryTo:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2726
    "helper - do the rename"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2727
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2728
    |any categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2729
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2730
    currentClassCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2731
	any := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2732
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2733
	self allClassesInSelectedNamespacesDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2734
	    aClass category = currentClassCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2735
		aClass category:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2736
		any := true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2737
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2738
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2739
	any ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2740
	    categories := classCategoryListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2741
	    categories remove:currentClassCategory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2742
	    categories add:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2743
	    categories sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2744
	    classCategoryListView setContents:categories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2745
	    currentClassCategory := aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2746
	    classCategoryListView setSelectElement:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2747
	] ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2748
	    currentClassCategory := aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2749
	    self updateClassCategoryList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2750
	    self updateClassListWithScroll:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2751
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2752
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  2753
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  2754
    "Modified: 16.1.1997 / 20:20:38 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2755
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2756
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2757
switchToAnyMethod:aSelectorString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2758
    "find all implementors of aSelectorString, and present a list
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2759
     to choose from. When an entry is selected, switch to that class/selector.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2760
     This allows for quickly moving around in the system."
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2761
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2762
    |classes sel box theClassName|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2763
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2764
    classes := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2765
    aSelectorString knownAsSymbol ifTrue:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2766
        sel := aSelectorString asSymbol.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2767
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2768
        Smalltalk allClassesDo:[:aClass |
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2769
            (aClass includesSelector:sel) ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2770
                classes add:aClass.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2771
            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2772
            (aClass class includesSelector:sel) ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2773
                classes add:aClass class.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2774
            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2775
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2776
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2777
    classes size == 0 ifTrue:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2778
        SystemBrowser showNoneFound.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2779
        ^ self
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2780
    ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2781
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2782
    classes size > 1 ifTrue:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2783
        box := ListSelectionBox 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2784
                    title:(resources string:'searching for #%1 method.\\in which class ?\\(Tab for completion or select)' with:aSelectorString) withCRs.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2785
        box label:'find method'.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2786
        box okText:(resources string:'show').
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2787
        box list:(classes collect:[:aClass | aClass name]) asSortedCollection.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2788
        box action:[:aString | theClassName := aString].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2789
        box entryCompletionBlock:[:contents |
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2790
            |s l what m names|
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2791
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2792
            s := contents withoutSpaces.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2793
            s size == 0 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2794
                l := classes
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2795
            ] ifFalse:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2796
                l := classes select:[:cls | cls name startsWith:s].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2797
            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2798
            l size == 0 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2799
                l := classes select:[:cls | cls name asLowercase startsWith:s asLowercase].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2800
            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2801
            l size > 0 ifTrue:[    
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2802
                box list:(names := l collect:[:aClass | aClass name]) asSortedCollection.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2803
                box contents:(names longestCommonPrefix). "/ l first name.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2804
                l size ~~ 1 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2805
                    self beep
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2806
                ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2807
            ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2808
        ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2809
        box showAtPointer.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2810
    ] ifFalse:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2811
        theClassName := classes first name
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2812
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2813
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2814
    theClassName notNil ifTrue:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2815
        self switchToClassNamed:theClassName. 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2816
        self updateMethodCategoryList.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2817
        self switchToMethodNamed:aSelectorString.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2818
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2819
1805
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
  2820
    "Modified: / 1.9.1995 / 01:39:58 / claus"
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2821
    "Modified: / 25.1.2000 / 20:43:35 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2822
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2823
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2824
updateClassCategoryList
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  2825
    self updateClassCategoryListWithScroll:true.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  2826
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  2827
    "Modified: 8.1.1997 / 10:58:06 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2828
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2829
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2830
updateClassCategoryListWithScroll:scroll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2831
    |oldClassCategory oldClass oldMethodCategory oldMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2832
     oldSelector newCategoryList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2833
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2834
    classMethodListView notNil ifTrue:[ ^ self ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2835
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2836
    oldClassCategory := currentClassCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2837
    oldClass := currentClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2838
    oldMethodCategory := currentMethodCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2839
    oldMethod := currentMethod.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2840
    oldMethod notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2841
	oldSelector := currentSelector
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2842
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2843
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2844
    classCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2845
	newCategoryList := self listOfAllClassCategories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2846
	newCategoryList = classCategoryListView list ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2847
	    scroll ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2848
		classCategoryListView contents:newCategoryList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2849
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2850
		classCategoryListView setContents:newCategoryList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2851
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2852
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2853
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2854
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2855
    oldClassCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2856
	classCategoryListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2857
	    classCategoryListView setSelectElement:oldClassCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2858
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2859
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2860
    classListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2861
	oldClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2862
	    classListView setSelectElement:(oldClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2863
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2864
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2865
    oldMethodCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2866
	methodCategoryListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2867
	    methodCategoryListView setSelectElement:oldMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2868
	].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2869
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2870
    oldSelector notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2871
	methodListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2872
	    methodListView setSelectElement:oldSelector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2873
	].
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  2874
    ]
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  2875
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  2876
    "Modified: / 27.7.1998 / 10:56:50 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2877
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2878
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2879
!BrowserView methodsFor:'class history'!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2880
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2881
addToClassHistory: aHistoryEntry
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2882
    "adds aHistoryEntry to the class history; aHistoryEntry consists of the class name and the selector name"
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2883
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2884
    ClassHistory remove: (ClassHistory detect: [:histEntry| (histEntry upTo: $ ) = (aHistoryEntry upTo: $ )] ifNone: nil) ifAbsent: nil.
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2885
    ClassHistory addFirst: aHistoryEntry.
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  2886
    [ClassHistory size > self class classHistoryMaxSize] whileTrue: [
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  2887
        ClassHistory removeLast
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  2888
    ]
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2889
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2890
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2891
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2892
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2893
changeHistoryMenu
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2894
    "returns a popup menu to navigate
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2895
     to the last few changes"
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2896
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2897
    <resource: #programMenu >
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2898
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2899
    |labels selectors args changes hist menu n nMax|
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2900
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2901
    changes := ChangeSet current.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2902
    hist := OrderedCollection new.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2903
    labels := OrderedCollection new.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2904
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2905
    menu := Menu new.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2906
    n := 0.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2907
    nMax := self class classHistoryMaxSize.
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2908
    changes reverseDo:[:aChange |
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2909
        |item|
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2910
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2911
        n < nMax ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2912
            aChange isMethodChange ifTrue:[
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2913
                item := aChange printString.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2914
                (labels includes:item) ifFalse:[
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2915
                    labels add:item.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2916
                    n := n + 1.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2917
                ]
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2918
            ].
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2919
        ].
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2920
    ].
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2921
    n = 0 ifTrue:[
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2922
        ^ nil
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2923
    ].
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2924
    ^ PopUpMenu 
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2925
        labels:labels
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  2926
        selector:#switchBackToMessageNamed:
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2927
        args:labels
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2928
        receiver:self
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2929
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  2930
    "Modified: / 10.2.2000 / 14:05:34 / cg"
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2931
!
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2932
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2933
classHistoryMenu
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2934
    "returns a popup menu to navigate to
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2935
     the last visited classes"
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2936
1669
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  2937
    <resource: #programMenu >
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  2938
1528
c9e0c25f38dd no complicated cascades for the stc
tz
parents: 1524
diff changeset
  2939
    |labels selectors args|
c9e0c25f38dd no complicated cascades for the stc
tz
parents: 1524
diff changeset
  2940
1575
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
  2941
    self class checkClassHistory.
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2942
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2943
    ClassHistory notEmpty ifTrue: [
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2944
        labels := ClassHistory collect: [:clsName| clsName upTo: $ ].
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2945
        labels add: '-';add:(resources string:'empty history').
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2946
        selectors := Array new: ClassHistory size.
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  2947
        selectors atAllPut:#switchBackToMessageNamed:.
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2948
        selectors := selectors asOrderedCollection.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2949
        selectors add: nil; add:#emptyClassHistory.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2950
        args := ClassHistory copy.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2951
        args add: nil; add: nil.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2952
    ] ifFalse: [
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2953
        labels := resources string:#('empty history').
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2954
    ].
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2955
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2956
    ^ PopUpMenu 
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2957
        labels:labels
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2958
        selectors:selectors
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2959
        args:args
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2960
        receiver:self.
1669
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  2961
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  2962
    "Modified: / 21.5.1998 / 15:42:10 / cg"
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2963
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2964
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2965
emptyClassHistory
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2966
    "removes all class history entries"
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2967
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2968
    ClassHistory removeAll
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2969
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2970
2618
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  2971
loadFromMessage:aMessageString
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  2972
    "switch to the class and selector specified by aMessage,
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  2973
     which has the form: '<className> {class} <selector>'
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  2974
     Backward compatibility - should no longer be used."
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  2975
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  2976
    self switchBackToMessageNamed:aMessageString
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  2977
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  2978
!
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  2979
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  2980
switchBackToMessageNamed: aMessage
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  2981
    "switch to the class and selector specified by aMessage,
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  2982
     which has the form: '<className> {class} <selector>'"
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  2983
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  2984
    |selector nameSpace words meta savedHistory ns|
2593
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2985
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2986
    words := aMessage asCollectionOfWords.
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2987
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2988
    savedHistory := ClassHistory copy.
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2989
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2990
    self switchToClassNamed:(words first).
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2991
    self classSelectionChanged.
1635
29ae5c9bce7b '* hierarchy *' switching error fixed for classes with similar names (!!!) + consider namespaces for the class history
tz
parents: 1627
diff changeset
  2992
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  2993
    (ns := actualClass nameSpace ? Smalltalk) ~~ Smalltalk 
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  2994
        ifTrue:  [nameSpace := ns name]
2593
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2995
        ifFalse: [nameSpace := '* all *'].
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2996
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2997
    namespaceList model value ~= nameSpace ifTrue:[
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2998
        namespaceList model value:nameSpace.    
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  2999
    ].
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3000
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3001
    meta := (aMessage includesString: ' class ').
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3002
    meta not ~~ showInstance ifTrue:[
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3003
        self instanceProtocol:meta not.
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3004
        self classSelectionChanged.
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3005
    ].
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3006
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3007
    (words size > 1
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  3008
    and:[(words last) ~= 'class']) ifTrue:[
2593
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3009
        selector := words last asSymbolIfInterned.
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3010
        (selector notNil and:[actualClass implements:selector])
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3011
        ifTrue:[
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3012
            self switchToMethodNamed: selector.
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3013
        ]
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3014
    ].
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3015
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3016
    ClassHistory := savedHistory.
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3017
! !
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3018
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3019
!BrowserView methodsFor:'class list menu'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3020
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3021
classClassInstVars
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3022
    "show class instance variables in codeView and setup accept-action
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3023
     for a class-instvar-definition change"
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  3024
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  3025
    self doClassMenu:[:currentClass |
2253
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3026
        |s|
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3027
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3028
        s := WriteStream on:(String new).
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3029
        currentClass fileOutClassInstVarDefinitionOn:s withNameSpace:true.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3030
        codeView contents:(s contents).
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3031
        codeView modified:false.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3032
        codeModified := false.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3033
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3034
        self setAcceptActionForClassInstVars.
2253
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3035
        self clearExplainAction.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3036
2253
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3037
        methodListView notNil ifTrue:[
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3038
            methodListView setSelection:nil
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3039
        ].
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3040
        aspect := #classInstVars.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3041
        self normalLabel
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  3042
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3043
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3044
    "Modified: / 10.2.2000 / 14:12:32 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3045
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3046
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3047
classComment
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3048
    "show the classes comment in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3049
     Also, set accept action to change the comment."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3050
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3051
    self classShowFrom:#comment 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3052
		   set:#comment: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3053
		aspect:#comment 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3054
	       default:nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3055
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3056
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3057
classDefinition
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  3058
    "show class definition in View and setup accept-action for
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3059
     a class-definition change.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3060
     Extract documentation either from a documentation method or
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3061
     from the comment - not a biggy, but beginners will like
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3062
     it when exploring the system."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3063
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3064
    self doClassMenu:[:currentClass |
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3065
        |m s cls aStream isComment src highlighter|
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3066
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3067
        aStream := TextStream on:(String new:200).
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3068
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3069
        cls := acceptClass ? currentClass.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3070
        cls isMeta ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3071
            cls := cls soleInstance
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3072
        ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3073
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3074
        (cls isNameSpace and:[cls ~~ Smalltalk]) ifTrue:[
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3075
            cls fileOutDefinitionOn:aStream
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3076
        ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3077
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3078
            "/
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3079
            "/ here, show it with a nameSpace pragma
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3080
            "/ and prefer short names.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3081
            "/
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3082
            cls
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3083
                basicFileOutDefinitionOn:aStream 
2649
e4b2bcafaf2f no package info in class definition
Claus Gittinger <cg@exept.de>
parents: 2648
diff changeset
  3084
                withNameSpace:true
e4b2bcafaf2f no package info in class definition
Claus Gittinger <cg@exept.de>
parents: 2648
diff changeset
  3085
                withPackage:false.
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3086
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3087
            cls isLoaded ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3088
                "/ show the definition now...
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3089
                src := aStream contents.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3090
                codeView contents:src.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3091
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3092
                "/ ...but continue fetching with the documentation,
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3093
                "/ which may take longer, if the source must be fetched
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3094
                "/ from the repository.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3095
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3096
                "
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3097
                 add documentation as a comment, if there is any
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3098
                "
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3099
                m := cls class compiledMethodAt:#documentation.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3100
                m notNil ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3101
                    s := m comment.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3102
                    isComment := false.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3103
                ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3104
                    "try comment"
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3105
                    s := cls comment.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3106
                    s isString ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3107
                        s isEmpty ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3108
                            s := nil
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3109
                        ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3110
                            (s includes:$") ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3111
                                s := s copyReplaceAll:$" with:$'.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3112
                            ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3113
                            isComment := true
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3114
                        ]
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3115
                    ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3116
                        "/ class redefines comment ?
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3117
                        s := nil
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3118
                    ]
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3119
                ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3120
            ].
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3121
            cls isJavaClass ifFalse:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3122
                aStream cr; cr; cr; cr; cr.
2605
56cf1ae89b39 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  3123
                aStream emphasis:(UserPreferences current commentEmphasisAndColor).
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3124
                s isNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3125
                    aStream nextPut:$" ; cr; nextPutLine:' no comment or documentation method found'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3126
                ] ifFalse:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3127
                    aStream nextPut:$" ; cr; nextPutLine:' Documentation:'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3128
                    aStream cr; nextPutLine:s; cr.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3129
                    aStream nextPutLine:' Notice: '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3130
                    aStream nextPutAll:'   the above text has been extracted from the classes '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3131
                    aStream nextPutLine:(isComment ifTrue:['comment.'] ifFalse:['documentation method.']).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3132
                    aStream nextPutLine:'   Any change in it will be lost if you ''accept'' here.'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3133
                    aStream nextPutAll:'   To change the '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3134
                    aStream nextPutAll:(isComment ifTrue:['comment'] ifFalse:['documentation']).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3135
                    aStream nextPutAll:', switch to the '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3136
                    aStream nextPutAll:(isComment ifTrue:['comment'] ifFalse:['documentation method']).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3137
                    aStream nextPutLine:' and ''accept'' any changes there.'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3138
                ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3139
                aStream nextPut:$".
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3140
                aStream emphasis:nil.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  3141
            ]
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3142
        ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3143
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3144
        src := aStream contents.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3145
        UserPreferences current syntaxColoring ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3146
            highlighter := cls syntaxHighlighterClass.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3147
            highlighter notNil ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3148
                src := highlighter formatExpression:src in:nil.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3149
            ]
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3150
        ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3151
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3152
        codeView contents:src.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3153
        codeView modified:false.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3154
        codeModified := false.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3155
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3156
        self setAcceptActionForClass.
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3157
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3158
"/        currentClass isNamespace ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3159
"/            codeView acceptAction:nil.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3160
"/        ] ifFalse:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3161
"/            codeView acceptAction:[:theCode |
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3162
"/                |ns|
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3163
"/
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3164
"/                currentClass notNil ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3165
"/                    ns := currentClass nameSpace
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3166
"/                ] ifFalse:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3167
"/                    ns := nil
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3168
"/                ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3169
"/            
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3170
"/                codeView cursor:Cursor execute.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3171
"/
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3172
"/                Class nameSpaceQuerySignal handle:[:ex |
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3173
"/                    ns isNil ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3174
"/                        ex reject
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3175
"/                    ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3176
"/                    ex proceedWith:ns
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3177
"/                ] do:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3178
"/                    Object abortSignal catch:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3179
"/
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3180
"/                        Class nameSpaceQuerySignal answer:Smalltalk
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3181
"/                        do:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3182
"/                            (Compiler evaluate:theCode asString notifying:codeView compile:false)
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3183
"/                            isBehavior ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3184
"/                                codeView modified:false.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3185
"/                                codeModified := false.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3186
"/                                self classCategoryUpdate.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3187
"/                                self updateClassListWithScroll:false.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3188
"/                            ]
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3189
"/                        ]
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3190
"/                    ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3191
"/                ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3192
"/                codeView cursor:Cursor normal.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3193
"/            ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3194
"/        ].
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3195
        self clearExplainAction.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3196
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3197
        methodListView notNil ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3198
            methodListView setSelection:nil
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3199
        ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3200
        aspect := #definition.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3201
        self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3202
    ]
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  3203
1727
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  3204
    "Modified: / 18.7.1998 / 22:52:50 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3205
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3206
1971
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3207
classDerivedInstancesInspect
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3208
    "inspect the current classes derived instances"
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3209
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3210
    |insts|
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3211
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3212
    self checkClassSelected ifFalse:[^ self].
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3213
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3214
    insts := currentClass allSubInstances.
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3215
    insts size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3216
	self warn:'no direct or derived instances'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3217
	^ self
1971
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3218
    ].
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3219
    insts size == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3220
	insts first inspect.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3221
	^ self.
1971
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3222
    ].
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3223
    insts inspect
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3224
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3225
    "Created: / 24.2.1996 / 16:12:14 / cg"
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3226
    "Modified: / 21.7.1998 / 11:32:49 / cg"
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3227
!
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3228
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3229
classDocumentation
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3230
    "show classes documentation (i.e. open doc-View on it)"
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3231
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3232
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3233
	Autoload autoloadFailedSignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3234
	    self warn:'autoload failed.
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3235
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3236
Check your source directory and/or 
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3237
the abbreviation file for the classes (correct) shortened name.'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3238
	    ex return.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3239
	] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3240
	    |text v|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3241
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3242
	    text := currentClass htmlDocumentation.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3243
	    text notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3244
		v := HTMLDocumentView
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3245
			openFullOnText:text 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3246
			inDirectory:(Smalltalk getSystemFileName:'doc/online/english/classDoc').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3247
		v nameSpaceForExecution:(currentClass nameSpace).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3248
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3249
	]
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3250
    ]
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3251
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3252
    "Created: 18.5.1996 / 12:12:20 / cg"
1188
3805f78caf95 documentationViews currentDirectory ...
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3253
    "Modified: 17.6.1997 / 13:32:40 / cg"
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3254
!
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3255
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3256
classDocumentationAs
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3257
    "as for a fileName & save a classes documentation html doc into it"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3258
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3259
    |fileBox dir saveName|
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3260
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3261
    fileBox := FileSelectionBox
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3262
		    title:(resources string:'save HTML doc of ''%1'' as:' with:currentClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3263
		    okText:(resources string:'save')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3264
		    abortText:(resources string:'cancel')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3265
		    action:[:fileName | saveName := fileName].
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3266
    fileBox initialText:((Smalltalk fileNameForClass:currentClass) , '.html').
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3267
    dir := FileSelectionBox lastFileSelectionDirectory.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3268
    dir notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3269
	fileBox directory:dir.
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3270
    ].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3271
    fileBox showAtPointer.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3272
    fileBox destroy.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3273
    saveName isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3274
	^ self
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3275
    ].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3276
    saveName isEmpty ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3277
	self warn:'bad name given'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3278
	^ self
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3279
    ].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3280
    FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3281
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3282
    self classDocumentationToFile:saveName
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3283
!
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3284
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3285
classDocumentationToFile:aFilename
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3286
    "save a classes documentation html doc into a file"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3287
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3288
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3289
	Autoload autoloadFailedSignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3290
	    self warn:'autoload failed.
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3291
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3292
Check your source directory and/or 
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3293
the abbreviation file for the classes (correct) shortened name.'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3294
	    ex return.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3295
	] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3296
	    |text v f|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3297
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3298
	    text := currentClass htmlDocumentation.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3299
	    text notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3300
		f := aFilename asFilename writeStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3301
		f nextPutAll:text asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3302
		f close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3303
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3304
	]
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3305
    ]
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3306
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3307
    "Created: 18.5.1996 / 12:12:20 / cg"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3308
    "Modified: 17.6.1997 / 13:32:40 / cg"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3309
!
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3310
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3311
classFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3312
    "fileOut the current class.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3313
     Catch errors (sure, you like to know if it failed) and
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3314
     warn if any)"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3315
1139
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3316
    self classFileOutAsk:false
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3317
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3318
    "Modified: 16.4.1997 / 20:55:13 / cg"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3319
!
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3320
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3321
classFileOutAs
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3322
    "fileOut the current class, asking for a filename."
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3323
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3324
    self classFileOutAsk:true
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3325
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3326
    "Modified: 16.4.1997 / 20:55:31 / cg"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3327
!
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3328
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3329
classFileOutAsk:ask
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3330
    "fileOut the current class, possibly asking for a filename.
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3331
     Catch errors (sure, you like to know if it failed) and
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3332
     warn if any)"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3333
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3334
    self doClassMenu:[:currentClass |
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3335
        |msg fileBox saveName dir|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3336
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3337
        currentClass isPrivate ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3338
            self warn:'You must fileOut the owning class: ' , currentClass owningClass name
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3339
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3340
            ask ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3341
                fileBox := FileSelectionBox
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3342
                                title:(resources string:'fileOut %1 as:' with:currentClass name)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3343
                                okText:(resources string:'fileOut')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3344
                                abortText:(resources string:'cancel')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3345
                                action:[:fileName | saveName := fileName].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3346
                fileBox initialText:((Smalltalk fileNameForClass:currentClass) , '.st').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3347
                dir := FileSelectionBox lastFileSelectionDirectory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3348
                dir notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3349
                    fileBox directory:dir.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3350
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3351
                fileBox showAtPointer.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3352
                fileBox destroy.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3353
                saveName isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3354
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3355
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3356
                saveName isEmpty ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3357
                    self warn:'bad name given'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3358
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3359
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3360
                FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3361
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3362
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3363
            self busyLabel:'saving %1' with:currentClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3364
            Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3365
                self warn:'cannot fileOut: %1\(%2)' with:currentClass name with:ex errorString.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3366
                self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3367
                ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3368
            ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3369
                saveName notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3370
                    currentClass fileOutAs:saveName.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3371
                ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3372
                    currentClass fileOut.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3373
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3374
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3375
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3376
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3377
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  3378
1979
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3379
    "Created: / 16.4.1997 / 20:55:01 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3380
    "Modified: / 29.12.1998 / 21:41:09 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3381
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3382
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3383
classFileOutBinary
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3384
    "fileOut the current class as binary bytecode."
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3385
1979
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3386
    self classFileOutBinaryAsk:false
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3387
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3388
    "Modified: / 29.12.1998 / 21:42:15 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3389
!
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3390
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3391
classFileOutBinaryAs
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3392
    "fileOut the current class as binary bytecode; ask for a fileName."
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3393
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3394
    self classFileOutBinaryAsk:true
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3395
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3396
    "Created: / 29.12.1998 / 21:42:27 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3397
!
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3398
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3399
classFileOutBinaryAsk:ask
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3400
    "fileOut the current class as binary bytecode."
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3401
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3402
    |mode fileBox saveName dir|
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3403
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  3404
    mode := Dialog choose:(resources string:'save including sources ?')
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3405
                   labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3406
                   values:#(nil #discard #reference #keep)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3407
                   default:#keep.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3408
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  3409
    mode isNil ifTrue:[^ self].   "/ cancelled
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  3410
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3411
    self doClassMenu:[:currentClass |
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3412
        |msg|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3413
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3414
        currentClass isPrivate ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3415
            self warn:'You must fileOut the owning class: ' , currentClass owningClass name
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3416
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3417
            ask ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3418
                fileBox := FileSelectionBox
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3419
                                title:(resources string:'binary fileOut %1 as:' with:currentClass name)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3420
                                okText:(resources string:'fileOut')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3421
                                abortText:(resources string:'cancel')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3422
                                action:[:fileName | saveName := fileName].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3423
                fileBox initialText:((Smalltalk fileNameForClass:currentClass) , '.cls').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3424
                dir := FileSelectionBox lastFileSelectionDirectory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3425
                dir notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3426
                    fileBox directory:dir.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3427
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3428
                fileBox showAtPointer.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3429
                fileBox destroy.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3430
                saveName isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3431
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3432
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3433
                saveName isEmpty ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3434
                    self warn:'bad name given'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3435
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3436
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3437
                FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3438
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3439
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3440
            self busyLabel:'saving binary of %1' with:currentClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3441
            Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3442
                self warn:'cannot create: %1\(%2)' with:ex parameter with:ex errorString.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3443
                self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3444
                ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3445
            ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3446
                saveName notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3447
                    currentClass binaryFileOutWithSourceMode:mode as:saveName.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3448
                ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3449
                    currentClass binaryFileOutWithSourceMode:mode
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3450
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3451
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3452
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3453
        self normalLabel.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3454
    ]
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3455
1979
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3456
    "Created: / 29.12.1998 / 21:35:13 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3457
    "Modified: / 29.12.1998 / 21:45:54 / cg"
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3458
!
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3459
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3460
classHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3461
    "show current classes hierarchy in codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3462
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3463
    self doClassMenu:[:currentClass |
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3464
        |aStream|
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3465
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3466
        aStream := WriteStream on:(String new:200).
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3467
        actualClass printHierarchyOn:aStream.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3468
        codeView contents:(aStream contents).
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3469
        codeView modified:false.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3470
        codeModified := false.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3471
        self clearAcceptAction.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3472
        self clearExplainAction.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3473
        methodListView notNil ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3474
            methodListView setSelection:nil
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3475
        ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3476
        aspect := #hierarchy. 
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3477
        self normalLabel
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3478
    ]
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3479
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3480
    "Modified: / 10.2.2000 / 14:14:04 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3481
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3482
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3483
classInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3484
    "inspect the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3485
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3486
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3487
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3488
    currentClass inspect.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3489
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3490
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3491
classInstancesInspect
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3492
    "inspect the current classes instances"
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3493
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3494
    |insts|
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3495
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3496
    self checkClassSelected ifFalse:[^ self].
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3497
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3498
    insts := currentClass allInstances.
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3499
    insts size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3500
	self warn:'no instances'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3501
	^ self
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3502
    ].
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3503
    insts size == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3504
	insts first inspect.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3505
	^ self.
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3506
    ].
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3507
    insts inspect
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3508
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3509
    "Created: / 24.2.1996 / 16:12:14 / cg"
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3510
    "Modified: / 21.7.1998 / 11:32:49 / cg"
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3511
!
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3512
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3513
classLoad
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3514
    "load an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3515
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  3516
    |nm nameShown|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3517
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3518
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3519
    nm := currentClass name.
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  3520
    nameShown := self displayedClassNameOf:currentClass.
987
e24e45bd126a dont update while loading
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
  3521
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3522
    Autoload autoloadFailedSignal handle:[:ex |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3523
	self warn:(resources string:'autoload of %1 failed.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3524
1313
a287a275aaef remember last 'fileout as...' directory.
Claus Gittinger <cg@exept.de>
parents: 1308
diff changeset
  3525
Check your source directory for a file named ''%2.st'' 
a287a275aaef remember last 'fileout as...' directory.
Claus Gittinger <cg@exept.de>
parents: 1308
diff changeset
  3526
and/or the abbreviation file for its (correct) shortened name.') 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3527
		with:nm with:(Smalltalk fileNameForClass:currentClass).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3528
	ex return.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3529
    ] do:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3530
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3531
	    self busyLabel:'loading %1 ...' with:currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3532
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3533
	    lockUpdates := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3534
	    [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3535
		currentClass autoload.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3536
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3537
		currentClass := actualClass := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3538
		"/ reselect the current class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3539
		showInstance ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3540
		    nameShown := nameShown , ' class'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3541
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3542
		self switchToClassNamed:nameShown.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3543
		self classSelectionChanged.
1540
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  3544
"/                self classDefinition
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3545
	    ] valueNowOrOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3546
		lockUpdates := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3547
		self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3548
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3549
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3550
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3551
1540
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  3552
    "Modified: / 9.4.1998 / 13:58:52 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3553
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3554
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3555
classMakePrivate
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3556
    "change a class from public to private;
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3557
     ask for the owners class, check if a private class with the same name exists,
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3558
     before doing this."
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3559
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  3560
    |ownerName owner|
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3561
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  3562
    ownerName := Dialog request:(resources string:'name of owner class:').
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3563
    ownerName size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3564
	"/ cancelled
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3565
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3566
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3567
    owner := Smalltalk classNamed:ownerName.
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3568
    owner isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3569
	self warn:(resources string:'no class named ''%1'' found - try again.' with:ownerName).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3570
	^ self
1675
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  3571
    ].
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  3572
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  3573
    (owner privateClassesAt:currentClass nameWithoutPrefix) notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3574
	self warn:(resources 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3575
			string:'a private class named ''%1'' already exists in ''%2''.\\Please remove/rename that one first,\or rename the public class ''%1'' here\and try again.'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3576
			with:currentClass nameWithoutPrefix
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3577
			with:ownerName)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3578
		    withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3579
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3580
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3581
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3582
    currentClass makePrivateIn:owner
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3583
1675
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  3584
    "Modified: / 29.5.1998 / 19:03:19 / cg"
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3585
!
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3586
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3587
classMakePublic
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3588
    "change a class from private to public;
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3589
     check if a public class with the same name exists,
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3590
     before doing this."
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3591
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  3592
    (Smalltalk classNamed:(currentClass nameWithoutPrefix)) notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3593
	self warn:(resources
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3594
			string:'a public class named ''%1'' already exists.\\Please remove/rename that one first,\or rename the private class ''%1'' here\and try again.'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3595
			with:currentClass nameWithoutPrefix) withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3596
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3597
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3598
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3599
    currentClass makePublic
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3600
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  3601
    "Modified: 3.7.1997 / 13:26:21 / cg"
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3602
!
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3603
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3604
classMenu
926
a7c7814c9426 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  3605
    "sent by classListView to ask for the menu"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3606
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  3607
    <resource: #keyboard ( #Cmdl #Cmdn #Cmdd) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  3608
    <resource: #programMenu >
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  3609
2029
67a8b3ec490f allow browsee-clone from hierarchy & subclass browser.
Claus Gittinger <cg@exept.de>
parents: 2026
diff changeset
  3610
    |specialMenu items m newClassMenu spawnMenu idx spawnItems|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3611
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3612
    currentClass isNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3613
        items :=  #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3614
                       ('fileIn new from repository...' classLoadNewRevision)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3615
                    ).
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3616
    ] ifFalse:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3617
        items :=  #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3618
                       ('fileOut binary'               classFileOutBinary           )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3619
                       ('fileOut binary as...'         classFileOutBinaryAs         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3620
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3621
                       ('inspect class'                classInspect                 )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3622
                       ('inspect instances'            classInstancesInspect        )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3623
                       ('inspect derived instances'    classDerivedInstancesInspect        )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3624
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3625
                       ('make private class...'        classMakePrivate             )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3626
                       ('make public class'            classMakePublic              )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3627
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3628
                       ('primitive definitions'        classPrimitiveDefinitions    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3629
                       ('primitive variables'          classPrimitiveVariables      )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3630
                       ('primitive functions'          classPrimitiveFunctions      )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3631
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3632
                       ('package...'                   classModifyPackage         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3633
                       ('source container...'          classModifyContainer         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3634
                       ('remove source container...'   classRemoveContainer         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3635
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3636
                       ('revision log'                 classRevisionInfo            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3637
                       ('compare with repository...'   classCompareWithRepository   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3638
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3639
                       ('check into source repository...' classCheckin                 )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3640
                       ('fileIn from repository...'    classLoadRevision            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3641
                    ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3642
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3643
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3644
    specialMenu := PopUpMenu itemList:items resources:resources.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3645
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3646
    currentClass notNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3647
        currentClass sourceCodeManager isNil ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3648
            specialMenu disableAll:#(classModifyContainer classRemoveContainer
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3649
                                     classRevisionInfo 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3650
                                     classLoadRevision classCheckin 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3651
                                     classCompareWithRepository).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3652
        ].
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3653
        currentClass isPrivate ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3654
            specialMenu disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3655
                                     classFileOutBinary
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3656
                                     classMakePrivate
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3657
                                     classModifyPackage
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3658
                                     classModifyContainer 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3659
                                     classRemoveContainer
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3660
                                     classRevisionInfo 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3661
                                     classLoadRevision classCheckin
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3662
                                     classCompareWithRepository
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3663
                                     classPrimitiveDefinitions
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3664
                                     classPrimitiveVariables
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3665
                                     classPrimitiveFunctions).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3666
        ] ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3667
            specialMenu disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3668
                                     classMakePublic
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3669
                                    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3670
        ]
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3671
    ] ifFalse:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3672
        SourceCodeManager isNil ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3673
            specialMenu disableAll:#(classLoadNewRevision)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3674
        ]
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3675
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3676
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3677
    (currentClass notNil
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3678
    and:[currentClass isLoaded not]) ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3679
        specialMenu disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3680
                                     classInstancesInspect
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3681
                                     classDerivedInstancesInspect
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3682
                                     classFileOutBinary
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3683
                                     classFileOutBinaryAs
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3684
                                     classMakePrivate
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3685
                                     classMakePublic
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3686
                                     "/ classModifyPackage
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3687
                                     classModifyContainer 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3688
                                     classRemoveContainer
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3689
                                     classRevisionInfo 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3690
                                     classLoadRevision 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3691
                                     classCheckin
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3692
                                     classCompareWithRepository
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3693
                                     classPrimitiveDefinitions
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3694
                                     classPrimitiveVariables
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3695
                                     classPrimitiveFunctions).
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3696
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3697
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3698
    device ctrlDown ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3699
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3700
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3701
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3702
    currentClass isNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3703
        items :=    #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3704
                       ('new class'             classNewClass       Cmdn)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3705
                       ('new application'       classNewApplication)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3706
                       ('new dialog'            classNewDialog)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3707
                     ).
246
9f1583be2b81 ask class for its SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
  3708
    ] ifFalse:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3709
        currentClass isLoaded ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3710
            items :=    #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3711
                           ('documentation'              classDocumentation     )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3712
                           ('save documentation as...'  classDocumentationAs   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3713
                           ('-'                          nil                    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3714
                           ('class refs'                 classRefs              )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3715
                           ('-'                          nil                    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3716
                           ('new class'                  classNewClass          Cmdn )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3717
                           ('new application'            classNewApplication    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3718
                           ('new dialog'                 classNewDialog         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3719
                           ('remove...'                  classRemove            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3720
                           ('-'                          nil                    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3721
                           ('load'                       classLoad              Cmdl )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3722
                         ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3723
        ] ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3724
            fullProtocol ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3725
                items :=    #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3726
                               ('hierarchy'                 classHierarchy             )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3727
                               ('definition'                classDefinition            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3728
                               ('documentation'             classDocumentation    Cmdd )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3729
                               ('save documentation as...' classDocumentationAs       )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3730
                               ('comment'                   classComment               )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3731
                               ('class instvars'            classClassInstVars         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3732
                             ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3733
            ] ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3734
                items :=    #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3735
                               ('fileOut'                   classFileOut          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3736
                               ('fileOut as...'             classFileOutAs        )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3737
                               ('printOut'                  classPrintOut         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3738
                               ('printOut protocol'         classPrintOutProtocol )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3739
                               ('-'                         nil                   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3740
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3741
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3742
                classCategoryListView isNil ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3743
                    "/ a hierarchy or subclass-browser.
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3744
                    items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3745
                               ('browse'                    classCategoryClone   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3746
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3747
                ].
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3748
                items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3749
                               ('spawn...'                 spawnMenu             )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3750
                               ('-'                         nil                  )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3751
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3752
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3753
                spawnItems := #(               
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3754
                                    ('class'           classSpawn             )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3755
                                    ('full protocol'   classSpawnFullProtocol )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3756
                                    ('hierarchy'       classSpawnHierarchy    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3757
                                    ('subclasses'      classSpawnSubclasses   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3758
                               ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3759
                spawnMenu := PopUpMenu 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3760
                                itemList:spawnItems
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3761
                                resources:resources.
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3762
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3763
                fullClass ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3764
                    items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3765
                               ('hierarchy'                 classHierarchy            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3766
                               ('definition'                classDefinition           )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3767
                               ('documentation'             classDocumentation   Cmdd )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3768
                               ('save documentation as...' classDocumentationAs      )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3769
                               ('comment'                   classComment              )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3770
                               ('class instvars'            classClassInstVars        )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3771
                               ('-'                         nil                       )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3772
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3773
                ].
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3774
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3775
                items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3776
                               ('class refs'  classRefs   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3777
                               ('-'           nil         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3778
                               ('new...'     newClassMenu)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3779
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3780
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3781
                newClassMenu := PopUpMenu 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3782
                            itemList:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3783
                                        ('class'         classNewClass          Cmdn )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3784
                                        ('subclass'      classNewSubclass            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3785
                                        ('private class' classNewPrivateClass        )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3786
                                        ('application'   classNewApplication         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3787
                                        ('dialog'        classNewDialog              )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3788
                                      )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3789
                            resources:resources.
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3790
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3791
                items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3792
                               ('rename...'  classRename )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3793
                               ('remove...'  classRemove )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3794
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3795
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3796
                currentClass wasAutoloaded ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3797
                    items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3798
                               ('unload'  classUnload)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3799
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3800
                ]
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3801
            ]
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3802
        ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3803
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3804
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3805
    items := items , #(
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3806
                          ('='          nil             )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3807
                          ('others'     otherMenu   Ctrl)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3808
                        ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3809
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3810
    m := PopUpMenu itemList:items resources:resources.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3811
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3812
    newClassMenu notNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3813
        m subMenuAt:#newClassMenu put:newClassMenu.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3814
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3815
    spawnMenu notNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3816
        m subMenuAt:#spawnMenu put:spawnMenu.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3817
    ].
768
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  3818
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  3819
    (currentClass notNil
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  3820
    and:[currentClass isPrivate]) ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3821
        m disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3822
                       classFileOut
2249
fc17eb66cbec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2247
diff changeset
  3823
                       classFileOutAs
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3824
                      )
767
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  3825
    ].
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  3826
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3827
    m subMenuAt:#otherMenu put:specialMenu.
180
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  3828
    ^ m
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  3829
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3830
    "Modified: / 20.5.1999 / 18:36:25 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3831
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3832
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3833
classNewApplication
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3834
    "create a class-definition prototype for an application in codeview"
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3835
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3836
    |theClass cls|
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3837
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3838
    self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3839
	classClassDefinitionTemplateFor:ApplicationModel 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3840
	in:currentClassCategory 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3841
	namespace:false 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3842
	private:false.
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3843
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3844
    aspect := nil.
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3845
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3846
    "Modified: 4.1.1997 / 14:52:16 / cg"
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3847
!
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3848
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3849
classNewClass
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3850
    "create a class-definition prototype in codeview"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3851
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3852
    |theClass cls|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3853
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3854
    currentNamespace == JAVA ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3855
        theClass := Java at:'java.lang.Object'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3856
    ] ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3857
        theClass := Object.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3858
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3859
    currentClass notNil ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3860
        (cls := currentClass superclass) notNil ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3861
            theClass := cls 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3862
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3863
    ].
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3864
    self 
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3865
        classClassDefinitionTemplateFor:theClass 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3866
        in:currentClassCategory 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3867
        namespace:false 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3868
        private:false.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3869
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3870
    aspect := nil.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3871
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3872
    "Modified: 4.1.1997 / 14:52:16 / cg"
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3873
!
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3874
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3875
classNewDialog
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3876
    "create a class-definition prototype for a dialog in codeview"
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3877
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3878
    |theClass cls|
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3879
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3880
    self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3881
	classClassDefinitionTemplateFor:SimpleDialog 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3882
	in:currentClassCategory 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3883
	namespace:false 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3884
	private:false.
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3885
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3886
    aspect := nil.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3887
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3888
!
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3889
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3890
classNewPrivateClass
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3891
    "create a class-definition prototype in codeview"
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3892
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3893
    self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3894
	classClassDefinitionTemplateFor:Object 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3895
	in:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3896
	namespace:false 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3897
	private:true.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3898
    aspect := nil.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3899
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3900
    "Created: 11.10.1996 / 16:01:20 / cg"
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3901
    "Modified: 4.1.1997 / 14:51:49 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3902
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3903
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3904
classNewSubclass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3905
    "create a subclass-definition prototype in codeview"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3906
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3907
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3908
	self classClassDefinitionTemplateFor:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3909
					  in:(currentClass category)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3910
					  namespace:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3911
					  private:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3912
	aspect := nil
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3913
    ]
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3914
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3915
    "Modified: 4.1.1997 / 14:51:44 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3916
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3917
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3918
classPrimitiveDefinitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3919
    "show the classes primitiveDefinition in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3920
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3921
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3922
    self classShowFrom:#primitiveDefinitionsString 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3923
		   set:#primitiveDefinitions: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3924
		aspect:#primitiveDefinitions 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3925
	       default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3926
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3927
/*
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3928
 * includes, defines, structure definitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3929
 * and typedefs come here.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3930
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3931
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3932
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3933
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3934
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3935
classPrimitiveFunctions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3936
    "show the classes primitiveFunctions in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3937
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3938
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3939
    self classShowFrom:#primitiveFunctionsString 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3940
		   set:#primitiveFunctions: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3941
		aspect:#primitiveFunctions 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3942
	       default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3943
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3944
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3945
 * any local C (helper) functions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3946
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3947
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3948
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3949
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3950
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3951
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3952
classPrimitiveVariables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3953
    "show the classes primitiveVariables in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3954
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3955
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3956
    self classShowFrom:#primitiveVariablesString 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3957
		   set:#primitiveVariables: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3958
		aspect:#primitiveVariables 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3959
	       default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3960
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3961
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3962
 * any local C variables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3963
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3964
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3965
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3966
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3967
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3968
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3969
classPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3970
    self classPrintOutWith:#printOutOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3971
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3972
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3973
classPrintOutFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3974
    self classPrintOutWith:#printOutFullProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3975
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3976
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3977
classPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3978
    self classPrintOutWith:#printOutProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3979
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3980
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3981
classPrintOutWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3982
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3983
	|printStream|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3984
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3985
	printStream := Printer new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3986
	currentClass perform:aSelector with:printStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3987
	printStream close
152
d03618e99b3c show warnbox when autoload fails (instead of running into the debugger)
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
  3988
    ]
105
claus
parents: 98
diff changeset
  3989
!
claus
parents: 98
diff changeset
  3990
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3991
classProtocols
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3992
     ^ self
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3993
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3994
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3995
classRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3996
    self doClassMenu:[:currentClass |
2408
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3997
        self withBusyCursorDo:[
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3998
            |any1 any2 nm msg|
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3999
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4000
            any1 :=true.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4001
            any2 :=false.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4002
            nm := currentClass name asSymbol.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4003
            msg := SystemBrowser classResources string:'users of: %1' with:nm.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4004
            SystemBrowser 
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4005
                browseReferendsOf:nm 
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4006
                title:msg
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4007
                ifNone:[any1 := false].
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4008
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4009
            "/ for namespace-classes, also search for accesses without prefix
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4010
            (nm := currentClass nameWithoutPrefix) ~= currentClass name ifTrue:[
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4011
                any2 :=true.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4012
                SystemBrowser 
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4013
                    browseReferendsOf:nm asSymbol
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4014
                    title:(SystemBrowser classResources string:'users of: %1' with:nm)
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4015
                    ifNone:[any2 := false].
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4016
            ].
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4017
            (any1 or:[any2]) ifFalse:[
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4018
                SystemBrowser showNoneFound:msg.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4019
            ]
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4020
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4021
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4022
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4023
    "Created: 23.11.1995 / 14:11:43 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  4024
    "Modified: 18.8.1997 / 15:43:47 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4025
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4026
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4027
classRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4028
    "user requested remove of current class and all subclasses -
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4029
     count subclasses and let user confirm removal."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4030
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4031
    |count t box|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4032
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4033
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4034
	count := currentClass allSubclasses size.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4035
	t := 'remove %1'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4036
	count ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4037
	   t := t , '\(with %2 subclass'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4038
	   count ~~ 1 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4039
		t := t , 'es'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4040
	   ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4041
	   t := (t , ')') 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4042
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4043
	t := t , ' ?'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4044
	t := (resources string:t with:currentClass name asText allBold with:count) withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4045
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4046
	box := YesNoBox 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4047
		   title:t
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4048
		   yesText:(resources at:'remove')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4049
		   noText:(resources at:'abort').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4050
	box label:(resources string:'remove class').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4051
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4052
	box confirm ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4053
	    "after querying user - do really remove current class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4054
	     and all subclasses
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4055
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4056
	    self doClassMenu:[:currentClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4057
		|didRemove|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4058
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4059
		didRemove := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4060
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4061
		"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4062
		 query ?
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4063
		"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4064
		currentClass allSubclassesDo:[:aSubClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4065
		    (CheckForInstancesWhenRemovingClasses not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4066
		    or:[aSubClass hasInstances not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4067
		    or:[self confirm:(resources string:'''%1'' has instances - remove anyway ?' with:aSubClass name)]])
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4068
			ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4069
			    aSubClass removeFromSystem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4070
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4071
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4072
		(CheckForInstancesWhenRemovingClasses not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4073
		or:[currentClass hasInstances not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4074
		or:[self confirm:(resources string:'''%1'' has instances - remove anyway ?' with:currentClass name)]])
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4075
		    ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4076
			didRemove := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4077
			currentClass removeFromSystem.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4078
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4079
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4080
		didRemove ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4081
		    self changeCurrentClass:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4082
		    Smalltalk changed.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4083
		    self updateClassList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4084
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4085
		    "if it was the last in its category, update class category list"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4086
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4087
"/                    classListView numberOfLines == 0 ifTrue:[
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4088
"/                        self updateClassCategoryListWithScroll:false
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4089
"/                    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4090
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4091
		    methodCategoryListView notNil ifTrue:[methodCategoryListView contents:nil].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4092
		    methodListView notNil ifTrue:[methodListView contents:nil].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4093
		    codeView contents:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4094
		    codeView modified:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4095
		    codeModified := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4096
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4097
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4098
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4099
	box destroy.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4100
    ]
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  4101
1948
c5d2e8aac578 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1946
diff changeset
  4102
    "Modified: / 21.10.1998 / 20:49:52 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4103
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4104
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4105
classRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4106
    "launch an enterBox for new name and query user"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4107
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4108
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4109
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4110
    self checkClassSelected ifFalse:[^ self].
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4111
    box := self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4112
		enterBoxTitle:(resources 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4113
				string:'rename %1 to:' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4114
				with:currentClass name asText allBold) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4115
		okText:'rename'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4116
		label:'rename class'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4117
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4118
    box initialText:(currentClass name).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4119
    box action:[:aString | self renameCurrentClassTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4120
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4121
1948
c5d2e8aac578 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1946
diff changeset
  4122
    "Modified: / 21.10.1998 / 20:50:33 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4123
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4124
107
claus
parents: 106
diff changeset
  4125
classShowFrom:getSelector set:setSelector aspect:aspectSymbol default:default
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4126
    "common helper for comment, primitive-stuff etc.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4127
     show the string returned from the classes getSelector-method,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4128
     Set acceptaction to change it via setSelector."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4129
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4130
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4131
	|text|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4132
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4133
	text := currentClass perform:getSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4134
	text isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4135
	    text := default
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4136
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4137
	codeView contents:text.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4138
	codeView modified:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4139
	codeModified := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4140
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4141
	codeView acceptAction:[:theCode |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4142
	    Object abortSignal catch:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4143
		lockUpdates := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4144
		currentClass perform:setSelector with:theCode asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4145
		codeView modified:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4146
		codeModified := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4147
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4148
	    lockUpdates := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4149
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4150
	self clearExplainAction.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4152
	methodListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4153
	    methodListView setSelection:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4154
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4155
	aspect := aspectSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4156
	self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4157
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  4158
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  4159
    "Modified: / 31.3.1998 / 23:38:36 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4160
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4161
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4162
classSpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4163
    "create a new SystemBrowser browsing current class,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4164
     or if there is a selection, spawn a browser on the selected class
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4165
     even a class/selector pair can be specified."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4166
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4167
    self doClassMenuWithSelection:[:cls :sel |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4168
	|browser|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4169
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4170
	cls isMeta ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4171
	    self listOfNamespaces do:[:aNamespace |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4172
		aNamespace allBehaviorsDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4173
		    aClass class == cls ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4174
			browser := SystemBrowser browseClass:aClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4175
			browser instanceProtocol:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4176
			sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4177
			    browser switchToMethodNamed:sel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4178
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4179
			^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4180
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4181
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4182
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4183
	    self warn:'oops, no class for this metaclass'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4184
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4185
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4186
	browser := SystemBrowser browseClass:cls. 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4187
	cls hasMethods ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4188
	    browser instanceProtocol:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4189
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4190
	sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4191
	    browser switchToMethodNamed:sel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4192
	].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4193
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4194
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4195
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4196
     select 'Smalltalk allClassesDo:' and use spawn from the class menu
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4197
     select 'Smalltalk'               and use spawn from the class menu
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4198
    "
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4199
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4200
    "Modified: 20.12.1996 / 15:41:16 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4201
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4202
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4203
classSpawnFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4204
    "create a new browser, browsing current classes full protocol"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4205
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4206
    self doClassMenuWithSelection:[:cls :sel |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4207
	SystemBrowser browseFullClassProtocol:cls 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4208
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4209
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4210
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4211
classSpawnHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4212
    "create a new HierarchyBrowser browsing current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4213
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4214
    self doClassMenuWithSelection:[:cls :sel |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4215
	SystemBrowser browseClassHierarchy:cls 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4216
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4217
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4218
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4219
classSpawnSubclasses
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4220
    "create a new browser browsing current class's subclasses"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4221
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4222
    self doClassMenuWithSelection:[:cls :sel |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4223
	|subs|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4224
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4225
	subs := OrderedCollection new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4226
	self classHierarchyOf:cls withAutoloaded:false do:[:aClass :lvl |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4227
	    subs add:(String new:lvl*2) , aClass name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4228
	].
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4229
"/        subs := cls allSubclasses.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4230
	(subs notNil and:[subs size ~~ 0]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4231
	    SystemBrowser browseClasses:subs 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4232
				  title:('subclasses of ' , cls name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4233
				   sort:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4234
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4235
    ]
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4236
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  4237
    "Modified: 4.1.1997 / 13:35:55 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4238
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4239
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4240
classUnload
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4241
    "unload an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4242
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4243
    |nm|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4244
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4245
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4246
    nm := currentClass name.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4247
    currentClass unload.
1540
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  4248
    self switchToClassNamed:nm.
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  4249
    self classSelectionChanged.
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  4250
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  4251
    "Modified: / 9.4.1998 / 13:59:07 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4252
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4253
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4254
classUses
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4255
    "a powerful tool, when trying to learn more about where
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4256
     a class is used. This one searches all uses of a class,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4257
     and shows a list of uses - try it and like it"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4258
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4259
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4260
	self withSearchCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4261
	    SystemBrowser browseUsesOf:currentClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4262
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4263
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4264
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4265
    "Created: 23.11.1995 / 14:11:47 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4266
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4267
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4268
doClassMenuWithSelection:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4269
    "a helper - if there is a selection, which represents a classes name,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4270
     evaluate aBlock, passing that class and optional selector as arguments.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4271
     Otherwise, check if a class is selected and evaluate aBlock with the
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4272
     current class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4273
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4274
    |string words clsName cls sel isMeta|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4275
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4276
    string := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4277
    string notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4278
	self extractClassAndSelectorFromSelectionInto:[:c :s :m |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4279
	    clsName := c.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4280
	    sel := s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4281
	    isMeta := m.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4282
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4283
	clsName isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4284
	    string := string asString withoutSeparators.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4285
	    words := string asCollectionOfWords.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4286
	    words notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4287
		clsName := words first.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4288
		(clsName endsWith:' class') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4289
		    isMeta := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4290
		    clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4291
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4292
		    isMeta := false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4293
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4294
		sel := Parser selectorInExpression:string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4295
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4296
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4297
	clsName notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4298
	    (cls := Smalltalk classNamed:clsName) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4299
		isMeta ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4300
		    cls := cls class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4301
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4302
		self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4303
		    aBlock value:cls value:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4304
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4305
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4306
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4307
		self warn:'no class named: %1 - spawning current' with:clsName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4308
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4309
	].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4310
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4311
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4312
    classMethodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4313
	sel := classMethodListView selectionValue string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4314
	sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4315
	    sel := self selectorFromClassMethodString:sel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4316
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4317
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4318
    self doClassMenu:[:currentClass | aBlock value:currentClass value:sel]
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4319
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4320
    "Modified: 17.6.1996 / 16:51:49 / stefan"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  4321
    "Modified: 18.8.1997 / 15:44:01 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4322
! !
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4323
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4324
!BrowserView methodsFor:'class list source administration'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4325
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4326
classCheckin
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4327
    "check a class into the source repository"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4328
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4329
    self doClassMenu:[:currentClass |
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4330
        currentClass isLoaded ifFalse:[
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4331
            self warn:'cannot checkin unloaded classes.'.
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4332
            ^ self.
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4333
        ].
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4334
        self classCheckin:currentClass withLog:nil
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4335
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4336
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4337
    "Created: 23.11.1995 / 11:41:38 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4338
    "Modified: 15.4.1996 / 17:07:07 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4339
!
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4340
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4341
classCheckin:aClass withLog:aLogMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4342
    "check a class into the source repository"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4343
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4344
    SourceCodeManagerUtilities
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4345
        checkinClass:aClass withLog:aLogMessage.
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4346
    self normalLabel.
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4347
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4348
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  4349
classCompareWithRepository
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4350
    "open a diff-textView comparing the current (in-image) version
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  4351
     with the some version found in the repository."
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4352
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  4353
    currentClass isLoaded ifFalse:[
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4354
        self warn:'cannot compare unloaded classes.'.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4355
        ^ self.
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  4356
    ].
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  4357
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4358
    self doClassMenu:[:currentClass |
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4359
        |aStream comparedSource currentSource v rev revString thisRevString mgr
2673
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  4360
         nm msg rev2 newestRev 
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4361
         containerModule containerPackage containerFile rslt|
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4362
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4363
        nm := currentClass name.
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4364
        mgr := currentClass sourceCodeManager.
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4365
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4366
        rev := currentClass binaryRevision.
2223
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4367
        rev2 := currentClass revision.
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4368
        rev isNil ifTrue:[
2223
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4369
            rev := rev2
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4370
        ].
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4371
        rev isNil ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4372
            "/
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4373
            "/ class not in repository - allow compare against any other containers newest contents
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4374
            "/
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4375
            self normalLabel.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4376
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4377
            containerModule := lastModule ? Project current repositoryModule.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4378
            containerPackage := lastPackage ? Project current package.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4379
            rslt := SourceCodeManagerUtilities
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4380
                askForContainer:(resources string:'The class seems to have no repository information.\\Do you want to compare it against an existing containers contents ?')
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4381
                title:'Container to compare' note:nil 
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4382
                initialModule:containerModule 
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4383
                initialPackage:containerPackage 
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4384
                initialFileName:(currentClass name , '.st').
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4385
            rslt isNil ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4386
                "/ canel
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4387
                ^ self
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4388
            ].
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4389
            containerModule := lastModule := rslt at:#module.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4390
            containerPackage := lastPackage := rslt at:#package.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4391
            containerFile := rslt at:#fileName.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4392
        ] ifFalse:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4393
            "/
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4394
            "/ class in repository - ask for revision
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4395
            "/
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4396
            newestRev := mgr newestRevisionOf:currentClass.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4397
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4398
            msg := resources string:'compare to revision: (empty for newest)'.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4399
            rev notNil ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4400
                msg := msg , '\\' , (resources string:'Current %1 is based upon rev %2.'
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4401
                                               with:nm asText allBold with:rev).
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4402
                (rev2 notNil and:[rev2 ~= rev]) ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4403
                    msg := msg , '\' , (resources string:'And has been checked into the repository as %1.'
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4404
                                                   with:rev2)
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4405
                ]
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4406
            ].
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4407
            newestRev notNil ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4408
                msg := msg , '\' , (resources string:'Newest in reporitory is %1.'
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4409
                                               with:newestRev)
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4410
            ].
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4411
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4412
            self normalLabel.
2673
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  4413
            rev := SourceCodeManagerUtilities
2679
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4414
                        askForExistingRevision:msg 
2673
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  4415
                        title:'Compare with repository' 
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  4416
                        class:currentClass
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  4417
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  4418
            "/ rev := Dialog request:msg withCRs onCancel:nil.
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4419
        ].
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4420
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4421
        (rev notNil or:[containerFile notNil]) ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4422
            rev notNil ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4423
                rev withoutSpaces isEmpty ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4424
                    msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4425
                    "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4426
                    aStream := mgr getSourceStreamFor:currentClass revision:newestRev.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4427
                    revString := '(newest: ' , (newestRev ? '???') , ')'.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4428
                ] ifFalse:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4429
                    msg := 'extracting previous %1'.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4430
                    aStream := mgr getSourceStreamFor:currentClass revision:rev.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4431
                    revString := rev
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4432
                ].
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4433
            ] ifFalse:[
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4434
                msg := 'extracting newest version from ' , containerModule , '/' , containerPackage, '/' , containerFile.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4435
                aStream := mgr streamForClass:nil fileName:containerFile revision:#newest directory:containerPackage module:containerModule cache:false.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  4436
                revString := '???'
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4437
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4438
            self busyLabel:msg with:nm.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4439
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4440
            aStream isNil ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4441
                self warn:'could not extract source from repository'.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4442
                ^ self
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4443
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4444
            aStream class readErrorSignal handle:[:ex |
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4445
                self warn:('read error while reading extracted source\\' , ex errorString) withCRs.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4446
                aStream close.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4447
                ^ self
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4448
            ] do:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4449
                comparedSource := aStream contents asString.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4450
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4451
            aStream close.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4452
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4453
            self busyLabel:'generating current source ...' with:nil.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4454
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4455
            aStream := '' writeStream.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4456
            Method flushSourceStreamCache.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4457
            currentClass fileOutOn:aStream withTimeStamp:false.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4458
            currentSource := aStream contents asString.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4459
            aStream close.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4460
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4461
            self busyLabel:'comparing  ...' with:nil.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4462
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4463
            comparedSource = currentSource ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4464
                self information:'versions are identical'.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4465
            ] ifFalse:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4466
                thisRevString := currentClass revision.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4467
                thisRevString isNil ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4468
                    thisRevString := 'no revision'
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4469
                ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4470
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4471
                revString = '(newest)' ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4472
                    (rev := mgr newestRevisionOf:currentClass) notNil ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4473
                        revString := '(newest is' , rev , ')'
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4474
                    ]
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4475
                ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4476
2330
7a095f5456d3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2328
diff changeset
  4477
                self busyLabel:'comparing  ...' with:nil.
7a095f5456d3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2328
diff changeset
  4478
2716
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  4479
                UserPreferences current versionDiffViewerClass
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  4480
                  openOnClass:currentClass
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  4481
                  labelA:('current: (based on: ' , thisRevString , ')')
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  4482
                  sourceA:currentSource
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  4483
                  labelB:('repository: ' , revString)
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  4484
                  sourceB:comparedSource
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  4485
                  title:('comparing ' , currentClass name).
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4486
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4487
            self normalLabel.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4488
        ]
1627
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  4489
    ]
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  4490
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  4491
    "Created: / 4.1.1997 / 15:48:20 / cg"
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  4492
    "Modified: / 28.4.1998 / 17:40:02 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4493
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4494
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  4495
classCreateSourceContainerFor:aClass
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  4496
    "let user specify the source-repository values for aClass"
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  4497
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  4498
    ^ self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4499
	classDefineSourceContainerFor:aClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4500
	title:(resources string:'Repository information for %1' with:aClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4501
	text:(resources string:'CREATE_REPOSITORY' with:aClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4502
	createDirectories:true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4503
	createContainer:true.
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  4504
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4505
    "Modified: 15.4.1996 / 17:07:57 / cg"
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4506
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4507
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4508
classDefineSourceContainerFor:aClass title:title text:boxText createDirectories:createDirs createContainer:createContainer
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  4509
    "let user specify the source-repository values for aClass"
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  4510
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4511
    |rslt|
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4512
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4513
    rslt := SourceCodeManagerUtilities
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4514
                defineSourceContainerForClass:aClass 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4515
                title:title 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4516
                text:boxText 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4517
                createDirectories:createDirs 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4518
                createContainer:createContainer.
2479
b7943e6621b2 eliminated some popupDialogs when changing sourceContainer
Claus Gittinger <cg@exept.de>
parents: 2478
diff changeset
  4519
    self normalLabel.
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4520
    ^ rslt.
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4521
!
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4522
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4523
classLoadNewRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4524
    "let user specify a container and fileIn from there"
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4525
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  4526
    |box
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4527
     moduleHolder packageHolder fileNameHolder
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  4528
     module package fileName aStream
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  4529
     y component mgr|
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4530
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4531
    mgr := SourceCodeManager.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4532
    mgr isNil ifTrue:[^ false].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4533
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4534
    fileNameHolder := ValueHolder newString.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4535
    moduleHolder := (OperatingSystem getLoginName) asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4536
    packageHolder := 'private' asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4537
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4538
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4539
    "/ open a dialog for the module/package/container
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4540
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4541
    box := DialogBox new.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4542
    box label:'container fileIn'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4543
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4544
    component := box addTextLabel:(resources string:'container to fileIn') withCRs.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4545
    component adjust:#left; borderWidth:0.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4546
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4547
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4548
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4549
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4550
    component := box addTextLabel:(resources string:'Module:').
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4551
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4552
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4553
    component := box addInputFieldOn:moduleHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4554
    component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4555
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4556
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4557
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4558
    component := box addTextLabel:'Package:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4559
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4560
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4561
    component := box addInputFieldOn:packageHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4562
    component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4563
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4564
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4565
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4566
    component := box addTextLabel:'Filename:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4567
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4568
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4569
    component := box addInputFieldOn:fileNameHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4570
    component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4571
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4572
    box addVerticalSpace.
2048
f8c010698b75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  4573
    box addAbortAndOkButtons.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4574
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4575
    box showAtPointer.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4576
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4577
    box destroy.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4578
    box accepted ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4579
	^ false
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4580
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4581
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4582
    module := moduleHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4583
    package := packageHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4584
    fileName := fileNameHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4585
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4586
    (fileName endsWith:',v') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4587
	fileName := fileName copyWithoutLast:2
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4588
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4589
    (fileName endsWith:'.st') ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4590
	fileName := fileName , '.st'
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4591
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4592
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4593
    (mgr checkForExistingContainerInModule:module 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4594
				   package:package 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4595
				 container:fileName) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4596
	self warn:'no such container'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4597
	^ false
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4598
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4599
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4600
    aStream := mgr 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4601
	    streamForClass:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4602
	    fileName:fileName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4603
	    revision:#newest
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4604
	    directory:package
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4605
	    module:module
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4606
	    cache:false.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4607
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4608
    aStream isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4609
	self warn:'could not fileIn from repository'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4610
	^ false.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4611
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4612
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4613
    self busyLabel:'loading from %1' with:(module , '/' , package , '/' , fileName).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4614
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4615
    Class withoutUpdatingChangesDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4616
	[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4617
	    aStream fileIn.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4618
	] valueNowOrOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4619
	    aStream close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4620
	    self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4621
	    Smalltalk changed.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4622
	].
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4623
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4624
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4625
    ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4626
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4627
    "Created: 13.9.1996 / 09:27:09 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4628
    "Modified: 16.1.1997 / 00:50:09 / cg"
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4629
!
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4630
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4631
classLoadRevision
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4632
    "load a specific revision into the system - especially useful to
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4633
     upgrade a class to the newest revision"
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4634
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  4635
    currentClass isLoaded ifFalse:[
2679
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4636
        self warn:'cannot load specific releases of autoloaded classes.'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4637
        ^ self.
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  4638
    ].
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  4639
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4640
    self doClassMenu:[:currentClass |
2679
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4641
        |aStream comparedSource currentSource v rev revString what mgr keep className
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4642
         newClass prevCategory ok|
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4643
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4644
        rev := SourceCodeManagerUtilities
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4645
                    askForExistingRevision:'load which revision:'
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4646
                    title:'Load from repository' 
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4647
                    class:currentClass.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4648
        "/ rev := Dialog request:'load which revision: (empty for newest)' onCancel:nil.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4649
        rev notNil ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4650
            className := currentClass name.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4651
            (className includesString:'_rev_') ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4652
                self warn:'select the original class and try again.'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4653
                ^ self
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4654
            ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4655
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4656
            mgr := currentClass sourceCodeManager.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4657
            ok := false.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4658
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4659
            rev withoutSpaces isEmpty ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4660
                what := className , '(newest)'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4661
                self busyLabel:'extracting %1' with:what.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4662
                aStream := mgr getMostRecentSourceStreamForClassNamed:className.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4663
                revString := 'newest'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4664
                keep := false.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4665
            ] ifFalse:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4666
                what := className , '(' , rev , ')'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4667
                self busyLabel:'extracting %1' with:what.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4668
                aStream := mgr getSourceStreamFor:currentClass revision:rev.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4669
                revString := rev.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4670
                keep := true.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4671
            ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4672
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4673
            aStream isNil ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4674
                self warn:'cannot find classes source.'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4675
                ^ self.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4676
            ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4677
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4678
            self busyLabel:'loading %1' with:what .
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4679
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4680
            [
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4681
                Class withoutUpdatingChangesDo:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4682
                    |saveIt prevSkip|
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4683
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4684
                    saveIt := Dialog confirmWithCancel:'Keep a save-copy of the existing class ?
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4685
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4686
Enter ''yes'', to have the existing class be
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4687
renamed before the fileIn is performed.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4688
You have to care for subclasses if doing so,
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4689
because those are moved out of the way together
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4690
with the class.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4691
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4692
Enter ''no'' to load the repository version
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4693
without saving the existing class.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4694
In this case, methods from the repository version
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4695
will be merged with methods of the class in your 
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4696
running image.)' default:false.
2679
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4697
                    saveIt isNil ifTrue:[^ self].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4698
                    saveIt ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4699
                        "/ rename the current class - for backup
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4700
                        prevCategory := currentClass category.    
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4701
                        currentClass category:'* obsolete *'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4702
                        Smalltalk renameClass:currentClass to:className , '_saved'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4703
                    ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4704
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4705
                    prevSkip := ClassCategoryReader skipUnchangedMethods.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4706
                    ClassCategoryReader skipUnchangedMethods:false.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4707
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4708
                    Class nameSpaceQuerySignal answer:currentClass nameSpace
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4709
                    do:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4710
                        Class packageQuerySignal answer:currentClass package
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4711
                        do:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4712
                            lockUpdates := true.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4713
                            [
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4714
                                aStream fileIn.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4715
                            ] valueNowOrOnUnwindDo:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4716
                                ClassCategoryReader skipUnchangedMethods:prevSkip.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4717
                                lockUpdates := false.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4718
                            ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4719
                        ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4720
                    ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4721
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4722
                    "/ did that work ?
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4723
                    newClass := Smalltalk at:className ifAbsent:nil.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4724
                    newClass isNil ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4725
                        saveIt ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4726
                            self warn:'fileIn failed - undoing changes ...'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4727
                            Smalltalk renameClass:currentClass to:className.                        
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4728
                            currentClass category:prevCategory.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4729
                        ] ifFalse:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4730
                            self warn:'fileIn failed - cannot recover class'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4731
                        ]
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4732
                    ] ifFalse:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4733
                        "/
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4734
                        "/ if we loaded an old version, rename that one and fix the name of the
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4735
                        "/ current class
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4736
                        "/
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4737
                        keep ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4738
                            saveIt ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4739
                                Smalltalk renameClass:newClass to:(className , '_rev_' , rev).
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4740
                                newClass category:'* old versions *'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4741
                                Smalltalk renameClass:currentClass to:className.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4742
                                currentClass category:prevCategory.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4743
                            ]
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4744
                        ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4745
                        ok := true.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4746
                    ]
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4747
                ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4748
            ] valueNowOrOnUnwindDo:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4749
                aStream close.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4750
                self normalLabel.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4751
                Smalltalk changed.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4752
            ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4753
            ok ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4754
                self switchToClassNamed:newClass name.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4755
            ]    
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  4756
        ]
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4757
    ]
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4758
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  4759
    "Created: / 14.11.1995 / 16:43:15 / cg"
1698
4fcf69e3d3c1 when loading an existing class from the repository,
Claus Gittinger <cg@exept.de>
parents: 1696
diff changeset
  4760
    "Modified: / 18.6.1998 / 14:29:40 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4761
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4762
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4763
classModifyContainer
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4764
    "change the classes container in the source repository"
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4765
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4766
    currentClass isLoaded ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4767
	self warn:'dont know anything about unloaded classes.'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4768
	^ self.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4769
    ].
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4770
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4771
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4772
	self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4773
	    classDefineSourceContainerFor:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4774
	    title:(resources string:'Repository information for %1' with:currentClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4775
	    text:'defining/changing the source code container'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4776
	    createDirectories:true createContainer:true. 
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4777
    ]
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4778
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4779
    "Created: 23.11.1995 / 11:41:38 / cg"
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  4780
    "Modified: 6.2.1996 / 16:58:58 / cg"
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4781
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4782
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4783
classModifyPackage
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4784
    "change the classes package assignment (dangerous)"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4785
2423
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  4786
    |newPackage p|
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4787
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4788
    currentClass owningClass notNil ifTrue:[
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4789
        self warn:'Private classes always belong to the owners package.\\Cannot change the packageID.' withCRs.
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4790
        ^ self
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4791
    ].
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4792
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4793
    currentClass isLoaded ifFalse:[
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4794
        self warn:('The package-ID is ''' , currentClass package asText allBold , '''.'
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4795
                   , '\\I will not change the package-ID of unloaded classes.') withCRs.
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4796
        ^ self.
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4797
    ].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4798
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4799
    newPackage := Dialog 
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4800
                    request:(resources string:'Change the package-ID of ''%1'' to:\\(Warning - this may affect autoloading & source code access)' with:currentClass name asText allBold) withCRs
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4801
                    initialAnswer:currentClass package.
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4802
    newPackage size == 0 ifTrue:[
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4803
        ^ self
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4804
    ].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4805
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4806
    self doClassMenu:[:currentClass |
2423
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  4807
        currentClass package:newPackage.
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  4808
        (p := Project projectNamed:newPackage) notNil ifTrue:[
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  4809
            p addClass:currentClass
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  4810
        ]
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4811
    ]
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4812
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4813
    "Created: 23.11.1995 / 11:41:38 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4814
    "Modified: 6.2.1996 / 16:58:58 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4815
!
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4816
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4817
classRemoveContainer
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4818
    "remove a container from the source repository"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4819
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4820
    currentClass isLoaded ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4821
	self warn:'please load the class first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4822
	^ self.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4823
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4824
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4825
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4826
	self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4827
	    classRemoveSourceContainerFor:currentClass
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4828
    ]
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4829
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4830
    "Created: 23.11.1995 / 11:41:38 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4831
    "Modified: 11.9.1996 / 12:55:42 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4832
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4833
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4834
classRemoveSourceContainerFor:aClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4835
    "show container & let user confirm twice."
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4836
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  4837
    |module package fileName info mgr|
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4838
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4839
    aClass isLoaded ifFalse:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4840
        self warn:'please load the class first'.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4841
        ^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4842
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4843
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4844
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4845
    "/ ask the sourceCodeManager if it knows anything about that class
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4846
    "/ if so, take that as a default.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4847
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4848
    mgr := aClass sourceCodeManager.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4849
    mgr isNil ifTrue:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4850
        self warn:'No sourceCodeManagement.'.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4851
        ^ false
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4852
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4853
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4854
    info := mgr sourceInfoOfClass:aClass.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4855
    info notNil ifTrue:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4856
        (info includesKey:#module) ifTrue:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4857
            module := (info at:#module).
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4858
        ].
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4859
        (info includesKey:#directory) ifTrue:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4860
            package := (info at:#directory).
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4861
        ].
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4862
        fileName := mgr containerFromSourceInfo:info.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4863
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4864
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4865
    module isNil ifTrue:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4866
        self warn:'classes module is unknown.\\It seems to not have a container.' withCRs.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4867
        ^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4868
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4869
    package isNil ifTrue:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4870
        self warn:'classes package is unknown.\\It seems to not have a container.' withCRs.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4871
        ^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4872
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4873
    fileName isNil ifTrue:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4874
        self warn:'classes container fileName is unknown.\\It seems to not have a container.' withCRs.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4875
        ^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4876
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4877
        
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4878
    OperatingSystem isMSDOSlike ifTrue:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4879
        module replaceAll:$\ with:$/.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4880
    ].
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4881
    OperatingSystem isMSDOSlike ifTrue:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4882
        package replaceAll:$\ with:$/.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4883
    ].
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4884
    (mgr checkForExistingContainerInModule:module 
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4885
                                   package:package 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4886
                                 container:fileName) ifFalse:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4887
        self warn:'Class has no source container.' withCRs.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4888
        ^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4889
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4890
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  4891
    (Dialog
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4892
        choose:(resources 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4893
                    string:'Please confirm removal of the container for %1:
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4894
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4895
container:    %2 / %3 / %4
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4896
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4897
Really remove ?' 
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4898
                    with:aClass name 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4899
                    with:module 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4900
                    with:package 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4901
                    with:fileName) 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4902
        labels:(Array 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4903
                    with:(resources string:'no') 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4904
                    with:(resources string:'remove'))
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4905
        values:#(false true)
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4906
        default:false) ifFalse:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4907
        ^ self.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4908
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4909
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4910
    (mgr removeContainerFor:aClass
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4911
                   inModule:module
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4912
                    package:package
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4913
                  container:fileName) ifFalse:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4914
        self warn:(resources string:'failed to remove container.').
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4915
        self normalLabel.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4916
        ^ true.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4917
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4918
    ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4919
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4920
    "Created: 11.9.1996 / 13:06:14 / cg"
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  4921
    "Modified: 13.9.1996 / 19:06:06 / cg"
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4922
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4923
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4924
classRevisionInfo
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4925
    "show current classes revision info in codeView"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4926
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4927
    self doClassMenu:[:currentClass |
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4928
        |aStream info info2 s rv mgr fn msg|
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4929
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4930
        aStream := WriteStream on:(String new:200).
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4931
        currentClass notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4932
            Processor activeProcess 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4933
                withPriority:Processor activePriority-1 to:Processor activePriority
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4934
            do:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4935
                self busyLabel:'extracting revision info' with:nil.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4936
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4937
                info := currentClass revisionInfo.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4938
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4939
                rv := currentClass binaryRevision.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4940
                rv notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4941
                    aStream nextPutLine:'**** Loaded classes binary information ****'; cr.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4942
                    aStream nextPutLine:'  Binary based upon : ' , rv.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4943
                    aStream cr.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4944
                ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4945
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4946
                info notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4947
                    (info includesKey:#revision) ifFalse:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4948
                        aStream nextPutLine:'WARNING:'; cr.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4949
                        aStream nextPutLine:'  The class seems not to be loaded from the repository.'.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4950
                        aStream nextPutLine:'  Check carefully before checking anything in.'.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4951
                        aStream nextPutLine:'  (i.e. compare with repository for renamed class(es), same-name but unrelated etc.)'.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4952
                        aStream cr.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4953
                    ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4954
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4955
                    aStream nextPutLine:'**** Classes source information ****'; cr.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4956
                    s := info at:#repositoryPath ifAbsent:nil.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4957
                    s notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4958
                        aStream nextPutLine:'  Source repository : ' , s
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4959
                    ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4960
                    aStream nextPutLine:'  Filename ........ : ' , (info at:#fileName ifAbsent:'?').
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4961
                    aStream nextPutLine:'  Revision ........ : ' , (info at:#revision ifAbsent:'?').
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4962
                    aStream nextPutLine:'  Checkin date .... : ' , (info at:#date ifAbsent:'?') , ' ' , (info at:#time ifAbsent:'?').
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4963
                    aStream nextPutLine:'  Checkin user .... : ' , (info at:#user ifAbsent:'?').
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4964
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4965
                    (info2 := currentClass packageSourceCodeInfo) notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4966
                        aStream nextPutLine:'  Repository: ..... : ' , (info2 at:#module ifAbsent:'?').
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4967
                        aStream nextPutLine:'  Directory: ...... : ' , (info2 at:#directory ifAbsent:'?').
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4968
                    ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4969
                    aStream nextPutLine:'  Container ....... : ' , (info at:#repositoryPathName ifAbsent:'?').
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4970
                    aStream cr.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4971
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4972
                    (mgr := currentClass sourceCodeManager) notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4973
                        aStream nextPutLine:'**** Repository information ****'; cr.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4974
                        mgr writeRevisionLogOf:currentClass to:aStream.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4975
                    ]
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4976
                ] ifFalse:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4977
                    aStream nextPutLine:'No revision info found'.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4978
                    currentClass isLoaded ifFalse:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4979
                        aStream cr; nextPutAll:'This is an autoloaded class - you may see more after its loaded.'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4980
                    ] ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4981
                        fn := currentClass classFilename.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4982
                        currentClass wasAutoloaded ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4983
                            msg := 'This class was autoloaded.'.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4984
                            fn notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4985
                                msg := msg , ' (from ''' , fn , ''')'.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4986
                            ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4987
                        ] ifFalse:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4988
                            fn notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4989
                                msg := 'This class was loaded from ''' , fn , '''.'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4990
                            ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4991
                        ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4992
                        msg notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4993
                            aStream cr; nextPutAll:msg.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4994
                        ]
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4995
                    ]
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4996
                ]
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4997
            ]
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4998
        ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4999
        codeView contents:(aStream contents).
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5000
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5001
        codeView modified:false.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5002
        codeModified := false.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  5003
        self clearAcceptAction.
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5004
        self clearExplainAction.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5005
        methodListView notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5006
            methodListView setSelection:nil
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5007
        ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5008
        aspect := #revisionInfo. 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5009
        self normalLabel
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5010
    ]
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5011
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  5012
    "Created: / 14.11.1995 / 16:43:15 / cg"
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  5013
    "Modified: / 10.2.2000 / 14:14:09 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5014
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5015
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5016
!BrowserView methodsFor:'class stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5017
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5018
allClasses
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5019
    |classes|
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5020
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5021
    currentNamespace = '* all *' ifTrue:[
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5022
        ^ Smalltalk allClasses
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5023
    ].
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5024
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5025
    classes := Set new.
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5026
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5027
    (self listOfNamespaces) do:[:aNamespace |
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5028
        aNamespace allBehaviorsDo:[:aClass |
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5029
            |actualNamespace nm|
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5030
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5031
            aClass isMeta ifFalse:[
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5032
                (aClass isNameSpace not
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5033
                or:[aClass == Smalltalk]) ifTrue:[
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5034
                    actualNamespace := aClass nameSpace.
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5035
                    (actualNamespace isNameSpace not "/ a private class
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5036
                    or:[actualNamespace == aNamespace]) ifTrue:[
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5037
                        classes add:aClass
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5038
                    ]
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5039
                ]
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5040
            ]
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5041
        ]
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5042
    ].
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5043
    ^ classes
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5044
!
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5045
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5046
allClassesInCategory:aCategory
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5047
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5048
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5049
    currentNamespace = '* all *' ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5050
        ^ Smalltalk allClassesInCategory:currentClassCategory
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5051
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5052
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5053
    classes := Set new.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5054
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5055
    (self listOfNamespaces) do:[:aNamespace |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5056
        aNamespace allBehaviorsDo:[:aClass |
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5057
            |actualNamespace nm|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5058
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5059
            aClass isMeta ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5060
                (aCategory = '* all *'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5061
                or:[aClass category = aCategory]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5062
                    (aClass isNameSpace not
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5063
                    or:[aClass == Smalltalk]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5064
                        actualNamespace := aClass nameSpace.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5065
                        (actualNamespace isNameSpace not "/ a private class
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5066
                        or:[actualNamespace == aNamespace]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5067
                            classes add:aClass
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5068
                        ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5069
                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5070
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5071
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5072
        ]
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5073
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5074
    ^ classes
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5075
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5076
    "Created: 23.12.1996 / 10:26:28 / cg"
887
ad1d6b0ed970 namespace fixes
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  5077
    "Modified: 23.12.1996 / 11:33:13 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5078
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5079
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5080
allClassesInCategory:aCategory do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5081
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5082
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5083
    classes := self allClassesInCategory:aCategory.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5084
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5085
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5086
    "Modified: 23.12.1996 / 10:30:00 / cg"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5087
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5088
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5089
allClassesInCategory:aCategory inOrderDo:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5090
    "evaluate the argument, aBlock for all classes in aCategory;
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5091
     superclasses come first - then subclasses"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5092
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5093
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5094
1079
513fda872db0 oops - need an OC for sorting
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  5095
    classes := (self allClassesInCategory:aCategory) asOrderedCollection.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5096
    classes topologicalSort:[:a :b | b isSubclassOf:a].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5097
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5098
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5099
    "Created: 23.12.1996 / 10:27:52 / cg"
1079
513fda872db0 oops - need an OC for sorting
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  5100
    "Modified: 19.3.1997 / 12:48:28 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5101
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5102
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5103
allClassesInSelectedNamespacesDo:aBlock
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5104
    |nameSpacesConsidered|
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5105
1701
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5106
    currentNamespace = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5107
	Smalltalk allBehaviorsDo:aBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5108
	^ self
1701
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5109
    ].
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5110
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5111
    nameSpacesConsidered := self listOfNamespaces asIdentitySet.
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5112
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5113
    Smalltalk allBehaviorsDo:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5114
	(nameSpacesConsidered includes:aClass nameSpace)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5115
	ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5116
	    aBlock value:aClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5117
	]
1701
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5118
    ]
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5119
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5120
    "Created: / 16.1.1997 / 20:18:47 / cg"
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5121
    "Modified: / 18.6.1998 / 15:06:23 / cg"
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5122
!
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5123
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5124
changeCurrentClass:newClass
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5125
    "change the current class to some other class;
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5126
     keep instance protocol as it was.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5127
     This does not update any views."
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5128
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5129
    |cls meta|
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5130
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5131
"/    fullProtocol ifTrue:[^ self].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5132
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5133
    self releaseClass.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5134
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5135
    cls := newClass.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5136
    cls isMeta ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5137
	meta := cls.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5138
	cls := meta soleInstance
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5139
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5140
	meta := cls class
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5141
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5142
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5143
    currentClass := cls.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5144
    showInstance ifTrue:[
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5145
       actualClass := acceptClass := cls.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5146
    ] ifFalse:[
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5147
       actualClass := acceptClass := meta.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5148
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5149
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5150
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5151
	cls addDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5152
	meta addDependent:self.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5153
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5154
    self normalLabel.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5155
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5156
    "Modified: / 1.9.1995 / 01:04:05 / claus"
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5157
    "Modified: / 13.12.1995 / 15:32:49 / cg"
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5158
    "Created: / 10.4.1998 / 12:25:16 / cg"
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5159
!
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5160
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5161
checkClassSelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5162
    "warn and return false, if no class is selected"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5163
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5164
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5165
	self warn:'select a class first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5166
	^ false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5167
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5168
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5169
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5170
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5171
classClassDefinitionTemplateFor:aClass in:cat namespace:isNameSpace private:isPrivate
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5172
    "common helper for newClass and newSubclass
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5173
     - show a template to define a subclass of aClass in category cat.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5174
     Also, set acceptaction to install the class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5175
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5176
    |theSuperClass|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5177
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5178
    currentMethodCategory := nil.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  5179
    self releaseMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5180
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  5181
    classListView setSelection:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5182
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5183
    fullClass ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5184
        methodCategoryListView contents:nil.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5185
        methodListView contents:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5186
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5187
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5188
    (aClass == Autoload
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  5189
    or:[aClass isNil or:[aClass isLoaded not]]) ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5190
        currentNamespace == JAVA ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5191
            theSuperClass := Java at:'java.lang.Object'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5192
        ] ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5193
            theSuperClass := Object
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5194
        ]
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5195
    ] ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5196
        theSuperClass := aClass
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5197
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5198
    codeView contents:(self classTemplateFor:theSuperClass in:cat namespace:isNameSpace private:isPrivate).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5199
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  5200
    codeModified := false.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5201
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5202
    self changeCurrentClass:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5203
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  5204
    "Created: / 23.12.1996 / 12:45:43 / cg"
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  5205
    "Modified: / 27.7.1998 / 10:57:09 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5206
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5207
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5208
classDoubleClick:lineNr
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5209
    "double click on a class;
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5210
     if its unloaded, load it.
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5211
     if its an application-class, start the app"
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5212
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5213
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5214
	currentClass isVisualStartable ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5215
	    self withWaitCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5216
		self busyLabel:'starting application %1' with:currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5217
		currentClass open.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5218
		self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5219
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5220
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5221
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5222
	currentClass isLoaded ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5223
	    self classLoad.
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5224
"/            self withWaitCursorDo:[
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5225
"/                currentClass autoload.
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5226
"/            ].
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5227
	    self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5228
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5229
	].
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5230
    ]
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5231
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5232
    "Created: / 29.10.1997 / 15:50:26 / cg"
1478
852defc72eca Load autoloaded classes with doubleclick.
Stefan Vogel <sv@exept.de>
parents: 1451
diff changeset
  5233
    "Modified: / 16.2.1998 / 11:55:25 / stefan"
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5234
    "Modified: / 4.3.1998 / 14:58:35 / cg"
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5235
!
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5236
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5237
classListUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5238
    RememberAspect ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5239
	aspect == #hierarchy ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5240
	    ^ self classHierarchy
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5241
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5242
	aspect == #classInstVars ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5243
	    ^ self classClassInstVars
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5244
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5245
	aspect == #comment ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5246
	    ^ self classComment
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5247
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5248
	aspect == #primitiveDefinitions ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5249
	    ^ self classPrimitiveDefinitions
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5250
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5251
	aspect == #primitiveFunctions ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5252
	    ^ self classPrimitiveFunctions
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5253
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5254
	aspect == #primitiveVariables ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5255
	    ^ self classPrimitiveVariables
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5256
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5257
	aspect == #revisionInfo ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5258
	    ^ self classRevisionInfo
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5259
	].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5260
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5261
    self classDefinition
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5262
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5263
    "Created: 23.11.1995 / 11:28:58 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5264
    "Modified: 23.11.1995 / 11:36:08 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5265
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5266
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5267
classSelection:lineNr
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5268
    "user clicked on a class line - show method categories"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5269
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  5270
    |cls nm oldSelector sel classes msg globlName|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5271
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5272
    (currentClassHierarchy notNil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5273
     and:[fullProtocol]) ifTrue:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5274
        oldSelector := currentSelector.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5275
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5276
        self updateMethodCategoryListWithScroll:false.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5277
        self updateMethodListWithScroll:false.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5278
        fullProtocol ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5279
            self updateVariableList.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5280
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5281
        oldSelector notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5282
            self switchToMethod:oldSelector.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5283
            currentMethod isNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5284
                currentSelector := oldSelector.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5285
                codeView contents:'*** no other implementor of ' , currentSelector asText allBold , ' in that hierarchy ***'.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  5286
                self clearAcceptAction.
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5287
            ] ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5288
                self switchToMethodCategory:(currentMethod category).
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5289
                self methodSelectionChanged.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5290
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5291
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5292
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5293
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5294
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5295
    (sel := classListView selectionValue) isNil ifTrue:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5296
        self classCategorySelectionChanged. 
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5297
        aspect := nil.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5298
        currentClass := actualClass := nil.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5299
        self updateCodeView.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5300
        ^ self
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5301
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5302
    nm := sel withoutSpaces.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5303
    cls := self findClassNamed:nm.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5304
    cls notNil ifTrue:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5305
        self changeCurrentClass:cls.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5306
        self classSelectionChanged
836
22cdfaaf87fc namespace fixes & another check
Claus Gittinger <cg@exept.de>
parents: 834
diff changeset
  5307
    ] ifFalse:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5308
        (self confirm:('oops - no class named: ' , nm , ' found in selected namespace(s)\\Try to reconnect ?') withCRs)
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5309
        ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5310
            "/ search for all classes by that name ...
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5311
            classes := IdentitySet new.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5312
            Class allSubInstancesDo:[:aClass |
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5313
                aClass name = nm ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5314
                    classes add:aClass
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5315
                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5316
            ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5317
            classes notEmpty ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5318
                classes size == 1 ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5319
                    cls := classes first.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5320
                    Smalltalk 
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5321
                        keysAndValuesDo:[:key :aClass |
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5322
                                (Smalltalk at:key) == cls ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5323
                                    globlName := key
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5324
                                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5325
                        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5326
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5327
                    msg := 'found ' , cls name , ' in category ''' , cls category , '''.\'.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5328
                    globlName notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5329
                        msg := msg , '(known as ' , globlName , ')\'.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5330
                    ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5331
                    (self confirm:(msg , '\rebind in Smalltalk as ''' , cls name , '''?') withCRs)
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5332
                    ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5333
                        Smalltalk at:cls name asSymbol put:cls
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5334
                    ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5335
                ] ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5336
                    self warn:('found multiple classes with a name of ' , nm , '.\\Select and rename as required') withCRs.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5337
                     SystemBrowser browseClasses:classes asOrderedCollection
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5338
                                           title:'choose and rename as required'
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5339
                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5340
            ] ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5341
                self warn:'oops - could not find that class'
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5342
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5343
        ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5344
    ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5345
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5346
    actualClass notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5347
        self addToClassHistory: actualClass name asString
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5348
    ]
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5349
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  5350
    "Modified: / 10.2.2000 / 14:14:18 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5351
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5352
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5353
classSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5354
    |oldMethodCategory oldMethod oldSelector|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5355
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  5356
    self withBusyCursorDo:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5357
        "/ alien classes have no methodCategories; hide that list ...
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5358
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5359
        currentClass notNil ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5360
            currentClass supportsMethodCategories ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5361
                self hideMethodCategoryList
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5362
            ] ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5363
                self showMethodCategoryList
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5364
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5365
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5366
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5367
        "/ temporarily nil the aspect, to avoid
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5368
        "/ double redraw.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5369
        aspect := nil. "/ #definition.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5370
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5371
        oldMethodCategory := currentMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5372
        oldMethod := currentMethod.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5373
        oldSelector := currentSelector.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5374
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5375
        showInstance ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5376
            actualClass := acceptClass := currentClass
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5377
        ] ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5378
            actualClass := acceptClass := currentClass class
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5379
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5380
        currentMethodCategory := nil.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5381
        self releaseMethod.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5382
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5383
        self updateMethodCategoryList.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5384
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5385
        oldMethodCategory notNil ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5386
            methodCategoryListView setSelectElement:oldMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5387
            methodCategoryListView hasSelection ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5388
                currentMethodCategory := oldMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5389
                self methodCategorySelectionChanged
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5390
            ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5391
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5392
        aspect := #definition.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5393
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5394
        self updateMethodList.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5395
        "/ self updateCodeView.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5396
        self updateVariableList.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5397
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5398
        fullClass ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5399
            self updateCodeView.
2632
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
  5400
            self setAcceptActionForFullClass.
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5401
        ] ifFalse:[
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5402
"/            self classDefinition.
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5403
            self classListUpdate.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5404
            self setAcceptActionForClass.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5405
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5406
        self clearExplainAction.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5407
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5408
        (classCategoryListView notNil and:[currentClass notNil]) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5409
            (currentClassCategory = currentClass category) ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5410
                currentClassCategory := currentClass category.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5411
                (classCategoryListView list includes:currentClassCategory) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5412
                    classCategoryListView setSelectElement:currentClassCategory
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5413
                ] ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5414
                    classCategoryListView setSelection:nil
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5415
                ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5416
            ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5417
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5418
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5419
        self setDoitActionForClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5420
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5421
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  5422
    "Created: / 23.11.1995 / 11:32:03 / cg"
2632
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
  5423
    "Modified: / 24.2.2000 / 15:50:17 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5424
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5425
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5426
classTemplateFor:aSuperClass in:categoryString namespace:isNameSpace private:isPrivate
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5427
    "return a class definition template - be smart in what is offered initially"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5428
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  5429
    |cat name nameProto namePrefix i existingNames withNameSpaceDirective
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5430
     className ownerName s isJava|
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5431
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5432
    (aSuperClass notNil and:[aSuperClass isJavaClass not]) ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5433
        (currentNamespace == JAVA 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5434
        or:[aSuperClass notNil and:[aSuperClass isJavaClass]])
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5435
        ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5436
            ^ self javaClassTemplateFor:aSuperClass in:categoryString private:isPrivate
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5437
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5438
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5439
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5440
    self setAcceptActionForNewClass.
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5441
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5442
    s := TextStream on:''.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5443
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5444
    isNameSpace ifTrue:[
2652
6cd9b4646289 oops - Namespace -> NameSpace
ca
parents: 2649
diff changeset
  5445
        s nextPutAll:'NameSpace name:''NewNameSpace'''.
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5446
        s cr; cr.
2605
56cf1ae89b39 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  5447
        s emphasis:(UserPreferences current commentEmphasisAndColor).
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5448
        s nextPutAll:'"
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  5449
 Replace ''NewNameSpace'' by the desired name.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  5450
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  5451
 Create the namespace by ''accepting'',
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  5452
 either via the menu or the keyboard (usually CMD-A).
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  5453
"
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5454
'.
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5455
        ^ s contents.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5456
    ].
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5457
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5458
    withNameSpaceDirective :=
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5459
        currentNamespace notNil 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5460
        and:[currentNamespace ~= '* all *'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5461
        and:[currentNamespace ~= Smalltalk]].
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5462
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5463
    withNameSpaceDirective ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5464
        className := aSuperClass nameWithoutNameSpacePrefix.
2652
6cd9b4646289 oops - Namespace -> NameSpace
ca
parents: 2649
diff changeset
  5465
        s nextPutAll:('"{ NameSpace: ''' , currentNamespace name , ''' }"').
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5466
        s cr; cr.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5467
    ] ifFalse:[    
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5468
        className := aSuperClass name.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5469
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5470
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5471
    cat := categoryString.
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  5472
    (cat isNil or:[cat startsWith:$*]) ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5473
        cat := '* no category *'
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5474
    ].
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5475
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5476
    nameProto := 'NewClass'.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5477
    i := 1.
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5478
    isPrivate ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5479
        namePrefix := currentClass name , '::'.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5480
        existingNames := currentClass privateClasses.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5481
        existingNames size > 0 ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5482
            existingNames := existingNames collect:[:cls | cls name].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5483
        ]
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5484
    ] ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5485
        namePrefix := ''.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5486
        existingNames := Smalltalk keys
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5487
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5488
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5489
    name := 'NewClass' , i printString.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5490
    existingNames notNil ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5491
        nameProto := namePrefix , name.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5492
        [nameProto knownAsSymbol and:[existingNames includes:nameProto asSymbol]] whileTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5493
            i := i + 1.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5494
            name := 'NewClass' , i printString.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5495
            nameProto := namePrefix , name
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5496
        ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5497
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5498
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5499
    s nextPutAll:className.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5500
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5501
    isPrivate ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5502
        withNameSpaceDirective ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5503
            ownerName := currentClass nameWithoutNameSpacePrefix
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5504
        ] ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5505
            ownerName := currentClass name
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5506
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5507
        s nextPutAll:(' subclass:#' , name  , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5508
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5509
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5510
' , '    poolDictionaries: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5511
' , '    privateIn:' , ownerName)
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5512
    ] ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5513
        s nextPutAll:(' subclass:#' , name , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5514
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5515
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5516
' , '    poolDictionaries: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5517
' , '    category: ''').
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5518
        cat notNil ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5519
            cat printWithQuotesDoubledOn:s
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5520
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5521
        s nextPutAll: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5522
    ].
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5523
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5524
    s cr; cr.
2605
56cf1ae89b39 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  5525
    s emphasis:(UserPreferences current commentEmphasisAndColor).
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5526
    s nextPutAll:'
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5527
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5528
 Replace ''' , className , ''', ''', name , ''' and
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5529
 the empty string arguments by true values.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5530
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5531
 Install (or change) the class by ''accepting'',
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5532
 either via the menu or the keyboard (usually CMD-A).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5533
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5534
 To be nice to others (and yourself later), do not forget to
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5535
 add some documentation; preferably under the classes documentation
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5536
 protocol.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5537
 (see the `create documentation stubs'' item in the methodList menu.)
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5538
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5539
'.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5540
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5541
    ^ s contents
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5542
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  5543
    "Created: / 23.12.1996 / 12:46:31 / cg"
1686
1889219f83e4 care for embedded quotes in a category string.
Claus Gittinger <cg@exept.de>
parents: 1675
diff changeset
  5544
    "Modified: / 15.6.1998 / 17:23:05 / cg"
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5545
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5546
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5547
doClassMenu:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5548
    "a helper - check if class is selected and evaluate aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5549
     while showing waitCursor"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5550
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5551
    self checkClassSelected ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5552
	self withBusyCursorDo:[aBlock value:currentClass]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5553
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  5554
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  5555
    "Modified: 18.8.1997 / 15:43:58 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5556
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5557
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5558
javaClassTemplateFor:aSuperClass in:categoryString private:isPrivate
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5559
    "return a java class definition template - be smart in what is offered initially"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5560
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5561
    |cat name nameProto namePrefix i existingNames withNameSpaceDirective
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5562
     className ownerName s superPackage|
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5563
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5564
    self setAcceptActionForNewJavaClass.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5565
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5566
    s := TextStream on:''.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5567
    s nextPutAll:('package ' , categoryString , ';').
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5568
    s cr; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5569
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5570
    s nextPutAll:('public '); cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5571
    s nextPutAll:('class ').
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5572
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5573
    i := 1.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5574
    name := 'NewClass' , i printString.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5575
    [ (Java classNamed:(categoryString , '.' , name)) notNil ] whileTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5576
        i := i + 1.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5577
        name := 'NewClass' , i printString.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5578
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5579
    s nextPutAll:name; space.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5580
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5581
    className := aSuperClass lastName.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5582
    superPackage := aSuperClass package copy replaceAll:$/ with:$..
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5583
    superPackage = categoryString ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5584
        superPackage = 'java.lang' ifFalse:[
2351
aea6ec072a3d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2350
diff changeset
  5585
            className := aSuperClass name asString copy replaceAll:$/ with:$..
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5586
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5587
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5588
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5589
    s nextPutAll:'extends '; nextPutAll:className.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5590
    s nextPutAll:' {'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5591
    s nextPutAll:'    // { private } { static } { final } type varName;'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5592
    s nextPutAll:'    // int var1;'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5593
    s nextPutAll:'    // int var2;'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5594
    s nextPutAll:'}'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5595
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5596
    s cr; cr.
2605
56cf1ae89b39 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  5597
    s emphasis:(UserPreferences current commentEmphasisAndColor).
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5598
    s nextPutAll:'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5599
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5600
// Replace ''' , className , ''', ''', name , ''' and
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5601
// change the local variable declarations as required.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5602
//
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5603
// Install (or change) the class by ''accepting'',
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5604
// either via the menu or the keyboard (usually CMD-A).
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5605
'.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5606
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5607
    ^ s contents
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5608
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5609
    "Created: / 23.12.1996 / 12:46:31 / cg"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5610
    "Modified: / 15.6.1998 / 17:23:05 / cg"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5611
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5612
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5613
listOfAllClassNamesInCategory:aCategory
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5614
    "return a list of the names of all classes in a given category"
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5615
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5616
    ^ self listOfAllClassesInCategory:aCategory names:true
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5617
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5618
    "Modified: 10.1.1997 / 14:00:33 / cg"
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5619
!
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5620
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5621
listOfAllClassesInCategory:aCategory names:namesFlag
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5622
    "return a list of (the names) of all classes in a given category
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5623
     from the currently selected set of nameSpaces."
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5624
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5625
    |nameSpaces listOfClassNames listOfClasses classesPresent namesPresent searchCategory 
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  5626
     match anyCategory nm allNameSpaces|
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5627
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5628
    allNameSpaces := (currentNamespace = '* all *').
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5629
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5630
    "/ keep track of added names (care for obsolete classes)
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5631
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5632
    namesPresent := Set new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5633
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
  5634
    (aCategory = '* hierarchy *') ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5635
        listOfClassNames := OrderedCollection new.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5636
        listOfClasses := OrderedCollection new.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5637
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5638
        self classHierarchyOf:Object withAutoloaded:true do:[:aClass :lvl|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5639
            |indent|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5640
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5641
            (aClass isNameSpace not
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5642
            or:[aClass == Smalltalk]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5643
                aClass isObsolete ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5644
                    nm := self displayedClassNameOf:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5646
                    (namesPresent includes:nm) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5647
                        indent := String new:lvl*2.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5648
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5649
                        "/ show classes from other nameSpaces in italic
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5650
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5651
                        (allNameSpaces not
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5652
                         and:[(self findClassNamedInNameSpace:nm) isNil]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5653
                            nm := nm asText emphasizeAllWith:#italic.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5654
                        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5655
                        nm := indent , nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5656
                        namesPresent add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5657
                        listOfClassNames add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5658
                        listOfClasses add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5659
                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5660
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5661
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5662
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5663
        namesFlag ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5664
            ^ listOfClasses
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5665
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5666
        ^ listOfClassNames
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5667
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5668
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5669
    (aCategory = '* all *') ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5670
        anyCategory := true
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5671
    ] ifFalse:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5672
        anyCategory := false.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5673
        (aCategory = '* no category *') ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5674
            searchCategory := nil
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5675
        ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5676
            searchCategory := aCategory
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5677
        ].
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5678
    ].
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5679
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5680
    allNameSpaces ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5681
        nameSpaces := Array with:Smalltalk.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5682
    ] ifFalse:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5683
        nameSpaces := self listOfNamespaces.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5684
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5685
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5686
    listOfClasses := OrderedCollection new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5687
    listOfClassNames := OrderedCollection new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5688
    classesPresent := IdentitySet new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5689
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5690
    nameSpaces do:[:aNamespace |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5691
        aNamespace allBehaviorsDo:[:aClass |
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5692
            |thisCategory actualNamespace nm owner|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5693
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5694
            aClass isMeta ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5695
                (aClass isNameSpace not
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5696
                or:[aClass == Smalltalk]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5697
                    (classesPresent includes:aClass) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5698
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5699
                        match := anyCategory.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5700
                        match ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5701
                            thisCategory := aClass category.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5702
                            match := ((thisCategory = searchCategory) 
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5703
                                     or:[thisCategory = aCategory]).
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5704
                        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5705
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5706
                        match ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5707
                            fullClass ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5708
                                aClass owningClass notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5709
                                    match := false
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5710
                                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5711
                            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5712
                        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5713
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5714
                        match ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5715
                            nm := self displayedClassNameOf:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5716
                            (namesPresent includes:nm) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5717
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5718
                                allNameSpaces ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5719
                                    (owner := aClass topOwningClass) notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5720
                                        actualNamespace := owner nameSpace
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5721
                                    ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5722
                                        actualNamespace := aClass nameSpace.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5723
                                    ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5724
                                    match := actualNamespace isNameSpace not "/ a private class
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5725
                                             or:[actualNamespace == aNamespace].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5726
                                ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5727
                                match ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5728
                                    namesPresent add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5729
                                    classesPresent add:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5730
                                    listOfClasses add:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5731
                                    listOfClassNames add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5732
                                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5733
                            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5734
                        ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5735
                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5736
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5737
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5738
        ]
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5739
    ].
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5740
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5741
    fullClass ifFalse:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5742
        "/
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5743
        "/ mhm - must search through private classes of those
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5744
        "/ in smalltalk (they are not visible in the nameSpace,
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5745
        "/ but should also be displayed)
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5746
        "/
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5747
        Smalltalk allBehaviorsDo:[:aClass |
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5748
            |actualNamespace owner|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5749
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5750
            aClass isMeta ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5751
                (classesPresent includes:aClass) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5752
                    (owner := aClass topOwningClass) notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5753
                        (classesPresent includes:owner) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5754
                            nm := self displayedClassNameOf:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5755
                            (namesPresent includes:nm) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5756
                                namesPresent add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5757
                                listOfClasses add:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5758
                                listOfClassNames add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5759
                            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5760
                        ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5761
                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5762
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5763
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5764
        ].
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5765
    ].
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5766
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5767
    (listOfClasses size == 0) ifTrue:[^ nil].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5768
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5769
    "/ sort by name
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5770
    listOfClassNames sortWith:listOfClasses.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5771
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5772
    namesFlag ifFalse:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5773
        ^ listOfClasses
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5774
    ].
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5775
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5776
    "/ indent after sorting
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5777
    1 to:listOfClassNames size do:[:index |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5778
        |nm cls owner s|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5779
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5780
        cls := listOfClasses at:index.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5781
        owner := cls.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5782
        (owner := owner owningClass) notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5783
            nm := listOfClassNames at:index.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5784
            s := nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5785
            [owner notNil] whileTrue:[    
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5786
                s := '  ' , s.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5787
                owner := owner owningClass
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5788
            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5789
            listOfClassNames at:index put:s.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5790
        ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5791
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5792
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5793
    ^ listOfClassNames
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5794
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5795
    "Created: 10.1.1997 / 13:57:34 / cg"
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
  5796
    "Modified: 22.3.1997 / 14:03:36 / cg"
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5797
!
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5798
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5799
listOfClassNameHierarchyOf:aClass
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5800
    "return a hierarchy class-list"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5801
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5802
    |startClass classes thisOne|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5803
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5804
    showInstance ifTrue:[
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  5805
        startClass := aClass
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5806
    ] ifFalse:[
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  5807
        startClass := aClass class.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5808
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5809
    classes := startClass allSuperclasses.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5810
    thisOne := Array with:startClass.
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  5811
    classes := classes reverse , thisOne.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5812
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5813
    fullProtocol ifFalse:[
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  5814
        classes := classes , startClass allSubclassesInOrder
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5815
    ].
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  5816
    ^ classes collect:[:c | self displayedClassNameOf:c "c name"]
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  5817
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5818
    "Created: 10.1.1997 / 14:01:06 / cg"
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  5819
    "Modified: 30.7.1997 / 17:47:24 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5820
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5821
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5822
renameCurrentClassTo:aString
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5823
    "helper - do the class-rename"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5824
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5825
    self doClassMenu:[:currentClass |
2644
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5826
        |oldSym oldBaseSym cls|
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5827
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5828
        "/ check if the target already exists - confirm if so.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5829
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5830
        (cls := Smalltalk classNamed:aString) notNil ifTrue:[
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5831
            (self confirm:(resources string:'WARN_RENAME' 
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5832
                                     with:aString 
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5833
                                     with:cls category) withCRs)
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5834
                ifFalse:[^ self]
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5835
        ].
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5836
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5837
        oldSym := currentClass name asSymbol.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5838
        oldBaseSym := currentClass nameWithoutPrefix asSymbol.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5839
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5840
        "/
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5841
        "/ renaming is actually more complicated as one might
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5842
        "/ think (care for classVariables, privateClasses etc.)
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5843
        "/ Smalltalk knows all about that ...
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5844
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5845
        Smalltalk renameClass:currentClass to:aString.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5846
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5847
        self updateClassList.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5848
        self updateMethodCategoryListWithScroll:false.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5849
        self updateMethodListWithScroll:false.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5850
        self withBusyCursorDo:[
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5851
            Transcript showCR:('searching for users of ' , oldSym); endEntry.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5852
            SystemBrowser browseReferendsOf:oldSym warnIfNone:false.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5853
            oldBaseSym ~= oldSym ifTrue:[
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5854
                Transcript showCR:('searching for users of ' , oldBaseSym); endEntry.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5855
                SystemBrowser browseReferendsOf:oldBaseSym warnIfNone:false
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5856
            ]
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  5857
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5858
    ]
214
bb193ae3f3f9 check for existing class in rename; avoid warnbox if no refs are found after rename
Claus Gittinger <cg@exept.de>
parents: 213
diff changeset
  5859
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5860
    "Created: / 25.11.1995 / 13:02:53 / cg"
1778
5c244fb31e02 care for valid selector selected when searching;
Claus Gittinger <cg@exept.de>
parents: 1773
diff changeset
  5861
    "Modified: / 31.7.1998 / 15:47:21 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5862
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5863
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5864
switchToClassNameMatching:aMatchString
1889
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5865
    |classNames caselessMatchingNames 
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5866
     substringMatchingNames caselessSubstringMatchingNames
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5867
     lcMatchString subMatch lcSubMatch thisName box className
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5868
     needSearch cls|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5869
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  5870
    classNames := Set new.
1688
186e02887c30 also do caseless match in find-class
Claus Gittinger <cg@exept.de>
parents: 1687
diff changeset
  5871
    caselessMatchingNames := Set new.
1889
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5872
    substringMatchingNames := Set new.
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5873
    caselessSubstringMatchingNames := Set new.
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5874
    lcMatchString := aMatchString asLowercase.
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5875
    needSearch := true.
1889
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5876
    aMatchString includesMatchCharacters ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5877
	subMatch := '*' , aMatchString , '*'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5878
	lcSubMatch := subMatch asLowercase.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5879
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5880
	"/ if the name is already a good one, avoid the expensive search
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5881
	className := aMatchString asSymbolIfInterned.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5882
	className notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5883
	    cls := Smalltalk at:className ifAbsent:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5884
	    (cls notNil and:[cls isBehavior]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5885
		needSearch := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5886
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5887
	]
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5888
    ].
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5889
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5890
    needSearch ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5891
	Smalltalk allBehaviorsDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5892
	    "/ to make it look better,
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5893
	    "/ show dotted names for java
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5894
	    "/ thisName := aClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5895
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5896
	    aClass isJavaClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5897
		thisName := aClass displayString. "/ fullName copyReplaceAll:$/ with:$.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5898
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5899
		thisName := aClass name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5900
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5901
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5902
	    (aMatchString match:thisName) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5903
		classNames add:thisName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5904
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5905
		(lcMatchString match:thisName asLowercase) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5906
		    caselessMatchingNames add:thisName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5907
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5908
		    subMatch notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5909
			(subMatch match:thisName) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5910
			    substringMatchingNames add:thisName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5911
			] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5912
			    (lcSubMatch match:thisName asLowercase) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5913
				caselessSubstringMatchingNames add:thisName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5914
			    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5915
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5916
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5917
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5918
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5919
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5920
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5921
	"/ if nothing matched - try caseless matches
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5922
	classNames size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5923
	    classNames := caselessMatchingNames.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5924
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5925
	    "/ if nothing matched - try substring matches
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5926
	    classNames size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5927
		classNames := substringMatchingNames.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5928
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5929
		"/ if nothing matched - try caseless substring matches
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5930
		classNames size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5931
		    classNames := caselessSubstringMatchingNames.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5932
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5933
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5934
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5935
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5936
	(classNames size == 0) ifTrue:[^ nil].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5937
	(classNames size == 1) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5938
	    className := classNames first
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5939
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5940
	    classNames := classNames asArray sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5941
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5942
	    box := self listBoxTitle:'select class to switch to:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5943
			      okText:'ok'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5944
				list:classNames.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5945
	    box action:[:aString | className := aString].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5946
	    box showAtPointer.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5947
	].
1567
20820f265460 handle cancel in match-class-select
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
  5948
    ].
20820f265460 handle cancel in match-class-select
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
  5949
20820f265460 handle cancel in match-class-select
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
  5950
    className isNil ifTrue:[^ self].
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5951
1727
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  5952
    "/ use slashed javaName for search.
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  5953
    (className includes:$.) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5954
	className := className copyReplaceAll:$. with:$/
1727
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  5955
    ].
1563
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  5956
    self switchToClassNamed:className.
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  5957
    self classSelectionChanged.
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  5958
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5959
    "Modified: / 22.2.1999 / 18:55:25 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5960
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5961
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5962
switchToClassNamed:aString
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  5963
    |meta str theClass newCat element idx l|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5964
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5965
    meta := false.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  5966
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5967
    str := aString.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  5968
    (aString endsWith:' class') ifTrue:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5969
        str := aString copyWithoutLast:6.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5970
        meta := true
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  5971
    ].
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  5972
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  5973
    theClass := self findClassNamed:str.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  5974
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  5975
    classCategoryListView notNil ifTrue:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5976
        classCategoryListView list size == 0 ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5977
            classCategoryListView list:(self listOfAllClassCategories).
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5978
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5979
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5980
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5981
    theClass == currentClass ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5982
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5983
    theClass isBehavior ifTrue:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5984
        classCategoryListView notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5985
            currentClassHierarchy isNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5986
                ((newCat := theClass category) ~= currentClassCategory) ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5987
                    currentClassCategory := newCat.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5988
                    newCat isNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5989
                        element := '* no category *'
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5990
                    ] ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5991
                        element := newCat.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5992
                    ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5993
                    classCategoryListView setSelectElement:element.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5994
                    "/ classCategoryListView makeSelectionVisible.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5995
                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5996
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5997
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5998
        currentClass := actualClass := nil.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5999
        self updateClassList.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6000
        self changeCurrentClass:theClass.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  6001
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6002
"/        (currentNamespace = '* all *'
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6003
"/        or:[currentNamespace ~= theClass nameSpace]) ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6004
"/            str := theClass name
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6005
"/        ] ifFalse:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6006
"/            str := theClass nameWithoutPrefix
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6007
"/        ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6008
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6009
        l := classListView list.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6010
        l notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6011
            idx := l findFirst:[:line | line withoutSpaces = str].
1612
0cc1da8e1dba avoid a redraw of classDefinition.
Claus Gittinger <cg@exept.de>
parents: 1601
diff changeset
  6012
"/            classListView selection:idx.
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6013
              classListView setSelection:idx.
839
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  6014
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  6015
"/            classListView setSelectElement:str.
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6016
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6017
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6018
        self instanceProtocol:meta not.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6019
        idx ~~ 0 ifTrue:[
1522
6a0cf0f9b393 avoid double redraw when selecting a class
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  6020
"/            self classSelectionChanged.
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6021
            classCategoryListView notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6022
                classCategoryListView setSelectElement:theClass category
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6023
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6024
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6025
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6026
        actualClass notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6027
            self addToClassHistory: actualClass name asString
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6028
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6029
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6030
1522
6a0cf0f9b393 avoid double redraw when selecting a class
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  6031
    "Modified: / 1.9.1995 / 01:41:35 / claus"
6a0cf0f9b393 avoid double redraw when selecting a class
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  6032
    "Modified: / 17.6.1996 / 16:54:55 / stefan"
1563
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  6033
    "Modified: / 19.4.1998 / 20:57:49 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6034
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6035
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6036
updateClassList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6037
    self updateClassListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6038
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6039
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6040
updateClassListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6041
    |classes oldClassName|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6042
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  6043
    gotClassList == true ifTrue:[^ self].
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  6044
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6045
    classListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6046
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6047
	 refetch in case we are not up to date
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6048
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6049
	(currentClass notNil and:[fullProtocol not]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6050
	    oldClassName := currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6051
	    currentClass := self findClassNamed:oldClassName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6052
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6053
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6054
	currentClassCategory notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6055
	    classes := self listOfAllClassNamesInCategory:currentClassCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6056
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6057
	    currentClassHierarchy notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6058
		classes := self listOfClassNameHierarchyOf:currentClassHierarchy
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6059
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6060
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6061
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6062
	classListView list = classes ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6063
	    scroll ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6064
		classListView contents:classes
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6065
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6066
		classListView setContents:classes
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6067
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6068
	    oldClassName notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6069
		classListView setContents:classes.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6070
		classListView setSelectElement:oldClassName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6071
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6072
		variableListView notNil ifTrue:[variableListView contents:nil]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6073
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6074
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6075
	    scroll ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6076
		fullProtocol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6077
		    classListView scrollToBottom
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6078
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6079
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6080
	].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6081
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6082
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6083
    "Modified: 10.1.1997 / 14:01:20 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6084
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6085
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6086
!BrowserView methodsFor:'class-method list menu'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6087
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  6088
classMethodBrowse
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  6089
    SystemBrowser openInClass:actualClass selector:currentSelector
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  6090
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  6091
    "Created: 13.12.1995 / 15:05:12 / cg"
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  6092
    "Modified: 13.12.1995 / 15:06:26 / cg"
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  6093
!
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  6094
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6095
classMethodFileOutAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6096
    "fileout all methods into one source file"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6097
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6098
    |list classString selectorString cls mth outStream fileName append
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6099
     fileBox f|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6100
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6101
    append := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6102
    fileBox := FileSaveBox
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6103
			title:(resources string:'save methods in:')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6104
			okText:(resources string:'save')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6105
			abortText:(resources string:'cancel')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6106
			action:[:fName | fileName := fName].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6107
    fileBox appendAction:[:fName | fileName := fName. append := true].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6108
    fileBox initialText:'some_methods.st'.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6109
    Project notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6110
	fileBox directory:Project currentProjectDirectory
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6111
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6112
    fileBox showAtPointer.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6113
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6114
    fileName isNil ifTrue:[^ self].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6115
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6116
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6117
     if file exists, save original in a .sav file
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6118
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6119
    (f := fileName asFilename) exists ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6120
	f copyTo:(f withSuffix: 'sav')
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6121
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6122
    append ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6123
	outStream := FileStream appendingOldFileNamed:fileName
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6124
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6125
	outStream := FileStream newFileNamed:fileName.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6126
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6127
    outStream isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6128
	^ self warn:'cannot create: %1' with:fileName
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6129
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6130
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6131
	list := classMethodListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6132
	list do:[:l |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6133
	    |line|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6134
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6135
	    line := l asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6136
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6137
	    self busyLabel:'writing: ' with:line.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6138
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6139
	    classString := self classNameFromClassMethodString:line.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6140
	    selectorString := self selectorFromClassMethodString:line.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6141
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6142
	    cls := self findClassNamed:classString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6143
	    cls isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6144
		self warn:'oops class %1 is gone' with:classString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6145
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6146
		mth := cls compiledMethodAt:(selectorString asSymbol).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6147
		Class fileOutErrorSignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6148
		    |box answer|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6149
		    box := YesNoBox 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6150
				title:('fileOut error: ' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6151
				       , ex errorString 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6152
				       , '\\continue anyway ?') withCRs
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6153
				yesText:'continue' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6154
				noText:'abort'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6155
		    answer := box confirm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6156
		    box destroy.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6157
		    answer ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6158
			ex proceed
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6159
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6160
		    self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6161
		    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6162
		] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6163
		    cls fileOutMethod:mth on:outStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6164
		]    
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6165
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6166
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6167
	outStream close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6168
	self normalLabel.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6169
    ]
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  6170
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6171
    "Modified: / 17.6.1996 / 16:51:11 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6172
    "Modified: / 28.10.1997 / 14:39:48 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6173
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6174
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6175
classMethodMenu
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6176
    <resource: #keyboard ( #Cmds #Cmdi #Cmdg ) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6177
    <resource: #programMenu >
587
74d27450aa79 added resource info
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
  6178
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6179
    |items m specialMenu|
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6180
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6181
    (currentMethod notNil
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6182
    and:[currentMethod isWrapped]) ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6183
        items := #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6184
                            ('inspect method'      methodInspect            )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6185
                            ('decompile'           methodDecompile          )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6186
                            ('-'              nil               )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6187
                  ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6188
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6189
        currentMethod isCounting ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6190
            items := items , #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6191
                            ('stop counting'  methodStopCounting)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6192
                            ('reset count'    methodResetCounting)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6193
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6194
        ] ifFalse:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6195
            currentMethod isCountingMemoryUsage ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6196
                items := items , #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6197
                            ('stop mem usage'  methodStopMemoryUsage)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6198
                            ('reset mem count' methodResetMemoryUsage)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6199
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6200
            ] ifFalse:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6201
                currentMethod isTimed ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6202
                    items := items , #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6203
                            ('stop timing' methodStopTiming)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6204
                            ('reset times' methodResetTiming)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6205
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6206
                ] ifFalse:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6207
                    items := items , #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6208
                            ('remove break/trace'  methodRemoveBreakOrTrace )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6209
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6210
                ]
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6211
            ]
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6212
        ]
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6213
    ] ifFalse:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6214
        items := #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6215
                            ('inspect method'      methodInspect            )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6216
                            ('decompile'           methodDecompile          )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6217
                            ('-'                   nil                      )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6218
                            ('breakpoint'          methodBreakPoint         )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6219
                            ('breakpoint in...'   methodBreakPointInProcess)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6220
                            ('-'                   nil                      )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6221
                            ('trace'               methodTrace              )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6222
                            ('trace sender'        methodTraceSender        )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6223
                            ('trace full walkback' methodTraceFull          )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6224
                            ('-'                   nil                      )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6225
                            ('start timing'        methodStartTiming        )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6226
                            ('start counting'      methodStartCounting      )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6227
                            ('start mem usage'     methodStartMemoryUsage   )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6228
                      ).
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6229
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6230
    specialMenu := PopUpMenu
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6231
                        itemList:items
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6232
                        resources:resources.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6233
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6234
    device ctrlDown ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6235
        currentMethod isNil ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6236
            classMethodListView flash.
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6237
            ^ nil
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6238
        ].
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6239
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6240
        ^ specialMenu
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6241
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6242
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6243
    items := #(
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6244
                                ('fileOut'             methodFileOut                   )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6245
                                ('fileOut all'         classMethodFileOutAll           )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6246
                                ('printOut'            methodPrintOut                  )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6247
                                ('-'                   nil                             )
2328
21c475c3ed2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2327
diff changeset
  6248
                                ('browse full'         classMethodBrowse               )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6249
                                ('spawn'               methodSpawn                     )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6250
                                ('spawn class'         classSpawn                      )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6251
                                ('spawn full protocol' classSpawnFullProtocol          )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6252
                                ('spawn hierarchy'     classSpawnHierarchy             )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6253
                                ('-'                   nil                             )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6254
                                ('filter...'           classMethodFilter               )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6255
                                ('senders...'          methodSenders             Cmds  )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6256
                                ('implementors...'     methodImplementors        Cmdi  )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6257
                                ('globals...'          methodGlobalReferends     Cmdg  )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6258
                                ('-'                   nil                             )
2416
24ac1ac0140f allow category change from methodList browser
Claus Gittinger <cg@exept.de>
parents: 2411
diff changeset
  6259
                                ('change category...'  methodChangeCategory            )
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  6260
                                ('move...'             methodMove                      )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6261
                                ('remove'              methodRemove                    )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6262
                                ('-'                   nil                             )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6263
                                ('others'              othersMenu                Ctrl  )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6264
               ).
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  6265
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6266
    m := PopUpMenu itemList:items resources:resources.
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  6267
    m subMenuAt:#othersMenu put:specialMenu.
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  6268
    ^ m
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  6269
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  6270
    "Modified: / 7.8.1998 / 17:13:47 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6271
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6272
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6273
!BrowserView methodsFor:'class-method stuff'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6274
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6275
classFromClassMethodString:aString
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6276
    "helper for classMethod-list - extract class name from the string"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6277
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6278
    |classString|
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6279
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6280
    classString := self classNameFromClassMethodString:aString.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6281
    ^ self findClassNamed:classString.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6282
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6283
    "Created: 3.3.1997 / 15:12:59 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6284
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6285
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6286
classMethodFilter
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6287
    "filter - that is: open another method-list browser on all those methods
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6288
     which pass some filter."
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6289
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6290
    |aspects list allMethods filteredMethods sel str|
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6291
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6292
    aspects := IdentityDictionary new.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6293
    aspects at:#doFilterMessage         put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6294
    aspects at:#notContainingMessage    put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6295
    aspects at:#doFilterString          put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6296
    aspects at:#notContainingString     put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6297
    aspects at:#filteredMessageSelector put:nil asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6298
    aspects at:#filteredString          put:nil asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6299
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6300
    (SystemBrowser  
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6301
      openDialogInterfaceSpec:(self class methodFilterSpec)
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6302
      withBindings:aspects) ifFalse:[
2425
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6303
        ^ self
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6304
    ].
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6305
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6306
    self withBusyCursorDo:[
2425
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6307
        list := classMethodListView list.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6308
        allMethods := list collect:[:line |
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6309
            |cls sel|
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6310
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6311
            cls := self classFromClassMethodString:line.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6312
            sel := self selectorFromClassMethodString:line.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6313
            sel := sel asSymbol.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6314
            cls isNil ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6315
                nil
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6316
            ] ifFalse:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6317
                cls compiledMethodAt:sel
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6318
            ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6319
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6320
        allMethods := allMethods select:[:m | m notNil].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6321
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6322
        filteredMethods := allMethods.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6323
        (aspects at:#doFilterMessage) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6324
            sel := (aspects at:#filteredMessageSelector) value.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6325
            sel size > 0 ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6326
                sel := sel string asSymbol.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6327
                (aspects at:#notContainingMessage) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6328
                    filteredMethods := filteredMethods select:[:m | (m sends:sel) not].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6329
                ] ifFalse:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6330
                    filteredMethods := filteredMethods select:[:m | m sends:sel].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6331
                ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6332
            ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6333
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6334
        (aspects at:#doFilterString) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6335
            str := (aspects at:#filteredString) value.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6336
            str size > 0 ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6337
                str := str string.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6338
                (aspects at:#notContainingString) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6339
                    filteredMethods := filteredMethods select:[:m | (m source includesString:str) not].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6340
                ] ifFalse:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6341
                    filteredMethods := filteredMethods select:[:m | m source includesString:str].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6342
                ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6343
            ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6344
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6345
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6346
        filteredMethods = allMethods ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6347
            self information:'Filtered list is the same as shown.'.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6348
            ^ self
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6349
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6350
        filteredMethods isEmpty ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6351
            self information:'Filtered list is empty.'.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6352
            ^ self
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6353
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6354
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6355
        SystemBrowser
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6356
            browseMethods:filteredMethods 
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6357
            title:('filtered ' , self topView label)
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6358
    ]
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6359
!
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6360
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6361
classMethodSelection:lineNr
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6362
    "user clicked on a class/method line - show code"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6363
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  6364
    |cls string classString selectorString meta sensor|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6365
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6366
    string := classMethodListView selectionValue string.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6367
    classString := self classNameFromClassMethodString:string.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6368
    selectorString := self selectorFromClassMethodString:string.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6369
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  6370
    "/ reselected with control ?
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  6371
    ((sensor := self sensor) notNil and:[sensor ctrlDown]) ifTrue:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6372
        selectorString = currentSelector ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6373
            "/ if there is a trace/break, remove it.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6374
            (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6375
                self methodRemoveBreakOrTrace.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6376
                ^ self
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6377
            ]
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6378
        ].
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  6379
    ].
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  6380
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6381
    ((classString ~= 'Metaclass') and:[classString endsWith:' class']) ifTrue:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6382
        classString := classString copyWithoutLast:6 "copyTo:(classString size - 5)".
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6383
        meta := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6384
    ] ifFalse:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6385
        meta := false.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6386
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6387
    self changeCurrentClass:(self findClassNamed:classString).
131
claus
parents: 130
diff changeset
  6388
    meta ifTrue:[cls := currentClass class] ifFalse:[cls := currentClass].
claus
parents: 130
diff changeset
  6389
    actualClass := acceptClass := cls.
129
claus
parents: 126
diff changeset
  6390
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6391
    currentClass isNil ifTrue:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6392
        self warn:'oops method is gone'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6393
    ] ifFalse:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6394
        currentClassCategory := currentClass category.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6395
        currentSelector := selectorString asSymbol.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6396
        currentClass isJavaClass ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6397
            currentMethod := currentClass compiledMethodAt:currentSelector.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6398
            currentMethod isNil ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6399
                currentClass methodDictionary keysAndValuesDo:[:sel :mthd |
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6400
                    mthd name = currentSelector ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6401
                        currentMethod := mthd
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6402
                    ]       
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6403
                ].
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6404
            ]
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6405
        ] ifFalse:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6406
            currentMethod := actualClass compiledMethodAt:currentSelector.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6407
        ].
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6408
        currentMethod isNil ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6409
            self warn:'oops method is gone'
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6410
        ] ifFalse:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6411
            currentMethodCategory := currentMethod category.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6412
        ].
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6413
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6414
        self methodSelectionChanged
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6415
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6416
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6417
    self setDoitActionForClass
131
claus
parents: 130
diff changeset
  6418
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6419
    "Modified: / 31.8.1995 / 11:56:02 / claus"
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6420
    "Modified: / 17.6.1996 / 16:51:28 / stefan"
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6421
    "Modified: / 24.12.1999 / 02:10:45 / cg"
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6422
!
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6423
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6424
classNameFromClassMethodString:aString
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6425
    "helper for classMethod-list - extract the class name from the string"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6426
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6427
    |pos s words clsName|
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6428
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6429
    s := aString string withoutSpaces.
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6430
    (s includes:${ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6431
        s := s copyTo:(s indexOf:${ ) - 1.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6432
        s := s withoutSpaces.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6433
    ].
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6434
    (s includes:$[ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6435
        s := s copyTo:(s indexOf:$[ ) - 1.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6436
        s := s withoutSpaces.
2072
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  6437
    ].
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  6438
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6439
"/ new code:
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6440
    words := s asCollectionOfWords.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6441
    clsName := words at:1.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6442
    words size > 2 ifTrue:[
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6443
        (words at:2) = 'class' ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6444
            ^ clsName , ' class'
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6445
        ]
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6446
    ].
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6447
    ^ clsName.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6448
"/ OLD code
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6449
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6450
    (s endsWith:' !!') ifTrue:[
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6451
        s := s copyWithoutLast:2
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6452
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6453
    (s endsWith:')') ifTrue:[
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6454
        s := aString copyTo:(aString lastIndexOf:$()-1.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6455
        s := s withoutSpaces.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6456
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6457
    (s endsWith:' !!') ifTrue:[
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6458
        s := s copyWithoutLast:2
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6459
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6460
    pos := s lastIndexOf:(Character space).
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6461
    ^ s copyTo:(pos - 1)
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6462
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6463
    "Modified: / 17.6.1996 / 17:06:59 / stefan"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6464
    "Created: / 3.3.1997 / 15:11:30 / cg"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6465
    "Modified: / 16.10.1998 / 13:32:30 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6466
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6467
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6468
selectorFromClassMethodString:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6469
    "helper for classMethod-list - extract selector from the string"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6470
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6471
    |pos s|
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6472
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  6473
    s := aString string withoutSpaces.
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6474
    (s includes:${ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6475
        s := s copyTo:(s indexOf:${ ) - 1.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6476
        s := s withoutSpaces.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6477
    ].
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6478
    (s includes:$[ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6479
        s := s copyTo:(s indexOf:$[ ) - 1.
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6480
        s := s withoutSpaces.
2072
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  6481
    ].
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  6482
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6483
    (s endsWith:' !!') ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6484
        s := s copyWithoutLast:2
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6485
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6486
    (s endsWith:')') ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6487
        s := aString copyTo:(aString lastIndexOf:$()-1.
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6488
        s := s withoutSpaces.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6489
    ].
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  6490
    (s endsWith:' !!') ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6491
        s := s copyWithoutLast:2
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  6492
    ].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6493
    pos := s lastIndexOf:(Character space).
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6494
    s := s copyFrom:(pos + 1).
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6495
    s := s string.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6496
    ^ s
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6497
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6498
    "Modified: 17.6.1996 / 17:04:38 / stefan"
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6499
    "Modified: 4.11.1996 / 23:57:00 / cg"
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6500
!
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6501
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6502
updateClassMethodListWithScroll:scroll keepSelection:keep
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6503
    |newList selection s|
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6504
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6505
    newList := OrderedCollection new.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6506
    selection := classMethodListView selection.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6507
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6508
    "/ update the list, caring for traps.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6509
    classMethodListView list do:[:entry |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6510
	|cls sel mthd s icn|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6511
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6512
	cls := self classFromClassMethodString:entry string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6513
	sel := self selectorFromClassMethodString:entry string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6514
	(cls isNil or:[sel isNil]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6515
	    "/ method is gone ?
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6516
	    s := entry string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6517
	    (s endsWith:'???') ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6518
		s := s , ' ???'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6519
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6520
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6521
	    cls isJavaClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6522
		s := entry.
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6523
"/                cls methodDictionary keysAndValuesDo:[:sel :mthd |
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6524
"/                    mthd name = sel ifTrue:[
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6525
"/                        newList add:(self listEntryForMethod:mthd selector:(cls name , ' ' , sel))
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6526
"/                    ]
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6527
"/                ]
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6528
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6529
		mthd := cls compiledMethodAt:(sel asSymbol).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6530
		s := cls name , ' ' , sel asText allBold.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6531
		mthd isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6532
		    s := s , ' ???'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6533
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6534
		    ShowMethodCategoryInClassMethodList == true ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6535
			s := s , '  {' , mthd category asText allItalic, '}'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6536
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6537
		    s := (self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6538
			    listEntryForMethod:mthd 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6539
			    selector:s)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6540
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6541
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6542
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6543
	newList add:s.
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6544
    ].
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6545
    classMethodListView setList:newList.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6546
    classMethodListView setSelection:selection.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6547
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6548
    "Modified: / 18.12.1995 / 22:54:04 / stefan"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6549
    "Created: / 3.3.1997 / 15:10:15 / cg"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6550
    "Modified: / 17.10.1998 / 11:30:35 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6551
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6552
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6553
!BrowserView methodsFor:'event handling'!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6554
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6555
handlesKeyPress:key inView:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6556
    "this method is reached via delegation: are we prepared to handle
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6557
     a keyPress in some other view ?"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6558
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  6559
    <resource: #keyboard (#Find #Cmdn #Cmdl #Cmdi #Cmds #Cmdg #Cmdt #Cmda #Cmdc #Cmdo)>
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6560
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6561
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6562
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6563
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6564
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6565
    view == classCategoryListView ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6566
        (key == #Find) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6567
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6568
        (untranslatedKey == #Cmdc) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6569
        (untranslatedKey == #Cmdo) ifTrue:[^ true].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6570
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6571
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6572
    view == classListView ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6573
        (key == #Find) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6574
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6575
        (untranslatedKey == #Cmdl) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6576
        (untranslatedKey == #Cmdd) ifTrue:[^ true].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6577
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6578
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6579
    view == methodCategoryListView ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6580
        (key == #Find) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6581
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6582
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6583
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  6584
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  6585
    or:[view == classMethodListView]) ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6586
        (key == #Delete) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6587
        (untranslatedKey == #Cmdi) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6588
        (untranslatedKey == #Cmds) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6589
        (untranslatedKey == #Cmdg) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6590
        (untranslatedKey == #Cmdt) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6591
        (untranslatedKey == #Cmda) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6592
    ].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6593
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6594
    ^ false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6595
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  6596
    "Created: / 2.3.1996 / 14:33:30 / cg"
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  6597
    "Modified: / 16.1.1998 / 17:20:36 / stefan"
1557
5ecd643fc71c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1550
diff changeset
  6598
    "Modified: / 18.4.1998 / 15:54:15 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6599
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6600
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6601
keyPress:key x:x y:y view:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6602
    "this method is reached via delegation from the classCategoryListView"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6603
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  6604
    <resource: #keyboard (#Find #Cmdn #Cmdl #Cmdi #Cmds #Cmdg #Cmdt #Cmda #Cmdc #Cmdo)>
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6605
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6606
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6607
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6608
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6609
    "/ have to untranslate (since we get #Inspect / #Search
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6610
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6611
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6612
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6613
    view == classCategoryListView ifTrue:[
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6614
        (key == #Find) ifTrue:[^ self classCategoryFindClass].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6615
        (untranslatedKey == #Cmdn) ifTrue:[^ self classCategoryNewCategory].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6616
        (untranslatedKey == #Cmdc) ifTrue:[^ self classCategoryClone].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6617
        (untranslatedKey == #Cmdo) ifTrue:[^ self classCategoryOpenInClass].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6618
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6619
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6620
    view == classListView ifTrue:[
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6621
        (key == #Find) ifTrue:[^ self classCategoryFindClass].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6622
        (untranslatedKey == #Cmdn) ifTrue:[^ self classNewClass].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6623
        (untranslatedKey == #Cmdl) ifTrue:[^ self classLoad].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6624
        (untranslatedKey == #Cmdd) ifTrue:[^ self classDocumentation].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6625
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6626
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6627
    view == methodCategoryListView ifTrue:[
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6628
        (key == #Find) ifTrue:[^ self methodFindAnyMethod].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6629
        (untranslatedKey == #Cmdn) ifTrue:[^ self methodCategoryNewCategory].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6630
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6631
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  6632
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  6633
    or:[view == classMethodListView]) ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6634
        (key == #Delete) ifTrue:[^ self methodRemoveConfirmed].
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6635
        (untranslatedKey == #Cmdi) ifTrue:[^ self methodImplementors].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6636
        (untranslatedKey == #Cmds) ifTrue:[^ self methodSenders].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6637
        (untranslatedKey == #Cmdg) ifTrue:[^ self methodGlobalReferends].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6638
        (untranslatedKey == #Cmdt) ifTrue:[^ self methodStringSearch].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6639
        (untranslatedKey == #Cmda) ifTrue:[^ self methodAproposSearch].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6640
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6641
    view keyPress:key x:x y:y
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6642
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  6643
    "Created: / 2.3.1996 / 14:37:52 / cg"
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  6644
    "Modified: / 16.1.1998 / 17:20:24 / stefan"
1557
5ecd643fc71c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1550
diff changeset
  6645
    "Modified: / 18.4.1998 / 15:56:36 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6646
! !
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6647
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6648
!BrowserView methodsFor:'help'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6649
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6650
helpTextFor:aComponent
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6651
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6652
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6653
    aComponent == classCategoryListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6654
	s := 'HELP_CCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6655
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6656
    aComponent == classListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6657
	fullProtocol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6658
	    s := 'HELP_PCLASS_LIST'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6659
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6660
	    currentClassHierarchy notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6661
		s := 'HELP_HCLASS_LIST'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6662
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6663
		s := 'HELP_CLASS_LIST'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6664
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6665
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6666
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6667
    aComponent == methodCategoryListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6668
	s := 'HELP_MCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6669
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6670
    aComponent == methodListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6671
	s := 'HELP_METHOD_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6672
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6673
    aComponent == variableListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6674
	s := 'HELP_VAR_LIST'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6675
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6676
    aComponent == codeView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6677
	fullClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6678
	    s := 'HELP_FULLCODE_VIEW'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6679
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6680
	    s := 'HELP_CODE_VIEW'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6681
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6682
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6683
    (aComponent == instanceToggle 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6684
    or:[aComponent == classToggle]) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6685
	s := 'HELP_INST_CLASS_TOGGLE'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6686
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6687
    aComponent == classMethodListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6688
	s := 'HELP_CLSMTHOD_LIST'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6689
    ].
1211
588a4d148234 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1210
diff changeset
  6690
    (aComponent isComponentOf:namespaceList) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6691
	s := 'HELP_NS_BOX'
1210
2b37259f0068 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1208
diff changeset
  6692
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6693
    s notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6694
	^ resources string:s
105
claus
parents: 98
diff changeset
  6695
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6696
    ^ nil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6697
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6698
    "Modified: 31.8.1995 / 19:11:39 / claus"
1211
588a4d148234 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1210
diff changeset
  6699
    "Modified: 28.6.1997 / 15:00:18 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6700
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6701
2588
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
  6702
!BrowserView methodsFor:'initialization & release'!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6703
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6704
autoSearch:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6705
    "used with class-method list browsing. If true,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6706
     selecting an entry from the list will automatically
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6707
     search for the searchstring in the codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6708
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6709
    self setSearchPattern:aString.
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6710
    autoSearchIgnoreCase := false.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6711
    autoSearch := aString
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6712
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6713
    "Modified: / 18.6.1998 / 16:49:50 / cg"
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6714
!
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6715
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6716
autoSearch:aString ignoreCase:ign
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6717
    "used with class-method list browsing. If true,
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6718
     selecting an entry from the list will automatically
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6719
     search for the searchstring in the codeView"
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6720
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6721
    self setSearchPattern:aString.
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6722
    autoSearchIgnoreCase := ign.
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6723
    autoSearch := aString
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6724
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6725
    "Created: / 18.6.1998 / 16:49:59 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6726
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6727
1789
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6728
closeRequest
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6729
    "let user confirm, if codeView was modified and not saved"
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6730
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6731
    (self checkSelectionChangeAllowed) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6732
	super closeRequest
1789
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6733
    ]
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6734
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6735
    "Created: / 3.8.1998 / 19:52:39 / cg"
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6736
    "Modified: / 3.8.1998 / 20:02:29 / cg"
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6737
!
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6738
1902
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  6739
closeRequestFor:aDialog
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  6740
    "let user confirm, if codeView was modified and not saved"
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  6741
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  6742
    aDialog closeRequest
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  6743
!
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  6744
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6745
destroy
1715
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  6746
    "release dependant - destroy popups"
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  6747
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  6748
    self stopSyntaxHighlightProcess.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6749
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  6750
    self releaseMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6751
    Smalltalk removeDependent:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6752
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6753
	self releaseClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6754
	"/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6755
	"/ just in case someone keeps a ref to myself around ...
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6756
	"/ ... release refs to my class (not really needed)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6757
	"/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6758
	currentClass := actualClass := acceptClass := nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6759
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6760
    super destroy
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  6761
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  6762
    "Modified: / 27.7.1998 / 11:02:52 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6763
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6764
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6765
initialize
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6766
    super initialize.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6767
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6768
    showInstance := true.
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  6769
    showAllNamespaces := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6770
    fullClass := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6771
    fullProtocol := false.
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  6772
    gotClassList := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6773
    aspect := nil.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6774
    currentNamespace := '* all *'.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6775
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6776
    "inform me, when Smalltalk changes"
1529
af92934e130b initialize class history
tz
parents: 1528
diff changeset
  6777
    Smalltalk addDependent:self.
af92934e130b initialize class history
tz
parents: 1528
diff changeset
  6778
af92934e130b initialize class history
tz
parents: 1528
diff changeset
  6779
    "create a history"
af92934e130b initialize class history
tz
parents: 1528
diff changeset
  6780
    self class classHistory
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6781
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6782
1248
72832110f144 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
  6783
postRealize
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6784
    |v checkBlock|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6785
1248
72832110f144 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
  6786
    super postRealize.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6787
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6788
    checkBlock := [:lineNr | self checkSelectionChangeAllowed].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6789
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6790
    v := classCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6791
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6792
	v action:[:lineNr | self classCategorySelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6793
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6794
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6795
	v list size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6796
	    v list:(self listOfAllClassCategories).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6797
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6798
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6799
	 tell classCategoryListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6800
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6801
	v menuHolder:self; menuPerformer:self; menuMessage:#classCategoryMenu.
107
claus
parents: 106
diff changeset
  6802
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6803
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6804
    v := classListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6805
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6806
	v action:[:lineNr | self classSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6807
	v doubleClickAction:[:lineNr | self classDoubleClick:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6808
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6809
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6810
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6811
	 tell classListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6812
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6813
	v menuHolder:self; menuPerformer:self; menuMessage:#classMenu.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6814
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6815
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6816
    v := methodCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6817
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6818
	v action:[:lineNr | self methodCategorySelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6819
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6820
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6821
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6822
	 tell methodCategoryListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6823
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6824
	v menuHolder:self; menuPerformer:self; menuMessage:#methodCategoryMenu.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6825
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6826
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6827
    v := methodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6828
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6829
	v action:[:lineNr | self methodSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6830
	v doubleClickAction:[:lineNr | self methodDoubleClick:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6831
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6832
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6833
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6834
	 tell methodListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6835
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6836
	v menuHolder:self; menuPerformer:self; menuMessage:#methodMenu.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6837
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6838
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6839
    v := classMethodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6840
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6841
	v action:[:lineNr | self classMethodSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6842
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6843
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6844
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6845
	 tell classMethodListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6846
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6847
	v menuHolder:self; menuPerformer:self; menuMessage:#classMethodMenu.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6848
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6849
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6850
    v := variableListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6851
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6852
	v action:[:lineNr | self variableSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6853
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6854
	v toggleSelect:true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6855
	v menuHolder:self; menuPerformer:self; menuMessage:#variableListMenu.
117
claus
parents: 114
diff changeset
  6856
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6857
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6858
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  6859
     normal browsers show the top/selection at first;
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  6860
     fullProtocol browsers better show the end initially
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6861
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  6862
    fullProtocol ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6863
	classListView scrollToBottom.
123
claus
parents: 120
diff changeset
  6864
    ]
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  6865
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6866
    "Created: / 24.7.1997 / 18:14:59 / cg"
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  6867
    "Modified: / 29.10.1997 / 15:50:26 / cg"
124
claus
parents: 123
diff changeset
  6868
!
claus
parents: 123
diff changeset
  6869
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6870
title:someString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6871
    myLabel := someString.
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  6872
    self topView label:someString.
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  6873
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  6874
    "Modified: 18.8.1997 / 15:19:50 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6875
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6876
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6877
!BrowserView methodsFor:'initialize subviews'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6878
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6879
createClassListViewIn:frame
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6880
    "setup the classlist subview, a variableList view and the class/inst toggles"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6881
1080
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6882
    |v panel spc wScr wScrHalf|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6883
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6884
    self createTogglesIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6885
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6886
    panel := VariableVerticalPanel
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6887
                    origin:(0.0 @ 0.0) corner:(1.0 @ 1.0)
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6888
                    in:frame.
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  6889
    styleSheet is3D ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6890
        spc := ViewSpacing.
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  6891
    ] ifFalse:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6892
        spc := 0
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  6893
    ].
811
fde69dbb949a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 810
diff changeset
  6894
    panel bottomInset:(instanceToggle height + spc + instanceToggle borderWidth).
764
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  6895
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  6896
    v := HVScrollableView 
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6897
                for:SelectionInListView 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6898
                miniScrollerH:true miniScrollerV:false
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6899
                in:panel.
2277
1c664709240a classList with autoHide
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
  6900
    v autoHideHorizontalScrollBar:true.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6901
    v origin:(0.0 @ 0.0) corner:(1.0 @ 0.7).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6902
    classListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6903
    classListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6904
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6905
    v := HVScrollableView 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6906
                for:SelectionInListView 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6907
                miniScrollerH:true miniScrollerV:false
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6908
                in:panel.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6909
    v autoHideHorizontalScrollBar:true.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6910
    v origin:(0.0 @ 0.7) corner:(1.0 @ 1.0).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6911
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6912
    variableListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6913
    variableListView delegate:self.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6914
1080
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6915
    wScr := v scrollBar preferredExtent x.
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6916
    wScrHalf := wScr // 2.
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6917
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6918
"/    (styleSheet at:'scrollBarPosition' default:#right) == #right ifTrue:[
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6919
"/        classToggle rightInset:(classToggle rightInset + wScr).
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6920
"/        classToggle leftInset:(classToggle leftInset - wScrHalf).
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6921
"/        instanceToggle rightInset:(instanceToggle rightInset + wScrHalf)
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6922
"/    ].
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6923
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6924
    "Modified: 19.3.1997 / 17:38:07 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6925
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6926
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6927
createCodeViewIn:aView
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6928
    "setup the code view"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6929
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6930
    ^ self createCodeViewIn:aView atY:0.25
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6931
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6932
    "Modified: 2.3.1996 / 16:08:46 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6933
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6934
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6935
createCodeViewIn:aView atY:relY
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6936
    "setup the code view"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6937
    |v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6938
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6939
    v := HVScrollableView for:CodeView miniScrollerH:true miniScrollerV:false in:aView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6940
    v origin:(0.0 @ relY) corner:(1.0 @ 1.0).
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6941
    codeView := v scrolledView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6942
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6943
    "Created: 2.3.1996 / 16:09:03 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6944
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6945
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6946
createMethodListViewIn:aView atX:relX
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6947
    "setup the method list view"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6948
    |v|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6949
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6950
    v := HVScrollableView for:SelectionInListView miniScrollerH:true miniScrollerV:false in:aView.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6951
    v origin:(relX @ 0.0) corner:(1.0 @ 1.0).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6952
    methodListView := v scrolledView.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6953
    methodListView delegate:self.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6954
    ^ v
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6955
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6956
    "Created: 2.3.1996 / 16:07:10 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6957
    "Modified: 2.3.1996 / 16:11:42 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6958
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6959
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6960
createTogglesIn:aFrame
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6961
    "create and setup the class/instance toggles"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6962
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6963
    |h halfSpace classAction instanceAction|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6964
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6965
    classAction := [self instanceProtocol:false].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6966
    instanceAction := [self instanceProtocol:true].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6967
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6968
    halfSpace := ViewSpacing // 2.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6969
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6970
    instanceToggle := "Toggle" RadioButton label:(resources at:'instance') in:aFrame.
171
bd57f15a26c1 2d style pixel computations - again
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
  6971
    h := instanceToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6972
    instanceToggle origin:(0.0 @ 1.0) corner:(0.5 @ 1.0).
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6973
    instanceToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6974
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6975
    instanceToggle turnOn.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6976
    instanceToggle controller beToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6977
    instanceToggle pressAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6978
    instanceToggle releaseAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6979
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6980
    classToggle := "Toggle" RadioButton label:(resources at:'class') in:aFrame.
171
bd57f15a26c1 2d style pixel computations - again
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
  6981
    h := classToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6982
    classToggle origin:(0.5 @ 1.0) corner:(1.0 @ 1.0).
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6983
    classToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6984
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6985
    classToggle turnOff.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6986
    classToggle controller beToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6987
    classToggle pressAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6988
    classToggle releaseAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6989
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6990
    styleSheet is3D ifTrue:[
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6991
"/        instanceToggle bottomInset:halfSpace.
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6992
"/        classToggle bottomInset:halfSpace.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6993
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6994
	instanceToggle leftInset:halfSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6995
	classToggle leftInset:halfSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6996
	instanceToggle rightInset:ViewSpacing - halfSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6997
	classToggle rightInset:ViewSpacing - halfSpace.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6998
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6999
"/ no longer needed; changed to use RadioButtons instead of Toggle
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7000
"/        styleSheet name == #motif ifTrue:[
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7001
"/            instanceToggle showLamp:true.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7002
"/            classToggle showLamp:true.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7003
"/        ]
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7004
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7005
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7006
    "Modified: / 30.8.1998 / 22:53:55 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7007
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7008
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7009
focusSequence
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7010
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7011
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7012
    s := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7013
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7014
    classCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7015
	s add:classCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7016
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7017
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7018
    classListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7019
	s add:classListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7020
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7021
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7022
"/    variableListView notNil ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7023
"/        s add:variableListView
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7024
"/    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7025
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7026
    instanceToggle notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7027
	s add:instanceToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7028
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7029
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7030
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7031
	s add:methodCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7032
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7033
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7034
    methodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7035
	s add:methodListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7036
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7037
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7038
    classMethodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7039
	s add:classMethodListView
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7040
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7041
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7042
    s add:codeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7043
    ^ s
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7044
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7045
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7046
setupForAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7047
    "create subviews for a full browser"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7048
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  7049
    |vpanel hpanel frame v spc nsHolder hMax|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7050
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7051
    styleSheet is3D ifTrue:[
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7052
        spc := ViewSpacing.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7053
    ] ifFalse:[
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7054
        spc := 0
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7055
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7056
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7057
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7058
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.25) in:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7059
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7060
    v := HVScrollableView for:SelectionInListView
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7061
                          miniScrollerH:true miniScrollerV:false
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7062
                          in:hpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7063
    v origin:(0.0 @ 0.0) corner:(0.25 @ 1.0).
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7064
    styleSheet name == #win95 ifTrue:[v rightInset:1].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7065
    classCategoryListView := v scrolledView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7066
    classCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7067
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7068
    frame := View origin:(0.25 @ 0.0) corner:(0.5 @ 1.0) in:hpanel.
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7069
    styleSheet name == #win95 ifTrue:[frame rightInset:1].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7070
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7071
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  7072
    namespaceList := ComboListView origin:(0.0@1.0) corner:(0.25@1.0) in:hpanel.
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  7073
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  7074
    hMax := (instanceToggle height + instanceToggle borderWidth)
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7075
            max:(namespaceList preferredExtent y).
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7076
    hMax := hMax "+ (spc // 2)".
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7077
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7078
    v bottomInset:hMax + (spc - (spc // 2)).
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7079
    nsHolder := currentNamespace asValue.
931
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7080
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7081
    namespaceList topInset:(hMax negated) "- (spc//2)" "+ (spc // 2)".
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7082
    styleSheet name ~= 'win95' ifTrue:[
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7083
        namespaceList leftInset:(ViewSpacing // 2).
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7084
    ].
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7085
"/    namespaceList bottomInset:(spc // 2).
931
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7086
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7087
"/    styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7088
"/        namespaceList leftInset:(classCategoryListView originRelativeTo:v) x.
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7089
"/    ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7090
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7091
"/    (v scrollBar originRelativeTo:v) > (classCategoryListView originRelativeTo:v)
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7092
"/    ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7093
"/        namespaceList rightInset:((v scrollBar originRelativeTo:v)
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7094
"/                                  -
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7095
"/                                  (classCategoryListView originRelativeTo:v))
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7096
"/    ] ifFalse:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7097
"/        styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7098
"/            namespaceList rightInset:(ViewSpacing // 2).
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7099
"/        ]
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7100
"/    ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7101
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7102
"/        styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7103
"/            namespaceList rightInset:(ViewSpacing // 2).
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7104
"/        ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7105
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7106
    self setListOfNamespaces.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7107
    namespaceList model:nsHolder.
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7108
    namespaceList label menuHolder:self; menuMessage:#nameSpaceMenu.
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7109
    nsHolder onChangeEvaluate:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7110
                                self changeNameSpaceTo:nsHolder value
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7111
                              ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7112
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7113
    v := HVScrollableView for:SelectionInListView miniScrollerH:true miniScrollerV:false in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7114
    v origin:(0.5 @ 0.0) corner:(0.75 @ 1.0).
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7115
    styleSheet name == #win95 ifTrue:[v rightInset:1].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7116
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7117
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7118
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7119
    self createMethodListViewIn:hpanel atX:0.75.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7120
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7121
    self createCodeViewIn:vpanel
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7122
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7123
    "Modified: / 15.9.1998 / 22:15:24 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7124
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7125
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7126
setupForClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7127
    "create subviews for browsing a single class"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7128
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7129
    |vpanel hpanel frame v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7130
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7131
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7132
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7133
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.25) in:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7134
    frame := View origin:(0.0 @ 0.0) corner:(0.5 @ 1.0)in:hpanel.
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7135
    styleSheet name == #win95 ifTrue:[frame rightInset:1].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7136
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7137
    self createTogglesIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7138
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7139
    v := ScrollableView for:SelectionInListView in:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7140
    v origin:(0.0 @ 0.0)
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7141
      extent:[frame width
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7142
	      @
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7143
	      (frame height 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7144
	       - ViewSpacing
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7145
	       - instanceToggle height
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7146
	       - instanceToggle borderWidth
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7147
	       + v borderWidth)].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7148
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7149
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7150
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7151
    self createMethodListViewIn:hpanel atX:0.5.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7152
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7153
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  7154
    self changeCurrentClass:aClass.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7155
    actualClass := acceptClass := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7156
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7157
    self updateMethodList.
151
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  7158
    self updateCodeView.
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  7159
    self classDefinition.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7160
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7161
    "Modified: / 15.9.1998 / 22:20:33 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7162
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7163
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7164
setupForClass:aClass methodCategory:aMethodCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7165
    "setup subviews to browse a method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7166
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7167
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7168
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7169
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7170
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7171
    v := self createMethodListViewIn:vpanel atX:0.0.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7172
    v corner:(1.0 @ 0.25).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7173
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7174
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7175
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7176
    currentClassCategory := aClass category.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  7177
    self changeCurrentClass:aClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7178
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7179
    currentMethodCategory := aMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7180
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7181
    self updateCodeView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7182
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  7183
    "Modified: / 10.4.1998 / 12:25:52 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7184
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7185
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7186
setupForClass:aClass selector:selector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7187
    "setup subviews to browse a single method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7188
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7189
    |v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7190
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7191
    v := ScrollableView for:CodeView in:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7192
    v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7193
    codeView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7194
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7195
    currentClassCategory := aClass category.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  7196
    self changeCurrentClass:aClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7197
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7198
    currentSelector := selector.
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  7199
    currentMethod := actualClass compiledMethodAt:selector.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7200
    currentMethodCategory := currentMethod category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7201
    self updateCodeView
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  7202
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  7203
    "Modified: / 10.4.1998 / 12:25:55 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7204
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7205
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7206
setupForClassCategory:aClassCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7207
    "setup subviews to browse a class category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7208
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7209
    |vpanel hpanel frame v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7210
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7211
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7212
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7213
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.25) in:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7214
    frame  := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7215
    styleSheet name == #win95 ifTrue:[frame rightInset:1].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7216
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7217
    self createClassListViewIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7218
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7219
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7220
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7221
    styleSheet name == #win95 ifTrue:[v rightInset:1].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7222
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7223
    methodCategoryListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7224
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7225
    self createMethodListViewIn:hpanel atX:0.66.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7226
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7227
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7228
    currentClassCategory := aClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7229
    self updateClassList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7230
    self updateMethodCategoryList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7231
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7232
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7233
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7234
    "Modified: / 15.9.1998 / 22:16:45 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7235
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7236
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7237
setupForClassHierarchy:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7238
    "setup subviews to browse a class hierarchy"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7239
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7240
    |vpanel hpanel frame v cls|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7241
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7242
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7243
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7244
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7245
     notice: we use a different ratio here
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7246
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7247
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.4) in:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7248
    frame := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7249
    styleSheet name == #win95 ifTrue:[frame rightInset:1].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7250
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7251
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7252
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7253
    v := ScrollableView for:SelectionInListView in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7254
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7255
    styleSheet name == #win95 ifTrue:[v rightInset:1].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7256
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7257
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7258
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7259
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7260
    self createCodeViewIn:vpanel atY:0.4.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7261
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7262
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7263
    cls isMeta ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7264
	cls := cls soleInstance
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7265
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7266
    currentClassHierarchy := currentClass := actualClass := cls.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7267
    self updateClassList.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7268
    classListView setSelectElement:aClass name; makeSelectionVisible.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7269
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7270
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7271
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7272
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7273
    aClass isMeta ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7274
	self instanceProtocol:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7275
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7276
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7277
    "Modified: / 15.9.1998 / 22:21:03 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7278
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7279
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7280
setupForClassList:aList
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7281
    "setup subviews to browse classes from a list"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7282
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7283
    self setupForClassList:aList sort:true
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7284
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7285
    "Modified: 28.5.1996 / 13:53:03 / cg"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7286
!
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7287
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7288
setupForClassList:aList sort:doSort
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7289
    "setup subviews to browse classes from a list"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7290
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7291
    |vpanel hpanel frame l v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7292
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7293
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7294
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7295
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.25) in:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7296
    frame := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7297
    styleSheet name == #win95 ifTrue:[frame rightInset:1].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7298
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7299
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7300
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7301
    v := ScrollableView for:SelectionInListView in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7302
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7303
    styleSheet name == #win95 ifTrue:[v rightInset:1].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7304
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7305
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7306
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7307
    self createMethodListViewIn:hpanel atX:0.66.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7308
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7309
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7310
    l := (aList collect:[:entry | 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7311
		entry isBehavior ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7312
		    entry name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7313
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7314
		    entry
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7315
		]]) asOrderedCollection.
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7316
    doSort ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7317
	l sort.
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7318
    ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7319
    classListView list:l.
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  7320
    gotClassList := true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7321
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7322
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7323
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7324
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7325
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7326
    "Created: / 28.5.1996 / 13:52:47 / cg"
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7327
    "Modified: / 15.9.1998 / 22:21:25 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7328
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7329
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7330
setupForFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7331
    "setup subviews to browse a class as full text"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7332
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7333
    |vpanel hpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7334
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7335
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7336
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7337
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.25) in:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7338
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7339
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7340
    v origin:(0.0 @ 0.0) corner:(0.5 @ 1.0).
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7341
    styleSheet name == #win95 ifTrue:[v rightInset:1].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7342
    classCategoryListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7343
    classCategoryListView contents:(self listOfAllClassCategories).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7344
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7345
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7346
    v origin:(0.5 @ 0.0) corner:(1.0 @ 1.0).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7347
    classListView := v scrolledView.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7348
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7349
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7350
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7351
    fullClass := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7352
    self updateCodeView
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7353
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7354
    "Modified: / 15.9.1998 / 22:17:48 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7355
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7356
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7357
setupForFullClassProtocol:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7358
    "setup subviews to browse a classes full protocol"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7359
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7360
    |vpanel hpanel frame v cls|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7361
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7362
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7363
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7364
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7365
     notice: we use a different ratio here
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7366
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7367
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.4) in:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7368
    frame := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7369
    styleSheet name == #win95 ifTrue:[frame rightInset:1].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7370
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7371
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7372
    classListView multipleSelectOk:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7373
    classListView toggleSelect:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7374
    classListView strikeOut:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7375
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7376
    v := ScrollableView for:SelectionInListView in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7377
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7378
    styleSheet name == #win95 ifTrue:[v rightInset:1].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7379
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7380
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7381
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7382
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7383
    self createCodeViewIn:vpanel atY:0.4.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7384
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7385
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7386
    cls isMeta ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7387
	cls := cls soleInstance
107
claus
parents: 106
diff changeset
  7388
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7389
    currentClassHierarchy := actualClass := acceptClass := currentClass := cls.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7390
    fullProtocol := true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7391
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7392
    self updateClassList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7393
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7394
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7395
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7396
    self updateVariableList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7397
    aClass isMeta ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7398
	self instanceProtocol:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7399
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7400
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7401
    "Modified: / 15.9.1998 / 22:20:06 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7402
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7403
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7404
setupForList:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7405
    "setup subviews to browse methods from a list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7406
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7407
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7408
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7409
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7410
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7411
    v := ScrollableView for:SelectionInListView in:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7412
    v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7413
    classMethodListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7414
    classMethodListView contents:aList.
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  7415
    classMethodListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7416
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  7417
    classMethodListView doubleClickAction:[:lineNr | self classMethodBrowse].
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  7418
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7419
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7420
    aList size == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7421
	classMethodListView setSelection:1.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7422
	self classMethodSelection:1. 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7423
    ].
1060
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  7424
    self updateCodeView.
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  7425
    "/ kludge - get trap icons
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  7426
    self updateClassMethodListWithScroll:false keepSelection:true
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  7427
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7428
    "Modified: / 25.10.1997 / 19:27:40 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7429
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7430
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7431
!BrowserView methodsFor:'method category list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7432
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7433
createAccessMethodsFor:aCollectionOfInstVarNames withChange:withChange
990
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7434
    "workhorse for creating access methods for instvars."
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7435
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7436
    aCollectionOfInstVarNames do:[:name |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7437
	|source|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7438
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7439
	"check, if method is not already present"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7440
	(currentClass includesSelector:(name asSymbol)) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7441
	    source := (name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7442
		       , '\    "return the value of the instance variable '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7443
		       , name , ''' (automatically generated)"\\    ^ ' , name) withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7444
	    Compiler compile:source forClass:currentClass inCategory:'accessing'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7445
	] ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7446
	    Transcript showCR:'method ''', name , ''' already present'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7447
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7448
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7449
	(currentClass includesSelector:((name , ':') asSymbol)) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7450
	    withChange ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7451
		source := (name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7452
			  , ':something\    "set the value of the instance variable '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7453
			  , name , ''' and send a change notification (automatically generated)"\\    '
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7454
			  , name , ' := something.') withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7455
		source := source , ('\    self changed:#' , name , '.\') withCRs
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7456
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7457
		source := (name 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7458
			  , ':something\    "set the value of the instance variable '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7459
			  , name , ''' (automatically generated)"\\    '
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7460
			  , name , ' := something.') withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7461
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7462
	    Compiler compile:source forClass:currentClass inCategory:'accessing'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7463
	] ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7464
	    Transcript showCR:'method ''', name , ':'' already present'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7465
	].
990
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7466
    ]
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7467
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7468
    "Created: / 7.8.1998 / 18:19:06 / cg"
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7469
    "Modified: / 7.8.1998 / 18:25:32 / cg"
990
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7470
!
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7471
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7472
methodCategoryCopyCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7473
    "show the enter box to copy from an existing method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7474
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7475
    |title box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7476
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7477
    showInstance ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7478
	title := 'class to copy instance method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7479
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7480
	title := 'class to copy class method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7481
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7482
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7483
    box := self listBoxTitle:title 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7484
		      okText:'ok' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7485
			list:(Smalltalk allClasses collect:[:cls | cls name]) asArray sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7486
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7487
    box label:(resources string:'copy methods').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7488
    box action:[:aString | self copyMethodsFromClass:aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7489
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7490
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7491
    "Modified: 16.1.1997 / 00:01:20 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7492
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7493
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7494
methodCategoryCreateAccessMethods
559
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  7495
    "create access methods for instvars.
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  7496
     If no variable is selected, for all instvars;
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  7497
     otherwise for that selected instvar."
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7498
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7499
    self methodCategoryCreateAccessMethodsWithChange:false
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7500
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7501
    "Modified: / 7.8.1998 / 18:17:34 / cg"
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7502
!
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7503
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7504
methodCategoryCreateAccessMethodsWithChange
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7505
    "create access methods for instvars.
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7506
     If no variable is selected, for all instvars;
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7507
     otherwise for that selected instvar."
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7508
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7509
    self methodCategoryCreateAccessMethodsWithChange:true
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7510
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7511
    "Modified: / 7.8.1998 / 18:17:39 / cg"
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7512
!
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7513
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7514
methodCategoryCreateAccessMethodsWithChange:aBoolean
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7515
    "create access methods for instvars.
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7516
     If no variable is selected, for all instvars;
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7517
     otherwise for that selected instvar."
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7518
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7519
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7520
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7521
    showInstance ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7522
	self warn:'select instance - and try again'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7523
	^ self.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7524
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7525
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  7526
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7527
	|nm names|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7528
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7529
	(variableListView notNil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7530
	and:[(nm := variableListView selectionValue) notNil]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7531
	    names := Array with:nm
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7532
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7533
	    names := currentClass instVarNames 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7534
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7535
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7536
	lockUpdates := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7537
	[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7538
	    self createAccessMethodsFor:names withChange:aBoolean.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7539
	] valueOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7540
	    lockUpdates := false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7541
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7542
	self updateMethodCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7543
	self updateMethodListWithScroll:false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7544
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  7545
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7546
    "Modified: / 18.8.1997 / 15:44:10 / cg"
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7547
    "Created: / 7.8.1998 / 18:17:18 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7548
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7549
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7550
methodCategoryCreateApplicationMethods
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7551
    "create an empty application framework"
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7552
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7553
    |cls fn txt isDialog|
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7554
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7555
    self checkClassSelected ifFalse:[^ self].
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7556
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7557
    isDialog := (currentClass isSubclassOf:SimpleDialog).
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7558
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7559
    cls := currentClass class.
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7560
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7561
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7562
	|nm names source|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7563
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7564
	"/ add a windowSpec method for an empty applicationWindow,
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7565
	"/ with a menuPanel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7566
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7567
	(cls includesSelector:#windowSpec) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7568
	    isDialog ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7569
		txt :=
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7570
'windowSpec
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7571
    "This resource specification was automatically generated
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7572
     by the Browser."
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7573
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7574
    "Do not manually edit this!! If it is corrupted,
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7575
     the UIPainter may not be able to read the specification."
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7576
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7577
    "
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7578
     UIPainter new openOnClass:' , currentClass name , ' andSelector:#windowSpec
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7579
    "
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7580
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7581
    <resource: #canvas>
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7582
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7583
    ^
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7584
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7585
       #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7586
	  #window: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7587
	   #(#WindowSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7588
	      #name: ''' , currentClass name , '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7589
	      #layout: #(#LayoutFrame 221 0 118 0 520 0 417 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7590
	      #level: 0
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7591
	      #label: ''' , currentClass name , '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7592
	      #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7593
	      #max: #(#Point 1024 768)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7594
	      #bounds: #(#Rectangle 221 118 521 418)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7595
	      #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7596
	  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7597
	  #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7598
	   #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7599
	      #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7600
	       #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7601
		 #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7602
		    #name: ''buttonPanel''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7603
		    #layout: #(#LayoutFrame 0 0.0 -45 1 0 1.0 0 1.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7604
		    #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7605
		     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7606
			#collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7607
			 #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7608
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7609
			      #name: ''cancelButton''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7610
			      #label: ''Cancel''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7611
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7612
			      #model: #cancel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7613
			      #extent: #(#Point 125 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7614
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7615
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7616
			      #name: ''okButton''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7617
			      #label: ''OK''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7618
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7619
			      #model: #accept
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7620
			      #extent: #(#Point 125 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7621
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7622
			)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7623
		    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7624
		    #horizontalLayout: #spreadSpaceMax
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7625
		    #verticalLayout: #center
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7626
		    #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7627
		    #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7628
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7629
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7630
	  )
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7631
      )
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7632
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7633
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7634
		txt :=
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7635
'windowSpec
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7636
    "This resource specification was automatically generated
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7637
     by the Browser."
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7638
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7639
    "Do not manually edit this!! If it is corrupted,
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7640
     the UIPainter may not be able to read the specification."
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7641
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7642
    "
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7643
     UIPainter new openOnClass:' , currentClass name , ' andSelector:#windowSpec
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7644
    "
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7645
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7646
    <resource: #canvas>
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7647
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7648
    ^ #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7649
	  #window: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7650
	   #(#WindowSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7651
	      #name: ''' , currentClass name , '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7652
	      #layout: #(#LayoutFrame 204 0 162 0 503 0 461 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7653
	      #label: ''' , currentClass name , '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7654
	      #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7655
	      #max: #(#Point 1024 768)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7656
	      #bounds: #(#Rectangle 204 162 504 462)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7657
	      #menu: #mainMenu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7658
	      #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7659
	  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7660
	  #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7661
	   #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7662
	      #collection: #()
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7663
	  )
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7664
      )
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7665
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7666
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7667
	    Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7668
		compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7669
		forClass:cls 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7670
		inCategory:'interface specs'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7671
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7672
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7673
	isDialog ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7674
	    "/ add a topMenu method 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7675
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7676
	    (cls includesSelector:#mainMenu) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7677
		txt :=
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7678
'mainMenu
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7679
    "This resource specification was automatically generated
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7680
     by the Browser."
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7681
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7682
    "Do not manually edit this!! If it is corrupted,
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7683
     the MenuEditor may not be able to read the specification."
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7684
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7685
    "
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7686
     MenuEditor new openOnClass:' , currentClass name , ' andSelector:#mainMenu
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7687
    "
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7688
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7689
    <resource: #menu>
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7690
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7691
    ^ #(#Menu
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7692
	   #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7693
	     #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7694
		#label: ''File''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7695
		#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7696
		#submenu: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7697
		 #(#Menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7698
		     #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7699
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7700
			  #label: ''New''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7701
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7702
			  #value: #menuNew
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7703
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7704
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7705
			  #label: ''-''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7706
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7707
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7708
			  #label: ''Open...''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7709
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7710
			  #value: #menuOpen
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7711
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7712
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7713
			  #label: ''-''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7714
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7715
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7716
			  #label: ''Save''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7717
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7718
			  #value: #menuSave
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7719
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7720
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7721
			  #label: ''Save As...''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7722
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7723
			  #value: #menuSaveAs
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7724
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7725
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7726
			  #label: ''-''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7727
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7728
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7729
			  #label: ''Exit''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7730
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7731
			  #value: #closeRequest
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7732
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7733
		    ) nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7734
		    nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7735
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7736
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7737
	     #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7738
		#label: ''Help''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7739
		#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7740
		#startGroup: #right
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7741
		#submenu: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7742
		 #(#Menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7743
		     #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7744
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7745
			  #label: ''Documentation''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7746
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7747
			  #value: #openDocumentation
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7748
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7749
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7750
			  #label: ''-''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7751
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7752
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7753
			  #label: ''About this Application''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7754
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7755
			  #value: #openAboutThisApplication
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7756
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7757
		    ) nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7758
		    nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7759
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7760
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7761
	  ) nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7762
	  nil
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7763
      )
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7764
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7765
		Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7766
		    compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7767
		    forClass:cls 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7768
		    inCategory:'menu specs'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7769
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7770
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7771
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7772
	(cls includesSelector:#postBuildWith:) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7773
	    txt :=
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7774
'postBuildWith:aBuilder
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7775
    "This is a hook method generated by the Browser.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7776
     It will be invoked during the initialization of your app/dialog,
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7777
     after all of the visual components have been built, 
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7778
     but BEFORE the top window is made visible.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7779
     Add any app-specific actions here (reading files, setting up
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7780
     values etc.)"
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7781
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7782
    "/ add any code here ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7783
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7784
    ^ super postBuildWith:aBuilder
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7785
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7786
	    Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7787
		compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7788
		forClass:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7789
		inCategory:'initialization & release'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7790
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7791
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7792
	isDialog ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7793
	    (cls includesSelector:#closeRequest) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7794
		txt :=
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7795
'closeRequest
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7796
    "This is a hook method generated by the Browser.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7797
     It will be invoked when your app/dialog-window is about to be
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7798
     closed (and has a chance to suppress the close)."
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7799
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7800
    "/ change the code below as required ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7801
    "/ Closing can be suppressed, by returning.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7802
    "/ super closeRequest will initiate the closeDown
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7803
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7804
    ("self hasUnsavedChanges" true) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7805
	(self confirm:(resources string:''Close without saving ?'')) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7806
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7807
	]
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7808
    ].
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7809
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7810
    ^ super closeRequest
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7811
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7812
		Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7813
		    compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7814
		    forClass:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7815
		    inCategory:'initialization & release'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7816
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7817
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7818
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7819
	isDialog ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7820
	    (cls includesSelector:#closeDownViews) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7821
		txt :=
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7822
'closeDownViews
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7823
    "This is a hook method generated by the Browser.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7824
     It will be invoked when your app/dialog-window is really closed."
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7825
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7826
    "/ change the code below as required ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7827
    "/ This should cleanup any leftover resources
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7828
    "/ (for example, temporary files)
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7829
    "/ super closeRequest will initiate the closeDown
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7830
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7831
    "/ add your code here
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7832
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7833
    "/ do not remove the one below ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7834
    ^ super closeDownViews
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7835
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7836
		Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7837
		    compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7838
		    forClass:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7839
		    inCategory:'initialization & release'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7840
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7841
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7842
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7843
	isDialog ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7844
	    (cls includesSelector:#accept) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7845
		txt :=
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7846
'closeAccept
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7847
    "This is a hook method generated by the Browser.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7848
     It will be invoked when your dialog-window is closed with OK."
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7849
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7850
    "/ add any actions as required here ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7851
    Transcript showCR:''dialog accepted''.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7852
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7853
    "/ do not remove the one below ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7854
    ^ super closeAccept
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7855
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7856
		Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7857
		    compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7858
		    forClass:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7859
		    inCategory:'user actions'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7860
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7861
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7862
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7863
	self instanceProtocol:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7864
	self switchToMethodNamed:#windowSpec 
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7865
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7866
"/        self updateMethodCategoryListWithScroll:false.
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7867
"/        self updateMethodListWithScroll:false
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7868
    ]
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7869
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7870
    "Modified: / 1.2.1998 / 16:10:03 / cg"
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7871
!
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7872
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7873
methodCategoryCreateDocumentationMethods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7874
    "create empty documentation methods"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7875
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  7876
    |cls fn txt|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7877
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7878
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7879
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7880
    cls := currentClass class.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7881
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  7882
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7883
	|nm names source|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7884
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7885
	"/ add version method containing RCS template
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7886
	"/ but only if not already present and its not a private class.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7887
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7888
	cls isPrivate ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7889
	    (cls includesSelector:#version) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7890
		Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7891
'version
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  7892
    ^ ''$' , 'Header$''
1208
5a2aa83494c3 dont create a #version method in private classes.
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
  7893
' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7894
		      forClass:cls 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7895
		      inCategory:'documentation'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7896
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7897
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7898
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7899
	"/ add copyright method containing your/your companies
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7900
	"/ copyright template but only if not already present.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7901
	"/ this is only added, if specified in the 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7902
	"/ COPYRIGHT_TEMPLATE_FILE resources.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7903
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7904
	(cls includesSelector:#copyright) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7905
	    fn := resources at:#'COPYRIGHT_TEMPLATE_FILE' default:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7906
	    fn notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7907
		fn := fn asFilename.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7908
		fn exists ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7909
		    txt := fn contents asString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7910
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7911
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7912
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7913
	    txt notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7914
		txt := txt bindWith:(Date today year).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7915
		Compiler compile:
1194
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  7916
'copyright
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  7917
"
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  7918
' , txt , '
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  7919
"
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  7920
'                   forClass:cls 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7921
		  inCategory:'documentation'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7922
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7923
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7924
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7925
	"/ add documentation method containing doc template
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7926
	"/ but only if not already present.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7927
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7928
	(cls includesSelector:#documentation) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7929
	    Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7930
'documentation
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7931
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7932
    documentation to be added.
1444
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7933
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7934
    [author:]
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7935
	' , OperatingSystem getFullUserName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7936
	  , ' (' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ')' , '
1444
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7937
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7938
    [see also:]
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7939
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7940
    [instance variables:]
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7941
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7942
    [class variables:]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7943
"
120
claus
parents: 118
diff changeset
  7944
'                   forClass:cls 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7945
		  inCategory:'documentation'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7946
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7947
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7948
	"/ add examples method containing examples template
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7949
	"/ but only if not already present.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7950
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7951
	(cls includesSelector:#examples) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7952
	    Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7953
'examples
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7954
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7955
    examples to be added.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7956
								[exBegin]
1444
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7957
    ... add code fragment for 
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7958
    ... executable example here ...
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7959
								[exEnd]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7960
"
120
claus
parents: 118
diff changeset
  7961
'                   forClass:cls 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7962
		  inCategory:'documentation'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7963
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7964
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7965
	"/ add history method containing created-entry
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7966
	"/ but only if not already present.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7967
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7968
	(cls includesSelector:#history) ifFalse:[ 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7969
	    HistoryManager notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7970
		HistoryManager createInitialHistoryMethodIn:cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7971
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7972
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7973
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7974
	self instanceProtocol:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7975
	self switchToMethodNamed:#documentation 
1208
5a2aa83494c3 dont create a #version method in private classes.
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
  7976
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7977
"/        self updateMethodCategoryListWithScroll:false.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7978
"/        self updateMethodListWithScroll:false
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7979
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  7980
1444
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7981
    "Modified: / 1.2.1998 / 16:10:03 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7982
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7983
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7984
methodCategoryCreateUpdateMethod
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7985
    "create an update:with:from: method
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7986
     (I'm tired of typing)"
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7987
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7988
    self checkClassSelected ifFalse:[^ self].
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7989
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7990
    self withBusyCursorDo:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7991
        |txt|
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7992
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7993
        "/ add a windowSpec method for an empty applicationWindow,
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7994
        "/ with a menuPanel.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7995
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7996
        (actualClass includesSelector:#'update:with:from:') ifFalse:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7997
            txt :=
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7998
'update:something with:aParameter from:changedObject
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  7999
    "Invoked when an object that I depend upon sends a change notification."
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8000
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8001
    "stub code automatically generated - please change as required"
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8002
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8003
    "/ changedObject == someOfMyValueHolders ifTrue:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8004
    "/     self doSomethingApropriate
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8005
    "/     ^ self
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8006
    "/ ].
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8007
    super update:something with:aParameter from:changedObject
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8008
'.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8009
            Compiler 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8010
                compile:txt
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8011
                forClass:actualClass 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8012
                inCategory:'change & update'.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8013
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8014
            self instanceProtocol:true.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8015
            self switchToMethodNamed:#'update:with:from:' 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8016
        ].
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8017
    ]
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8018
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8019
    "Modified: / 10.2.2000 / 13:47:17 / cg"
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8020
!
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8021
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8022
methodCategoryFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8023
    "fileOut all methods in the selected methodcategory of
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8024
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8025
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8026
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8027
    self whenMethodCategorySelected:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8028
        self busyLabel:'saving: %1' with:currentClass name , '-' , currentMethodCategory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8029
        Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8030
            self warn:'cannot create: %1' with:ex parameter.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8031
            self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8032
            ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8033
        ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8034
            actualClass fileOutCategory:currentMethodCategory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8035
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8036
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8037
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8038
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8039
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8040
methodCategoryFileOutAll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8041
    "fileOut all methods in the selected methodcategory of
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8042
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8043
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8044
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8045
    self whenMethodCategorySelected:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8046
	|fileName outStream|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8047
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8048
	fileName := (currentMethodCategory , '.st') asFilename.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8049
	fileName makeLegalFilename.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8050
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8051
	 this test allows a smalltalk to be built without Projects/ChangeSets
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8052
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8053
	Project notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8054
	    fileName := Project currentProjectDirectory asFilename construct: fileName name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8055
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8056
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8057
	 if file exists, save original in a .sav file
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8058
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8059
	fileName exists ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8060
	    fileName copyTo:(fileName withSuffix: 'sav')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8061
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8062
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8063
	fileName := fileName pathName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8064
	outStream := FileStream newFileNamed:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8065
	outStream isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8066
	    ^ self warn:'cannot create: %1' with:fileName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8067
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8068
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8069
	self busyLabel:'saving: ' with:currentMethodCategory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8070
	Class fileOutErrorSignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8071
	    self warn:'cannot create: %1' with:ex parameter.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8072
	    ex return
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8073
	] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8074
	    Smalltalk allBehaviorsDo:[:class |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8075
		|hasMethodsInThisCategory|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8076
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8077
		hasMethodsInThisCategory := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8078
		class methodDictionary do:[:method |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8079
		    method category = currentMethodCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8080
			hasMethodsInThisCategory := true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8081
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8082
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8083
		hasMethodsInThisCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8084
		    class fileOutCategory:currentMethodCategory on:outStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8085
		    outStream cr
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8086
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8087
		hasMethodsInThisCategory := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8088
		class class methodDictionary do:[:method |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8089
		    method category = currentMethodCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8090
			hasMethodsInThisCategory := true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8091
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8092
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8093
		hasMethodsInThisCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8094
		    class class fileOutCategory:currentMethodCategory on:outStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8095
		    outStream cr
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8096
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8097
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8098
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8099
	outStream close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8100
	self normalLabel.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8101
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8102
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8103
    "Modified: / 7.6.1996 / 09:03:56 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8104
    "Modified: / 28.10.1997 / 14:37:32 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8105
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8106
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8107
methodCategoryMenu
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  8108
    <resource: #keyboard (#Cmdn)>
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8109
    <resource: #programMenu >
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  8110
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  8111
    |items m varSel s1 s2 codeMenu disableFlag|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8112
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8113
    currentClass isNil ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8114
        methodCategoryListView flash.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8115
        ^ nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8116
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8117
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8118
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8119
    currentClass isLoaded ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8120
        disableFlag := false.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8121
        showInstance ifFalse:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8122
            items := #( 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8123
                        ( 'documentation stubs' methodCategoryCreateDocumentationMethods)
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8124
                     ).
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8125
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8126
            (currentClass isSubclassOf:ApplicationModel) ifTrue:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8127
                (currentClass isSubclassOf:SimpleDialog) ifTrue:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8128
                        items := items , #( 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8129
                                ( 'initial dialog code' methodCategoryCreateApplicationMethods)
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8130
                             ).
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8131
                ] ifFalse:[
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  8132
"/                ((currentClass class implements:#windowSpec)
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  8133
"/                and:[currentClass class implements:#mainMenu]) ifFalse:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8134
                        items := items , #( 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8135
                                ( 'initial application code' methodCategoryCreateApplicationMethods)
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8136
                             ).
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  8137
"/                    ]
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8138
                ]
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8139
            ] 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8140
        ] ifTrue:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8141
            (variableListView notNil
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8142
            and:[(varSel := variableListView selectionValue) notNil]) ifTrue:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8143
                s1 := 'access methods (for ''%1'')'. 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8144
                s2 := 'access methods with change message (for ''%1'')'. 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8145
            ] ifFalse:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8146
                s1 := 'access methods (for all)'. 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8147
                s2 := 'access methods with change message (for all)'. 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8148
                disableFlag := currentClass instVarNames size == 0
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8149
            ].
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8150
            s1 := resources string:s1 with:varSel.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8151
            s2 := resources string:s2 with:varSel.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8152
            items := Array with:(Array 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8153
                                    with:s1 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8154
                                    with:#methodCategoryCreateAccessMethods)
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8155
                           with:(Array 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8156
                                    with:s2 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8157
                                    with:#methodCategoryCreateAccessMethodsWithChange).
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8158
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8159
            items := items , #( 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8160
                        ( 'standard update method template' methodCategoryCreateUpdateMethod)
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8161
                     ).
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8162
        ].
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8163
        codeMenu := PopUpMenu itemList:items resources:resources.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8164
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8165
        disableFlag ifTrue:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8166
            codeMenu disableAll:#(methodCategoryCreateAccessMethods methodCategoryCreateAccessMethodsWithChange).
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8167
        ].
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8168
        (actualClass implements:#'update:with:from:') ifTrue:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8169
            codeMenu disable:#methodCategoryCreateUpdateMethod
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8170
        ]
1237
eb435327405d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1236
diff changeset
  8171
    ].
1230
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  8172
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  8173
    currentMethodCategory notNil ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8174
        items := #(
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8175
                    ('fileOut'               methodCategoryFileOut        )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8176
                    ('fileOut all'           methodCategoryFileOutAll     )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8177
                    ('printOut'              methodCategoryPrintOut       )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8178
                    ('-'                                                  )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8179
                    ('SPAWN_METHODCATEGORY'  methodCategorySpawn          )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8180
                    ('spawn category'        methodCategorySpawnCategory  )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8181
                 ).
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8182
    ] ifFalse:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8183
        items := #().
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8184
    ].
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8185
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8186
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8187
    items := items , #(
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8188
                ('new category...'        methodCategoryNewCategory     Cmdn )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8189
                ('copy category...'       methodCategoryCopyCategory    )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8190
               ).                                                       
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8191
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8192
    currentMethodCategory notNil ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8193
        items := items , #(
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8194
                    ('-'                               )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8195
                    ('rename...'  methodCategoryRename )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8196
                    ('remove...'  methodCategoryRemove )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8197
                   ).
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8198
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8199
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8200
    codeMenu notNil ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8201
        items := items , #(
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8202
                        ('-'                      )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8203
                        ('generate' codeMenu)
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8204
                  ).
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8205
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8206
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8207
    m := PopUpMenu 
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8208
        itemList:items
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8209
        resources:resources.
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8210
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8211
    currentClass isLoaded ifFalse:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8212
        m disableAll:#(
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8213
                        methodCategoryNewCategory
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8214
                        methodCategoryCopyCategory
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8215
                        methodCategoryCreateAccessMethods
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8216
                        methodCategoryFindMethod
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8217
                      )
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8218
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8219
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8220
    codeMenu notNil ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8221
        m subMenuAt:#codeMenu put:codeMenu.
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8222
    ].
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8223
    ^ m
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8224
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8225
    "Modified: / 10.2.2000 / 13:38:58 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8226
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8227
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8228
methodCategoryNewCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8229
    "show the enter box to add a new method category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8230
     Offer existing superclass categories in box to help avoiding
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8231
     useless typing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8232
2643
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8233
    |someCategories existingCategories box superclass|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8234
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8235
    actualClass notNil ifTrue:[
2643
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8236
        someCategories := actualClass allCategories asSet.
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8237
        (superclass := actualClass superclass) notNil ifTrue:[
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8238
            superclass allSubclasses do:[:cls |
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8239
                someCategories addAll:cls categories
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8240
            ]
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8241
        ].
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8242
        someCategories := someCategories asOrderedCollection
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8243
    ] ifFalse:[
2643
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8244
        "
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8245
         mhmh - offer some typical categories ...
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8246
        "
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8247
        showInstance ifTrue:[
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8248
            someCategories := #('accessing' 
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8249
                                'initialization'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8250
                                'private' 
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8251
                                'printing & storing'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8252
                                'queries'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8253
                                'testing'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8254
                               )
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8255
        ] ifFalse:[
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8256
            someCategories := #(
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8257
                                'documentation'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8258
                                'initialization'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8259
                                'instance creation'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8260
                               ).
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8261
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8262
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8263
    someCategories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8264
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8265
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8266
     remove existing categories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8267
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8268
    existingCategories := methodCategoryListView list.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8269
    existingCategories notNil ifTrue:[
2643
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8270
        someCategories := someCategories select:[:cat | (existingCategories includes:cat) not].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8271
    ].
838
9e981e2b8158 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 836
diff changeset
  8272
    someCategories := someCategories asSet asOrderedCollection sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8273
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8274
    box := self listBoxTitle:'name of new method category:'
2643
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8275
                      okText:'create'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8276
                        list:someCategories.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8277
    box label:(resources string:'create category').
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  8278
    box initialText:lastCategory.
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  8279
    box action:[:aString | self newMethodCategory:aString. lastCategory := aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8280
    box showAtPointer
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8281
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8282
    "Modified: 15.1.1997 / 23:57:26 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8283
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8284
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8285
methodCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8286
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8287
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8288
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8289
    self whenMethodCategorySelected:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8290
	printStream := Printer new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8291
	actualClass printOutCategory:currentMethodCategory on:printStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8292
	printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8293
    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8294
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8295
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8296
methodCategoryRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8297
    "show number of methods to remove and query user"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8298
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  8299
    |t box sels count answer|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8300
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8301
    currentMethodCategory notNil ifTrue:[
2478
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8302
        sels := OrderedCollection new.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8303
        actualClass methodDictionary keysAndValuesDo:[:selector :aMethod |
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8304
            (aMethod category = currentMethodCategory) ifTrue:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8305
                sels add:selector
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8306
            ]
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8307
        ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8308
        count := sels size.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8309
        (count ~~ 0) ifTrue:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8310
            (count == 1) ifTrue:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8311
                t := 'remove the method in category ''%1'' ?'
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8312
            ] ifFalse:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8313
                t := 'remove all %2 methods in category ''%1'' ?'
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8314
            ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8315
            t := resources string:t with:currentMethodCategory with:count printString.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8316
            t := t withCRs.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8317
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8318
            box := YesNoBox 
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8319
                       title:t
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8320
                       yesText:(resources at:'remove')
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8321
                       noText:(resources at:'abort').
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8322
            answer := box confirm.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8323
            box destroy.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8324
            answer ifFalse:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8325
                ^ self.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8326
            ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8327
            sels do:[:selector|
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8328
                actualClass removeSelector:selector.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8329
            ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8330
        ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8331
        currentMethodCategory := nil.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8332
        self releaseMethod.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8333
        self updateMethodCategoryListWithScroll:false.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8334
        self updateMethodList
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8335
    ]
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8336
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8337
    "Modified: / 7.6.1996 / 09:13:15 / stefan"
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8338
    "Modified: / 27.7.1998 / 10:58:00 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8339
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8340
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8341
methodCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8342
    "launch an enterBox to rename current method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8343
2586
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8344
    |box suggestion last|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8345
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8346
    self checkMethodCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8347
2586
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8348
    LastRenames isNil ifTrue:[
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8349
        LastRenames := OrderedCollection new.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8350
    ].
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8351
    last := LastRenames detect:[:ren | ren key = currentMethodCategory] ifNone:nil.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8352
    last notNil ifTrue:[
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8353
        suggestion := last value
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8354
    ] ifFalse:[
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8355
        suggestion := currentMethodCategory
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8356
    ].
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8357
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8358
    box := self 
2586
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8359
                enterBoxTitle:(resources string:'rename method category ''%1'' to:' 
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8360
                                           with:currentMethodCategory asText allBold)
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8361
                okText:'rename'
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8362
                label:'rename category'.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8363
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8364
    box initialText:suggestion.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8365
    box action:[:aString | 
2586
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8366
        aString ~= currentMethodCategory ifTrue:[
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8367
            LastRenames := LastRenames select:[:ren | ren key ~= currentMethodCategory].
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8368
            LastRenames addLast:(currentMethodCategory -> aString).
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8369
            LastRenames size > 20 ifTrue:[LastRenames removeFirst].
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8370
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8371
            actualClass renameCategory:currentMethodCategory to:aString.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8372
            currentMethodCategory := aString.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8373
            self releaseMethod.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8374
            self updateMethodCategoryList.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8375
            self updateMethodListWithScroll:false
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8376
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8377
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8378
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8379
2586
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8380
    "Modified: / 4.2.2000 / 15:47:07 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8381
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8382
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8383
methodCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8384
    "create a new SystemBrowser browsing current method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8385
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8386
    currentMethodCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8387
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8388
	    SystemBrowser browseClass:actualClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8389
		    methodCategory:currentMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8390
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8391
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8392
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8393
    "Modified: 18.8.1997 / 15:44:18 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8394
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8395
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8396
methodCategorySpawnCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8397
    "create a new SystemBrowser browsing all methods from all
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8398
     classes with same category as current method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8399
2568
24854141205c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2565
diff changeset
  8400
    self askAndBrowseMethodCategory:'category to browse methods (matchPattern allowed):'
24854141205c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2565
diff changeset
  8401
                             action:[:aString | 
24854141205c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2565
diff changeset
  8402
                                        SystemBrowser browseMethodCategory:aString
24854141205c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2565
diff changeset
  8403
                                    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8404
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8405
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8406
!BrowserView methodsFor:'method category stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8407
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8408
checkMethodCategorySelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8409
    currentMethodCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8410
	self warn:'select a method category first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8411
	^ false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8412
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8413
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8414
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8415
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8416
copyMethodsFromClass:aClassName
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8417
    |class box list|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8418
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8419
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8420
	class := Smalltalk classNamed:aClassName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8421
	class isBehavior ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8422
	    self warn:'no class named %1' with:aClassName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8423
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8424
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8425
	class isLoaded ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8426
	    (self confirm:(class name , ' is an autoloaded class.\I can only copy categories if it is loaded first.\\Load the class now?') withCRs)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8427
	    ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8428
		class autoload
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8429
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8430
	].        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8431
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8432
	showInstance ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8433
	    class := class class             
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8434
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8435
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8436
	"show enterbox for category to copy from"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8437
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8438
	list := class categories asOrderedCollection sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8439
	list addFirst:'*'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8440
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8441
	box := self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8442
		enterBoxTitle:'name of category to copy from (matchpattern allowed, * for all):'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8443
		okText:'copy'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8444
		label:(resources string:'copy methods from %1' with:aClassName)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8445
		list:list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8446
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8447
	box open.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8448
	box accepted ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8449
	    self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8450
		copyMethodsFromClass:class 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8451
		category:(box aspectFor:#fieldValue) value
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8452
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8453
    ]
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8454
1384
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  8455
    "Modified: / 16.1.1997 / 20:15:51 / cg"
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  8456
    "Modified: / 19.12.1997 / 12:27:42 / stefan"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8457
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8458
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8459
copyMethodsFromClass:class category:category
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8460
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8461
	Object abortSignal catch:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8462
	    class methodDictionary do:[:aMethod |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8463
		|source|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8464
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8465
		(category match:aMethod category) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8466
		    source := aMethod source.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8467
		    codeView contents:source.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8468
		    codeView modified:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8469
		    codeModified := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8470
		    actualClass compilerClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8471
			 compile:source 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8472
			 forClass:actualClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8473
			 inCategory:aMethod category
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8474
			 notifying:codeView.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8475
		    self updateMethodCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8476
		    self updateMethodListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8477
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8478
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8479
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8480
    ]
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8481
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  8482
    "Modified: / 7.6.1996 / 09:02:35 / stefan"
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  8483
    "Modified: / 31.3.1998 / 23:39:11 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8484
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8485
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8486
listOfAllMethodCategoriesInClass:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8487
    "answer a list of all method categories of the argument, aClass"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8488
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8489
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8490
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8491
    newList := aClass categories.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8492
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8493
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8494
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8495
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8496
    "Modified: 7.6.1996 / 09:02:57 / stefan"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8497
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8498
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8499
listOfAllMethodCategoriesInFullProtocolHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8500
    "answer a list of all method categories of the argument, aClass,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8501
     and all of its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8502
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8503
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8504
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8505
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8506
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8507
    self classesInFullProtocolHierarchy:aClass do:[:c |
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8508
        newList addAll:(c categories).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8509
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8510
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8511
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8512
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8513
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8514
    "Modified: 7.6.1996 / 09:03:11 / stefan"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8515
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8516
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8517
methodCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8518
    "user clicked on a method category line - show selectors"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8519
1451
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8520
    |cat|
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8521
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8522
    (cat := methodCategoryListView selectionValue) isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8523
	cat := currentMethodCategory
1451
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8524
    ].
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8525
    cat notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8526
	self switchToMethodCategory:cat string.
1451
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8527
    ].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8528
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8529
    "Modified: 22.10.1996 / 17:27:13 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8530
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8531
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8532
methodCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8533
    "method category selection has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8534
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8535
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8536
	self releaseMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8537
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8538
	self updateMethodList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8539
	aspect ~~ #definition ifTrue:[self updateCodeView].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8540
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8541
	currentMethodCategory notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8542
	    methodCategoryListView setSelectElement:currentMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8543
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8544
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8545
	aspect isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8546
	    self setAcceptAndExplainActionsForMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8547
	].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8548
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8549
"/ this is now done in
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8550
"/ #updateMethodList
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8551
"/
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8552
"/        (variableListView notNil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8553
"/        and:[variableListView hasSelection]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8554
"/            self hilightMethodsInMethodCategoryList:false inMethodList:true.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8555
"/        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8556
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8557
1562
3785529d7e7d avoid double-redraw;
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  8558
    "Created: / 23.11.1995 / 14:17:38 / cg"
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8559
    "Modified: / 27.7.1998 / 10:58:26 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8560
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8561
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8562
newMethodCategory:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8563
    |categories|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8564
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8565
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8566
	^ self warn:'select/create a class first'.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8567
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8568
    categories := methodCategoryListView list.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8569
    categories isNil ifTrue:[categories := OrderedCollection new].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8570
    (categories includes:aString) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8571
	categories add:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8572
	categories sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8573
	methodCategoryListView contents:categories
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8574
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8575
    currentMethodCategory := aString.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  8576
    aspect := nil.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8577
    self methodCategorySelectionChanged
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  8578
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  8579
    "Modified: 10.2.1996 / 13:07:32 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8580
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8581
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8582
switchToMethodCategory:aCategory
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8583
    |oldSelector|
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8584
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8585
    oldSelector := currentSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8586
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8587
    aspect := nil.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8588
    (fullProtocol not and:[currentClass isNil]) ifTrue:[^ self].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8589
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8590
    currentMethodCategory := aCategory.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8591
    self methodCategorySelectionChanged.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8592
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8593
    "if there is only one method, show it right away"
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8594
    methodListView list size == 1 ifTrue:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8595
        methodListView setSelection:1.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8596
        self methodSelection:1
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8597
    ] ifFalse:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8598
        oldSelector notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8599
            methodListView setSelectElement:oldSelector.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8600
            methodListView hasSelection ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8601
                self methodSelection:methodListView selection.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8602
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8603
        ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8604
    ].
2593
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  8605
"/    actualClass notNil ifTrue:[
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  8606
"/        self addToClassHistory: actualClass name asString
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  8607
"/    ]
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8608
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8610
    "Modified: 26.5.1996 / 15:07:07 / cg"
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8611
    "Created: 4.6.1996 / 23:03:50 / cg"
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8612
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8613
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8614
updateMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8615
    self updateMethodCategoryListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8616
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8617
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8618
updateMethodCategoryListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8619
    |categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8620
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8621
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8622
	fullProtocol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8623
	    currentClassHierarchy notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8624
		categories := self listOfAllMethodCategoriesInFullProtocolHierarchy:actualClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8625
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8626
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8627
	    currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8628
		categories := self listOfAllMethodCategoriesInClass:actualClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8629
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8630
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8631
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8632
	methodCategoryListView list = categories ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8633
	    scroll ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8634
		methodCategoryListView contents:categories
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8635
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8636
		methodCategoryListView setContents:categories
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8637
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8638
	    currentMethodCategory notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8639
		methodCategoryListView setSelectElement:currentMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8640
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8641
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8642
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  8643
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8644
    "Modified: 30.7.1997 / 15:53:22 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8645
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8646
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8647
whenMethodCategorySelected:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8648
    self checkMethodCategorySelected ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8649
	self withBusyCursorDo:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8650
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8651
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8652
    "Modified: 18.8.1997 / 15:44:38 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8653
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8654
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8655
!BrowserView methodsFor:'method list menu'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8656
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8657
commonTraceHelperWith:aSelector
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8658
    "install a break/trace or countPoint for the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8659
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8660
    "/ not for unbound methods (i.e. obsolete)
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8661
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8662
    currentMethod isNil ifTrue:[^ self].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8663
    currentMethod who isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8664
	self warn:'method is no longer valid'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8665
	^ self
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8666
    ].
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8667
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8668
    currentMethod perform:aSelector.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8669
    self refetchMethod.
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8670
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  8671
    Class withoutUpdatingChangesDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8672
	currentClass changed:#methodTrap with:currentSelector.
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  8673
    ]
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8674
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8675
    "Modified: / 27.7.1998 / 11:10:40 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8676
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8677
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8678
commonTraceHelperWith:aSelector with:argument
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8679
    "install a break/trace or countPoint for the current method"
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8680
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8681
    "/ not for unbound methods (i.e. obsolete)
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8682
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8683
    currentMethod isNil ifTrue:[^ self].
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8684
    currentMethod who isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8685
	self warn:'method is no longer valid'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8686
	^ self
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8687
    ].
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8688
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8689
    currentMethod perform:aSelector with:argument.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8690
    self refetchMethod.
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8691
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  8692
    Class withoutUpdatingChangesDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8693
	currentClass changed:#methodTrap with:currentSelector.
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  8694
    ]
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  8695
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8696
    "Modified: / 27.7.1998 / 11:10:57 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8697
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8698
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8699
methodAproposSearch
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8700
    "launch an enterBox for a keyword search"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8701
2655
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2654
diff changeset
  8702
    self askForSearchTitle:'keyword to search for (in selector):' 
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2654
diff changeset
  8703
                  openWith:#aproposSearch:in:
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2654
diff changeset
  8704
                isSelector:true
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2654
diff changeset
  8705
                searchArea:#class
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  8706
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  8707
    "Modified: 11.11.1996 / 12:43:54 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8708
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8709
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8710
methodBreakPoint
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8711
    "set a breakpoint on the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8712
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8713
    self commonTraceHelperWith:#setBreakPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8714
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8715
    "Modified: / 12.1.1998 / 19:14:30 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8716
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8717
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8718
methodBreakPointInProcess
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8719
    "set a breakpoint on the current method, which only triggers if
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8720
     executed by some particular process."
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8721
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8722
    |processes processNames box windowGroups|
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8723
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8724
    windowGroups := WindowGroup allInstances.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8725
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8726
    processes := ProcessorScheduler knownProcesses asOrderedCollection.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8727
    processes := processes select:[:aProcess |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8728
			aProcess notNil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8729
			and:[aProcess id notNil]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8730
		 ].
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8731
    processes := processes sort:[:a :b | a id < b id].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8732
    processNames := processes collect:[:aProcess |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8733
			|pName theGroup top topLabel winLabel|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8734
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8735
			pName := aProcess nameOrId.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8736
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8737
			"/ if its a windowGroup process,
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8738
			"/ fetch its first topViews name and add.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8739
			"/ (allows selecting among multiple browsers ...)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8740
			winLabel := ''.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8741
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8742
			theGroup := windowGroups select:[:g | g process == aProcess].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8743
			theGroup size == 1 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8744
			    theGroup := theGroup first.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8745
			    top := theGroup topViews.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8746
			    top size > 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8747
				top := top first.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8748
				topLabel := top label.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8749
				(topLabel notNil and:[topLabel ~= pName]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8750
				     winLabel := '  "' , topLabel , '")'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8751
				]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8752
			    ].                        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8753
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8754
			aProcess id printString , ' [' , pName , ']' , winLabel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8755
		    ].
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8757
    "/ let user specify which one ...
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8758
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8759
    box := ListSelectionBox new.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8760
    box noEnterField.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8761
    box list:processNames.
1233
c5aac7105c4e more messages improved
Claus Gittinger <cg@exept.de>
parents: 1232
diff changeset
  8762
    box label:(resources string:'process selection').
c5aac7105c4e more messages improved
Claus Gittinger <cg@exept.de>
parents: 1232
diff changeset
  8763
    box title:(resources 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8764
		string:'stop if method is executed by process:\\(current process is %1)'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8765
		with:(Processor activeProcess id)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8766
		with:(Processor activeProcess nameOrId)) withCRs.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8767
    box action:[:selection |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8768
	self commonTraceHelperWith:#breakPointInProcess: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8769
			      with:(processes at:box selectionIndex)
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8770
    ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8771
    box showAtPointer.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8772
    box destroy
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8773
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8774
    "Created: / 14.10.1996 / 15:40:53 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8775
    "Modified: / 12.1.1998 / 19:14:37 / cg"
1448
09fa6dee211b Allow nil labels in TopView (when setting Breakpoint for aProcess)
Stefan Vogel <sv@exept.de>
parents: 1446
diff changeset
  8776
    "Modified: / 2.2.1998 / 12:39:38 / stefan"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8777
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8778
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8779
methodChangeCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8780
    "move the current method into another category -
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8781
     nothing done here, but a query for the new category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8782
     Remember the last category, to allow faster category change of a group of methods."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8783
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8784
    |box txt|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8785
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8786
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8787
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8788
    actualClass isNil ifTrue:[
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8789
        box := self 
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8790
                enterBoxTitle:'' 
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8791
                okText:'change'
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8792
                label:'change category'.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8793
    ] ifFalse:[
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8794
        |someCategories|
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8795
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8796
        someCategories := actualClass categories asOrderedCollection sort.
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8797
        box := self 
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8798
                listBoxTitle:'' 
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8799
                okText:'change' 
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8800
                list:someCategories.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8801
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8802
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8803
    box title:(resources string:'change category from ''%1'' to:' with:currentMethod category).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8804
    lastMethodCategory isNil ifTrue:[
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8805
        txt := currentMethod category.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8806
    ] ifFalse:[
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8807
        txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8808
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8809
    box initialText:txt.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8810
    box action:[:aString |
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8811
                    |method|
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8812
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8813
                    lastMethodCategory := aString.
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8814
                    method := currentMethod.
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8815
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8816
                    method category:aString asSymbol.
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8817
                    actualClass changed:#organization with:currentSelector.
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8818
                    method changed:#category.
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8819
                    actualClass addChangeRecordForMethodCategory:method category:aString.
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8820
                    self updateMethodCategoryListWithScroll:false.
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8821
                    self updateMethodListWithScroll:false
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8822
               ].
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8823
    box label:(resources string:'change category').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8824
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8825
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8826
    "Created: 29.10.1995 / 19:59:22 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8827
    "Modified: 16.1.1997 / 00:16:29 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8828
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8829
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8830
methodCompareSource
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8831
    "compare with some other methods source"
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8832
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8833
    |prev v classAndMethod words className methodName 
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8834
     meta class method|
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8835
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8836
    self checkMethodSelected ifFalse:[^ self].
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8837
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8838
    classAndMethod := Dialog 
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8839
                request:'Compare current code with source of (Class selector)'
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8840
                initialAnswer:(actualClass name , ' ' , currentSelector).
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8841
    classAndMethod size == 0 ifTrue:[^ self].
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8842
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8843
    words := classAndMethod asCollectionOfWords.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8844
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8845
    className := words at:1 ifAbsent:nil.
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8846
    className isNil ifTrue:[
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8847
        ^ self warn:'No class entered.'.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8848
    ].
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8849
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8850
    meta := false.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8851
    words size > 2 ifTrue:[
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8852
        (words at:2) ~= 'class' ifTrue:[
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8853
            ^ self warn:'Bad input.'.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8854
        ].
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8855
        methodName := words at:3.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8856
        meta := true.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8857
    ] ifFalse:[
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8858
        methodName := words at:2 ifAbsent:nil.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8859
    ].
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8860
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8861
    methodName isNil ifTrue:[
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8862
        ^ self warn:'No method entered.'.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8863
    ].
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8864
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8865
    className := className asSymbolIfInterned.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8866
    (className isNil or:[(class := Smalltalk at:className) isBehavior not]) ifTrue:[
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8867
        ^ self warn:'No such class.'.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8868
    ].
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8869
    meta ifTrue:[class := class class ].
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8870
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8871
    methodName := methodName asSymbolIfInterned.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8872
    (methodName isNil or:[(method := class compiledMethodAt:methodName) isNil]) ifTrue:[
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8873
        ^ self warn:'No such method.'.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8874
    ].
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8875
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8876
    v := DiffTextView 
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8877
        openOn:codeView contents asString string
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8878
        label:(resources string:'code here')
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8879
        and:method source asString string
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8880
        label:'method compare'.      
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8881
    v label:'comparing with ' , className , ' ' , methodName.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8882
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8883
    "Modified: 7.11.1996 / 18:53:55 / cg"
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8884
!
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8885
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8886
methodCompareWithPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8887
    "compare with previous version"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8888
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8889
    |prev v|
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8890
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8891
    self checkMethodSelected ifFalse:[^ self].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8892
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8893
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8894
    prev isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8895
	self warn:'oops - previous version is gone'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8896
	^ self
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8897
    ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8898
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8899
    v := DiffTextView 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8900
	openOn:codeView contents
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8901
	label:(resources string:'code here')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8902
	and:prev source
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8903
	label:'previous version'.      
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8904
    v label:'comparing ' , currentMethod whoString.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8905
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8906
    "Modified: 7.11.1996 / 18:53:55 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8907
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8908
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8909
methodCopy
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8910
    "copy the current method into another class; typically a brother-sister class"
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8911
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8912
    |newClass newClassName sup initial copiedMethod 
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8913
     supers subs list holders|
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8914
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8915
    self checkMethodSelected ifFalse:[^ self].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8916
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8917
    lastMethodMoveClass ~= currentClass name ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8918
        initial := lastMethodMoveClass.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8919
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8920
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8921
    initial isNil ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8922
        (sup := currentClass superclass) notNil ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8923
            initial := sup name
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8924
        ] ifFalse:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8925
            initial := nil.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8926
        ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8927
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8928
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8929
    supers := (currentClass allSuperclasses reverse collect:[:cls | cls name]).
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8930
    subs := (currentClass allSubclasses collect:[:cls | cls name]).
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8931
    list := supers.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8932
    (supers notEmpty and:[subs notEmpty]) ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8933
        list := list , (Array with:'---- ' , currentClass name , ' ----')
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8934
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8935
    list := list , subs.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8936
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8937
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8938
"/ preps to use windowSpecs ...
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8939
"/
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8940
"/    holders := IdentityDictionary new.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8941
"/    holders at:#className put:initial asValue.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8942
"/    holders at:#classList put:list.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8943
"/
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8944
"/    (SystemBrowser 
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8945
"/      openDialogInterface:#methodMoveDialogSpec
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8946
"/      withBindings:holders) ifFalse:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8947
"/        ^ self
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8948
"/    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8949
"/    newClassName := (holders at:#className) value.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8950
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8951
    newClassName := Dialog 
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8952
                    request:(resources string:'copy this method to which class:')
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8953
                    initialAnswer:initial
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8954
                    okLabel:(resources string:'copy')
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8955
                    title:(resources string:'copy method')
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8956
                    onCancel:nil
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8957
                    list:list.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8958
    newClassName isNil ifTrue:[^ self].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8959
    (newClassName startsWith:'---- ') ifTrue:[^ self].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8960
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8961
    newClass := Smalltalk classNamed:newClassName.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8962
    newClass isNil ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8963
        self warn:'no such class'.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8964
        ^ self
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8965
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8966
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8967
    showInstance ifFalse:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8968
        newClass isMeta ifFalse:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8969
            newClass := newClass class
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8970
        ]
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8971
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8972
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8973
    (newClass implements:currentSelector) ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8974
        (self confirm:(newClass name asText allBold , ' already implements ' , currentSelector
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8975
                      , '\\Redefine anyway ?' withCRs)) ifFalse:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8976
            ^ self
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8977
        ]
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8978
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8979
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8980
    lastMethodMoveClass := newClassName.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8981
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8982
    copiedMethod := newClass 
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8983
                        compile:(currentMethod source) 
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8984
                        classified:currentMethodCategory.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8985
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8986
    (copiedMethod isNil or:[copiedMethod == #Error]) ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8987
        self warn:'not copied - compilation failed due to an error'.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8988
        ^ self
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8989
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8990
!
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  8991
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8992
methodDecompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8993
    "decompile the current methods bytecodes.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8994
     The Decompiler is delivered as an extra, and not normally
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8995
     avaliable with the system."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8996
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8997
    |s|
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8998
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8999
    self checkMethodSelected ifFalse:[^ self].
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9000
    self checkSelectionChangeAllowed ifFalse:[^ self].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9001
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9002
    s := '' writeStream.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9003
    (currentMethod decompileTo:s) ifFalse:[
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  9004
        self warn:'No decompiler available'.
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9005
    ].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9006
    codeView contents:s contents.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9007
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  9008
    codeModified := false.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  9009
    self clearAcceptAction.
2026
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
  9010
    self clearExplainAction.
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9011
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  9012
    "Modified: / 10.2.2000 / 14:14:40 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9013
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9014
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9015
methodFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9016
    "file out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9017
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9018
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9019
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9020
    self busyLabel:'saving:' with:currentSelector.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9021
    Class fileOutErrorSignal handle:[:ex |
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  9022
        self warn:'cannot create: %1' with:ex parameter.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  9023
        self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  9024
        ex return
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9025
    ] do:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  9026
        actualClass fileOutMethod:currentMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9027
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9028
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9029
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9030
1990
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9031
methodFindAnyMethod
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9032
    |box|
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9033
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9034
    box := self enterBoxForSearchSelectorTitle:'method selector to search for:'.
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9035
    box label:(resources string:'find method').
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9036
    box action:[:aString | self switchToAnyMethodNamed:aString].
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9037
    box showAtPointer
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9038
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9039
    "Modified: / 15.1.1997 / 23:59:53 / cg"
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9040
    "Created: / 2.2.1999 / 14:40:04 / cg"
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9041
!
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9042
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9043
methodFindMethod
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9044
    |box|
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9045
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9046
    box := self enterBoxForSearchSelectorTitle:'method selector to search for:'.
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9047
    box label:(resources string:'find method').
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9048
    box action:[:aString | self switchToMethodNamed:aString].
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9049
    box showAtPointer
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9050
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9051
    "Modified: / 15.1.1997 / 23:59:27 / cg"
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9052
    "Created: / 2.2.1999 / 14:40:00 / cg"
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9053
!
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9054
1957
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9055
methodFlushCode
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9056
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9057
    self checkMethodSelected ifFalse:[^ self].
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9058
    self checkSelectionChangeAllowed ifFalse:[^ self].
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9059
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9060
    currentMethod checked:false.
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9061
    currentMethod code:nil.
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9062
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9063
    "Created: / 10.11.1998 / 18:30:14 / cg"
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9064
!
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9065
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9066
methodFormatMethod:oldText
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9067
    "prettyPrint the method (but do not accept it);
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9068
     uses the RefactoryBrowsers formatter"
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9069
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9070
    |tree newText|
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9071
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9072
    tree := BRParser 
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9073
                    parseMethod:oldText
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9074
                    onError: [:aString :position | ^ self "ignore any error"].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9075
    tree isNil ifTrue:[^ self].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9076
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9077
    newText := tree printString.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9078
    codeView contents:newText.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9079
    codeView modified:true.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9080
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9081
    "Modified: / 22.11.1999 / 11:53:55 / cg"
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9082
!
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9083
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9084
methodGlobalReferends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9085
    "launch an enterBox for global symbol to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9086
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9087
    self askForSearchTitle:'global variable to search users of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9088
		  openWith:#browseReferendsOf:in:
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9089
		isSelector:false
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9090
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9091
"/    self enterBoxForBrowseTitle:'global variable to browse users of:'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9092
"/                         action:[:aString | 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9093
"/                                    SystemBrowser browseReferendsOf:aString asSymbol
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9094
"/                                ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9095
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9096
    "Modified: 10.7.1996 / 10:37:37 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9097
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9098
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9099
methodImplementors
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9100
    "launch an enterBox for selector to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9101
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9102
    self 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9103
        askForSearchTitle:'selector to browse implementors of:' 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9104
        openWith:#browseImplementorsOf:in:ignoreCase:
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9105
        isSelector:true
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9106
        searchArea:#everywhere
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9107
        withCaseIgnore:true
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9108
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9109
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9110
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9111
methodInheritance
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9112
    "launch a browser showing inherited (and overwritten) methods"
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9113
2103
ab4e04bde5ec more info in inheritance-menu item.
Claus Gittinger <cg@exept.de>
parents: 2086
diff changeset
  9114
    |methodList nRedef msg whereRedef|
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9115
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9116
    currentClass isNil ifTrue:[^ self].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9117
    currentSelector isNil ifTrue:[^ self].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9118
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9119
    methodList := OrderedCollection new.
2103
ab4e04bde5ec more info in inheritance-menu item.
Claus Gittinger <cg@exept.de>
parents: 2086
diff changeset
  9120
    actualClass allSuperclasses do:[:aSuperClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9121
	|m|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9122
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9123
	m := aSuperClass compiledMethodAt:currentSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9124
	m notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9125
	    methodList addFirst:m
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9126
	]
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9127
    ].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9128
    methodList size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9129
	nRedef := 0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9130
	actualClass allSubclassesDo:[:aSubClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9131
	    (aSubClass compiledMethodAt:currentSelector) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9132
		nRedef := nRedef + 1.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9133
		whereRedef := aSubClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9134
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9135
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9136
	msg := '''%1'' does not redefine any inherited method.'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9137
	nRedef ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9138
	    nRedef == 1 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9139
		msg := msg , '\But is redefined in %3.'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9140
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9141
		msg := msg , '\But is redefined in %2 subclasses.'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9142
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9143
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9144
	^ self information:(resources
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9145
				string:msg
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9146
				with:currentSelector asText allBold
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9147
				with:nRedef
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9148
				with:whereRedef) withCRs.
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9149
    ].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9150
    methodList addLast:(actualClass compiledMethodAt:currentSelector).
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9151
    SystemBrowser 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9152
	browseMethods:methodList 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9153
	title:(resources string:'''%1'' inheritance & redefinition' with:currentSelector)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9154
	sort:false
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9155
!
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9156
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9157
methodInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9158
    "inspect  the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9159
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9160
    self checkMethodSelected ifFalse:[^ self].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9161
    currentMethod inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9162
"/    (actualClass compiledMethodAt:currentSelector) inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9163
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9164
    "Modified: 4.6.1996 / 22:47:27 / cg"
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  9165
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9166
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9167
methodInvoke
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9168
    "invoke the current method"
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9170
    |w cls sel|
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9171
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9172
    self checkMethodSelected ifFalse:[^ self].
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9173
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9174
    w := currentMethod who.
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9175
    w notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9176
	cls := w methodClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9177
	cls notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9178
	    cls ~~ actualClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9179
		^ self warn:'oops - obsolete class; please reselect class ...'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9180
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9181
	    cls isMeta ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9182
		cls := cls soleInstance
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9183
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9184
		cls := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9185
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9186
	    cls notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9187
		sel := w methodSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9188
		sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9189
		    currentClass perform:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9190
		    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9191
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9192
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9193
	].
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9194
    ]. 
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9195
    self warn:'cannot invoke method (no class)'
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9196
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9197
    "Modified: / 29.4.1997 / 11:24:30 / dq"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9198
    "Modified: / 29.10.1997 / 15:50:28 / cg"
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9199
!
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9200
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9201
methodLocalSuperSends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9202
    "launch a browser showing super sends in current class & subclasses"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9203
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9204
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9205
    self withSearchCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9206
	SystemBrowser browseSuperCallsUnder:currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9207
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9208
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9209
    "Created: 23.11.1995 / 12:03:57 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9210
    "Modified: 23.11.1995 / 14:12:15 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9211
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9212
289
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  9213
methodMakeIgnored
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  9214
    "make the current method be invisible.
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  9215
     EXPERIMENTAL"
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  9216
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  9217
    self methodPrivacy:#ignored
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  9218
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  9219
    "Created: 13.12.1995 / 13:59:59 / cg"
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  9220
!
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  9221
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9222
methodMakePrivate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9223
    "make the current method private.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9224
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9225
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9226
    self methodPrivacy:#private 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9227
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9228
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9229
methodMakeProtected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9230
    "make the current method protected.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9231
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9232
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9233
    self methodPrivacy:#protected 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9234
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9235
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9236
methodMakePublic
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9237
    "make the current method public.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9238
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9239
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9240
    self methodPrivacy:#public 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9241
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9242
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9243
methodMenu
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9244
    "return a popupmenu as appropriate for the methodList"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9245
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9246
    <resource: #keyboard ( #Cmds #Cmdi #Cmdg #Cmdt #Cmda #Ctrl) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9247
    <resource: #programMenu >
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  9248
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9249
    |specialMenu m items
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9250
     newItems brkItems fileItems mthdItems
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9251
     searchItems sepLocalItems sepMthdItems localSearchItems|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9252
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9253
    currentMethod notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9254
        currentMethod isCountingMemoryUsage ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9255
            brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9256
                                ('-'               nil)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9257
                                ('stop mem usage'  methodStopMemoryUsage)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9258
                                ('reset mem count' methodResetMemoryUsage)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9259
                          ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9260
        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9261
            currentMethod isCounting ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9262
                brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9263
                                    ('-'              nil               )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9264
                                    ('stop counting'  methodStopCounting)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9265
                                    ('reset count'    methodResetCounting)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9266
                              ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9267
            ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9268
                currentMethod isTimed ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9269
                    brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9270
                                        ('-'           nil             )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9271
                                        ('stop timing' methodStopTiming)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9272
                                        ('reset times' methodResetTiming)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9273
                                  ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9274
                ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9275
                    currentMethod isTraced ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9276
                        brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9277
                                            ('-'            nil                     )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9278
                                            ('remove trace' methodRemoveBreakOrTrace)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9279
                                      ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9280
                    ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9281
                        currentMethod isBreakpointed ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9282
                            brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9283
                                                ('-'                 nil                     )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9284
                                                ('remove breakpoint' methodRemoveBreakOrTrace)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9285
                                          ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9286
                        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9287
                            brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9288
                                                ('-'                   nil                       )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9289
                                                ('breakpoint'          methodBreakPoint          )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9290
                                                ('breakpoint in...'   methodBreakPointInProcess )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9291
                                                ('-'                   nil                       )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9292
                                                ('trace'               methodTrace               )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9293
                                                ('trace sender'        methodTraceSender         )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9294
                                                ('trace full walkback' methodTraceFull           )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9295
                                                ('-'                   nil                       )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9296
                                                ('start timing'        methodStartTiming         )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9297
                                                ('start counting'      methodStartCounting       )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9298
                                                ('start mem usage'     methodStartMemoryUsage    )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9299
                                          ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9300
                        ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9301
                    ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9302
                ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9303
            ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9304
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9305
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9306
        currentMethod isJavaMethod ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9307
            items := #(
2393
dd1cac491bb1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2387
diff changeset
  9308
                            ('compare source...'         methodCompareSource  )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9309
                            ('inspect method'            methodInspect        )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9310
                            ('decompile'                 methodDecompile      )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9311
                            ('-'                         nil                  )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9312
                            ('flush code'                methodFlushCode      )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9313
                       ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9314
            items := items , brkItems.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9315
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9316
        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9317
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9318
            items := #(
2393
dd1cac491bb1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2387
diff changeset
  9319
                            ('compare source...'         methodCompareSource  )
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9320
                            ('inspect method'            methodInspect        )
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9321
                            ('stc-compile'               methodSTCCompile     )
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9322
                            ('decompile'                 methodDecompile      )
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9323
                            ('-'                         nil                  )
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9324
                            ('package...'                methodModifyPackage  )
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9325
                       ).
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9326
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9327
            Method methodPrivacySupported ifTrue:[
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9328
                items := items , #(
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9329
                                ('-'                         nil                  )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9330
                                ('make public'               methodMakePublic     )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9331
                                ('make private'              methodMakePrivate    )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9332
                                ('make protected'            methodMakeProtected  )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9333
                                ('make ignored'              methodMakeIgnored    )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9334
                           ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9335
            ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9336
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9337
            actualClass isMeta ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9338
                items := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9339
                              ('invoke method' methodInvoke )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9340
                              ('-'             nil          )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9341
                          )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9342
                          , items.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9343
            ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9344
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9345
            items := items , brkItems.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9346
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9347
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9348
        specialMenu := PopUpMenu itemList:items resources:resources.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9349
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9350
        currentClass owningClass notNil ifTrue:[
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9351
            specialMenu disable:#methodModifyPackage
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9352
        ].
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9353
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9354
        currentMethod isPublic ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9355
            specialMenu disable:#methodMakePublic
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9356
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9357
        currentMethod isPrivate ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9358
            specialMenu disable:#methodMakePrivate
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9359
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9360
        currentMethod isProtected ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9361
            specialMenu disable:#methodMakeProtected
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9362
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9363
        currentMethod isIgnored ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9364
            specialMenu disable:#methodMakeIgnored
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9365
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9366
        ((currentMethod hasCode and:[currentMethod isDynamic not])
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9367
        or:[currentMethod isJavaMethod
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9368
        or:[Compiler canCreateMachineCode not]]) ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9369
            specialMenu disable:#methodSTCCompile
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9370
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9371
        currentMethod byteCode isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9372
            currentMethod isLazyMethod ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9373
                specialMenu disable:#methodDecompile
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9374
            ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9375
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9376
        currentMethod numArgs ~~ 0 ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9377
            specialMenu disable:#methodInvoke
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9378
        ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9379
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9380
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9381
    device ctrlDown ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9382
        currentMethod isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9383
            methodListView flash.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9384
            ^ nil
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9385
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9386
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9387
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9388
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9389
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9390
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9391
    sepLocalItems  := #().
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9392
    sepMthdItems  := #().
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9393
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9394
    searchItems := #(
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9395
                ('senders...'           methodSenders                 Cmds)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9396
                ('implementors...'      methodImplementors            Cmdi)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9397
                ('globals...'           methodGlobalReferends         Cmdg)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9398
                ('string search...'     methodStringSearch            Cmdt)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9399
                ('apropos...'           methodAproposSearch           )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9400
                ('-'                                                  )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9401
                ('find method here...'  methodFindMethod              )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9402
                ('find method...'       methodFindAnyMethod           )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9403
               ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9404
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9405
    currentMethodCategory notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9406
        sepLocalItems := #(('-')).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9407
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9408
        (currentClass notNil 
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9409
        and:[showInstance not
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9410
        and:[currentClass isSubclassOf:ApplicationModel]]) ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9411
            newItems :=           #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9412
                                    ('new method'       methodNewMethod     )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9413
                                    ('new window spec'  methodNewWindowSpec )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9414
                                    ('new menu spec'    methodNewMenuSpec   )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9415
                                    ('new image spec'   methodNewImageSpec   )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9416
                                    ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9417
        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9418
            newItems :=           #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9419
                                    ('new method'       methodNewMethod)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9420
                                    ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9421
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9422
        sepMthdItems := #(('-')).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9423
    ] ifFalse:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9424
        newItems := #()
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9425
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9426
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9427
    currentMethod notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9428
        fileItems :=           #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9429
                                ('fileOut'       methodFileOut  )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9430
                                ('printOut'      methodPrintOut )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9431
                                ('-'             nil            )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9432
                                ('SPAWN_METHOD'  methodSpawn    )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9433
                                ('inheritance'   methodInheritance )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9434
                                ('-'             nil            )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9435
                                ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9436
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9437
        sepLocalItems := #(('-')). 
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9438
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9439
        mthdItems :=           #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9440
                                ('change category...'      methodChangeCategory )
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9441
                                ('move to...'              methodMove           )
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9442
                                ('copy to...'              methodCopy           )
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9443
                                ('remove'                  methodRemove         )
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9444
                                ('-'                       nil                              )
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9445
                                ('compare with previous'   methodCompareWithPreviousVersion )
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9446
                                ('back to previous'        methodPreviousVersion            )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9447
                                ).
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9448
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9449
    ] ifFalse:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9450
        fileItems := #().
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9451
        mthdItems := #().
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9452
        sepMthdItems := #().
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9453
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9454
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9455
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9456
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9457
    items :=
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9458
                fileItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9459
                searchItems ,
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9460
"/                localSearchItems ,
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9461
                sepLocalItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9462
                newItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9463
                sepMthdItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9464
                mthdItems.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9465
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9466
    specialMenu notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9467
        items := items , #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9468
                        ('='                      )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9469
                        ('others'  otherMenu  Ctrl)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9470
                  ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9471
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9472
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9473
    m := PopUpMenu itemList:items resources:resources.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9474
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9475
    specialMenu notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9476
        m subMenuAt:#otherMenu put:specialMenu.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9477
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9478
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9479
    currentMethod notNil ifTrue:[
1715
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9480
"/        currentMethod isPrivate ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9481
"/            m disable:#methodMakePrivate
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9482
"/        ].
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9483
"/        currentMethod isProtected ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9484
"/            m disable:#methodMakeProtected
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9485
"/        ].
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9486
"/        currentMethod isPublic ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9487
"/            m disable:#methodMakePublic
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9488
"/        ].
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9489
"/        currentMethod isIgnored ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9490
"/            m disable:#methodMakeIgnored
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9491
"/        ].
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9492
"/
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9493
"/        (currentMethod code notNil
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9494
"/        or:[Compiler canCreateMachineCode not]) ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9495
"/            m disable:#methodSTCCompile
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9496
"/        ].
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9497
"/        currentMethod byteCode isNil ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9498
"/            m disable:#methodDecompile
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9499
"/        ].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9500
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9501
        currentMethod previousVersion isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9502
            m disable:#methodPreviousVersion.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9503
            m disable:#methodCompareWithPreviousVersion
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9504
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9505
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9506
    ^ m
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9507
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9508
    "Created: / 23.11.1995 / 12:02:29 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9509
    "Modified: / 18.12.1995 / 16:20:07 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9510
    "Modified: / 29.4.1997 / 11:20:59 / dq"
2134
1d9ec3a3a160 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2127
diff changeset
  9511
    "Modified: / 30.4.1999 / 09:15:32 / cg"
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9512
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9513
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9514
methodModifyPackage
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9515
    "change the methods package assignment"
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9516
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9517
    |newPackage|
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9518
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9519
    currentClass owningClass notNil ifTrue:[
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9520
        self warn:'Private classes always belong to the owners package.\\Cannot change the packageID.' withCRs.
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9521
        ^ self
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9522
    ].
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9523
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9524
    newPackage := Dialog 
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9525
                    request:(resources 
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9526
                                string:'Change the package-ID of ''%1'' to:' 
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9527
                                with:currentSelector asText allBold) withCRs
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9528
                    initialAnswer:currentClass package.
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9529
    newPackage size == 0 ifTrue:[
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9530
        ^ self
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9531
    ].
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9532
2337
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
  9533
    currentMethod package:newPackage.
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
  9534
    currentClass changed:#methodPackage with:currentSelector.
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9535
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9536
    "Created: 23.11.1995 / 11:41:38 / cg"
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9537
    "Modified: 6.2.1996 / 16:58:58 / cg"
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9538
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9539
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9540
!
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9541
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9542
methodMove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9543
    "move the current method into another class; typically a superclass"
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9544
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9545
    |newClass newClassName sup initial movedMethod 
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9546
     supers subs list holders|
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9547
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9548
    self checkMethodSelected ifFalse:[^ self].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9549
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9550
    lastMethodMoveClass ~= currentClass name ifTrue:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9551
        initial := lastMethodMoveClass.
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9552
    ].
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9553
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9554
    initial isNil ifTrue:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9555
        (sup := currentClass superclass) notNil ifTrue:[
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9556
            initial := sup name
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9557
        ] ifFalse:[
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9558
            initial := nil.
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9559
        ].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  9560
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  9561
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9562
    supers := (currentClass allSuperclasses reverse collect:[:cls | cls name]).
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9563
    subs := (currentClass allSubclasses collect:[:cls | cls name]).
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9564
    list := supers.
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9565
    (supers notEmpty and:[subs notEmpty]) ifTrue:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9566
        list := list , (Array with:'---- ' , currentClass name , ' ----')
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9567
    ].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9568
    list := list , subs.
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9569
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9570
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9571
"/ preps to use windowSpecs ...
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9572
"/
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9573
"/    holders := IdentityDictionary new.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9574
"/    holders at:#className put:initial asValue.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9575
"/    holders at:#classList put:list.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9576
"/
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9577
"/    (SystemBrowser 
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9578
"/      openDialogInterface:#methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9579
"/      withBindings:holders) ifFalse:[
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9580
"/        ^ self
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9581
"/    ].
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9582
"/    newClassName := (holders at:#className) value.
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9583
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9584
    newClassName := Dialog 
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  9585
                    request:(resources string:'move this method to which class:')
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9586
                    initialAnswer:initial
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9587
                    okLabel:(resources string:'move')
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9588
                    title:(resources string:'move method')
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9589
                    onCancel:nil
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9590
                    list:list.
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9591
    newClassName isNil ifTrue:[^ self].
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9592
    (newClassName startsWith:'---- ') ifTrue:[^ self].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  9593
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9594
    newClass := Smalltalk classNamed:newClassName.
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9595
    newClass isNil ifTrue:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9596
        self warn:'no such class'.
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9597
        ^ self
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9598
    ].
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9599
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9600
    showInstance ifFalse:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9601
        newClass isMeta ifFalse:[
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9602
            newClass := newClass class
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9603
        ]
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9604
    ].
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9605
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9606
    (newClass implements:currentSelector) ifTrue:[
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9607
        (self confirm:(newClass name asText allBold , ' already implements ' , currentSelector
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9608
                      , '\\Move anyway ?' withCRs)) ifFalse:[
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9609
            ^ self
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9610
        ]
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9611
    ].
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9612
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9613
    lastMethodMoveClass := newClassName.
978
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  9614
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  9615
    movedMethod := newClass 
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9616
                        compile:(currentMethod source) 
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9617
                        classified:currentMethodCategory.
978
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  9618
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  9619
    (movedMethod isNil or:[movedMethod == #Error]) ifTrue:[
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9620
        self warn:'not moved - compilation failed due to an error'.
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9621
        ^ self
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9622
    ].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9623
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9624
    self methodRemove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9625
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9626
    "Created: 13.12.1995 / 10:56:42 / cg"
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9627
    "Modified: 25.6.1997 / 13:58:56 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9628
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9629
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9630
methodNewImageSpec
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9631
    "open a BitmapEditor"
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9632
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9633
    |specSel|
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9634
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9635
    currentClass isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9636
        ^ self warn:'select/create a class first'.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9637
    ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9638
    currentMethodCategory isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9639
        ^ self warn:'select/create a method category first'.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9640
    ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9641
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9642
    (actualClass implements:#someImageSpec) ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9643
        specSel := #someImageSpec
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9644
    ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9645
    ImageEditor openOnClass:currentClass andSelector:specSel
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9646
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9647
    "Created: / 28.10.1997 / 12:42:00 / cg"
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9648
!
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9649
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9650
methodNewMenuSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9651
    "open a MenuEditor"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9652
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9653
    |specSel|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9654
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9655
    currentClass isNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9656
        ^ self warn:'select/create a class first'.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9657
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9658
    currentMethodCategory isNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9659
        ^ self warn:'select/create a method category first'.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9660
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9661
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9662
    (actualClass implements:#menuSpec) ifFalse:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9663
        specSel := #menuSpec
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9664
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9665
    MenuEditor openOnClass:currentClass andSelector:specSel
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9666
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9667
    "Created: / 28.10.1997 / 12:42:00 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9668
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9669
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9670
methodNewMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9671
    "prepare for definition of a new method - put a template into
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9672
     code view and define accept-action to compile it"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9673
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9674
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9675
	^ self warn:'select/create a class first'.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9676
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9677
    currentMethodCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9678
	^ self warn:'select/create a method category first'.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9679
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9680
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9681
    self releaseMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9682
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  9683
    methodListView setSelection:nil.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  9684
    codeView contents:(self methodTemplate).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9685
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  9686
    codeModified := false.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9687
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9688
    self setAcceptAndExplainActionsForMethod.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  9689
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9690
    "Modified: / 27.7.1998 / 11:00:16 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9691
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9692
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9693
methodNewWindowSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9694
    "open GUI Painter"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9695
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9696
    |specSel|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9697
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9698
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9699
	^ self warn:'select/create a class first'.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9700
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9701
    currentMethodCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9702
	^ self warn:'select/create a method category first'.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9703
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9704
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9705
    (actualClass implements:#windowSpec) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9706
	specSel := #windowSpec
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9707
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9708
    UIPainter openOnClass:currentClass andSelector:specSel
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9709
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9710
    "Modified: / 28.10.1997 / 12:40:35 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9711
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9712
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9713
methodPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9714
    "switch back to the previous version
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9715
     (undo last change)"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9716
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9717
    |cls sel prev|
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9718
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9719
    self checkMethodSelected ifFalse:[^ self].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9720
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9721
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9722
    prev isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9723
	self warn:'oops - previous version is gone'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9724
	^ self
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9725
    ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9726
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9727
    cls := currentMethod containingClass.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9728
    cls notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9729
	sel := actualClass selectorAtMethod:currentMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9730
	sel isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9731
	    self warn:'oops - cannot find methods selector (gone)'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9732
	] ifFalse:[        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9733
	    cls basicAddSelector:sel withMethod:prev.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9734
	    currentMethod := prev.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9735
	    self updateCodeView
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9736
	].
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9737
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9738
	self warn:'oops - cannot find containing class'
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9739
    ]
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9740
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9741
    "Modified: 7.11.1996 / 18:51:09 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9742
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9743
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9744
methodPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9745
    "print out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9746
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9747
    |printStream|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9748
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9749
    self checkMethodSelected ifFalse:[^ self].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9750
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9751
    printStream := Printer new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9752
    actualClass printOutSource:(currentMethod source) on:printStream.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9753
    printStream close
1426
aa8bda9a1964 oops - handle the case that no source is available when checking
Claus Gittinger <cg@exept.de>
parents: 1419
diff changeset
  9754
aa8bda9a1964 oops - handle the case that no source is available when checking
Claus Gittinger <cg@exept.de>
parents: 1419
diff changeset
  9755
    "Modified: / 28.1.1998 / 00:28:03 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9756
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9757
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9758
methodPrivacy:how
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9759
    "change the current methods privacy.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9760
     EXPERIMENTAL"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9761
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  9762
    |cls|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  9763
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9764
    self checkMethodSelected ifFalse:[^ self].
289
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  9765
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  9766
    (how == currentMethod privacy) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9767
	currentMethod privacy:how.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9768
	cls := currentMethod containingClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9769
	cls notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9770
	    cls addChangeRecordForMethodPrivacy:currentMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9771
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9772
	    self warn:'cannot write change record (no class)'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9773
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9774
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9775
	Class withoutUpdatingChangesDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9776
	    currentClass changed:#methodPrivacy with:currentSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9777
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9778
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9779
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  9780
    "Created: / 29.10.1995 / 20:00:00 / cg"
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  9781
    "Modified: / 8.1.1997 / 22:37:02 / cg"
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  9782
    "Modified: / 23.1.1998 / 17:56:02 / stefan"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9783
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9784
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9785
methodRemove
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9786
    "remove the current method"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9787
1054
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  9788
    |cls sel w|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  9789
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9790
    self checkMethodSelected ifFalse:[^ self].
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9791
1054
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  9792
    w := currentMethod who.
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  9793
    w notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9794
	cls := w methodClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9795
	sel := w methodSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9796
	cls notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9797
	    cls ~~ actualClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9798
		^ self warn:'oops - obsolete class; please reselect class ...'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9799
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9800
	    sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9801
		actualClass removeSelector:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9802
		self releaseMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9803
		self updateMethodListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9804
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9805
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9806
	].
1054
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  9807
    ]. 
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  9808
    self warn:'cannot remove method (no class)'
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9809
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9810
    "Modified: / 27.7.1998 / 11:00:35 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9811
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9812
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9813
methodRemoveBreakOrTrace
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9814
    "turn off tracing of the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9815
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9816
    self commonTraceHelperWith:#clearBreakPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9817
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9818
    "Modified: / 12.1.1998 / 19:15:32 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9819
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9820
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9821
methodRemoveConfirmed
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9822
    "confirm and remove the current method"
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9823
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9824
    |w|
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9825
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9826
    self checkMethodSelected ifFalse:[^ self].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9827
    w := currentMethod who.
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9828
    w notNil ifTrue:[
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9829
        (self confirm:'Remove ' , w methodSelector asText allBold , ' ?') ifTrue:[
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9830
            self methodRemove
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9831
        ]
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9832
    ]. 
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9833
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9834
    "Modified: / 27.7.1998 / 11:00:35 / cg"
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9835
!
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9836
1768
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9837
methodResetCounting
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9838
    "reset the counting statstics for the current method"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9839
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9840
    self commonTraceHelperWith:#resetCountingStatistics
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9841
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9842
    "Modified: / 30.7.1998 / 17:16:26 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9843
    "Created: / 30.7.1998 / 17:39:08 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9844
!
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9845
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9846
methodResetMemoryUsage
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9847
    "reset the memory statstics for the current method"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9848
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9849
    self commonTraceHelperWith:#resetMemoryUsageStatistics
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9850
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9851
    "Modified: / 30.7.1998 / 17:16:26 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9852
    "Created: / 30.7.1998 / 17:39:20 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9853
!
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9854
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9855
methodResetTiming
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9856
    "reset the timing statstics for the current method"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9857
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9858
    self commonTraceHelperWith:#resetTimingStatistics
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9859
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9860
    "Created: / 30.7.1998 / 17:14:41 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9861
    "Modified: / 30.7.1998 / 17:16:26 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9862
!
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9863
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9864
methodSTCCompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9865
    "compile the current method to machine code.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9866
     This is not supported on all machines, and never supported in
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9867
     the demo version."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9868
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9869
    |prev|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9870
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9871
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9872
    prev := Compiler stcCompilation:#always.
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9873
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9874
	[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9875
	    codeView accept.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9876
	] valueNowOrOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9877
	    Compiler stcCompilation:prev
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9878
	]
1183
5c5ddf5dcac1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1171
diff changeset
  9879
    ].
5c5ddf5dcac1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1171
diff changeset
  9880
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9881
    "Modified: 18.8.1997 / 15:44:22 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9882
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9883
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9884
methodSenders
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9885
    "launch an enterBox for selector to search for"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9886
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9887
    self 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9888
        askForSearchTitle:'selector to browse senders of:' 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9889
        openWith:#browseAllCallsOn:in:ignoreCase:
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9890
        isSelector:true
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9891
        searchArea:#everywhere
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9892
        withCaseIgnore:true
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9893
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9894
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9895
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9896
methodSpawn
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9897
    "create a new SystemBrowser browsing current method,
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9898
     or if the current selection is of the form 'class>>selector', spawan
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9899
     a browser on that method."
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9900
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9901
    |s sel selSymbol clsName clsSymbol cls isMeta w|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9902
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9903
    classMethodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9904
	s := classMethodListView selectionValue string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9905
	clsName := self classNameFromClassMethodString:s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9906
	sel := self selectorFromClassMethodString:s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9907
	isMeta := false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9908
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9909
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9910
    self extractClassAndSelectorFromSelectionInto:[:c :s :m |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9911
	clsName := c.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9912
	sel := s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9913
	isMeta := m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9914
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9915
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9916
    (sel notNil and:[clsName notNil]) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9917
	(clsName knownAsSymbol and:[sel knownAsSymbol]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9918
	    clsSymbol := clsName asSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9919
	    (Smalltalk includesKey:clsSymbol) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9920
		cls := Smalltalk at:clsSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9921
		isMeta ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9922
		    cls := cls class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9923
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9924
		cls isBehavior ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9925
		    cls := cls class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9926
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9927
		cls isBehavior ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9928
		    selSymbol := sel asSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9929
		    self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9930
			(cls includesSelector:selSymbol) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9931
			    cls := cls class.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9932
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9933
			(cls includesSelector:selSymbol) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9934
			    SystemBrowser browseClass:cls selector:selSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9935
			    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9936
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9937
			w := ' does not implement #' , sel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9938
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9939
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9940
		    w := ' is not a class'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9941
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9942
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9943
		w := ' is unknown'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9944
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9945
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9946
	    w := ' and/or ' , sel , ' are unknown'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9947
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9948
	self warn:(clsName , w).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9949
	^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9950
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9951
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9952
    self checkMethodSelected ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9953
	self warn:'select a method first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9954
	^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9955
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9956
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9957
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9958
	w := currentMethod who.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9959
	SystemBrowser browseClass:(w methodClass) selector:(w methodSelector)
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9960
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  9961
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9962
    "Modified: 18.8.1997 / 15:46:10 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9963
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9964
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9965
methodStartCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9966
    "set a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9967
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9968
    self commonTraceHelperWith:#startCounting
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9969
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9970
    "Created: / 15.12.1995 / 11:00:44 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9971
    "Modified: / 12.1.1998 / 19:15:40 / cg"
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9972
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9973
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  9974
methodStartMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  9975
    "set a countpoint for memory usage on the current method"
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  9976
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9977
    self commonTraceHelperWith:#startCountingMemoryUsage
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9978
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9979
    "Created: / 18.12.1995 / 16:00:22 / stefan"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9980
    "Modified: / 12.1.1998 / 19:15:46 / cg"
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  9981
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  9982
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9983
methodStartTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9984
    "set a timing on the current method"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9985
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9986
    self commonTraceHelperWith:#startTiming
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9987
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9988
    "Created: / 17.6.1996 / 17:12:06 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9989
    "Modified: / 12.1.1998 / 19:15:50 / cg"
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9990
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9991
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9992
methodStopCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9993
    "show the number of invocations & remove a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9994
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9995
    self commonTraceHelperWith:#stopCounting
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9996
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9997
    "Created: / 15.12.1995 / 11:03:22 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9998
    "Modified: / 12.1.1998 / 19:15:55 / cg"
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9999
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
 10000
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10001
methodStopMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10002
    "stop counting of memory usage for this method"
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10003
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10004
    self commonTraceHelperWith:#stopCountingMemoryUsage.
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10005
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10006
    "Created: / 18.12.1995 / 16:02:02 / stefan"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10007
    "Modified: / 12.1.1998 / 19:16:06 / cg"
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10008
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10009
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10010
methodStopTiming
1768
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10011
    "stop timing the current method"
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10012
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10013
    self commonTraceHelperWith:#stopTiming
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10014
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10015
    "Created: / 17.6.1996 / 17:12:27 / cg"
1768
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10016
    "Modified: / 30.7.1998 / 17:15:10 / cg"
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10017
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10018
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10019
methodStringSearch
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10020
    "launch an enterBox for string to search for"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10021
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10022
    |whereDefault|
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10023
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10024
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10025
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10026
	whereDefault := #class.
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10027
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10028
	currentClassCategory notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10029
	    whereDefault := #classCategory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10030
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10031
	    currentNamespace notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10032
		whereDefault := #currentNameSpace.                
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10033
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10034
		whereDefault := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10035
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10036
	]
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10037
    ].
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 10038
    self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10039
	askForSearchTitle:'string to search for in sources:' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10040
	openWith:#browseForString:in:ignoreCase:
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10041
	isSelector:true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10042
	searchArea:whereDefault
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10043
	withCaseIgnore:true
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 10044
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 10045
    "Modified: / 18.6.1998 / 16:42:11 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10046
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10047
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10048
methodTrace
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10049
    "turn on tracing of the current method"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10050
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10051
    self commonTraceHelperWith:#setTracePoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10052
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10053
    "Modified: / 12.1.1998 / 19:16:16 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10054
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10055
306
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
 10056
methodTraceFull
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
 10057
    "turn on tracing of the current method"
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
 10058
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10059
    self commonTraceHelperWith:#setTraceFullPoint.
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10060
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10061
    "Created: / 15.12.1995 / 18:20:33 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10062
    "Modified: / 12.1.1998 / 19:16:19 / cg"
306
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
 10063
!
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
 10064
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10065
methodTraceSender
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10066
    "turn on tracing of the current method"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10067
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10068
    self commonTraceHelperWith:#setTraceSenderPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10069
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10070
    "Modified: / 12.1.1998 / 19:16:22 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10071
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10072
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10073
!BrowserView methodsFor:'method stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10074
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10075
checkMethodSelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10076
    currentMethod isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10077
	self warn:'select a method first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10078
	^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10079
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10080
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10081
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10082
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10083
listEntryForMethod:aMethod selector:selector
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10084
    "answer a method list entry 
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10085
     (gimmic: adding a little image to breakPointed methods)"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10086
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10087
    |s icn resources|
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10088
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10089
    s := aMethod printStringForBrowserWithSelector:selector.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10090
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10091
    "/
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10092
    "/ wrap icons (i.e. break- or trace points)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10093
    "/ have higher prio ...
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10094
    "/
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10095
    aMethod isWrapped ifTrue:[
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10096
        (s endsWith:' !!') ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10097
            s := s copyWithoutLast:2
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10098
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10099
        aMethod isBreakpointed ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10100
            icn := self stopIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10101
        ] ifFalse:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10102
            aMethod isTimed ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10103
                icn := self timeIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10104
            ] ifFalse:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10105
                icn := self traceIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10106
            ]
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10107
        ].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10108
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10109
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10110
    icn isNil ifTrue:[
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10111
        ShowResourceIcons ~~ false ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10112
            icn := self resourceIconForMethod:aMethod.
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10113
        ].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10114
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10115
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10116
    icn notNil ifTrue:[
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10117
        ^ LabelAndIcon icon:icn string:s
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10118
    ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10119
    ^ s
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10120
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10121
    "Created: / 22.10.1996 / 19:51:00 / cg"
1851
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 10122
    "Modified: / 24.8.1998 / 21:37:04 / cg"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10123
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10124
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10125
listOfAllMethodsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10126
    "answer a list of all methods in a given method category 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10127
     of the argument, aClass and its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10128
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10129
1346
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
 10130
    |newList selectors otherSelectors allCategories|
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
 10131
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
 10132
    newList := OrderedCollection new.
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
 10133
    selectors := IdentitySet new.
611
f3e973ecc846 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
 10134
    otherSelectors := IdentitySet new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10135
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10136
    allCategories := (aCategory = '* all *').
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10137
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10138
    self classesInFullProtocolHierarchy:aClass do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10139
	|searchCategory|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10140
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10141
	(aCategory = '* no category *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10142
	    searchCategory := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10143
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10144
	    searchCategory := aCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10145
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10146
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10147
	c methodDictionary keysAndValuesDo:[:selector :aMethod |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10148
	    (allCategories
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10149
	     or:[aMethod category = searchCategory]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10150
		(otherSelectors includes:selector) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10151
		    (selectors includes:selector) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10152
			selectors add:selector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10153
			newList add:(selector -> aMethod)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10154
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10155
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10156
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10157
		otherSelectors add:selector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10158
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10159
	].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10160
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10161
    (newList size == 0) ifTrue:[^ nil].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10162
    ^ newList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10163
1346
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
 10164
    "Modified: 14.10.1997 / 00:19:20 / cg"
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10165
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10166
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10167
listOfAllMethodsInCategory:aCategory ofClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10168
    "answer a list of all methods in a given method category 
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10169
     of the argument, aClass"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10170
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10171
    |newList searchCategory all|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10172
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10173
    all := (aCategory = '* all *').
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10174
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10175
    (aCategory = '* no category *') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10176
	searchCategory := nil
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10177
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10178
	searchCategory := aCategory
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10179
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10180
    newList := OrderedCollection new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10181
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 10182
    aClass methodDictionary keysAndValuesDo:[:selector :aMethod |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10183
	(all or:[aMethod category = searchCategory]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10184
	    newList add:(selector -> aMethod)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10185
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10186
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10187
    (newList size == 0) ifTrue:[^ nil].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10188
    ^ newList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10189
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10190
    "Created: 30.7.1997 / 15:10:16 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10191
    "Modified: 30.7.1997 / 15:12:38 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10192
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10193
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10194
listOfAllSelectorsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10195
    "answer a list of all selectors in a given method category 
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10196
     of the argument, aClass and its superclasses.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10197
     Used with fullProtocol browsing."
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10198
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
 10199
    |methodList newList|
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10200
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10201
    methodList := self listOfAllMethodsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10202
    (methodList size == 0) ifTrue:[^ nil].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10203
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10204
    aClass isJavaClass ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10205
	methodList := methodList asOrderedCollection.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10206
	methodList sort:[:a :b |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10207
			    |mA mB|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10208
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10209
			    mA := a value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10210
			    mB := b value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10211
			    mA name < mB name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10212
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10213
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10214
	selectorList := methodList collect:[:assoc | assoc key].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10215
	^ methodList collect:[:assoc |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10216
				self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10217
				    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10218
				    selector:(assoc key)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10219
			     ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10220
    ].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10221
1262
8e1263b12ec6 checkin from browser
ca
parents: 1260
diff changeset
 10222
    methodList := methodList asOrderedCollection.
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10223
    selectorList := methodList collect:[:assoc | assoc key].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10224
    newList := methodList 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10225
		    collect:[:assoc |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10226
			self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10227
			    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10228
			    selector:assoc key
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10229
		    ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10230
    ^ newList asOrderedCollection sort:[:a :b | a string < b string] with:selectorList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10231
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10232
    "Modified: 30.7.1997 / 15:28:59 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10233
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10234
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10235
listOfAllSelectorsInCategory:aCategory ofClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10236
    "answer a list of all selectors in a given method category 
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10237
     of the argument, aClass"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10238
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10239
    |methodList newList|
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10240
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10241
    methodList := self listOfAllMethodsInCategory:aCategory ofClass:aClass.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10242
    (methodList size == 0) ifTrue:[^ nil].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10243
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10244
    aClass isJavaClass ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10245
	methodList := methodList asOrderedCollection.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10246
	methodList sort:[:a :b |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10247
			    |mA mB|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10248
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10249
			    mA := a value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10250
			    mB := b value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10251
			    mA name < mB name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10252
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10253
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10254
	selectorList := methodList collect:[:assoc | assoc key].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10255
	^ methodList collect:[:assoc |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10256
				self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10257
				    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10258
				    selector:(assoc key)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10259
			     ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10260
    ].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10261
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10262
    selectorList := methodList collect:[:assoc | assoc key].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10263
    newList := methodList 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10264
		    collect:[:assoc | 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10265
				self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10266
				    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10267
				    selector:(assoc key)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10268
			    ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10269
    ^ newList sort:[:a :b | a string < b string] with:selectorList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10270
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10271
    "Modified: 30.7.1997 / 15:29:16 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10272
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10273
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10274
methodDoubleClick:lineNr
1802
a654f429bc28 some obsolete code in #methodDoubleClick:
tz
parents: 1789
diff changeset
 10275
    |resources editorClass|
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10276
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10277
    currentMethod notNil ifTrue:[
2174
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10278
        resources := currentMethod resources.
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10279
        resources notNil ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10280
            (resources includesKey:#canvas) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10281
                editorClass := UIPainter
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10282
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10283
            (resources includesKey:#menu) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10284
                editorClass := MenuEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10285
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10286
            ((resources includesKey:#image) or: [resources includesKey:#fileImage]) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10287
                editorClass := ImageEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10288
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10289
            (resources includesKey:#help) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10290
                editorClass := UIHelpTool
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10291
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10292
            (resources includesKey:#tableColumns) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10293
                editorClass := DataSetBuilder
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10294
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10295
            (resources includesKey:#tabList) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10296
                editorClass := TabListEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10297
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10298
            (resources includesKey:#hierarchicalList) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10299
                editorClass := HierarchicalListEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10300
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10301
            editorClass notNil ifTrue: [
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10302
                self withWaitCursorDo:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10303
                    editorClass 
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10304
                        openOnClass:currentClass 
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10305
                        andSelector:currentSelector
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10306
                ]
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10307
            ]
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10308
        ]
1802
a654f429bc28 some obsolete code in #methodDoubleClick:
tz
parents: 1789
diff changeset
 10309
    ]
a654f429bc28 some obsolete code in #methodDoubleClick:
tz
parents: 1789
diff changeset
 10310
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10311
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10312
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10313
methodSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10314
    "user clicked on a method line - show code"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10315
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
 10316
    |selection sensor|
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10317
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10318
"/    selection := methodListView selectionValue string.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10319
selection := selectorList at:lineNr.
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10320
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10321
    "/ reselected with control ?
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
 10322
    ((sensor := self sensor) notNil and:[sensor ctrlDown]) ifTrue:[
2592
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10323
        selection = currentSelector ifTrue:[
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10324
            "/ if there is a trace/break, remove it.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10325
            (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10326
                self methodRemoveBreakOrTrace.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10327
                ^ self
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10328
            ]
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10329
        ].
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10330
    ].
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10331
    self switchToMethod:selection.
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10332
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10333
    "Modified: 30.7.1997 / 15:31:21 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10334
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10335
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10336
methodSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10337
    "method selection has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10338
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10339
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10340
	|index cls|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10341
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10342
	aspect := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10343
	self updateCodeView.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10344
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10345
	self refetchMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10346
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10347
	(currentMethod notNil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10348
	and:[currentMethod isCounting]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10349
	    self updateMethodListWithScroll:false keepSelection:true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10350
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10351
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10352
	self setAcceptAndExplainActionsForMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10353
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10354
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10355
	 if there is any autoSearch string, do the search
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10356
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10357
	autoSearch notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10358
	    codeView 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10359
		searchFwd:autoSearch
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10360
		ignoreCase:autoSearchIgnoreCase 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10361
		startingAtLine:1 col:0 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10362
		ifAbsent:[]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10363
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10364
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10365
	fullProtocol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10366
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10367
	     remove any bold attribute from classList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10368
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10369
	    1 to:classListView list size do:[:i |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10370
		classListView attributeAt:i remove:#bold.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10371
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10372
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10373
	     boldify the class where this method is implemented
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10374
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10375
	    currentMethod notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10376
		cls := currentMethod containingClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10377
		index := classListView list indexOf:(cls name).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10378
		(index == 0 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10379
		 and:[cls isMeta
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10380
		 and:[cls name endsWith:' class']]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10381
		    index := classListView list indexOf:(cls name copyWithoutLast:6).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10382
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10383
		index ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10384
		    classListView attributeAt:index add:#bold.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10385
		    classListView makeLineVisible:index.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10386
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10387
		currentClass := acceptClass := cls.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10388
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10389
	].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10390
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10391
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10392
    "Created: / 23.11.1995 / 14:17:44 / cg"
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10393
    "Modified: / 17.6.1996 / 16:47:50 / stefan"
1803
59fc7e02179e fixed update of implementing class in fullProtocol mode.
Claus Gittinger <cg@exept.de>
parents: 1802
diff changeset
 10394
    "Modified: / 4.8.1998 / 20:04:58 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10395
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10396
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10397
methodTemplate
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10398
    "return a method definition template"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10399
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10400
    |s|
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10401
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10402
    s := TextStream on:''.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10403
    s nextPutAll:'message selector and argument names
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10404
    "comment stating purpose of this message"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10405
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10406
    |temporaries|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10407
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10408
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10409
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10410
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10411
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10412
    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10413
     optional: comment giving example use
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10414
    "
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10415
'.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10416
    s cr.
2605
56cf1ae89b39 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
 10417
    s emphasis:(UserPreferences current commentEmphasisAndColor).
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10418
    s nextPutAll:'"
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10419
 change the above template into real code.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10420
 Then `accept'' either via the menu 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10421
 or via the keyboard (usually CMD-A).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10422
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10423
 You do not need this template; you can also
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10424
 select any existing methods code, change it,
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10425
 and finally `accept''. The method will then be
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10426
 installed under the selector as defined in the
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10427
 actual text - no matter which method is selected
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10428
 in the browser.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10429
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10430
 Or clear this text, type in the method from scratch
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10431
 and install it with `accept''.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10432
"
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10433
'.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10434
    ^ s contents
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10435
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10436
    "Created: 8.2.1996 / 18:21:53 / cg"
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10437
    "Modified: 1.8.1997 / 12:43:51 / cg"
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10438
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10439
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10440
resourceIconForMethod:aMethod
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10441
    |resources|
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10442
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10443
    (resources := aMethod resources) notNil ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10444
        (resources includesKey:#canvas) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10445
            ^ self canvasIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10446
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10447
        (resources includesKey:#menu) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10448
            ^ self menuIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10449
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10450
        (resources includesKey:#image) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10451
            ^ self imageIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10452
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10453
        (resources includesKey:#fileImage) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10454
            ^ self fileImageIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10455
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10456
        (resources includesKey:#help) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10457
            ^ self helpIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10458
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10459
        (resources includesKey:#programMenu) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10460
            ^ self programMenuIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10461
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10462
        (resources includesKey:#tableColumns) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10463
            ^ self tableColumnsIcon 
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10464
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10465
        (resources includesKey:#tabList) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10466
            ^ self tabListIcon 
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10467
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10468
        (resources includesKey:#hierarchicalList) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10469
            ^ self hierarchicalListIcon 
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10470
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10471
        (resources includesKey:#programImage) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10472
            ^ self programImageIcon 
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10473
        ]
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10474
    ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10475
    ^ nil
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10476
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10477
!
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10478
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10479
switchToAnyMethodNamed:matchString
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 10480
    "switch (in the current classes hierarchy) to a method named matchString.
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10481
     If there are more than one matches, switch to the first."
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10482
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
 10483
    |aSelector classToStartSearch classToSearch aClass nm|
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10484
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10485
    actualClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10486
	currentClassHierarchy notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10487
	    classToStartSearch := currentClassHierarchy
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10488
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10489
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10490
	classToStartSearch := actualClass 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10491
    ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 10492
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10493
    classToStartSearch notNil ifTrue:[
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10494
"/        showInstance ifFalse:[
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10495
"/            classToStartSearch := classToStartSearch class
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10496
"/        ].
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10497
	((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10498
	    classToSearch := classToStartSearch.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10499
	    aClass := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10500
	    [classToSearch notNil and:[aClass isNil]] whileTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10501
		aSelector := classToSearch methodDictionary findFirstKey:[:element | matchString match:element].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10502
		aSelector notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10503
		    aClass := classToSearch
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10504
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10505
		    classToSearch := classToSearch superclass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10506
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10507
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10508
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10509
	    aSelector := matchString asSymbolIfInterned.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10510
	    aSelector notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10511
		aClass := classToStartSearch whichClassIncludesSelector:aSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10512
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10513
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10514
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10515
	aClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10516
	    nm := aClass name.
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10517
"/            showInstance ifFalse:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
 10518
"/                ((nm ~= 'Metaclass') and:[nm endsWith:' class']) ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
 10519
"/                    nm := nm copyWithoutLast:6 "copyTo:(nm size - 5)"
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10520
"/                ]
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10521
"/            ].
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10522
	    aClass ~~ actualClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10523
		self switchToClassNamed:nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10524
	    ].    
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10525
	    self switchToMethodNamed:aSelector "matchString".
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10526
	    ^ self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10527
	]
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10528
    ].
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10529
    self beep
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10530
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
 10531
    "Modified: 17.6.1996 / 16:52:36 / stefan"
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
 10532
    "Modified: 8.10.1996 / 22:06:01 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10533
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10534
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10535
switchToMethod:aString
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10536
    "user clicked on a method line - show code"
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10537
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10538
    |selectorString selectorSymbol cat|
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10539
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10540
    (fullProtocol not and:[currentClass isNil]) ifTrue:[^ self].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10541
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10542
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10543
     kludge: extract real selector
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10544
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10545
    selectorString := aString withoutSpaces upTo:(Character space).
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 10546
    selectorSymbol := selectorString asSymbolIfInterned.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 10547
    selectorSymbol isNil ifTrue:[
2592
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10548
        self beep.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10549
        ^ self
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 10550
    ].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10551
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10552
    fullProtocol ifTrue:[
2592
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10553
        self releaseMethod.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10554
        "
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10555
         search which class implements the selector
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10556
        "
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10557
        self classesInFullProtocolHierarchy:actualClass do:[:c |
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10558
            (currentMethod isNil 
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10559
             and:[c includesSelector:selectorSymbol]) ifTrue:[
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10560
                currentSelector := selectorSymbol.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10561
                currentMethod := c compiledMethodAt:selectorSymbol.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10562
                acceptClass := c
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10563
            ]
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10564
        ]
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10565
    ] ifFalse:[
2592
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10566
        currentSelector := selectorSymbol.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10567
        currentMethod := actualClass compiledMethodAt:selectorSymbol.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10568
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10569
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10570
    methodCategoryListView notNil ifTrue:[
2592
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10571
        currentMethod notNil ifTrue:[
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10572
            cat := currentMethod category.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10573
            (currentMethodCategory ~= cat) ifTrue:[
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10574
                currentMethodCategory := cat.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10575
                methodCategoryListView setSelectElement:currentMethodCategory
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10576
            ]
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10577
        ]
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
 10578
    ].
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
 10579
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
 10580
    self methodSelectionChanged.
1539
971e20d7b6bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
 10581
    currentSelector notNil ifTrue:[
2592
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10582
        self addToClassHistory: actualClass name asString, ' ', currentSelector
1539
971e20d7b6bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
 10583
    ]
971e20d7b6bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
 10584
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10585
    "Modified: / 27.7.1998 / 11:01:38 / cg"
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10586
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10587
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10588
switchToMethodNamed:matchString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10589
    "switch (in the current class) to a method named matchString.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10590
     If there are more than one matches, switch to the first."
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10591
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
 10592
    |aSelector method cat classToSearch dict m idx|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10593
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10594
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10595
	classToSearch := actualClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10596
	dict := classToSearch methodDictionary.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10597
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10598
	((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10599
	    aSelector := dict findFirstKey:[:element | matchString match:element].       
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10600
	    aSelector notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10601
		method := dict at:aSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10602
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10603
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10604
	    matchString knownAsSymbol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10605
		aSelector := matchString asSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10606
		method := dict at:aSelector ifAbsent:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10607
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10608
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10609
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10610
	method notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10611
	    cat := method category.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10612
	    cat isNil ifTrue:[cat := '* all *'].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10613
	    methodCategoryListView setSelectElement:cat.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10614
	    currentMethodCategory := cat.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10615
	    self updateMethodCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10616
	    self methodCategorySelectionChanged.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10617
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10618
	    self releaseMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10619
	    currentMethod := method.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10620
	    currentSelector := aSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10621
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10622
	    m := aSelector , '*(*)'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10623
	    selectorList notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10624
		idx := selectorList findFirst:[:line |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10625
						    line = aSelector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10626
						    or:[m match:line]].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10627
"/            idx := methodListView list findFirst:[:line |
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10628
"/                                                line = aSelector
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10629
"/                                                or:[m match:line]].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
 10630
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10631
		methodListView setSelection:idx. "/ setSelectElement:aSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10632
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10633
	    self methodSelectionChanged.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10634
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10635
	]
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10636
    ].
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10637
    self beep.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10638
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10639
    "Modified: / 28.6.1996 / 20:28:56 / stefan"
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10640
    "Modified: / 27.7.1998 / 11:01:55 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10641
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10642
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10643
updateMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10644
    self updateMethodListWithScroll:true keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10645
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10646
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10647
updateMethodListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10648
    self updateMethodListWithScroll:scroll keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10649
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10650
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10651
updateMethodListWithScroll:scroll keepSelection:keep
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10652
    |selectors scr first last selection searchCategory|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10653
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10654
    methodListView notNil ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10655
        selection := methodListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10656
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10657
        searchCategory := currentMethodCategory.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10658
        (currentClass notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10659
        and:[currentClass supportsMethodCategories not]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10660
            searchCategory := '* all *'
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10661
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10662
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10663
        (searchCategory notNil 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10664
        and:[actualClass notNil]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10665
            fullProtocol ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10666
                selectors := self listOfAllSelectorsInCategory:searchCategory 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10667
                                inFullProtocolHierarchyOfClass:actualClass
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10668
            ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10669
                selectors := self listOfAllSelectorsInCategory:searchCategory
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10670
                                                       ofClass:actualClass
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10671
            ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10672
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10673
        scr := scroll.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10674
        first := methodListView firstLineShown.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10675
        first ~~ 1 ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10676
            last := methodListView lastLineShown.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10677
            selectors size <= (last - first + 1) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10678
                scr := true
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10679
            ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10680
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10681
2243
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10682
        scr ifTrue:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10683
            methodListView list:selectors
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10684
        ] ifFalse:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10685
            methodListView setList:selectors
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10686
        ].
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10687
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10688
        (variableListView notNil 
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10689
        and:[variableListView hasSelection]) ifTrue:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10690
            self hilightMethodsInMethodList.
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10691
        ].
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10692
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10693
        keep ifTrue:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10694
            methodListView setSelection:selection.
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10695
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10696
        ^ self
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 10697
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 10698
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 10699
    classMethodListView notNil ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10700
        self updateClassMethodListWithScroll:scroll keepSelection:keep
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 10701
    ].
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10702
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10703
    "Modified: 18.12.1995 / 22:54:04 / stefan"
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10704
    "Modified: 30.7.1997 / 15:55:06 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10705
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10706
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10707
!BrowserView methodsFor:'misc'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10708
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10709
codeChanged
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10710
    codeView modified ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10711
        self stopSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10712
        codeModified := true.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10713
        self startSyntaxHighlightProcess.
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10714
    ]
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10715
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10716
    "Created: / 31.3.1998 / 14:25:29 / cg"
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10717
    "Modified: / 18.6.1998 / 09:27:52 / cg"
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10718
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10719
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10720
compressedCodeLinesFor:someCode
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10721
    |s|
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10722
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10723
    s := someCode asString string asCollectionOfLines copy.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10724
    [s last isEmpty] whileTrue:[s removeLast].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10725
    s := s collect:[:s | |t|
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10726
			   s notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10727
			      t := s withoutTrailingSeparators.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10728
			      t size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10729
				  nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10730
			      ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10731
				  t
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10732
			      ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10733
			   ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10734
			      s
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10735
			   ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10736
		     ].
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10737
    ^ s
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10738
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10739
    "Created: / 17.6.1998 / 16:48:03 / cg"
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10740
!
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10741
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10742
instanceProtocol:aBoolean
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10743
    "switch between instance and class protocol"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10744
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10745
    |onToggle offToggle|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10746
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10747
    showInstance ~~ aBoolean ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10748
	self checkSelectionChangeAllowed ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10749
	    instanceToggle notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10750
		aBoolean ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10751
		    offToggle := classToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10752
		    onToggle := instanceToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10753
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10754
		    onToggle := classToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10755
		    offToggle := instanceToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10756
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10757
		onToggle turnOn.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10758
		offToggle turnOff.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10759
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10760
	    showInstance := aBoolean.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10761
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10762
	    (variableListView notNil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10763
	    and:[variableListView hasSelection]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10764
		self unhilightMethodCategories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10765
		self unhilightMethods.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10766
		variableListView setSelection:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10767
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10768
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10769
	    fullProtocol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10770
		showInstance ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10771
		    actualClass := currentClassHierarchy.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10772
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10773
		    actualClass := currentClassHierarchy class.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10774
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10775
		acceptClass := actualClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10776
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10777
		self updateClassList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10778
		self updateMethodCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10779
		self updateMethodListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10780
		self updateVariableList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10781
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10782
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10783
	    currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10784
		self classSelectionChanged
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10785
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10786
	    codeView modified:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10787
	    codeModified := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10788
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10789
	    aBoolean ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10790
		onToggle := classToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10791
		offToggle := instanceToggle
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10792
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10793
		offToggle := classToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10794
		onToggle := instanceToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10795
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10796
	    onToggle turnOn.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10797
	    offToggle turnOff.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10798
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10799
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
 10800
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 10801
    "Modified: / 31.3.1998 / 23:40:04 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10802
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10803
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10804
processName
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10805
    "the name of my process - for the processMonitor only"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10806
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10807
    ^ 'System Browser'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10808
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10809
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 10810
showActivity:someMessage
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 10811
    "some activityNotification to be forwarded to the user;
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 10812
     show it in the windows title area here."
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 10813
1500
c7cac8cb021f show busyCursor while autloading or starting an app
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
 10814
    someMessage size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10815
	self normalLabel
1500
c7cac8cb021f show busyCursor while autloading or starting an app
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
 10816
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10817
	self busyLabel:someMessage with:nil
1500
c7cac8cb021f show busyCursor while autloading or starting an app
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
 10818
    ]
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 10819
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 10820
    "Created: 16.12.1995 / 18:41:37 / cg"
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 10821
    "Modified: 23.4.1996 / 21:39:24 / cg"
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 10822
!
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 10823
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10824
updateCodeView
1623
d8ec0dca0923 ask class for syntaxHighliter (avoid formatting Java classes ...)
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
 10825
    |code sourceLineNumber doStartSyntax invalidate highlighter|
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10826
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10827
    codeView modifiedChannel retractInterestsFor:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10828
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10829
    aspect == #hierarchy ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10830
        ^ self classHierarchy
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10831
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10832
    aspect == #classInstVars ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10833
        ^ self classClassInstVars
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10834
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10835
    aspect == #comment ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10836
        ^ self classComment
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10837
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10838
    aspect == #primitiveDefinitions ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10839
        ^ self classPrimitiveDefinitions
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10840
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10841
    aspect == #primitiveFunctions ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10842
        ^ self classPrimitiveFunctions
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10843
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10844
    aspect == #primitiveVariables ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10845
        ^ self classPrimitiveVariables
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10846
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10847
    aspect == #revisionInfo ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10848
        ^ self classRevisionInfo
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10849
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10850
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10851
    fullClass ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10852
        currentClass notNil ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10853
            code := currentClass source.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10854
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10855
    ] ifFalse:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10856
        aspect == #definition ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10857
            ^ self classDefinition
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10858
        ].
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10859
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10860
        currentMethod notNil ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10861
            (codeView acceptAction isNil
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10862
            and:[actualClass notNil 
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10863
            and:[currentMethodCategory notNil]]) ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10864
                self setAcceptAndExplainActionsForMethod.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10865
            ].
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10866
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10867
            code := currentMethod source.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10868
            sourceLineNumber := currentMethod sourceLineNumber.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10869
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10870
            code isNil ifTrue:[
2422
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10871
                (sourceLineNumber isNil
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10872
                or:[currentMethod sourcePosition isNil
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10873
                or:[currentMethod getSource isNil]]) ifTrue:[
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10874
                    code := '"
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10875
Sorry, but the methods sourceCode is not available.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10876
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10877
Probably, the methods sourceCode-info was stripped from the system.
1501
81295c442770 output a reasonable message, if a methods source is not available.
Claus Gittinger <cg@exept.de>
parents: 1500
diff changeset
 10878
"'.
2422
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10879
                ] ifFalse:[
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10880
                    code := '"
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10881
Sorry, but the methods sourceCode is not available.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10882
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10883
If this ST/X is a ' , 'regular distribution' asText allBold ,', please check the setting of
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10884
your systemPath which contains a collection of pathNames.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10885
The system searches those directories for a subdirectory named ''source'', 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10886
which itself should contain the classes source file.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10887
Also, check if that directory and/or sourceFile grants read access.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10888
The sourcePath can be accessed via 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10889
    Smalltalk systemPath 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10890
and
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10891
    Smalltalk systemPath:aCollectionOfPathStrings
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10892
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10893
To fix this (in the running system), evaluate:
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10894
    Smalltalk systemPath addFirst:''<<pathOfDirContainingSourceDir>>.''
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10895
    Smalltalk flushPathCaches.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10896
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10897
You may also want to add those statements to the end of your ''private.rc''
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10898
file - so you will not get this error again and again. 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10899
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10900
Also, check if you have the sourceCodeManagement (CVS) enabled,
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10901
and (if so) configured correctly.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10902
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10903
If all of the above fail, and you know the path of the source file,
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10904
you can workaround the problem, by adding a symbolic link to that sourcefile
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10905
in the ''source'' directory.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10906
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10907
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10908
If this is ST/X a ' , 'demo-distribution' asText allBold ,', the source for some classes is not
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10909
published, and this may be normal behavior (unless it happens for all classes).
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10910
Notice, that it is possible to browse & add new methods - even with missing sources.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10911
"'.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10912
                ].
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 10913
                self clearAcceptAction.
2525
2573dc6b6028 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2513
diff changeset
 10914
            ] ifFalse:[       
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10915
                (UserPreferences current autoFormatting
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10916
                and:[BRParser notNil
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10917
                and:[BRFormatter notNil]]) ifTrue:[
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10918
                    Object errorSignal handle:[:ex |
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10919
                    ] do:[
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10920
                        |tree|
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10921
                        tree := BRParser 
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10922
                                    parseMethod:code
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10923
                                    onError: [:aString :position | nil].
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10924
                        tree notNil ifTrue:[
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10925
                            code := tree printString
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10926
                        ].
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10927
                    ].
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 10928
                ].
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10929
                UserPreferences current syntaxColoring ifTrue:[
2525
2573dc6b6028 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2513
diff changeset
 10930
                    highlighter := (actualClass ? Smalltalk) syntaxHighlighterClass.
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10931
                    highlighter notNil ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10932
                        code size < 5000 ifTrue:[       
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10933
                            code := highlighter formatMethod:code in:actualClass.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10934
                            codeView modifiedChannel onChangeSend:#codeChanged to:self.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10935
                        ] ifFalse:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10936
                            doStartSyntax := true.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10937
                        ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10938
                    ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10939
                ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10940
            ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10941
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10942
    ].
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10943
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10944
    "/ do async redraw - avoids visible scroll when an autoSearch is
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10945
    "/ done soon ...
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10946
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10947
    code size > 0 ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10948
        codeView setList:(code asStringCollection) expandTabs:true redraw:false.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10949
        codeView cursorHome.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10950
        codeView unselectWithoutRedraw.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10951
        codeView invalidate.
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10952
    ] ifFalse:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10953
        codeView contents:code.
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10954
    ].
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10955
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10956
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 10957
    codeModified := false.
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 10958
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10959
    doStartSyntax == true ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10960
        self startSyntaxHighlightProcess.
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10961
    ].
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10962
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10963
    sourceLineNumber notNil ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10964
        sourceLineNumber ~~ 1 ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10965
            codeView gotoLine:sourceLineNumber.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10966
            sourceLineNumber > 10 ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10967
                sourceLineNumber := sourceLineNumber - 10
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10968
            ].
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10969
            codeView scrollToLine:sourceLineNumber.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10970
        ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10971
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10972
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10973
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10974
    "Created: / 23.11.1995 / 14:16:43 / cg"
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 10975
    "Modified: / 10.2.2000 / 14:15:03 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10976
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10977
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10978
!BrowserView methodsFor:'namespace menu'!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10979
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10980
nameSpaceCheckInEach
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10981
    |classes|
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10982
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10983
    (self checkSelectionChangeAllowedWithCompare:false) ifFalse:[^ self].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10984
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10985
    classes := currentNamespace allClasses.
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10986
    classes isEmpty ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10987
        self warn:(resources 
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10988
                        string:'No classes in nameSpace ''%''.'
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10989
                        with:currentNamespace name).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10990
        ^ self
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10991
    ].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10992
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10993
    self withBusyCursorDo:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10994
        |logMessage|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10995
2529
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 10996
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 10997
        logMessage := SourceCodeManagerUtilities 
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 10998
                        getLogMessageFor:(resources 
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 10999
                                            string:'(any in nameSpace %1)'
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 11000
                                            with:currentNamespace name).
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11001
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11002
        logMessage notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11003
            "/ ignore private classes
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11004
            classes := classes select:[:aClass | aClass owningClass isNil].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11005
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11006
            classes do:[:aClass |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11007
                self busyLabel:'checking in %1' with:aClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11008
                "/ ca does not want boxes to pop up all over ...
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11009
                InformationSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11010
                    Transcript showCR:ex errorString
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11011
                ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11012
                    self classCheckin:aClass withLog:logMessage
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11013
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11014
                self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11015
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11016
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11017
        self normalLabel.
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11018
    ]
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11019
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11020
    "Created: 23.11.1995 / 11:41:38 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11021
    "Modified: 15.6.1996 / 00:25:58 / stefan"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11022
    "Modified: 18.8.1997 / 15:42:21 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11023
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11024
!
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11025
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11026
nameSpaceMenu
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 11027
    <resource: #programMenu >
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 11028
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 11029
    |items|
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 11030
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11031
    items := #( 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11032
		('new namespace' nameSpaceNewNameSpace)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11033
	      ).
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11034
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11035
"/    showAllNamespaces ifTrue:[
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 11036
"/        items := items , #( ('-') ('show topLevel namespaces only' showTopLevelNamespaces)).
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11037
"/    ] ifFalse:[
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 11038
"/        items := items , #( ('-') ('show all namespaces' showAllNamespaces)).
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11039
"/    ].
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11040
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11041
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11042
    (currentNamespace notNil
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11043
    and:[currentNamespace ~~ Smalltalk
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11044
    and:[currentNamespace ~= '* all *']]) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11045
	"/ is it all empty ?
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11046
	currentNamespace allClasses isEmpty ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11047
	    items := items , #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11048
				('-') 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11049
				('remove' nameSpaceRemove)).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11050
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11051
	    items := items , #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11052
				('-') 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11053
				('remove all classes...' nameSpaceRemoveAllClasses)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11054
				('-') 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11055
				('checkin each...'       nameSpaceCheckInEach)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11056
			      ).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11057
	]
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11058
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11059
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 11060
    ^ PopUpMenu itemList:items resources:resources performer:self
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 11061
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 11062
    "Created: / 4.1.1997 / 23:51:38 / cg"
1993
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11063
    "Modified: / 3.2.1999 / 20:13:57 / cg"
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11064
!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11065
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11066
nameSpaceNewNameSpace
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11067
    "create a namespace-definition prototype in codeview"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11068
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11069
    self classClassDefinitionTemplateFor:nil in:nil namespace:true private:false.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11070
    aspect := nil.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11071
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11072
    "Modified: 23.12.1996 / 12:47:06 / cg"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11073
    "Created: 23.12.1996 / 13:11:48 / cg"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11074
!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11075
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11076
nameSpaceRemove
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11077
    "remove that nameSpace - but only if its empty"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11078
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11079
    (currentNamespace ~~ Smalltalk
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11080
    and:[currentNamespace allClasses isEmpty]) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11081
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11082
	    Smalltalk removeClass:currentNamespace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11083
	    allNamespaces := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11084
	    self setListOfNamespaces.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11085
	    self changeNameSpaceTo:'* all *'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11086
	    namespaceList contents:'* all *'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11087
	]
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11088
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11089
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 11090
    "Modified: 18.8.1997 / 15:44:31 / cg"
1993
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11091
!
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11092
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11093
nameSpaceRemoveAllClasses
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11094
    "remove all classes in that nameSpace - but only after confirmation"
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11095
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11096
    |classes|
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11097
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11098
    classes := currentNamespace allClasses.
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11099
    classes isEmpty ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11100
	self warn:(resources 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11101
			string:'No classes in nameSpace ''%''.'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11102
			with:currentNamespace name).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11103
	^ self
1993
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11104
    ].
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11105
    (self confirm:(resources 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11106
		    string:'Really remove all %1 classes in nameSpace ''%2'' ?' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11107
		    with:classes size printString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11108
		    with:currentNamespace name)) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11109
	^ self
1993
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11110
    ].
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11111
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11112
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11113
	classes copy do:[:cls |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11114
	    Smalltalk removeClass:cls.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11115
	]
1993
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11116
    ]
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11117
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11118
    "Modified: / 3.2.1999 / 20:18:13 / cg"
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11119
! !
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11120
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11121
!BrowserView methodsFor:'namespace stuff'!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11122
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11123
changeNameSpaceTo:nsName
2022
ccb6e99e1569 code density
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
 11124
    |n selectedClass str selectedCategory l newCat|
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11125
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11126
    nsName = '* all *' ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11127
        currentNamespace := nsName.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11128
    ] ifFalse:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11129
        n := Smalltalk at:nsName asSymbol.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11130
        n isNameSpace ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11131
            currentNamespace := n.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11132
        ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11133
            ^ self
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11134
        ]
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11135
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11136
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11137
    selectedClass := actualClass.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11138
    currentClass := actualClass := nil.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11139
    selectedCategory := currentClassCategory.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11140
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11141
    self updateClassCategoryListWithScroll:true.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11142
    selectedCategory notNil ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11143
        self classCategorySelectionChanged.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11144
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11145
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11146
    selectedClass notNil ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11147
        str := self displayedClassNameOf:selectedClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11148
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11149
        self switchToClassNamed:str.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11150
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11151
        ((l := classListView list) isNil
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11152
        or:[(l includes:str) not]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11153
             currentClassCategory := nil.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11154
             currentClass := nil.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11155
             aspect := nil.   
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11156
             self updateMethodCategoryList.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11157
             self updateMethodList.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11158
             self updateCodeView.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11159
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11160
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11161
        (classCategoryListView notNil and:[currentClass notNil]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11162
            newCat := currentClass category.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11163
            (currentClassCategory = newCat) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11164
                currentClassCategory := newCat.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11165
                classCategoryListView setSelectElement:newCat
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11166
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11167
        ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11168
    ]
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11169
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11170
    "Created: 3.1.1997 / 11:11:13 / cg"
1015
b3727346969f nicer version validation
Claus Gittinger <cg@exept.de>
parents: 1000
diff changeset
 11171
    "Modified: 29.1.1997 / 18:33:42 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11172
!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11173
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11174
displayedClassNameOf:aClass
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11175
    "depending on the current nameSpace, either show a classes
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11176
     fullname or its name without the namespace prefix (if its in the current)"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11177
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11178
    |owner nm ns|
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11179
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
 11180
    aClass isJavaClass ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11181
	^ aClass fullName "/ asString replaceAll:$/ with:$.
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
 11182
    ].
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
 11183
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
 11184
    "/ in which nameSpace is that class (or its owner) ?
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
 11185
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11186
    owner := aClass topOwningClass.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11187
    owner notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11188
	ns := owner nameSpace.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11189
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11190
	ns := aClass nameSpace.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11191
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11192
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11193
    "/ this 'cannot' happen (should always be Smalltalk)
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11194
    ns isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11195
	^ aClass name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11196
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11197
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11198
    currentNamespace = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11199
	(ns == Smalltalk) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11200
	    nm := aClass nameWithoutNameSpacePrefix.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11201
	    ^ nm
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11202
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11203
	nm := aClass nameWithoutNameSpacePrefix.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11204
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11205
"/        ^ aClass name        "/ full name
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11206
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11207
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11208
    nm := aClass nameWithoutNameSpacePrefix.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11209
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11210
    "/ is it in one of the selected namespaces ?
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11211
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11212
    (self findClassNamedInNameSpace:nm) isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11213
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11214
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11215
    currentNamespace = ns ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11216
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11217
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11218
    ^ nm.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11219
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11220
    "Created: 20.12.1996 / 17:46:41 / cg"
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
 11221
    "Modified: 31.7.1997 / 22:57:16 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11222
!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11223
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11224
listOfAllNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11225
    "return a list of all namespaces"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11226
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11227
    allNamespaces isNil ifTrue:[
2646
bb22d1b835e6 renamed Namespace to NameSpace
Claus Gittinger <cg@exept.de>
parents: 2645
diff changeset
 11228
        allNamespaces := NameSpace allNamespaces.
2303
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11229
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11230
        showAllNamespaces ifFalse:[
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11231
            "/ only topLevel namespaces are shown
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11232
            "/ i.e. ignore subspaces 
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11233
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11234
            allNamespaces := allNamespaces select:[:ns | ns isTopLevelNamespace].
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11235
        ]
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11236
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11237
    ^ allNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11238
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11239
    "Modified: 31.7.1997 / 22:32:30 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11240
!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11241
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11242
listOfNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11243
    "return a list of considered namespaces"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11244
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11245
    currentNamespace isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11246
	^ Array with:Smalltalk
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11247
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11248
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11249
    currentNamespace = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11250
	^ self listOfAllNamespaces
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11251
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11252
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11253
    ^ Array with:currentNamespace
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11254
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11255
    "Created: 26.10.1996 / 11:25:39 / cg"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11256
    "Modified: 20.12.1996 / 19:18:18 / cg"
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11257
!
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11258
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11259
setListOfNamespaces
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11260
    |l hasSmalltalk|
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11261
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11262
    namespaceList isNil ifTrue:[ ^ self ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11263
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11264
    l := self listOfAllNamespaces collect:[:ns | ns name].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11265
    l := l asOrderedCollection.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11266
    hasSmalltalk := true.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11267
    l remove:'Smalltalk' ifAbsent:[hasSmalltalk := false].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11268
    l sort.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11269
    l addFirst:'-'.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11270
    hasSmalltalk ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11271
	l addFirst:'Smalltalk'
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11272
    ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11273
    l addFirst:'* all *'.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11274
    namespaceList list:l
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11275
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11276
    "Modified: 20.12.1996 / 19:18:29 / cg"
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11277
!
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11278
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11279
showAllNamespaces
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11280
    "toggle to show all namespaces"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11281
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11282
    showAllNamespaces := true.
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11283
    self updateNamespaceList
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11284
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11285
    "Modified: 31.7.1997 / 22:33:16 / cg"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11286
!
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11287
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11288
showTopLevelNamespaces
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11289
    "toggle to show topLevel namespaces only"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11290
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11291
    showAllNamespaces := false.
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11292
    self updateNamespaceList
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11293
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11294
    "Created: 31.7.1997 / 22:33:29 / cg"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11295
!
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11296
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11297
updateNamespaceList
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11298
    allNamespaces := nil.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11299
    namespaceList notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11300
	self setListOfNamespaces
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11301
    ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11302
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11303
    "Created: 8.1.1997 / 10:54:03 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11304
! !
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11305
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11306
!BrowserView methodsFor:'private'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11307
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11308
askAndBrowseMethodCategory:title action:aBlock
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11309
    "convenient helper method: setup enterBox with initial being current method category"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11310
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11311
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11312
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11313
    box := self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11314
		enterBoxTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11315
		okText:'browse'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11316
		label:'browse category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11317
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11318
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11319
    sel isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11320
	currentMethodCategory notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11321
	    sel := currentMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11322
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11323
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11324
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11325
	box initialText:(sel asString withoutSpaces)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11326
    ].
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 11327
    box action:[:aString | self withBusyCursorDo:[aBlock value:aString]].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11328
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11329
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11330
    "Modified: / 18.6.1998 / 16:40:46 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11331
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11332
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11333
askForMethodCategory
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11334
    "convenient helper method: setup a box asking for a method category"
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11335
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 11336
    |someCategories box txt retVal|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11337
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
 11338
    someCategories := actualClass categories asOrderedCollection sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11339
    box := self listBoxTitle:'accept in which method category ?' okText:'accept' list:someCategories.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11340
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11341
    lastMethodCategory isNil ifTrue:[
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
 11342
        txt := '* as yet undefined *' "/ 'new methods'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11343
    ] ifFalse:[
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
 11344
        txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11345
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11346
    box initialText:txt.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 11347
    box action:[:aString | aString notEmpty ifTrue:[retVal := aString] ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11348
    box showAtPointer.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 11349
    ^ retVal
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 11350
1727
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
 11351
    "Modified: / 18.7.1998 / 22:18:25 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11352
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11353
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11354
askForSearchSelectorTitle:title openWith:aSelector
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11355
    "convenient helper method: setup enterBox with text from codeView or selected
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11356
     method for browsing based on a selector. Set action and launch box"
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11357
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11358
    ^ self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11359
	askForSearchTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11360
	openWith:aSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11361
	isSelector:true
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11362
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11363
    "Modified: / 18.6.1998 / 16:40:39 / cg"
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11364
!
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11365
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11366
askForSearchTitle:title openWith:aSelector isSelector:isSelector
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11367
    "convenient helper method: setup enterBox with text from codeView or selected
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11368
     method for browsing based on a selector. Set action and launch box"
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11369
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11370
    ^ self
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11371
	askForSearchTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11372
	openWith:aSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11373
	isSelector:isSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11374
	searchArea:#everywhere
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11375
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11376
    "Modified: / 18.6.1998 / 16:40:35 / cg"
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11377
!
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11378
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11379
askForSearchTitle:title openWith:aSelector isSelector:isSelector searchArea:whereDefault
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11380
    "convenient helper method: setup enterBox with text from codeView or selected
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11381
     method for browsing based on a selector. Set action and launch box.
1155
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11382
     SearchArea may be one of #everywhere, #classCategory, #class, #classWithPrivateClasses,
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11383
     #classHierarchy or #classHierarchyWithPrivateClasses"
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11384
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11385
    ^ self
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11386
	askForSearchTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11387
	openWith:aSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11388
	isSelector:isSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11389
	searchArea:whereDefault 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11390
	withCaseIgnore:false
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11391
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11392
    "Modified: / 18.6.1998 / 16:40:26 / cg"
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11393
!
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11394
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11395
askForSearchTitle:title openWith:aSelector isSelector:isSelector searchArea:whereDefault withCaseIgnore:withCaseIgnore
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11396
    "convenient helper method: setup enterBox with text from codeView or selected
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11397
     method for browsing based on a selector. Set action and launch box.
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 11398
     SearchArea may be one of 
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11399
        #everywhere, 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11400
        #currentNameSpace
2399
8da9ee60bef2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
 11401
        #currentClassesNameSpace
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11402
        #classCategory, 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11403
        #class, 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11404
        #classWithPrivateClasses,
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11405
        #classHierarchy or 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11406
        #classHierarchyWithPrivateClasses"
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 11407
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 11408
    |box panel selectorHolder where whereChannel caseHolder
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11409
     b sel classes areas toSearch cls privates inputField ns|
1155
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11410
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 11411
    areas := OrderedCollection new.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11412
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11413
    isSelector ifTrue:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11414
        sel := self selectorToSearchFor.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11415
    ] ifFalse:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11416
        sel := self stringToSearchFor.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11417
    ].
2590
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11418
    sel size == 0 ifTrue:[
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11419
        "/ use last searchString
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11420
        LastSearchPatterns size > 0 ifTrue:[
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11421
            sel := LastSearchPatterns first.
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11422
        ].
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11423
    ].
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11424
    selectorHolder := sel asValue.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11425
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11426
    box := Dialog new.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
 11427
    (box addTextLabel:(resources string:title)) adjust:#left.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11428
1805
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
 11429
    inputField := box addComboBoxOn:selectorHolder tabable:true.
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
 11430
    inputField list:LastSearchPatterns.
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
 11431
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11432
    inputField selectAll.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11433
    inputField entryCompletionBlock:[:contents |
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11434
        |s what m|
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11435
2687
1c3f48a220b4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2685
diff changeset
 11436
        s := contents string withoutSpaces.
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11437
        box topView withWaitCursorDo:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11438
            what := Smalltalk selectorCompletion:s.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11439
            inputField contents:what first.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11440
            (what at:2) size ~~ 1 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11441
                self beep
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11442
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11443
        ]
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11444
    ].
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11445
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11446
    withCaseIgnore ifTrue:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11447
        box addCheckBox:(resources string:'ignore case') on:(caseHolder := false asValue).
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11448
    ].
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11449
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11450
    (currentClassCategory notNil 
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11451
    or:[currentClass notNil]) ifTrue:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11452
        box addHorizontalLine.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11453
        box addVerticalSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11454
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11455
        (box addTextLabel:(resources string:'search in:')) adjust:#left.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11456
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11457
        panel := VerticalPanelView new.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11458
        panel horizontalLayout:#fitSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11459
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11460
        whereChannel := RadioButtonGroup new.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11461
        b := CheckBox label:(resources string:'everywhere').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11462
        panel add:b. whereChannel add:b value:#everywhere.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11463
        areas add:#everywhere.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11464
        box makeTabable:b.
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11465
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11466
"/        classMethodListView notNil ifTrue:[
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11467
"/            b := CheckBox label:(resources string:'shown methods').
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11468
"/            panel add:b. whereChannel add:b value:#currentMethodList.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11469
"/            areas add:#currentMethodList.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11470
"/            box makeTabable:b.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11471
"/        ].
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11472
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11473
        currentNamespace ~= '* all *' ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11474
            b := CheckBox label:(resources string:'current nameSpace').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11475
            panel add:b. whereChannel add:b value:#currentNameSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11476
            areas add:#currentNameSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11477
            box makeTabable:b.
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11478
        ] ifFalse:[
2402
1b1143acfaca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
 11479
            (currentClass notNil 
1b1143acfaca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
 11480
            and:[(ns := currentClass nameSpace) notNil 
1b1143acfaca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
 11481
            and:[ns ~~ Smalltalk]]) ifTrue:[
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11482
                b := CheckBox label:(resources string:'classes nameSpace (''%1'')' with:ns name).
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11483
                panel add:b. whereChannel add:b value:#currentClassesNameSpace.
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11484
                areas add:#currentClassesNameSpace.
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11485
                box makeTabable:b.
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11486
            ]
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11487
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11488
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11489
        currentClassCategory notNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11490
            b := CheckBox label:(resources string:'class category (''%1'')' with:currentClassCategory).
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11491
            panel add:b. whereChannel add:b value:#classCategory.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11492
            areas add:#classCategory.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11493
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11494
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11495
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11496
        currentClass notNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11497
            b := CheckBox label:(resources string:'class (''%1'')' with:currentClass name).
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11498
            panel add:b. whereChannel add:b value:#class.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11499
            areas add:#class.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11500
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11501
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11502
            b := CheckBox label:(resources string:'class & superclasses').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11503
            panel add:b. whereChannel add:b value:#classAndSuperclasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11504
            areas add:#classAndSuperclasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11505
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11506
            currentClass superclass isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11507
                b disable
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11508
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11509
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11510
            b := CheckBox label:(resources string:'class & subclasses').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11511
            panel add:b. whereChannel add:b value:#classHierarchy.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11512
            areas add:#classHierarchy.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11513
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11514
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11515
            currentClass subclasses size == 0 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11516
                b disable.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11517
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11518
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11519
            b := CheckBox label:(resources string:'class & private classes').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11520
            panel add:b. whereChannel add:b value:#classWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11521
            areas add:#classWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11522
            box makeTabable:b.
1811
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 11523
        
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11524
            fullProtocol ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11525
                cls := actualClass.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11526
                cls isMeta ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11527
                    cls := cls soleInstance
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11528
                ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11529
            ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11530
                cls := currentClass
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11531
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11532
            cls privateClasses size == 0 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11533
                b disable
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11534
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11535
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11536
            b := CheckBox label:(resources string:'class & subclasses & all private classes').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11537
            panel add:b. whereChannel add:b value:#classHierarchyWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11538
            areas add:#classHierarchyWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11539
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11540
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11541
            currentClass subclasses size == 0 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11542
                b disable.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11543
            ] ifFalse:[
1236
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11544
"/ this takes too long ...
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11545
"/                toSearch := IdentitySet new.
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11546
"/                currentClass withAllSubclasses do:[:cls | toSearch add:cls privateClasses].
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11547
"/                toSearch size == 0 ifTrue:[
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11548
"/                    b disable
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11549
"/                ]
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11550
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11551
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11552
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11553
        whereDefault notNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11554
            (areas includes:whereDefault) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11555
                where := whereDefault asSymbol
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11556
            ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11557
                where := areas first.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11558
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11559
        ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11560
            where := #everywhere.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11561
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11562
        whereChannel value:where.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11563
        box addComponent:panel indent:0.  "/ panel has its own idea of indenting
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11564
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11565
        box addVerticalSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11566
        box addHorizontalLine.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11567
    ] ifFalse:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11568
        whereChannel := #everywhere asValue.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11569
    ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11570
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11571
    box addAbortButton.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
 11572
    box addOkButtonLabelled:(resources string:'browse').
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11573
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11574
    box label:(resources string:'search').
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11575
    box open.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11576
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11577
    box accepted ifTrue:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11578
        sel := selectorHolder value.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11579
        where := whereChannel value.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11580
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11581
        sel isEmpty ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11582
            self warn:'nothing entered for search'.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11583
            ^ self.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11584
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11585
        where isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11586
            self warn:'no class(es) for search'.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11587
            ^ self.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11588
        ].
2687
1c3f48a220b4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2685
diff changeset
 11589
        sel := sel string.
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11590
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11591
        LastSearchPatterns isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11592
            LastSearchPatterns := OrderedCollection new.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11593
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11594
        (LastSearchPatterns includes:sel) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11595
            LastSearchPatterns remove:sel.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11596
        ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11597
            LastSearchPatterns size > 15 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11598
                LastSearchPatterns removeFirst
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11599
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11600
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11601
        LastSearchPatterns addFirst:sel.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11602
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11603
        where == #everywhere ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11604
            classes := Smalltalk allClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11605
        ] ifFalse:[ where == #currentNameSpace ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11606
            classes := currentNamespace allClassesWithAllPrivateClasses
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11607
        ] ifFalse:[ where == #currentClassesNameSpace ifTrue:[
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11608
            classes := currentClass nameSpace allClassesWithAllPrivateClasses
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11609
        ] ifFalse:[ where == #classCategory ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11610
            classes := Smalltalk allClassesInCategory:currentClassCategory
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11611
        ] ifFalse:[(where == #class or:[where == #classWithPrivateClasses]) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11612
            currentClass isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11613
                classes := #()
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11614
            ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11615
                classes := Array with:currentClass
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11616
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11617
        ] ifFalse:[ (where == #classHierarchy or:[where == #classHierarchyWithPrivateClasses]) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11618
            classes := currentClass withAllSubclasses
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11619
        ] ifFalse:[ (where == #classAndSuperclasses) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11620
            classes := currentClass withAllSuperclasses
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11621
        ]]]]]]].
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11622
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11623
        (where == #classWithPrivateClasses 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11624
        or:[where == #classHierarchyWithPrivateClasses]) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11625
            toSearch := IdentitySet withAll:classes.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11626
            classes := IdentitySet withAll:toSearch.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11627
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11628
            [toSearch notEmpty] whileTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11629
                cls := toSearch removeFirst.
2273
a28341a7fbfc quicker search for allPrivateClasses
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
 11630
                classes addAll:cls allPrivateClasses.
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11631
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11632
            classes := classes asOrderedCollection.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11633
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11634
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11635
        classes isEmpty ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11636
            self warn:'no class(es) given for search'.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11637
        ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11638
            self withSearchCursorDo:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11639
                withCaseIgnore ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11640
                    SystemBrowser perform:aSelector with:sel with:classes with:caseHolder value
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11641
                ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11642
                    SystemBrowser perform:aSelector with:sel with:classes
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11643
                ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11644
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11645
        ]
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11646
    ]
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11647
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11648
    "Created: / 18.6.1998 / 16:39:44 / cg"
1805
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
 11649
    "Modified: / 5.8.1998 / 00:29:54 / cg"
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
 11650
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11651
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11652
busyLabel:what with:someArgument
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11653
    "set the title for some warning"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11654
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 11655
    self topView
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11656
	label:('System Browser - ' , (resources string:what with:someArgument))
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 11657
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 11658
    "Modified: 18.8.1997 / 15:19:15 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11659
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11660
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11661
checkAcceptedMethod:mthdHere inClass:actualClass
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11662
    "method was accepted - do some standard checks"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11663
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11664
    |sel cls superCls implClass mthdThere treeHere treeThere dictionary|
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11665
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11666
    (BRParser notNil and:[BRParser isLoaded]) ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11667
        "/ does new method redefine an inherited method,
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11668
        "/ which does the same ?
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11669
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11670
        sel := mthdHere selector.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11671
        cls := mthdHere mclass.
2600
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11672
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11673
        ( #( 
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11674
            documentation
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11675
            version
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11676
            examples
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11677
            copyright
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11678
            history
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11679
           ) includes:sel) ifTrue:[
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11680
            cls isMeta ifTrue:[
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11681
                ^ self
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11682
            ]
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 11683
        ].
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11684
        superCls := cls superclass.
2624
faabcb137c0a oops - care for nil superclass
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
 11685
        superCls notNil ifTrue:[
faabcb137c0a oops - care for nil superclass
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
 11686
            implClass := superCls whichClassImplements:sel.
faabcb137c0a oops - care for nil superclass
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
 11687
        ].
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11688
        implClass notNil ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11689
            "/ ok, it is redefined
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11690
            mthdThere := implClass compiledMethodAt:sel.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11691
            treeHere := BRParser 
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11692
                            parseMethod:mthdHere source
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11693
                            onError: [:aString :position | ^ self "ignore any error"].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11694
            treeHere isNil ifTrue:[^ self].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11695
            treeThere := BRParser 
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11696
                            parseMethod:mthdThere source
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11697
                            onError: [:aString :position | ^ self "ignore any error"].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11698
            treeThere isNil ifTrue:[^ self].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11699
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11700
            dictionary := Dictionary new.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11701
            (treeHere body equalTo: treeThere body withMapping: dictionary) ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11702
                self information:'This methods functionality is already inherited from ', implClass name.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11703
            ] 
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11704
        ]        
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11705
    ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11706
2624
faabcb137c0a oops - care for nil superclass
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
 11707
    "Modified: / 18.2.2000 / 11:34:12 / cg"
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11708
!
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11709
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11710
checkSelectionChangeAllowed
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11711
    "return true, if selection change is ok;
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11712
     its not ok, if code has been changed.
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11713
     in this case, return the result of a user query"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11714
1811
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 11715
    |what m cls src1 src2 list1 list2 v|
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11716
447
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
 11717
    codeView modified ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11718
	codeModified == true ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11719
	    ^ true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11720
	]
447
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
 11721
    ].
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
 11722
1811
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 11723
    cls := acceptClass ? actualClass.
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 11724
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 11725
    (currentMethod notNil and:[cls notNil]) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11726
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11727
	    m := cls compiledMethodAt:currentSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11728
	    m notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11729
		src1 := m source.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11730
		src1 notNil ifTrue:[src1 := src1 string].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11731
		src2 := codeView contents.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11732
		src2 notNil ifTrue:[src2 := src2 string].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11733
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11734
		(src1 ~= src2) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11735
		    src1 size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11736
			list1 := #()
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11737
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11738
			list1 := src1 asCollectionOfLines 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11739
					collect:[:line | 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11740
						    line isNil ifTrue:['']
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11741
						    ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11742
							line 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11743
							    withoutTrailingSeparators
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11744
								withTabsExpanded
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11745
						    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11746
						].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11747
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11748
		    list2 := src2 asCollectionOfLines collect:[:line | line isNil ifTrue:['']
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11749
							       ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11750
								    line 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11751
									withoutTrailingSeparators
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11752
									    withTabsExpanded
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11753
							       ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11754
						      ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11755
		    HistoryManager notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11756
			list1 := HistoryManager withoutHistoryLines:list1 asStringCollection asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11757
			list2 := HistoryManager withoutHistoryLines:list2 asStringCollection asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11758
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11759
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11760
		    list1 = list2 ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11761
			what := self checkSelectionChangeAllowedWithCompare:true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11762
			what == #compare ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11763
			    v := DiffTextView 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11764
				    openOn:src2 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11765
				    label:(resources string:'code here (to be accepted ?)')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11766
				    and:src1
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11767
				    label:(resources string:'methods actual code').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11768
			    v label:(resources string:'comparing method versions').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11769
			    ^ false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11770
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11771
			^ what
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11772
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11773
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11774
		^ true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11775
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11776
	]
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11777
    ].
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11778
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11779
    ^ self checkSelectionChangeAllowedWithCompare:false
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11780
1426
aa8bda9a1964 oops - handle the case that no source is available when checking
Claus Gittinger <cg@exept.de>
parents: 1419
diff changeset
 11781
    "Created: / 24.11.1995 / 11:03:33 / cg"
1535
1f32a2695303 ignore emphasis when comparing versions (in checkSelectionChangeAllowed)
Claus Gittinger <cg@exept.de>
parents: 1534
diff changeset
 11782
    "Modified: / 7.4.1998 / 09:49:52 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11783
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11784
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11785
checkSelectionChangeAllowedWithCompare:compareOffered
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11786
    "return true, if selection change is ok;
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11787
     its not ok, if code has been changed.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11788
     in this case, return the result of a user query"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11789
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11790
    |action labels values|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11791
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11792
    codeView modified ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11793
	codeModified ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11794
	    ^ true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11795
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11796
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11797
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11798
    compareOffered ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11799
	labels := #('cancel' 'compare' 'accept' 'continue').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11800
	values := #(false #compare #accept true).
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11801
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11802
	labels := #('cancel' 'accept' 'continue').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11803
	values := #(false #accept true).
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11804
    ].
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11805
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11806
    action := OptionBox 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11807
		  request:(resources at:'text has not been accepted.\\Your modifications will be lost when continuing.') withCRs
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11808
		  label:(resources string:'Attention')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11809
		  form:(WarningBox iconBitmap)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11810
		  buttonLabels:(resources array:labels)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11811
		  values:values
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11812
		  default:true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11813
    action ~~ #accept ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11814
	^ action
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11815
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11816
    codeView accept. 
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11817
    ^ true
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11818
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 11819
    "Created: / 24.11.1995 / 10:54:46 / cg"
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 11820
    "Modified: / 31.3.1998 / 23:36:55 / cg"
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11821
!
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11822
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11823
classHierarchyOf:aClass level:level do:aBlock using:subclassDictionary removeFrom:remainSet
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11824
    "evaluate the 2-arg block for every subclass of aClass,
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11825
     passing class and nesting level to the block."
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11826
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11827
    |names subclasses|
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11828
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11829
    remainSet remove:aClass ifAbsent:[].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11830
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11831
    aBlock value:aClass value:level.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11832
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11833
    subclasses := subclassDictionary at:aClass ifAbsent:[nil].
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11834
    (subclasses size == 0) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11835
	names := subclasses collect:[:class | class name].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11836
	names sortWith:subclasses.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11837
	subclasses do:[:aSubClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11838
	    self classHierarchyOf:aSubClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11839
			    level:(level + 1) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11840
			       do:aBlock 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11841
			    using:subclassDictionary
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11842
		       removeFrom:remainSet
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11843
	]
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11844
    ]
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11845
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11846
    "Created: 20.12.1996 / 17:05:06 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11847
    "Modified: 5.1.1997 / 18:45:41 / cg"
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11848
!
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11849
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11850
classHierarchyOf:topClass withAutoloaded:withAutoloaded do:aBlock
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11851
    "evaluate the 2-arg block for every class,
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11852
     starting at Object; passing class and nesting level to the block."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11853
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11854
    |classes s subclassDict l remaining allNameSpaces nameSpaceList|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11855
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11856
    classes := IdentitySet new.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11857
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11858
    "/ first, collect the list of classes to consider
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11859
    "/ thats all classes which are in the selected NameSpaces,
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11860
    "/ or private ones, owned by a class which is
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11861
    "/ also all of its superclasses are added.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11862
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11863
    allNameSpaces := (currentNamespace = '* all *').
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11864
    nameSpaceList := self listOfNamespaces.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11865
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11866
    Smalltalk allBehaviorsDo:[:aClass |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11867
        |actualNamespace match owner|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11868
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11869
        aClass isMeta ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11870
            (aClass isNameSpace not
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11871
            or:[aClass == Smalltalk]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11872
                match := allNameSpaces.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11873
                match ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11874
                    (owner := aClass topOwningClass) notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11875
                        actualNamespace := owner nameSpace
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11876
                    ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11877
                        actualNamespace := aClass nameSpace.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11878
                    ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11879
                    match := nameSpaceList includesIdentical:actualNamespace.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11880
                ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11881
                match ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11882
                    classes addAll:(aClass withAllSuperclasses).
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11883
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11884
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11885
        ]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11886
    ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11887
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11888
    "/ now, generate a dictionary, which associates a set of subclasses
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11889
    "/ to each ...
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11890
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11891
    subclassDict := IdentityDictionary new:classes size.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11892
    classes do:[:aClass |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11893
        s := aClass superclass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11894
        s notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11895
            l := subclassDict at:s ifAbsent:[nil].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11896
            l isNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11897
                l := OrderedCollection new:5.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11898
                subclassDict at:s put:l
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11899
            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11900
            l add:aClass
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11901
        ]
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
 11902
    ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11903
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11904
    "/
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11905
    "/ walk this ..
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11906
    "/
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11907
    remaining := classes.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11908
    self classHierarchyOf:topClass level:0 do:aBlock using:subclassDict removeFrom:remaining.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11909
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11910
    "/
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11911
    "/ if autoloaded classes are wanted ...
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11912
    "/
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11913
    withAutoloaded ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11914
        (remaining includes:Autoload) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11915
            self classHierarchyOf:Autoload level:0 do:aBlock using:subclassDict removeFrom:remaining.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11916
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11917
        (remaining asSortedCollection:[:a :b | a name < b name]) do:[:aNilSubclass |
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11918
            aBlock value:aNilSubclass value:0
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11919
        ]
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11920
    ].
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
 11921
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
 11922
    "Created: 28.5.1996 / 13:46:23 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11923
    "Modified: 5.1.1997 / 18:44:50 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11924
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11925
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11926
classesInFullProtocolHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11927
    "evaluate aBlock for all non-striked out classes in
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11928
     the hierarchy"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11929
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11930
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11931
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11932
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11933
    aClass withAllSuperclasses do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11934
	(classListView isInSelection:index) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11935
	    aBlock value:c
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11936
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11937
	index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11938
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11939
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11940
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11941
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11942
classesInHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11943
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11944
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11945
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11946
    aClass withAllSuperclasses do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11947
	(classListView isInSelection:index) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11948
	    aBlock value:c
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11949
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11950
	index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11951
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11952
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11953
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11954
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11955
clearAcceptAction
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11956
    "tell the codeView that there is nothing to accept"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11957
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11958
    codeView acceptAction:nil.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11959
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11960
    "Created: / 10.2.2000 / 14:13:25 / cg"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11961
!
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11962
2026
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11963
clearExplainAction
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11964
    "tell the codeView that there is nothing to explain"
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11965
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11966
    codeView explainAction:nil.
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11967
    codeView pointerOverWordAction:nil
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11968
!
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11969
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11970
compileCode:someCode
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11971
    (ReadStream on:someCode) fileIn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11972
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11973
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11974
enterBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11975
    "convenient method: setup enterBox with text from codeview"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11976
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11977
    ^ self enterBoxForCodeSelectionTitle:title withList:nil okText:okText
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11978
!
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11979
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11980
enterBoxForCodeSelectionTitle:title withList:listOrNil okText:okText
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11981
    "convenient method: setup enterBox with text from codeview"
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11982
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
 11983
    |sel box initialText superclass|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11984
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11985
    box := self 
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11986
                enterBoxTitle:(resources string:title) 
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11987
                withList:listOrNil
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11988
                okText:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11989
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11990
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11991
    sel notNil ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11992
        initialText := sel asString withoutSeparators
2012
b4c2dc90f899 present superclass in find-class dialog, if nothing is selected.
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
 11993
    ] ifFalse:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11994
        (currentClass notNil 
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11995
        and:[(superclass := currentClass superclass) notNil]) ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11996
            initialText := superclass name
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11997
        ]
2012
b4c2dc90f899 present superclass in find-class dialog, if nothing is selected.
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
 11998
    ].
b4c2dc90f899 present superclass in find-class dialog, if nothing is selected.
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
 11999
    initialText notNil ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12000
        box initialText:initialText
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12001
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12002
    ^ box
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12003
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
 12004
    "Modified: / 22.2.1999 / 18:57:22 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12005
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12006
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12007
enterBoxForSearchSelectorTitle:title
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12008
    "convenient method: setup enterBox with text from codeView or selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12009
     method for browsing based on a selector"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12010
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12011
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12012
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12013
    box := self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12014
		enterBoxTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12015
		okText:'search'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12016
		label:'search selector'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12017
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12018
    box initialText:(self selectorToSearchFor).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12019
    ^ box
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12020
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12021
    "Modified: 15.1.1997 / 23:10:26 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12022
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12023
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12024
enterBoxTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12025
    "convenient method: setup enterBox"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12026
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12027
    ^ self enterBoxTitle:title withList:nil okText:okText
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12028
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12029
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12030
enterBoxTitle:title okText:okText label:label
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12031
    "convenient method: setup enterBox"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12032
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12033
    |box|
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12034
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12035
    box := EnterBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12036
    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12037
    box title:(resources string:title) 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12038
	okText:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12039
    ^ box
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12040
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12041
    "Created: 15.1.1997 / 23:01:04 / cg"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12042
    "Modified: 16.1.1997 / 00:26:31 / cg"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12043
!
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12044
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12045
enterBoxTitle:title okText:okText label:label list:aList
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12046
    "convenient method: setup enterBox"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12047
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12048
    |box fieldHolder|
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12049
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12050
    fieldHolder := ValueHolder new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12051
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12052
    box := DialogBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12053
    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12054
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12055
    (box addTextLabel:(resources string:title)) adjust:#left.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12056
    box addVerticalSpace.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12057
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12058
    aList isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12059
	box addInputFieldOn:fieldHolder.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12060
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12061
	(box addComboBoxOn:fieldHolder) list:aList
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12062
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12063
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12064
    box addVerticalSpace:15.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12065
    box addAbortButton;
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12066
	addOkButtonLabelled:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12067
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
 12068
    box aspectAt:#fieldValue put:fieldHolder.
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
 12069
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12070
"/    box showAtPointer.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12071
"/
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12072
"/    box := EnterBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12073
"/    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12074
"/    box title:(resources string:title) 
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12075
"/        okText:(resources string:okText).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12076
    ^ box
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12077
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12078
    "Created: 15.1.1997 / 23:01:04 / cg"
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
 12079
    "Modified: 16.1.1997 / 20:13:28 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12080
!
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12081
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12082
enterBoxTitle:title withList:aListOrNil okText:okText
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12083
    "convenient method: setup enterBox"
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12084
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12085
    |box|
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12086
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12087
    aListOrNil notNil ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12088
        box := EnterBoxWithList new.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12089
        box list:aListOrNil.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12090
    ] ifFalse:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12091
        box := EnterBox new.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12092
    ].
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12093
    box title:(resources string:title) okText:(resources string:okText).
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12094
    ^ box
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12095
!
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12096
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12097
extractClassAndSelectorFromSelectionInto:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12098
    "given a string which can be either 'class>>sel' or
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12099
     'class sel', extract className and selector, and call aBlock with
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12100
    the result."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12101
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12102
    |sel clsName isMeta sep s|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12103
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12104
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12105
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12106
	sel := sel asString withoutSeparators.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12107
	('*>>*' match:sel) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12108
	    sep := $>
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12109
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12110
	    ('* *' match:sel) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12111
		sep := Character space
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12112
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12113
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12114
	sep notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12115
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12116
	     extract class/sel from selection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12117
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12118
	    s := ReadStream on:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12119
	    clsName := s upTo:sep.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12120
	    [s peek == sep] whileTrue:[s next].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12121
	    sel := s upToEnd.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12122
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12123
	    (clsName endsWith:' class') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12124
		isMeta := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12125
		clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12126
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12127
		isMeta := false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12128
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12129
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12130
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12131
    aBlock value:clsName value:sel value:isMeta
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12132
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
 12133
    "Modified: 17.6.1996 / 16:52:14 / stefan"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12134
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12135
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12136
findClassNamed:aClassName
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12137
    "search through namespaces for aClassName."
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12138
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12139
    |nm nameSym cls meta|
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12140
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12141
    meta := false.
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12142
    nm := aClassName.
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12143
    (nm endsWith:' class') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12144
	meta := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12145
	nm := nm copyWithoutLast:6.
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12146
    ].
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12147
    nameSym := nm asSymbol.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12148
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
 12149
    currentNamespace = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12150
	(cls := Smalltalk at:nameSym) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12151
	    meta ifTrue:[^ cls class].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12152
	    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12153
	]
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
 12154
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12155
    self listOfNamespaces do:[:aNamespace |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12156
	(cls := aNamespace at:nameSym) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12157
	    meta ifTrue:[^ cls class].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12158
	    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12159
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12160
    ].
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
 12161
    currentNamespace ~= '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12162
	(cls := Smalltalk at:nameSym) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12163
	    meta ifTrue:[^ cls class].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12164
	    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12165
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12166
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12167
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12168
    (nm startsWith:'Smalltalk::') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12169
	cls := Smalltalk classNamed:(nm copyFrom:'Smalltalk::' size + 1).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12170
	cls notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12171
	    meta ifTrue:[^ cls class].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12172
	    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12173
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12174
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12175
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12176
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12177
    "Created: 20.12.1996 / 15:39:38 / cg"
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12178
    "Modified: 23.1.1997 / 14:21:00 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12179
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12180
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12181
findClassNamedInNameSpace:aClassName
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
 12182
    "search through current namespaces for aClassName.
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
 12183
     Return the class or nil, if not found."
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
 12184
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
 12185
    |cls owner|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12186
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12187
    self listOfNamespaces do:[:aNamespace |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12188
	(cls := aNamespace at:aClassName asSymbol) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12189
	    (owner := cls topOwningClass) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12190
		owner nameSpace == aNamespace ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12191
		    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12192
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12193
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12194
		cls nameSpace == aNamespace ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12195
		    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12196
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12197
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12198
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12199
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12200
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12201
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12202
    "Created: 20.12.1996 / 17:41:54 / cg"
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
 12203
    "Modified: 3.1.1997 / 19:30:53 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12204
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12205
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12206
findClassOfVariable:aVariableName accessWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12207
    "this method returns the class, in which a variable
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12208
     is defined; 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12209
     needs either #instVarNames or #classVarNames as aSelector."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12210
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12211
    |cls homeClass list|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12212
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12213
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12214
     first, find the class, where the variable is declared
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12215
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12216
    cls := currentClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12217
    [cls notNil] whileTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12218
	aSelector == #classInstVarNames ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12219
	    list := cls class instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12220
	] ifFalse:[                             
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12221
	    list := cls perform:aSelector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12222
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12223
	(list includes:aVariableName) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12224
	    homeClass := cls.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12225
	    cls := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12226
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12227
	    cls := cls superclass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12228
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12229
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12230
    homeClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12231
	"nope, must be one below ... (could optimize a bit, by searching down
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12232
	 for the declaring class ...
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12233
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12234
	homeClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12235
    ] ifFalse:[
552
c61c0758c10b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 547
diff changeset
 12236
"/        Transcript showCR:'starting search in ' , homeClass name.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12237
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12238
    ^ homeClass
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12239
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12240
    "Modified: / 25.10.1997 / 20:26:25 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12241
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12242
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12243
hideMethodCategoryList
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12244
    classCategoryListView isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12245
	classListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12246
	    methodCategoryListView superView extent:0.0 @ 1.0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12247
	    methodListView superView origin:0.33 @ 0.0 extent:0.67 @ 1.0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12248
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12249
	^ self.
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12250
    ].
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12251
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12252
    methodCategoryListView superView extent:0.0 @ 1.0.
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12253
    methodListView superView origin:0.5 @ 0.0 extent:0.5 @ 1.0.
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12254
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12255
    "Created: 30.7.1997 / 17:50:27 / cg"
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12256
    "Modified: 30.7.1997 / 18:00:02 / cg"
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12257
!
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12258
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12259
listBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12260
    "convenient method: setup listBox with text from codeview"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12261
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12262
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12263
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12264
    box := self listBoxTitle:title okText:okText list:nil. 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12265
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12266
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12267
	box initialText:(sel asString withoutSeparators)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12268
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12269
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12270
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12271
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12272
listBoxTitle:title okText:okText list:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12273
    "convenient method: setup a listBox & return it"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12274
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12275
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12276
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12277
    box := ListSelectionBox 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12278
		title:(resources string:title)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12279
		okText:(resources string:okText)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12280
		action:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12281
    box list:aList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12282
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12283
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12284
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12285
normalLabel
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12286
    "set the normal (inactive) window- and icon labels"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12287
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12288
    |l il|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12289
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12290
    myLabel notNil ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12291
        "if I have been given an explicit label,
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12292
         and its not the default, take that one"
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12293
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12294
        myLabel ~= 'System Browser' ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12295
            l := il := myLabel
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12296
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12297
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12298
    l isNil ifTrue:[    
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12299
        l := resources string:'System Browser'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12300
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12301
        currentClass notNil ifTrue:[
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
 12302
"/            l := l, ': ', currentClass name.
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12303
            l := self displayedClassNameOf:currentClass.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12304
            classListView isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12305
                currentSelector notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12306
                    l := l , ' ' ,  currentSelector
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12307
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12308
            ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12309
                currentClass isLoaded ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12310
                    l := l , ' (unloaded)'
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12311
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12312
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12313
            il := currentClass nameWithoutPrefix
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12314
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12315
            il := l.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12316
        ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12317
    ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12318
    self topView label:l; iconLabel:il.
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12319
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12320
    "Modified: 18.8.1997 / 15:19:36 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12321
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12322
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12323
refetchMethod
1803
59fc7e02179e fixed update of implementing class in fullProtocol mode.
Claus Gittinger <cg@exept.de>
parents: 1802
diff changeset
 12324
    |sel cls stillSearching ignoredClasses|
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12325
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12326
    sel := currentSelector.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12327
    self releaseMethod.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12328
    currentSelector := sel.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12329
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12330
	currentMethod := (acceptClass ? actualClass) compiledMethodAt:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12331
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12332
	(currentMethod notNil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12333
	and:[currentMethod isWrapped]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12334
	    currentMethod originalMethod  addDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12335
	    currentMethod addDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12336
	]
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12337
    ]
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12338
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12339
    "Created: / 27.7.1998 / 11:09:35 / cg"
1803
59fc7e02179e fixed update of implementing class in fullProtocol mode.
Claus Gittinger <cg@exept.de>
parents: 1802
diff changeset
 12340
    "Modified: / 4.8.1998 / 20:04:47 / cg"
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12341
!
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12342
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
 12343
releaseClass
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
 12344
    |cls meta|
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
 12345
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
 12346
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12347
	cls := currentClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12348
	cls isMeta ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12349
	    meta := cls.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12350
	    cls := meta soleInstance
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12351
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12352
	    meta := cls class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12353
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12354
	cls removeDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12355
	meta removeDependent:self.
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
 12356
    ].
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
 12357
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
 12358
    "Created: 13.12.1995 / 15:32:21 / cg"
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
 12359
!
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
 12360
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12361
releaseMethod
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12362
    currentMethod notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12363
	currentMethod removeDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12364
	currentMethod isWrapped ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12365
	    currentMethod originalMethod removeDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12366
	]
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12367
    ].
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12368
    currentMethod := currentSelector := nil.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12369
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12370
    "Created: / 27.7.1998 / 10:56:00 / cg"
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12371
    "Modified: / 27.7.1998 / 11:26:52 / cg"
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12372
!
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12373
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12374
selectorToSearchFor
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12375
    "look in codeView and methodListView for a search-string when searching for selectors"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12376
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12377
    |sel t|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12378
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12379
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12380
    sel notNil ifTrue:[
2588
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12381
        t := BrowserView extractSelectorFrom:sel.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12382
        t notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12383
            sel := t.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12384
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12385
    ] ifFalse:[
2588
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12386
        methodListView notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12387
            methodListView selection notNil ifTrue:[
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 12388
sel := selectorList at:(methodListView selection).
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 12389
"/                sel := methodListView selectionValue string
2588
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12390
            ]
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12391
        ] ifFalse:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12392
            classMethodListView notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12393
                classMethodListView selection notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12394
                    sel := classMethodListView selectionValue string.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12395
                ].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12396
                sel notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12397
                    sel := self selectorFromClassMethodString:sel
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12398
                ]
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12399
            ]
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12400
        ].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12401
        sel notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12402
            sel := sel withoutSpaces upTo:(Character space)
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12403
        ] ifFalse:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12404
            sel := ''
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12405
        ]
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 12406
    ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 12407
    ^ sel string
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 12408
2588
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12409
    "Modified: / 6.2.2000 / 00:59:20 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12410
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12411
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12412
setAcceptActionForClass
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12413
    "tell the codeView what to do on accept and explain"
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12414
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12415
    currentClass isJavaClass ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12416
        ^ self setAcceptActionForJavaClass.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12417
    ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12418
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12419
    (currentClass isNameSpace and:[currentClass ~~ Smalltalk]) ifTrue:[
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12420
        self clearAcceptAction.
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12421
    ] ifFalse:[
2217
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12422
        codeView acceptAction:[:theCode |
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12423
            |ns|
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12424
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12425
            currentClass notNil ifTrue:[
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12426
                ns := currentClass nameSpace
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12427
            ] ifFalse:[
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12428
                ns := nil
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12429
            ].
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12430
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12431
            codeView withWaitCursorDo:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12432
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12433
                Class nameSpaceQuerySignal handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12434
                    ns isNil ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12435
                        ex reject
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12436
                    ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12437
                    ex proceedWith:ns
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12438
                ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12439
                    Object abortSignal catch:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12440
                        UndefinedObject createMinimumProtocolInNewSubclassQuery
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12441
                        answer:true
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12442
                        do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12443
                            (Class classRedefinitionSignal)handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12444
                                |answer oldVsNew oldPkg newPkg|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12445
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12446
                                oldVsNew := ex parameter.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12447
                                oldPkg := oldVsNew key package.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12448
                                newPkg := oldVsNew value package.
2485
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12449
"/ cg: now always keep the old packageID
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12450
                                answer := OptionBox 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12451
                                              request: 
2485
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12452
('You are about to change the definition of a class from another (system-) package.
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12453
The class is part of the ''%1'' package. 
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12454
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12455
PS: you can disable this check in the launchers settings-compilation dialog.' 
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12456
                                                  bindWith:(oldPkg asText allBold))
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12457
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12458
                                              label:'Class redefinition'
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12459
                                              form:(WarningBox iconBitmap)
2485
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12460
                                              buttonLabels:#('cancel' 'continue')
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12461
                                              values:#(#cancel #keep)
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12462
                                              default:#keep.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12463
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12464
                                (answer ~~ #cancel) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12465
                                    ex proceedWith:answer
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12466
                                ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12467
                            ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12468
                                |rslt|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12469
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12470
                                rslt := Compiler 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12471
                                            evaluate:theCode asString 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12472
                                            notifying:codeView 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12473
                                            compile:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12474
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12475
                                rslt isBehavior ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12476
                                    self classCategoryUpdate.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12477
                                    self updateClassListWithScroll:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12478
                                    codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12479
                                    codeModified := false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12480
                                ].
2217
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12481
                            ]
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12482
                        ]
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12483
                    ].
2217
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12484
                ].
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12485
            ].
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12486
        ].
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12487
    ]
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12488
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12489
    "Modified: / 10.2.2000 / 14:14:46 / cg"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12490
!
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12491
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12492
setAcceptActionForClassInstVars
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12493
    "tell the codeView what to do on accept"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12494
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12495
    codeView acceptAction:[:theCode |
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12496
        codeView withWaitCursorDo:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12497
            Object abortSignal catch:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12498
                Class nameSpaceQuerySignal answer:Smalltalk
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12499
                do:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12500
                    Compiler evaluate:theCode asString notifying:codeView compile:false.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12501
                ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12502
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12503
                codeView modified:false.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12504
                codeModified := false.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12505
                self normalLabel.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12506
                self updateClassList.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12507
            ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12508
        ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12509
    ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12510
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12511
    "Created: / 10.2.2000 / 14:11:59 / cg"
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12512
!
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12513
2632
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12514
setAcceptActionForFullClass
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12515
    "tell the codeView what to do on accept"
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12516
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12517
    codeView acceptAction:[:theCode |
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12518
        codeView withWaitCursorDo:[
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12519
            Object abortSignal catch:[
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12520
                self compileCode:theCode asString.
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12521
                codeView modified:false.
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12522
                codeModified := false.
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12523
            ].
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12524
        ].
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12525
    ].
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12526
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12527
    "Created: / 24.2.2000 / 15:50:03 / cg"
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12528
!
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 12529
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12530
setAcceptActionForJavaClass
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12531
    "tell the codeView what to do on accept and explain"
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12532
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12533
    self setAcceptActionForNewJavaClass 
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12534
!
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12535
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12536
setAcceptActionForNewClass
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12537
    "tell the codeView what to do on accept and explain"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12538
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12539
    codeView acceptAction:[:theCode |
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12540
        codeView withWaitCursorDo:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12541
            Object abortSignal catch:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12542
                |cls|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12543
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12544
                Object errorSignal handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12545
                    codeView error:ex errorString
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12546
                             position:1 to:nil from:nil.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12547
                ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12548
                    Class nameSpaceQuerySignal answer:Smalltalk
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12549
                    do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12550
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12551
                        cls := (Compiler evaluate:theCode asString notifying:codeView compile:false).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12552
                        cls isBehavior ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12553
                            codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12554
                            self classCategoryUpdate.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12555
                            self updateClassListWithScroll:false.
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12556
                            cls isNameSpace ifFalse:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12557
                                self switchToClassNamed:(cls name).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12558
                            ]
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12559
                        ]
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12560
                    ]
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12561
                ]
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12562
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12563
        ].
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12564
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12565
    self clearExplainAction.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12566
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12567
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12568
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12569
setAcceptActionForNewJavaClass
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12570
    "tell the codeView what to do on accept and explain"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12571
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12572
    codeView acceptAction:[:theCode |
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12573
        codeView withWaitCursorDo:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12574
            Object abortSignal catch:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12575
                |cls|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12576
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12577
                Object errorSignal handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12578
                    ex signal == Object haltSignal ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12579
                        ex reject
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12580
                    ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12581
                    codeView error:ex errorString position:1 to:nil from:nil.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12582
                ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12583
                    cls := JavaCompiler 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12584
                                evaluateClassDefinition:theCode asString 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12585
                                notifying:codeView.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12586
                    cls isBehavior ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12587
                        codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12588
                        self classCategoryUpdate.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12589
                        self updateClassListWithScroll:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12590
                        self switchToClassNamed:(cls name).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12591
                        self classDefinition.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12592
                    ]
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12593
                ]
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12594
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12595
        ].
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12596
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12597
    self clearExplainAction.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12598
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12599
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12600
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12601
setAcceptAndExplainActionsForMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12602
    "tell the codeView what to do on accept and explain"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12603
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12604
    codeView acceptAction:[:theCode |
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12605
        |cat cls rslt|
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12606
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12607
        fullProtocol ifTrue:[
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12608
            cls := acceptClass 
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12609
        ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12610
        cls isNil ifTrue:[
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12611
            cls := actualClass.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12612
            cls isNil ifTrue:[
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12613
                self warn:'oops class is gone; reselect and try again'.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12614
                ^ self
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12615
            ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12616
        ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12617
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12618
        codeView withWaitCursorDo:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12619
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12620
            (cat := currentMethodCategory) = '* all *' ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12621
                "must check from which category this code came from ...
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12622
                 ... thanks to Arno for pointing this out"
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12623
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12624
                cat := self askForMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12625
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12626
            (cat notNil and:[cat notEmpty]) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12627
                Object abortSignal catch:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12628
                    lockUpdates := true.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12629
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12630
                    (Class methodRedefinitionSignal) handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12631
                        |answer oldVsNew oldPkg newPkg|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12632
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12633
                        oldVsNew := ex parameter.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12634
                        oldPkg := oldVsNew key package.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12635
                        newPkg := oldVsNew value package.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12636
                        answer := OptionBox 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12637
                                      request: 
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12638
('You are about to change a method from another (system-) package.
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12639
The methods original packageID was ''%1''. 
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12640
If you proceed, the new method will be marked as belonging
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12641
to the ''%2'' package (and this warning will not be shown again).
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12642
If you proceed with ''keep'', the new method will be installed
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12643
but the old packageID will be preserved.
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12644
Otherwise, hit ''cancel'' to leave the code unchanged.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12645
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12646
PS: you can disable these checks in the launchers settings-compilation dialog.' 
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12647
                                            bindWith:(oldPkg asText allBold)
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12648
                                                with:(newPkg asText allBold))
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12649
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12650
                                      label:'Method redefinition'
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12651
                                      form:(WarningBox iconBitmap)
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12652
                                      buttonLabels:#('cancel' 'keep' 'continue')
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12653
                                      values:#(#cancel #keep #continue)
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12654
                                      default:#continue.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12655
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12656
                        (answer ~~ #cancel) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12657
                            ex proceedWith:answer
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12658
                        ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12659
                    ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12660
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12661
                        rslt := actualClass compilerClass 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12662
                            compile:theCode asString
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12663
                            forClass:cls
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12664
                            inCategory:cat 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12665
                            notifying:codeView.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12666
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12667
                        codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12668
                        codeModified := false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12669
                        currentMethod := actualClass compiledMethodAt:currentSelector.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12670
                        methodCategoryListView notNil ifTrue:[    
2513
e8f2d01f7ff3 care for no methodCategoryList
Claus Gittinger <cg@exept.de>
parents: 2506
diff changeset
 12671
                            ((methodCategoryListView list ? #()) includes:cat) ifFalse:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12672
                                self updateMethodCategoryListWithScroll:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12673
                            ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12674
                        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12675
                        self updateMethodListWithScroll:false keepSelection:(rslt == currentMethod).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12676
                        self normalLabel.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12677
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12678
                        rslt isMethod ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12679
                            self checkAcceptedMethod:rslt inClass:actualClass.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12680
                        ]
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12681
                    ]
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12682
                ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12683
                lockUpdates := false.
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12684
            ].
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12685
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12686
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12687
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12688
    codeView explainAction:[:theCode :theSelection |
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12689
        self showExplanation:(Explainer 
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12690
                                explain:theSelection 
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12691
                                in:theCode
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12692
                                forClass:actualClass)
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12693
    ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12694
    BRFormatter notNil ifTrue:[
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12695
        "/ use the refactoryBrowser for formatting, if present
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12696
        codeView formatAction:[:theCode |
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12697
            self methodFormatMethod:theCode.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12698
        ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12699
    ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12700
2026
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12701
"/ future feature ...
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12702
"/    codeView pointerOverWordAction:[:word :line :col |
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12703
"/        word isAlphaNumeric ifTrue:[
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12704
"/            Transcript showCR:(Explainer 
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12705
"/                                explain:word 
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12706
"/                                in:codeView contents
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12707
"/                                forClass:actualClass)
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12708
"/        ]
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12709
"/    ].
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12710
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12711
    "Modified: / 10.2.2000 / 14:17:14 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12712
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12713
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12714
setDoitActionForClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12715
    "tell the codeView what to do on doIt"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12716
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12717
    "set self for doits. This allows accessing the current class
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12718
     as self, and access to the class variables by name.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12719
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12720
    codeView doItAction:[:theCode |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12721
	|compiler ns|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12722
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12723
	currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12724
	    ns := currentClass nameSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12725
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12726
	    ns := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12727
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12728
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12729
	Class nameSpaceQuerySignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12730
	    ns isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12731
		ex reject
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12732
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12733
	    ex proceedWith:ns
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12734
	] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12735
	    currentClass isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12736
		compiler := Compiler
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12737
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12738
		compiler := currentClass evaluatorClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12739
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12740
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12741
	    compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12742
		evaluate:theCode 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12743
		in:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12744
		receiver:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12745
		notifying:codeView 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12746
		logged:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12747
		ifFail:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12748
	]
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12749
    ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12750
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12751
    "Modified: / 17.6.1998 / 11:35:44 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12752
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12753
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12754
setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12755
    codeView setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12756
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12757
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12758
showExplanation:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12759
    "show explanation from Parser"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12760
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12761
    self information:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12762
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12763
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12764
showMethodCategoryList
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12765
    classCategoryListView isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12766
	classListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12767
	    methodCategoryListView superView extent:0.33 @ 1.0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12768
	    methodListView superView origin:0.66 @ 0.0 extent:0.34 @ 1.0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12769
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12770
	^ self.
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12771
    ].
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 12772
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12773
	methodCategoryListView superView extent:0.25 @ 1.0.
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 12774
    ].
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 12775
    methodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12776
	methodListView superView origin:0.75 @ 0.0 extent:0.25 @ 1.0.
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 12777
    ].
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12778
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12779
    "Created: 30.7.1997 / 17:50:20 / cg"
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 12780
    "Modified: 16.8.1997 / 03:28:23 / cg"
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12781
!
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12782
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12783
stringToSearchFor
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12784
    "look in codeView and methodListView for a search-string when searching for classes/names"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12785
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12786
    |sel|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12787
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12788
    sel := codeView selection.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12789
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12790
	sel := sel asString withoutSpaces
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12791
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12792
	sel isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12793
	    currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12794
		sel := currentClass name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12795
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12796
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12797
	sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12798
	    sel := sel withoutSpaces
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12799
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12800
	    sel := ''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12801
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12802
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12803
    ^ sel
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12804
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12805
    "Created: / 17.6.1998 / 12:42:31 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12806
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12807
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12808
warnLabel:what
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12809
    "set the title for some warning"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12810
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12811
    self topView label:('System Browser WARNING: ' , what)
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12812
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12813
    "Modified: 18.8.1997 / 15:19:56 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12814
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12815
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12816
warnObsoleteCode:whatHappened
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12817
    "invoked, when someone else has changed what I am showing
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12818
     currently. Change my window label and show the text in red."
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12819
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12820
    self warnLabel:whatHappened.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12821
    codeView contents:(codeView contents asText 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12822
			emphasizeAllWith:(#color->Color red))
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12823
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12824
    "Modified: / 17.6.1998 / 12:40:46 / cg"
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12825
    "Created: / 17.6.1998 / 12:42:12 / cg"
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12826
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12827
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12828
withBusyCursorDo:aBlock
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12829
    ^ self topView withWaitCursorDo:aBlock
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12830
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12831
    "Created: 18.8.1997 / 15:41:52 / cg"
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12832
!
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12833
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12834
withSearchCursorDo:aBlock
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12835
    ^ self topView withCursor:(Cursor questionMark) do:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12836
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12837
    "Created: 23.11.1995 / 14:11:14 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12838
    "Modified: 18.8.1997 / 15:40:19 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12839
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12840
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12841
!BrowserView methodsFor:'private - defaults'!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12842
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12843
canvasIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12844
    "answer an icon to mark canvas (windowSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12845
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12846
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12847
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12848
    ^ icons at:#canvas ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12849
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12850
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12851
	CanvasIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12852
	    CanvasIcon := self class canvasIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12853
	    CanvasIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12854
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12855
	CanvasIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12856
	    (CanvasIcon magnifiedBy:(fh / CanvasIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12857
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12858
	    CanvasIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12859
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12860
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12861
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12862
    "Modified: / 26.7.1998 / 14:04:10 / cg"
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12863
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12864
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12865
fileImageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12866
    "answer an icon to mark fileImage methods"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12867
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12868
    ^ self imageIcon
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12869
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12870
    "Modified: / 7.4.1997 / 17:31:40 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12871
    "Created: / 29.10.1997 / 03:32:05 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12872
!
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12873
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12874
globalClassIdentifierEmphasisAndColor
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12875
    |prefs|
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12876
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12877
    prefs := UserPreferences current.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12878
    ^ Text 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12879
        addEmphasis:(prefs globalClassIdentifierEmphasis) to:(#color->prefs globalClassIdentifierColor).
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12880
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12881
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12882
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12883
helpIcon
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12884
    "answer an icon to mark help spec methods"
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12885
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12886
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12887
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12888
    ^ icons at:#help ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12889
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12890
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12891
	HelpIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12892
	    HelpIcon := self class helpIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12893
	    HelpIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12894
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12895
	HelpIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12896
	    (HelpIcon magnifiedBy:(fh / HelpIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12897
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12898
	    HelpIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12899
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12900
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12901
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12902
    "Modified: / 26.7.1998 / 14:03:50 / cg"
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12903
!
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12904
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12905
hierarchicalListIcon
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12906
    "answer an icon to mark hierarchicalList spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12907
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12908
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12909
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12910
    ^ icons at:#hierarchicalList ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12911
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12912
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12913
	HierarchicalListIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12914
	    HierarchicalListIcon := self class hierarchicalListIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12915
	    HierarchicalListIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12916
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12917
	HierarchicalListIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12918
	    (HierarchicalListIcon magnifiedBy:(fh / ImageIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12919
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12920
	    HierarchicalListIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12921
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12922
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12923
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12924
    "Modified: / 26.7.1998 / 14:03:31 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12925
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12926
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12927
imageIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12928
    "answer an icon to mark image spec methods"
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12929
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12930
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12931
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12932
    ^ icons at:#image ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12933
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12934
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12935
	ImageIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12936
	    ImageIcon := self class imageIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12937
	    ImageIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12938
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12939
	ImageIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12940
	    (ImageIcon magnifiedBy:(fh / ImageIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12941
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12942
	    ImageIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12943
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12944
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12945
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12946
    "Modified: / 26.7.1998 / 14:02:58 / cg"
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12947
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12948
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12949
menuIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12950
    "answer an icon to mark menu spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12951
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12952
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12953
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12954
    ^ icons at:#menu ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12955
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12956
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12957
	MenuIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12958
	    MenuIcon := self class menuIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12959
	    MenuIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12960
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12961
	MenuIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12962
	    (MenuIcon magnifiedBy:(fh / MenuIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12963
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12964
	    MenuIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12965
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12966
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12967
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12968
    "Modified: / 26.7.1998 / 14:02:40 / cg"
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12969
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12970
1851
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12971
programImageIcon
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12972
    "answer an icon to mark program-image spec methods"
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12973
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12974
    ^ self imageIcon
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12975
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12976
    "Created: / 24.8.1998 / 21:37:38 / cg"
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12977
!
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12978
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12979
programMenuIcon
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12980
    "answer an icon to mark menu spec methods"
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12981
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12982
    icons isNil ifTrue:[icons := IdentityDictionary new].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12983
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12984
    ^ icons at:#programMenu ifAbsentPut:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12985
        |fh m|
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12986
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12987
        m := self class programMenuIcon onDevice:Display.
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12988
        m clearMaskedPixels.
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12989
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12990
        m height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12991
            (m magnifiedBy:(fh / m height)) onDevice:device
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12992
        ] ifFalse:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12993
            m onDevice:device.
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12994
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12995
      ]
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 12996
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12997
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12998
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12999
stopIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13000
    "answer an icon to mark breakPointed methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13001
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13002
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13003
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13004
    ^ icons at:#stop ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13005
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13006
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13007
	StopIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13008
	    StopIcon := self class stopIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13009
	    StopIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13010
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13011
	StopIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13012
	    (StopIcon magnifiedBy:(fh / StopIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13013
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13014
	    StopIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13015
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13016
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13017
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13018
    "Modified: / 26.7.1998 / 13:58:00 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13019
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13020
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13021
tabListIcon
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13022
    "answer an icon to mark tabList spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13023
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13024
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13025
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13026
    ^ icons at:#tabList ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13027
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13028
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13029
	TabListIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13030
	    TabListIcon := self class tabListIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13031
	    TabListIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13032
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13033
	TabListIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13034
	    (TabListIcon magnifiedBy:(fh / TabListIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13035
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13036
	    TabListIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13037
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13038
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13039
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13040
    "Modified: / 26.7.1998 / 14:02:11 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13041
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13042
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13043
tableColumnsIcon
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13044
    "answer an icon to mark tableColumns spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13045
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13046
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13047
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13048
    ^ icons at:#tableColumns ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13049
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13050
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13051
	TableColumnsIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13052
	    TableColumnsIcon := self class tableColumnsIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13053
	    TableColumnsIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13054
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13055
	TableColumnsIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13056
	    (TableColumnsIcon magnifiedBy:(fh / TableColumnsIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13057
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13058
	    TableColumnsIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13059
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13060
    ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13061
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13062
    "Modified: / 26.7.1998 / 14:01:41 / cg"
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13063
!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13064
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13065
timeIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13066
    "answer an icon to mark timed methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13067
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13068
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13069
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13070
    ^ icons at:#time ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13071
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13072
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13073
	TimeIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13074
	    TimeIcon := self class timeIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13075
	    TimeIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13076
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13077
	TimeIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13078
	    (TimeIcon magnifiedBy:(fh / TimeIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13079
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13080
	    TimeIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13081
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13082
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13083
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13084
    "Modified: / 26.7.1998 / 14:00:34 / cg"
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13085
!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13086
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13087
traceIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13088
    "answer an icon to mark traced methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13089
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13090
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13091
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13092
    ^ icons at:#trace ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13093
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13094
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13095
	TraceIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13096
	    TraceIcon := self class traceIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13097
	    TraceIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13098
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13099
	TraceIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13100
	    (TraceIcon magnifiedBy:(fh / TraceIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13101
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13102
	    TraceIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13103
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13104
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13105
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13106
    "Modified: / 26.7.1998 / 14:01:02 / cg"
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13107
! !
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13108
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13109
!BrowserView methodsFor:'syntax coloring'!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13110
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13111
startSyntaxHighlightProcess
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13112
    "start a background process, which does the syntax coloring.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13113
     When it finishes, it pushes a user event to install the new
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13114
     text. 
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13115
     (This is done as a event to synchronize the coloring with modifications
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13116
      done to the text - the colored text will discarded, if there were
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13117
      any modifications in the meanwhile)"
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13118
2264
036fa673217d lower prio of syntaxProcess even more, if topView is not visible
Claus Gittinger <cg@exept.de>
parents: 2261
diff changeset
 13119
    |oldCodeList highlighter t prio|
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13120
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13121
    coloringProcess notNil ifTrue:[
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13122
        coloringProcess terminate.
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13123
        coloringProcess := nil.
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13124
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13125
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13126
    currentMethod isNil ifTrue:[^ self].
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13127
    UserPreferences current syntaxColoring == true ifFalse:[^ self].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13128
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13129
    highlighter := actualClass syntaxHighlighterClass.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13130
    highlighter isNil ifTrue:[^ self].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13131
2272
6eda2d09f226 even lower syntaxHighlighting prio
Claus Gittinger <cg@exept.de>
parents: 2264
diff changeset
 13132
    prio := Processor userBackgroundPriority - 1.
2264
036fa673217d lower prio of syntaxProcess even more, if topView is not visible
Claus Gittinger <cg@exept.de>
parents: 2261
diff changeset
 13133
    self topView shown ifFalse:[
2272
6eda2d09f226 even lower syntaxHighlighting prio
Claus Gittinger <cg@exept.de>
parents: 2264
diff changeset
 13134
        prio := (prio - 1 max:1).
2264
036fa673217d lower prio of syntaxProcess even more, if topView is not visible
Claus Gittinger <cg@exept.de>
parents: 2261
diff changeset
 13135
    ].
036fa673217d lower prio of syntaxProcess even more, if topView is not visible
Claus Gittinger <cg@exept.de>
parents: 2261
diff changeset
 13136
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13137
    coloringProcess := [
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13138
        |oldCode newCode cls sensor|
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13139
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13140
        [
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13141
            codeView modified ifFalse:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13142
                oldCodeList := codeView list copy.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13143
                codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13144
                    oldCodeList isNil ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13145
                        oldCode := oldCodeList asStringWithoutEmphasis.
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13146
                        codeView modified ifFalse:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13147
                            "/ oldCode := oldCodeList asStringWithoutEmphasis.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13148
                            cls := actualClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13149
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13150
                            codeView modified ifFalse:[
2431
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 13151
                                Screen currentScreenQuerySignal answer:device
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 13152
                                do:[
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 13153
                                    newCode := highlighter formatMethod:oldCode in:cls.
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 13154
                                ].
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 13155
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13156
                                "/ must add this event - and not been interrupted
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13157
                                "/ by any arriving key-event.
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13158
                                codeView modified ifFalse:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13159
                                    newCode := newCode asStringCollection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13160
                                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13161
                                        coloringProcess := nil.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13162
                                        (sensor := self sensor) notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13163
                                            sensor
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13164
                                                pushUserEvent:#syntaxHighlightedCode: for:self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13165
                                                withArguments:(Array with:newCode).
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13166
                                        ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13167
                                    ]
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13168
                                ]
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13169
                            ].
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13170
                        ].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13171
                    ].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13172
                ].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13173
            ].
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13174
        ] valueNowOrOnUnwindDo:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13175
            coloringProcess := nil.
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13176
        ].
2264
036fa673217d lower prio of syntaxProcess even more, if topView is not visible
Claus Gittinger <cg@exept.de>
parents: 2261
diff changeset
 13177
    ] forkAt:prio.
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13178
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13179
    codeView modified:false.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13180
    codeView modifiedChannel onChangeSend:#codeChanged to:self.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13181
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13182
    "Created: / 31.3.1998 / 14:25:29 / cg"
1715
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
 13183
    "Modified: / 9.7.1998 / 00:25:51 / cg"
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13184
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13185
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13186
stopSyntaxHighlightProcess
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13187
    "stop any background process, which does the syntax coloring."
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13188
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13189
    |p|
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13190
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13191
    (p := coloringProcess) notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13192
        coloringProcess := nil.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13193
        p terminate.
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13194
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13195
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13196
    "Modified: / 17.6.1998 / 16:45:18 / cg"
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13197
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13198
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13199
syntaxHighlightedCode:newCode
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13200
    "the background highlighter has generated new colored text,
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13201
     with highlighted syntax.
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13202
     If there have been no modifications in the meantime, install it."
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13203
2428
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13204
    |firstShown lastShown sensor cursorWasOn anyChange newLines l
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13205
     replaceAction|
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13206
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13207
    codeView modified ifTrue:[
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13208
        "/ new input arrived in the meantime
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13209
        ^ self
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13210
    ].
2254
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 13211
"/    codeView hasSelection ifTrue:[
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 13212
"/        "/ something selected - dont overwrite (is this agood idea ?)
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 13213
"/        ^ self
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 13214
"/    ].
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13215
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13216
    coloringProcess notNil ifTrue:[
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13217
        "/ another coloring process has already been started.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13218
        "/ ignore this (leftover) code.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13219
        ^ self
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13220
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13221
    currentMethod isNil ifTrue:[
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13222
        "/ have already switched to some other method,
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13223
        "/ or closed.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13224
        ^ self
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13225
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13226
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13227
    firstShown := codeView firstLineShown.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13228
    lastShown := codeView lastLineShown.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13229
    sensor := self sensor.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13230
2428
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13231
    replaceAction := [:lNr :line |
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13232
        |oldLine|
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13233
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13234
        oldLine := codeView listAt:lNr.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13235
        oldLine notNil ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13236
            line notNil ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13237
                "/ this check is needed - there is a race 
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13238
                "/ when the text is converted. This detects the 
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13239
                "/ resulting error.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13240
                "/ Certainly a kludge. 
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13241
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13242
                oldLine string = line string ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13243
                    oldLine emphasis ~= line emphasis ifTrue:[
2668
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13244
                        codeView list at:lNr put:line.
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13245
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13246
                        codeView withoutRedrawAt:lNr put:line.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13247
                        (lNr between:firstShown and:lastShown) ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13248
                            anyChange ifFalse:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13249
                                anyChange := true.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13250
                                cursorWasOn := codeView hideCursor
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13251
                            ].
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13252
                            codeView redrawLine:lNr.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13253
                        ]
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13254
                    ]
1720
d76ee513d34e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
 13255
"/                ] ifFalse:[
d76ee513d34e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
 13256
"/                    oldLine string printCR.
d76ee513d34e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
 13257
"/                    line string printCR.
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13258
                ]
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13259
            ]
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13260
        ].
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13261
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13262
        "/ stop when keyboard input arrives ...
2429
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13263
"/ cg: commented - thats done when text is modified ...
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13264
"/        (sensor hasUserEvents) ifTrue:[
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13265
"/            (sensor hasKeyPressEventFor:nil) ifTrue:[
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13266
"/                (anyChange and:[cursorWasOn]) ifTrue:[codeView showCursor].
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13267
"/                ^ self.
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13268
"/            ]
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13269
"/        ]
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13270
    ].
2428
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13271
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13272
    anyChange := false.
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13273
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13274
    newLines := newCode asStringCollection.
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13275
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13276
    "/ the cursor line first - thats where your eyes are ...
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13277
    (l := codeView cursorLine) notNil ifTrue:[
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13278
        l <= newLines size ifTrue:[
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13279
            replaceAction value:l value:(newLines at:l)
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13280
        ]
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13281
    ].
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13282
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13283
    newLines keysAndValuesDo:replaceAction.
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13284
2668
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13285
    anyChange ifTrue:[
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13286
        codeView textChanged.
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13287
        cursorWasOn ifTrue:[
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13288
            codeView showCursor
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13289
        ]
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13290
    ].
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13291
1995
ef8e49bf56d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1993
diff changeset
 13292
    "Modified: / 5.2.1999 / 22:29:17 / cg"
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13293
! !
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13294
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13295
!BrowserView methodsFor:'unused'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13296
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13297
listOfAllMethodCategoriesInHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13298
    "answer a list of all method categories of the argument, aClass,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13299
     and all of its superclasses"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13300
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13301
    |newList cat|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13302
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13303
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13304
    self classesInHierarchy:aClass do:[:c |
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
 13305
        newList addAll:(c categories).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13306
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13307
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13308
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13309
    ^ newList asOrderedCollection sort
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13310
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 13311
    "Modified: 7.6.1996 / 09:03:22 / stefan"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13312
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13313
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13314
listOfAllSelectorsInCategory:aCategory inHierarchyOfClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13315
    "answer a list of all selectors in a given method category 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13316
     of the argument, aClass and its superclasses"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13317
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13318
    |newList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13319
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13320
    newList := Set new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13321
    self classesInHierarchy:aClass do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13322
	|searchCategory|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13323
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13324
	(aCategory = '* all *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13325
	    newList addAll:(c methodDictionary keys)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13326
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13327
	    (aCategory = '* no category *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13328
		searchCategory := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13329
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13330
		searchCategory := aCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13331
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13332
	    c methodDictionary keysAndValuesDo:[:selector :aMethod |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13333
		(aMethod category = searchCategory) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13334
		    newList add:selector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13335
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13336
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13337
	].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13338
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13339
    (newList size == 0) ifTrue:[^ nil].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13340
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 13341
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 13342
    "Modified: 5.6.1996 / 11:42:12 / stefan"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13343
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13344
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13345
!BrowserView methodsFor:'variable list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13346
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13347
allClassInstVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13348
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13349
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13350
    self allVarRefsTitle:'class instance variable to browse all modifications of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13351
		  access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13352
		    mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13353
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13354
    "Modified: / 25.10.1997 / 20:19:49 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13355
    "Created: / 25.10.1997 / 20:21:48 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13356
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13357
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13358
allClassInstVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13359
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13360
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13361
    self allVarRefsTitle:'class instance variable to browse all references to:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13362
		  access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13363
		    mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13364
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13365
    "Modified: / 25.10.1997 / 20:20:09 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13366
    "Created: / 25.10.1997 / 20:22:14 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13367
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13368
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13369
allClassVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13370
    "show an enterbox for classVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13371
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13372
    self allVarRefsTitle:'class variable to browse all modifications of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13373
		  access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13374
		    mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13375
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13376
    "Modified: / 25.10.1997 / 20:22:24 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13377
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13378
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13379
allClassVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13380
    "show an enterbox for classVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13381
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13382
    self allVarRefsTitle:'class variable to browse all references to:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13383
		  access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13384
		    mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13385
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13386
    "Modified: / 25.10.1997 / 20:22:30 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13387
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13388
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13389
allInstVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13390
    "show an enterbox for instVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13391
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13392
    self allVarRefsTitle:'instance variable to browse all modifications of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13393
		  access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13394
		    mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13395
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13396
    "Modified: / 25.10.1997 / 20:22:35 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13397
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13398
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13399
allInstVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13400
    "show an enterbox for instVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13401
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13402
    self allVarRefsTitle:'instance variable to browse all references to:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13403
		  access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13404
		    mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13405
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13406
    "Modified: / 25.10.1997 / 20:22:40 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13407
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13408
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13409
allVarRefsTitle:title access:access mods:modifications
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13410
    "show an enterbox for instVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13411
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13412
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13413
	|box|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13414
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13415
	box := self enterBoxForVariableSearch:title.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13416
	box action:[:aVariableName |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13417
	    |homeClass|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13418
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13419
	    aVariableName isEmpty ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13420
		self withSearchCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13421
		    homeClass := self findClassOfVariable:aVariableName accessWith:access.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13422
		    access == #classVarNames ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13423
			SystemBrowser 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13424
			    browseClassRefsTo:aVariableName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13425
			    under:homeClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13426
			    modificationsOnly:modifications
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13427
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13428
			access == #classInstVarNames ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13429
			    SystemBrowser 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13430
				browseInstRefsTo:aVariableName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13431
				under:homeClass class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13432
				modificationsOnly:modifications
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13433
			] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13434
			    SystemBrowser 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13435
				browseInstRefsTo:aVariableName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13436
				under:homeClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13437
				modificationsOnly:modifications
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13438
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13439
		     ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13440
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13441
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13442
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13443
	box showAtPointer
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13444
    ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13445
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13446
    "Created: / 25.10.1997 / 20:19:26 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13447
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13448
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13449
classInstVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13450
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13451
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13452
    self varRefsOrModsTitle:'class instance variable to browse modifications of:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13453
		     access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13454
		       mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13455
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13456
    "Modified: / 25.10.1997 / 20:17:41 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13457
    "Created: / 25.10.1997 / 20:21:04 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13458
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13459
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13460
classInstVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13461
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13462
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13463
    self varRefsOrModsTitle:'class instance variable to browse references to:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13464
		     access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13465
		       mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13466
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13467
    "Modified: / 25.10.1997 / 20:17:23 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13468
    "Created: / 25.10.1997 / 20:21:19 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13469
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13470
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13471
classVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13472
    "show an enterbox for classVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13473
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13474
    self varRefsOrModsTitle:'class variable to browse modifications of:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13475
		     access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13476
		       mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13477
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13478
    "Modified: / 25.10.1997 / 20:17:41 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13479
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13480
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13481
classVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13482
    "show an enterbox for classVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13483
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13484
    self varRefsOrModsTitle:'class variable to browse references to:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13485
		     access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13486
		       mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13487
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13488
    "Modified: / 25.10.1997 / 20:17:23 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13489
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13490
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13491
enterBoxForVariableSearch:title
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13492
    |box sel|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13493
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13494
    box := self enterBoxForCodeSelectionTitle:title okText:'browse'.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13495
    variableListView notNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13496
        codeView hasSelection ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13497
            (sel := variableListView selectionValue) notNil ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13498
                (sel startsWith:'-') ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13499
                    box initialText:sel
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13500
                ]
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13501
            ]
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13502
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13503
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13504
    ^ box
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13505
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13506
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13507
instVarMods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13508
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13509
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13510
    self varRefsOrModsTitle:'instance variable to browse modifications of:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13511
		     access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13512
		       mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13513
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13514
    "Modified: / 25.10.1997 / 20:14:52 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13515
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13516
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13517
instVarRefs
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13518
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13519
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13520
    self varRefsOrModsTitle:'instance variable to browse references to:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13521
		     access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13522
		       mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13523
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13524
    "Modified: / 25.10.1997 / 20:14:27 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13525
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13526
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13527
showClassInstVars
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13528
    classInstVarsInVarList := true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13529
    self updateVariableList.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13530
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13531
    "Created: / 25.10.1997 / 19:43:04 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13532
    "Modified: / 25.10.1997 / 19:43:41 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13533
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13534
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13535
showClassVars
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13536
    classInstVarsInVarList := false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13537
    self updateVariableList.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13538
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13539
    "Created: / 25.10.1997 / 19:42:55 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13540
    "Modified: / 25.10.1997 / 19:43:35 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13541
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13542
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13543
varInspect
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13544
    "open an inspector on the value of a classVar / classInstVar"
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13545
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13546
    |name searchClass dict|
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13547
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13548
    name := variableListView selectionValue.
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13549
    name isNil ifTrue:[^ self].
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13550
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13551
    showInstance ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13552
	"/ inspect an instVar
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13553
	"/ create a dictionary of all instances with their current value there
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13554
	dict := IdentityDictionary new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13555
	currentClass allInstancesDo:[:i |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13556
	    dict at:i put:(i instVarNamed:name).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13557
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13558
	(dict size == 0) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13559
	    self warn:'there are currently no instances of ' , currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13560
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13561
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13562
	dict inspect
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13563
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13564
	(classInstVarsInVarList) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13565
	    "/ inspect a classVar
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13566
	    searchClass := currentClass whichClassDefinesClassVar:name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13567
	    (searchClass classVarAt:(name asSymbol)) inspect
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13568
	] ifTrue:[        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13569
	    "/ inspect a classInstVar
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13570
	    (currentClass instVarNamed:name) inspect.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13571
	].
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13572
    ].
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13573
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
 13574
    "Modified: / 16.10.1998 / 00:37:58 / cg"
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13575
!
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13576
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13577
varRefsOrModsTitle:title access:accessor mods:mods
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13578
    "show an enterbox for instvar to search for"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13579
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13580
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13581
	|box|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13582
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13583
	box := self enterBoxForVariableSearch:title.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13584
	box action:[:aString |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13585
	    aString notEmpty ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13586
		self withSearchCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13587
		    |sel classes|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13588
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13589
		    sel := #'browseInstRefsTo:in:modificationsOnly:'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13590
		    accessor == #classInstVarNames ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13591
			classes := Array with:currentClass class.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13592
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13593
			classes := Array with:currentClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13594
			accessor == #classVarNames ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13595
			    sel := #'browseClassRefsTo:in:modificationsOnly:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13596
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13597
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13598
		    SystemBrowser perform:sel with:aString with:classes with:mods 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13599
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13600
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13601
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13602
	box showAtPointer
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13603
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13604
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13605
    "Created: / 25.10.1997 / 20:12:52 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13606
    "Modified: / 25.10.1997 / 21:10:34 / cg"
93
claus
parents: 92
diff changeset
 13607
!
claus
parents: 92
diff changeset
 13608
claus
parents: 92
diff changeset
 13609
varTypeInfo
claus
parents: 92
diff changeset
 13610
    "show typical usage of a variable"
claus
parents: 92
diff changeset
 13611
claus
parents: 92
diff changeset
 13612
    |name idx classes values value msg cut names instCount subInstCount box
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13613
     searchClass s canInspect|
93
claus
parents: 92
diff changeset
 13614
claus
parents: 92
diff changeset
 13615
    name := variableListView selectionValue.
claus
parents: 92
diff changeset
 13616
    name isNil ifTrue:[^ self].
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13617
    name := name asText allBold.
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13618
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13619
    canInspect := false.
93
claus
parents: 92
diff changeset
 13620
1390
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 13621
    (classInstVarsInVarList or:[showInstance]) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13622
	searchClass := currentClass whichClassDefinesClassVar:name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13623
	value := searchClass classVarAt:(name asSymbol).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13624
	s := value displayString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13625
	s size > 60 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13626
	    s := (s copyTo:60) , ' ...'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13627
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13628
	msg := name , ' is (currently):\\' , s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13629
	s ~= value classNameWithArticle ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13630
	    msg := msg , '\\(' , value class name , ')'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13631
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13632
	canInspect := true.
1390
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 13633
    ] ifTrue:[        
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13634
	searchClass := actualClass whichClassDefinesInstVar:name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13635
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13636
	idx := searchClass instVarOffsetOf:name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13637
	idx isNil ifTrue:[^ self].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13638
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13639
	classes := IdentitySet new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13640
	values := IdentitySet new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13641
	instCount := 0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13642
	subInstCount := 0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13643
	searchClass allSubInstancesDo:[:i |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13644
	    |val|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13645
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13646
	    val := i instVarAt:idx.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13647
	    val notNil ifTrue:[values add:val].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13648
	    classes add:val class.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13649
	    (i isMemberOf:searchClass) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13650
		instCount := instCount + 1.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13651
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13652
		subInstCount := subInstCount + 1
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13653
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13654
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13655
	(instCount == 0 and:[subInstCount == 0]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13656
	    self warn:'there are currently no instances of ' , currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13657
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13658
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13659
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13660
	instCount ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13661
	    msg := 'in (currently: ' , instCount printString,') instances '.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13662
	    subInstCount ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13663
		msg := msg , 'and '
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13664
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13665
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13666
	    msg := 'in '.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13667
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13668
	subInstCount ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13669
	    msg := msg , '(currently: ' , subInstCount printString, ') derived instances '
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13670
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13671
	msg := msg, 'of ' , searchClass name , ',\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13672
	msg := msg , name , ' '.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13673
	((values size == 1) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13674
	or:[classes size == 1 and:[classes first == UndefinedObject]]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13675
	    values size == 1 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13676
		value := values first.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13677
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13678
	    (value isNumber or:[value isString]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13679
		msg := msg , 'is always the same:\\      ' , 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13680
			     value class name , ' (' , value storeString , ')'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13681
		canInspect := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13682
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13683
		(value isNil or:[value == true or:[value == false]]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13684
		    msg := msg , 'is always:\\      ' , 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13685
				 value printString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13686
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13687
		    msg := msg , 'is always the same:\\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13688
		    msg := msg , '      ' , value class name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13689
		    value isLiteral ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13690
			msg := msg , ' (' , value storeString , ')'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13691
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13692
		    canInspect := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13693
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13694
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13695
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13696
	    classes size == 1 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13697
		msg := msg , 'is always:\\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13698
		msg := msg , '      ' , classes first name , '\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13699
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13700
		msg := msg , 'is one of:\\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13701
		classes := classes asOrderedCollection.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13702
		classes size > 20 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13703
		    classes := classes copyFrom:1 to:20.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13704
		    cut := true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13705
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13706
		    cut := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13707
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13708
		names := classes collect:[:cls |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13709
		    cls == UndefinedObject ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13710
			'nil'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13711
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13712
			cls == True ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13713
			    'true'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13714
			] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13715
			    cls == False ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13716
				'false'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13717
			    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13718
				cls name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13719
			    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13720
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13721
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13722
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13723
		names sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13724
		names do:[:nm |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13725
		    msg := msg , '      ' , nm , '\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13726
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13727
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13728
	].
93
claus
parents: 92
diff changeset
 13729
    ].
claus
parents: 92
diff changeset
 13730
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13731
    canInspect ifTrue:[
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13732
       (OptionBox 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13733
		      request:msg withCRs
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13734
		      label:'Variable Type Information'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13735
		      form:(InfoBox iconBitmap)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13736
		      buttonLabels:#('OK' 'inspect')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13737
		      values:#(true #inspect)) == #inspect
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13738
	ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13739
	    value inspect
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13740
	]
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13741
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13742
	box := InfoBox title:msg withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13743
	box label:'Variable Type Information'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13744
	box showAtPointer
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13745
    ].
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 13746
1390
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 13747
    "Modified: / 3.1.1998 / 14:50:00 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13748
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13749
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13750
variableListMenu
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13751
    <resource: #programMenu >
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13752
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 13753
    |items m|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13754
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13755
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13756
	variableListView flash.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13757
	^ nil
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13758
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13759
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13760
    showInstance ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13761
	items := #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13762
		    ('class instvar refs...'      classInstVarRefs    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13763
		    ('class instvar mods...'      classInstVarMods    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13764
		    ('classvar refs...'           classVarRefs        )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13765
		    ('classvar mods...'           classVarMods        )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13766
		    ('-'                           nil                 )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13767
		    ('all class instvar refs...'  allClassInstVarRefs )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13768
		    ('all class instvar mods...'  allClassInstVarMods )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13769
		    ('all classvar refs...'       allClassVarRefs     )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13770
		    ('all classvar mods...'       allClassVarMods     )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13771
		   ).
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13772
    ] ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13773
	items := #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13774
		    ('instvar refs...'            instVarRefs         )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13775
		    ('instvar mods...'            instVarMods         )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13776
		    ('classvar refs...'           classVarRefs        )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13777
		    ('classvar mods...'           classVarMods        )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13778
		    ('-'                           nil                 )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13779
		    ('all instvar refs...'        allInstVarRefs      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13780
		    ('all classvar refs...'       allClassVarRefs     )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13781
		    ('all instvar mods...'        allInstVarMods      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13782
		    ('all classvar mods...'       allClassVarMods     )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13783
		   ).
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13784
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13785
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13786
    showInstance ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13787
	classInstVarsInVarList == true ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13788
	    items := items , #(('-') ('show classVars' showClassVars)).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13789
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13790
	    items := items , #(('-') ('show classInstVars' showClassInstVars)).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13791
	].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13792
    ].
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 13793
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 13794
    ("showInstance and:[" variableListView hasSelection "]" ) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13795
	items := items , #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13796
				('-'                           )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13797
				('type information' varTypeInfo)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13798
			   ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 13799
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 13800
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13801
    ("showInstance not and:["variableListView hasSelection"]") ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13802
	items := items , #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13803
				('inspect' varInspect)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13804
			   ).
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13805
    ].
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13806
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 13807
    m := PopUpMenu itemList:items resources:resources.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13808
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13809
    currentClass instSize == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13810
	m disableAll:#(instVarRefs instVarMods).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13811
	currentClass subclasses size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13812
	    m disableAll:#(allInstVarRefs allInstVarMods).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13813
	]
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13814
    ].
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 13815
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 13816
    currentClass isLoaded ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13817
	m disableAll
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 13818
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 13819
    ^ m
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 13820
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13821
    "Modified: / 15.10.1998 / 10:51:17 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13822
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13823
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13824
variableSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13825
    "variable selection changed"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13826
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13827
    |name idx|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13828
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13829
    name := variableListView selectionValue.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13830
    name isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13831
	self unhilightMethodCategories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13832
	self unhilightMethods.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13833
	self autoSearch:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13834
	^ self
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13835
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13836
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13837
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13838
     first, check if the selected variable is really the one 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13839
     we get - reselect if its hidden (for example, a class variable
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13840
     with the same name could be defined in a subclass)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13841
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13842
    idx := variableListView list findLast:[:entry | entry = name].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13843
    idx ~~ lineNr ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13844
	"select it - user will see whats going on"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13845
	variableListView setSelection:idx
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13846
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13847
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13848
    "search for methods in the current category, which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13849
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13850
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13851
    self hilightMethodsInMethodCategoryList:true inMethodList:true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13852
    self autoSearch:name.
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
 13853
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
 13854
    "Modified: 25.5.1996 / 12:26:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13855
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13856
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13857
!BrowserView methodsFor:'variable stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13858
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13859
hilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13860
    "helper; given a list itme, highlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13861
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13862
    |e|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13863
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13864
    methodCategoryListView font bold ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13865
	"/ already bold; use different color then
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13866
	methodCategoryListView foregroundColor brightness > 0.5 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13867
	    methodCategoryListView backgroundColor brightness < 0.25 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13868
		e := #color->Color blue
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13869
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13870
		e := #color->Color black
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13871
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13872
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13873
	    methodCategoryListView backgroundColor brightness > 0.75 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13874
		e := #color->Color red darkened
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13875
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13876
		e := #color->Color white.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13877
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13878
	]
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13879
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13880
	e := #bold.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13881
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13882
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13883
    entry isString ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13884
	^ entry asText emphasizeAllWith:e.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13885
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13886
    ^ entry copy string:(entry string asText emphasizeAllWith:e)
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13887
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13888
    "Created: 22.10.1996 / 23:36:59 / cg"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13889
    "Modified: 22.10.1996 / 23:50:03 / cg"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13890
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13891
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13892
hilightMethodsInMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13893
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13894
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13895
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13896
    self hilightMethodsInMethodCategoryList:true inMethodList:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13897
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13898
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13899
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13900
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13901
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13902
hilightMethodsInMethodCategoryList:inCat inMethodList:inMethods 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13903
    "search for methods  which access the selected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13904
     variable, and highlight them"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13905
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13906
    |name redefinedSelectors methodList methodCategoryList entry|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13907
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13908
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13909
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13910
    inCat ifTrue:[self unhilightMethodCategories].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13911
    inMethods ifTrue:[self unhilightMethods].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13912
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13913
    actualClass isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13914
    (methodCategoryListView isNil 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13915
    and:[methodListView isNil]) ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13916
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13917
    name := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13918
    name isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13919
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13920
    self withSearchCursorDo:[
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13921
        |classes filter any supers|
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13922
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13923
        classes := Array with:actualClass.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13924
        (currentClassHierarchy notNil and:[fullProtocol]) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13925
            supers := actualClass allSuperclasses.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13926
            classes := classes , supers.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13927
            redefinedSelectors := IdentitySet new.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13928
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13929
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13930
        filter := SystemBrowser 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13931
                        filterToSearchRefsTo:name 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13932
                        classVars:(showInstance not and:[classInstVarsInVarList ~~ true]) 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13933
                        modificationsOnly:false. 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13934
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13935
        methodListView notNil ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13936
            methodList := methodListView list.
2361
c1f1e0b88d1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2357
diff changeset
 13937
            methodList notNil ifTrue:[
c1f1e0b88d1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2357
diff changeset
 13938
                methodList := methodList collect:[:s | self selectorFromClassMethodString:s].
c1f1e0b88d1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2357
diff changeset
 13939
            ]
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13940
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13941
        methodCategoryListView notNil ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13942
            methodCategoryList := methodCategoryListView list.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13943
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13944
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13945
        any := false.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13946
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13947
        "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13948
         highlight the method that ref this variable
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13949
        "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13950
        classes do:[:someClass |
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13951
            (fullProtocol
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13952
            and:[classListView valueIsInSelection:(someClass name)]) ifFalse:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13953
                someClass methodDictionary keysAndValuesDo:[:selector :method |
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13954
                    (inCat
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13955
                    or:[methodList notNil
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13956
                        and:[methodList includes:selector]])
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13957
                    ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13958
                        (redefinedSelectors isNil
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13959
                        or:[(redefinedSelectors includes:selector) not])
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13960
                       ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13961
                           (filter value:someClass value:method value:selector) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13962
                               |idx cat|
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13963
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13964
                               (inCat
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13965
                               and:[methodCategoryList notNil]) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13966
                                   cat := method category.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13967
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13968
                                    highlight the methodCategory
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13969
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13970
                                   idx := methodCategoryListView list indexOf:cat.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13971
                                   idx ~~ 0 ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13972
                                        entry := methodCategoryListView at:idx.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13973
                                        entry := self hilightEntryFor:entry.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13974
                                        methodCategoryListView at:idx put:entry
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13975
"/                                       methodCategoryListView attributeAt:idx put:#bold.
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13976
                                   ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13977
                               ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13978
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13979
                               (inMethods
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13980
                               and:[methodList notNil]) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13981
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13982
                                    highlight the method
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13983
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13984
                                   idx := methodListView list 
2354
d6c68a5408be variable access highlighting fixed
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
 13985
                                                findFirst:[:item | |s|
d6c68a5408be variable access highlighting fixed
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
 13986
                                                                (s := item string) = selector
d6c68a5408be variable access highlighting fixed
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
 13987
                                                                or:[s startsWith:(selector , ' ')]
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13988
                                                          ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13989
                                   idx ~~ 0 ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13990
                                        entry := methodListView at:idx.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13991
                                        entry := self hilightEntryFor:entry.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13992
                                        methodListView at:idx put:entry
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13993
"/                                        methodListView attributeAt:idx put:#bold.
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13994
                                   ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13995
                                   any := true
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13996
                               ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13997
                           ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13998
                           redefinedSelectors notNil ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13999
                               redefinedSelectors add:selector
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14000
                           ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14001
                        ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14002
                    ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14003
                ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14004
            ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14005
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14006
        any ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14007
            self setSearchPattern:name
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14008
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14009
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14010
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14011
    "Created: / 23.11.1995 / 14:12:08 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14012
    "Modified: / 5.6.1996 / 11:38:19 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14013
    "Modified: / 25.10.1997 / 21:02:47 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14014
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14015
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14016
hilightMethodsInMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14017
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14018
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14019
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14020
    self hilightMethodsInMethodCategoryList:false inMethodList:true 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14021
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14022
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14023
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14024
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14025
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14026
unhilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14027
    "helper; given a list itme, unhighlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14028
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14029
    entry isString ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14030
	^ entry string
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14031
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14032
    ^ entry copy string:(entry string)
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14033
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14034
    "Created: 22.10.1996 / 23:38:21 / cg"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14035
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14036
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14037
unhilightMethodCategories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14038
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14039
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14040
    |list entry sz "{ Class: SmallInteger }"|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14041
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14042
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14043
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14044
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14045
	list := methodCategoryListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14046
	sz := list size.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14047
	1 to:sz do:[:idx |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14048
	    entry := list at:idx.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14049
	    entry := self unhilightEntryFor:entry.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14050
	    methodCategoryListView at:idx put:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14051
"/            methodCategoryListView attributeAt:idx put:nil.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14052
	]
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14053
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14054
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14055
    "Modified: 22.10.1996 / 23:40:52 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14056
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14057
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14058
unhilightMethods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14059
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14060
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14061
    |list entry sz "{Class: SmallInteger }" |
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14062
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14063
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14064
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14065
    methodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14066
	list := methodListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14067
	sz := list size.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14068
	1 to:sz do:[:idx |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14069
	    entry := list at:idx.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14070
	    entry := self unhilightEntryFor:entry.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14071
	    methodListView at:idx put:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14072
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14073
"/            methodListView attributeAt:idx put:nil.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14074
	].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14075
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14076
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14077
    "Modified: 22.10.1996 / 23:39:18 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14078
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14079
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14080
updateVariableList
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14081
    "update the variable list - either show instVars, classVars or classInstVars"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14082
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14083
    |l subList last nameAccessSelector class oldSelection askMeta|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14084
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14085
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14086
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14087
    oldSelection := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14088
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14089
    l := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14090
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14091
     show classVars/classInstVars, 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14092
     if classProtocol is shown (instead of classInstance vars)
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14093
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14094
    askMeta := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14095
    showInstance ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14096
        nameAccessSelector := #instVarNames
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14097
    ] ifFalse:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14098
        classInstVarsInVarList == true ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14099
            nameAccessSelector := #instVarNames.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14100
            askMeta := true.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14101
        ] ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14102
            nameAccessSelector := #classVarNames
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14103
        ]
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14104
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 14105
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 14106
    class := currentClassHierarchy notNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14107
        currentClassHierarchy
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 14108
    ] ifFalse:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14109
        currentClass
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14110
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14111
    class := currentClass.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14112
    fullProtocol ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14113
        class := currentClassHierarchy
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14114
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14115
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14116
    class isNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14117
        variableListView list:nil.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14118
        ^ self
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14119
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 14120
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14121
    class withAllSuperclasses do:[:aClass |
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14122
        |ignore clsName|
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14123
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14124
        ignore := fullProtocol 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14125
                  and:[classListView valueIsInSelection:(aClass name asString)].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14126
        ignore ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14127
            askMeta ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14128
                subList := aClass class perform:nameAccessSelector.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14129
            ] ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14130
                subList := aClass perform:nameAccessSelector.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14131
            ].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14132
            subList size ~~ 0 ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14133
                l := l , (subList asOrderedCollection reverse).
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14134
                aClass nameSpace == currentNamespace ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14135
                    clsName := aClass nameWithoutNameSpacePrefix
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14136
                ] ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14137
                    clsName := aClass name
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14138
                ].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14139
                showInstance ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14140
                    clsName := clsName , ' class'
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14141
                ].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14142
                l := l , (OrderedCollection with:'--- ' , clsName , ' ---').
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14143
            ]
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14144
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14145
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14146
    l reverse.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14147
    variableListView setAttributes:nil.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 14148
    l ~= variableListView list ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14149
        variableListView list:l.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 14150
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 14151
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14152
    l keysAndValuesDo:[:index :entry |
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14153
        (entry startsWith:'-') ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14154
            variableListView attributeAt:index put:#disabled.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14155
            last := index
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14156
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14157
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14158
    last notNil ifTrue:[variableListView scrollToLine:last].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14159
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14160
    oldSelection notNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14161
        variableListView setSelectElement:oldSelection.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14162
        self hilightMethodsInMethodCategoryList:true inMethodList:true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14163
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
 14164
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
 14165
    "Modified: / 17.9.1998 / 13:45:02 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14166
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14167
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
 14168
!BrowserView class methodsFor:'documentation'!
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
 14169
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
 14170
version
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
 14171
    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.631 2000-08-23 16:18:43 cg Exp $'
263
7b9622ce4fcc more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
 14172
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14173
BrowserView initialize!