BrowserView.st
author Claus Gittinger <cg@exept.de>
Thu, 27 Jan 2000 13:01:26 +0100
changeset 2565 a0487f27becc
parent 2552 faf9ae5ca5b2
child 2568 24854141205c
permissions -rw-r--r--
fixed method search
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
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    13
StandardSystemView subclass:#BrowserView
1763
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    14
	instanceVariableNames:'classCategoryListView classListView methodCategoryListView
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    15
		methodListView classMethodListView codeView classToggle
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    16
		instanceToggle currentNamespace currentClassCategory
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    17
		currentClassHierarchy currentClass currentMethodCategory
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    18
		currentMethod currentSelector showInstance actualClass fullClass
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    19
		lastMethodCategory aspect variableListView fullProtocol
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    20
		lockUpdates autoSearch myLabel acceptClass lastSourceLogMessage
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    21
		lastCategory lastModule lastPackage lastMethodMoveClass
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    22
		namespaceList allNamespaces gotClassList classList selectorList
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    23
		showAllNamespaces classInstVarsInVarList coloringProcess
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    24
		codeModified autoSearchIgnoreCase icons'
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    25
	classVariableNames:'CheckForInstancesWhenRemovingClasses RememberAspect DefaultIcon
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    26
		StopIcon TraceIcon TimeIcon CanvasIcon MenuIcon ImageIcon
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    27
		TabListIcon HierarchicalListIcon TableColumnsIcon HelpIcon
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    28
		ShowResourceIcons ClassHistory LastSearchPatterns
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    29
		ShowMethodCategoryInClassMethodList'
1763
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    30
	poolDictionaries:''
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    31
	category:'Interface-Browsers'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    32
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    33
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    34
!BrowserView class methodsFor:'documentation'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    35
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    36
copyright
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    37
"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    38
 COPYRIGHT (c) 1989 by Claus Gittinger
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
    39
	      All Rights Reserved
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    40
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    41
 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
    42
 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
    43
 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
    44
 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
    45
 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
    46
 hereby transferred.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    47
"
165
df29ee4514c1 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 161
diff changeset
    48
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    49
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    50
documentation
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    51
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    52
    this class implements all kinds of class browsers.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    53
    Typically, it is started with 'SystemBrowser open', but there are many other 
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    54
    startup messages, to launch special browsers.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    55
    See the categories 'startup' and 'special search startup' in the classes
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    56
    protocol.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    57
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    58
    Alse, see the extra document 'doc/misc/sbrowser.doc' or the HTML online doc
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    59
    for how to use the browser.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    60
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    61
    written winter 89 by claus
106
claus
parents: 105
diff changeset
    62
claus
parents: 105
diff changeset
    63
    Notice: SystemBrowser is currently being rewritten to be an instance
claus
parents: 105
diff changeset
    64
    of ApplicationModel - this transition is not yet complete and you see
claus
parents: 105
diff changeset
    65
    here intermediate versions of BrowserView/SystemBrowser. 
claus
parents: 105
diff changeset
    66
    All action is (currently) still done here in BrowserView, although the
claus
parents: 105
diff changeset
    67
    SystemBrowsers class methods are used to startup a browser.
claus
parents: 105
diff changeset
    68
    This will certainly change ...
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    69
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    70
    [author:]
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
    71
	Claus Gittinger
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    72
"
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
    73
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    74
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    75
!BrowserView class methodsFor:'initialization'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    76
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    77
initialize
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    78
    "Browser configuration;
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    79
     (values can be changed from your private startup file)"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    80
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    81
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    82
    "
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    83
     setting 'ShowMethodCategoryInClassMethodList' to false will suppress the display
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    84
     of a methods category in the search-result browsers..
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    85
    "
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    86
    ShowMethodCategoryInClassMethodList := true.
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    87
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    88
    "
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    89
     setting 'ShowResourceIcons' to false will suppress the display
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    90
     of image-, menu-, canvas- etc. icons beside the method name in
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    91
     the method list.
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    92
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
    93
    ShowResourceIcons := true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
    94
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    95
    "
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    96
     setting 'CheckForInstancesWhenRemovingClasses' to false, the removeClass function will remove
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    97
     classes WITHOUT checking for instances. Otherwise,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    98
     it will check and let you confirm in case there are instances.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    99
     Checking for instances may be a bit time consuming, though.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   100
     The default is true - therefore, it will check
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   101
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   102
    CheckForInstancesWhenRemovingClasses := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   103
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   104
    "
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
   105
     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
   106
     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
   107
     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
   108
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   109
    RememberAspect := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   110
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   111
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   112
     CheckForInstancesWhenRemovingClasses := true
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   113
     CheckForInstancesWhenRemovingClasses := false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   114
     RememberAspect := true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   115
     RememberAspect := false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   116
     ShowResourceIcons := true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   117
     ShowResourceIcons := false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   118
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   119
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   120
    "Created: / 23.11.1995 / 11:35:58 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   121
    "Modified: / 27.10.1997 / 17:34:25 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   122
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   123
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   124
!BrowserView class methodsFor:'cleanup'!
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   125
1575
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   126
checkClassHistory
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   127
    "checks the class history on non-existing classes"
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   128
1709
2aa28cabbfb2 set class history
tz
parents: 1704
diff changeset
   129
    self classHistory reverseDo:
1575
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   130
    [:histEntry|
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   131
	(Smalltalk at: (histEntry upTo: $ ) asSymbol) isBehavior
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   132
	ifFalse:
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   133
	[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   134
	    ClassHistory remove: histEntry
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   135
	]
1575
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   136
    ]
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   137
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   138
!
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   139
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   140
lowSpaceCleanup
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   141
    DefaultIcon := StopIcon := TraceIcon := TimeIcon := nil.
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   142
    CanvasIcon := MenuIcon := ImageIcon := TabListIcon := nil.
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   143
    HierarchicalListIcon := TableColumnsIcon := HelpIcon := nil.
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   144
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   145
    "
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   146
     self lowSpaceCleanup
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   147
    "
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   148
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   149
    "Modified: / 26.7.1998 / 14:12:23 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   150
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   151
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   152
preSnapshot
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   153
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   154
    StopIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   155
    TraceIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   156
    TimeIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   157
    CanvasIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   158
    MenuIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   159
    ImageIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   160
    TabListIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   161
    HierarchicalListIcon := 
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   162
    TableColumnsIcon :=
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   163
    HelpIcon :=
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   164
    nil
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   165
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   166
! !
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   167
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   168
!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
   169
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   170
classHistory
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   171
    "returns the class history"
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   172
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   173
    ClassHistory isNil ifTrue: [ClassHistory := OrderedCollection new].
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   174
    ^ClassHistory
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   175
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   176
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   177
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   178
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   179
classHistoryMaxSize
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   180
    "returns maximum size of the class history"
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   181
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   182
    ^10
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   183
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   184
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   185
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   186
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   187
defaultIcon
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   188
    "return the browsers default window icon"
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   189
1288
9f6e0e8c3ab8 fixed icon
Claus Gittinger <cg@exept.de>
parents: 1282
diff changeset
   190
    <resource: #style (#SYSTEMBROWSER_ICON #SYSTEMBROWSER_ICON_FILE)>
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   191
2127
67083916cc02 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
   192
    |nm i resources|
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   193
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   194
    (i := DefaultIcon) isNil ifTrue:[
2342
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   195
        resources := self classResources.
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   196
        i := resources at:'SYSTEMBROWSER_ICON' default:nil.
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   197
        i isNil ifTrue:[
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   198
            nm := resources at:'SYSTEMBROWSER_ICON_FILE' default:'SBrowser.xbm'.
2478
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
   199
            i := Smalltalk imageFromFileNamed:nm inPackage:#'stx:libtool'.
2342
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   200
            i isNil ifTrue:[
2451
2a01088e75d3 try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
   201
                i := StandardSystemView defaultIcon
2342
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   202
            ]
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   203
        ].
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   204
        i notNil ifTrue:[
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   205
            DefaultIcon := i := i onDevice:Display
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   206
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   207
    ].
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   208
    ^ i
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   209
2127
67083916cc02 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
   210
    "Modified: / 19.3.1997 / 20:48:34 / ca"
67083916cc02 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
   211
    "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
   212
!
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   213
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   214
fileImageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   215
    "answer an icon to mark file-loading image  methods"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   216
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   217
    ^ self imageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   218
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   219
    "Created: / 29.10.1997 / 03:32:43 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   220
!
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   221
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   222
programMenuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   223
    "answer an icon to mark programmed-menu (menuSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   224
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   225
    ^ self menuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   226
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   227
    "Created: / 28.10.1997 / 13:40:49 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   228
! !
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   229
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   230
!BrowserView class methodsFor:'image specs'!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   231
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   232
canvasIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   233
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   234
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   235
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   236
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   237
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   238
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   239
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   240
     ImageEditor openOnClass:self andSelector:#canvasIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   241
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   242
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   243
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   244
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   245
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   246
	constantNamed:#'BrowserView canvasIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   247
	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
   248
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   249
helpIcon
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   250
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   251
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   252
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   253
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   254
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   255
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   256
    "
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   257
     ImageEditor openOnClass:self andSelector:#helpIcon
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   258
    "
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   259
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   260
    <resource: #image>
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   261
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   262
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   263
	constantNamed:#'BrowserView helpIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   264
	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
   265
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   266
hierarchicalListIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   267
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   268
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   269
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   270
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   271
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   272
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   273
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   274
     ImageEditor openOnClass:self andSelector:#hierarchicalListIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   275
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   276
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   277
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   278
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   279
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   280
	constantNamed:#'BrowserView hierarchicalListIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   281
	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
   282
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   283
imageIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   284
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   285
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   286
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   287
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   288
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   289
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   290
    "
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   291
     self imageIcon inspect
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   292
     ImageEditor openOnClass:self andSelector:#imageIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   293
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   294
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   295
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   296
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   297
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   298
	constantNamed:#'BrowserView imageIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   299
	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
   300
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   301
!
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   302
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   303
menuIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   304
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   305
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   306
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   307
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   308
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   309
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   310
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   311
     ImageEditor openOnClass:self andSelector:#menuIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   312
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   313
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   314
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   315
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   316
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   317
	constantNamed:#'BrowserView menuIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   318
	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
   319
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   320
stopIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   321
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   322
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   323
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   324
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   325
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   326
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   327
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   328
     ImageEditor openOnClass:self andSelector:#stopIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   329
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   330
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   331
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   332
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   333
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   334
	constantNamed:#'BrowserView stopIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   335
	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
   336
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   337
tabListIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   338
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   339
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   340
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   341
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   342
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   343
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   344
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   345
     ImageEditor openOnClass:self andSelector:#tabListIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   346
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   347
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   348
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   349
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   350
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   351
	constantNamed:#'BrowserView tabListIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   352
	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
   353
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   354
tableColumnsIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   355
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   356
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   357
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   358
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   359
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   360
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   361
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   362
     ImageEditor openOnClass:self andSelector:#tableColumnsIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   363
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   364
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   365
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   366
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   367
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   368
	constantNamed:#'BrowserView tableColumnsIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   369
	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
   370
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   371
timeIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   372
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   373
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   374
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   375
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   376
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   377
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   378
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   379
     ImageEditor openOnClass:self andSelector:#timeIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   380
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   381
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   382
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   383
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   384
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   385
	constantNamed:#'BrowserView timeIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   386
	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
   387
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   388
traceIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   389
    "This resource specification was automatically generated
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   390
     by the ImageEditor of ST/X."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   391
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   392
    "Do not manually edit this!! If it is corrupted,
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   393
     the ImageEditor may not be able to read the specification."
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   394
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   395
    "
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
   396
     ImageEditor openOnClass:self andSelector:#traceIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   397
    "
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   398
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   399
    <resource: #image>
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   400
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   401
    ^Icon
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   402
	constantNamed:#'BrowserView traceIcon'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   403
	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
   404
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   405
!BrowserView class methodsFor:'interface specs'!
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   406
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   407
methodFilterSpec
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   408
    "This resource specification was automatically generated
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   409
     by the UIPainter of ST/X."
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   410
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   411
    "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
   412
     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
   413
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   414
    "
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   415
     UIPainter new openOnClass:BrowserView andSelector:#methodFilterSpec
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   416
    "
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   417
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   418
    <resource: #canvas>
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   419
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   420
    ^ 
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   421
     #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   422
	#name: #methodFilterSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   423
	#window: 
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   424
       #(#WindowSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   425
	  #label: 'Method Filter:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   426
	  #name: 'Method Filter:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   427
	  #layout: #(#LayoutFrame 41 0 142 0 556 0 320 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   428
	  #level: 0
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   429
	  #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   430
	  #max: #(#Point 1280 1024)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   431
	  #bounds: #(#Rectangle 41 142 557 321)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   432
	  #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   433
	  #returnIsOKInDialog: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   434
	  #escapeIsCancelInDialog: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   435
	)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   436
	#component: 
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   437
       #(#SpecCollection
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   438
	  #collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   439
	   #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   440
	      #label: 'Browse methods from list, which:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   441
	      #name: 'Label1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   442
	      #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
   443
	      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   444
	      #adjust: #left
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   445
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   446
	   #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   447
	      #name: 'HorizontalPanel2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   448
	      #layout: #(#LayoutFrame 0 0 44 0 -2 1 84 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   449
	      #horizontalLayout: #leftFit
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   450
	      #verticalLayout: #center
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   451
	      #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   452
	      #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   453
	      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   454
	     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   455
		#collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   456
		 #(#ToggleSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   457
		    #label: 'Do not'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   458
		    #name: 'Toggle1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   459
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   460
		    #model: #notContainingMessage
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   461
		    #isTriggerOnDown: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   462
		    #showLamp: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   463
		    #lampColor: #(#Color 100.0 100.0 0.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   464
		    #extent: #(#Point 70 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   465
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   466
		 #(#CheckBoxSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   467
		    #label: 'Send the message:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   468
		    #name: 'CheckBox1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   469
		    #model: #doFilterMessage
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   470
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   471
		    #extent: #(#Point 200 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   472
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   473
		 #(#InputFieldSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   474
		    #name: 'EntryField1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   475
		    #enableChannel: #doFilterMessage
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   476
		    #model: #filteredMessageSelector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   477
		    #extent: #(#Point 238 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   478
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   479
		 )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   480
               
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   481
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   482
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   483
	   #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   484
	      #name: 'HorizontalPanel3'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   485
	      #layout: #(#LayoutFrame 0 0 84 0 -2 1 124 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   486
	      #horizontalLayout: #leftFit
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   487
	      #verticalLayout: #center
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   488
	      #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   489
	      #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   490
	      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   491
	     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   492
		#collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   493
		 #(#ToggleSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   494
		    #label: 'Do not'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   495
		    #name: 'Toggle2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   496
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   497
		    #model: #notContainingString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   498
		    #isTriggerOnDown: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   499
		    #showLamp: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   500
		    #lampColor: #(#Color 100.0 100.0 0.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   501
		    #extent: #(#Point 70 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   502
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   503
		 #(#CheckBoxSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   504
		    #label: 'Contain the String:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   505
		    #name: 'CheckBox2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   506
		    #model: #doFilterString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   507
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   508
		    #extent: #(#Point 200 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   509
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   510
		 #(#InputFieldSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   511
		    #name: 'EntryField2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   512
		    #enableChannel: #doFilterString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   513
		    #model: #filteredString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   514
		    #extent: #(#Point 238 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   515
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   516
		 )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   517
               
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   518
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   519
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   520
	   #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   521
	      #name: 'HorizontalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   522
	      #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
   523
	      #horizontalLayout: #fitSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   524
	      #verticalLayout: #centerMax
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   525
	      #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   526
	      #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   527
	      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   528
	     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   529
		#collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   530
		 #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   531
		    #label: 'Cancel'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   532
		    #name: 'Button1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   533
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   534
		    #model: #cancel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   535
		    #extent: #(#Point 253 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   536
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   537
		 #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   538
		    #label: 'Browse'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   539
		    #name: 'Button2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   540
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   541
		    #model: #accept
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   542
		    #isDefault: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   543
		    #actionValue: ''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   544
		    #extent: #(#Point 254 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   545
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   546
		 )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   547
               
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   548
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   549
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   550
	   )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   551
         
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   552
	)
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   553
      )
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   554
!
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   555
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   556
methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   557
    "This resource specification was automatically generated
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   558
     by the UIPainter of ST/X."
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   559
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   560
    "Do not manually edit this!! If it is corrupted,
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   561
     the UIPainter may not be able to read the specification."
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   562
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   563
    "
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   564
     UIPainter new openOnClass:BrowserView andSelector:#methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   565
     BrowserView new openInterface:#methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   566
    "
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   567
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   568
    <resource: #canvas>
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   569
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   570
    ^
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   571
     
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   572
       #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   573
	  #window: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   574
	   #(#WindowSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   575
	      #name: 'Move method to:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   576
	      #layout: #(#LayoutFrame 290 0 207 0 628 0 334 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   577
	      #label: 'Move method to:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   578
	      #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   579
	      #max: #(#Point 1280 1024)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   580
	      #bounds: #(#Rectangle 290 207 629 335)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   581
	      #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   582
	  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   583
	  #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   584
	   #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   585
	      #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   586
	       #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   587
		 #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   588
		    #name: 'Label1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   589
		    #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
   590
		    #label: 'Move method to which class:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   591
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   592
		    #adjust: #left
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   593
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   594
		 #(#ComboBoxSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   595
		    #name: 'ComboBox1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   596
		    #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
   597
		    #model: #className
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   598
		    #comboList: #classList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   599
		    #useIndex: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   600
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   601
		 #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   602
		    #name: 'HorizontalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   603
		    #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
   604
		    #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   605
		     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   606
			#collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   607
			 #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   608
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   609
			      #name: 'Button1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   610
			      #label: 'Cancel'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   611
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   612
			      #model: #cancel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   613
			      #extent: #(#Point 165 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   614
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   615
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   616
			      #name: 'Button2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   617
			      #label: 'Move'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   618
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   619
			      #model: #accept
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   620
			      #isDefault: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   621
			      #extent: #(#Point 165 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   622
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   623
			)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   624
		    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   625
		    #horizontalLayout: #fitSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   626
		    #verticalLayout: #centerMax
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   627
		    #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   628
		    #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   629
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   630
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   631
	  )
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   632
      )
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   633
!
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   634
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   635
repositoryLoadSpec
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   636
    "This resource specification was automatically generated
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   637
     by the UIPainter of ST/X."
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   638
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   639
    "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
   640
     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
   641
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   642
    "
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   643
     UIPainter new openOnClass:BrowserView andSelector:#repositoryLoadSpec
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   644
     BrowserView new openInterface:#repositoryLoadSpec
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   645
    "
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   646
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   647
    <resource: #canvas>
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   648
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   649
    ^
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   650
     
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   651
       #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   652
	  #window: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   653
	   #(#WindowSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   654
	      #name: 'Load from repository'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   655
	      #layout: #(#LayoutFrame 216 0 173 0 618 0 737 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   656
	      #label: 'Load from repository'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   657
	      #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   658
	      #max: #(#Point 1280 1024)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   659
	      #bounds: #(#Rectangle 216 173 619 738)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   660
	      #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   661
	  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   662
	  #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   663
	   #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   664
	      #collection: 
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
		 #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   667
		    #name: 'Label1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   668
		    #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
   669
		    #label: 'Load class(es) from the repository ...'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   670
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   671
		    #adjust: #left
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   672
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   673
		 #(#VariableVerticalPanelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   674
		    #name: 'VariableVerticalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   675
		    #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
   676
		    #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   677
		     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   678
			#collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   679
			 #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   680
			   #(#ViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   681
			      #name: 'Box1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   682
			      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   683
			       #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   684
				  #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   685
				   #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   686
				     #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   687
					#name: 'Label6'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   688
					#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
   689
					#label: 'Modules'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   690
					#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   691
					#adjust: #right
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   692
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   693
				     #(#SequenceViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   694
					#name: 'moduleSelectionList'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   695
					#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
   696
					#model: #moduleSelection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   697
					#hasHorizontalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   698
					#hasVerticalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   699
					#miniScrollerHorizontal: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   700
					#useIndex: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   701
					#sequenceList: #moduleList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   702
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   703
				  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   704
			      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   705
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   706
			   #(#ViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   707
			      #name: 'Box2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   708
			      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   709
			       #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   710
				  #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   711
				   #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   712
				     #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   713
					#name: 'Label5'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   714
					#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
   715
					#label: 'Packages'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   716
					#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   717
					#adjust: #right
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   718
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   719
				     #(#SequenceViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   720
					#name: 'packageSelectionList'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   721
					#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
   722
					#model: #packageSelection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   723
					#hasHorizontalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   724
					#hasVerticalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   725
					#miniScrollerHorizontal: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   726
					#useIndex: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   727
					#sequenceList: #packageList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   728
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   729
				  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   730
			      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   731
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   732
			   #(#ViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   733
			      #name: 'Box3'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   734
			      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   735
			       #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   736
				  #collection: 
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
				     #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   739
					#name: 'Label4'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   740
					#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
   741
					#label: 'Containers'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   742
					#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   743
					#adjust: #right
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   744
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   745
				     #(#SequenceViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   746
					#name: 'containerList'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   747
					#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
   748
					#model: #containerSelection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   749
					#hasHorizontalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   750
					#hasVerticalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   751
					#miniScrollerHorizontal: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   752
					#isMultiSelect: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   753
					#useIndex: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   754
					#sequenceList: #containerList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   755
					#doubleClickChannel: #containerDoubleClicked
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   756
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   757
				  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   758
			      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   759
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   760
			)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   761
		    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   762
		    #handles: #(#Any 0.21165 0.539806 1.0)
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
		 #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   765
		    #name: 'HorizontalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   766
		    #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
   767
		    #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   768
		     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   769
			#collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   770
			 #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   771
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   772
			      #name: 'loadButton'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   773
			      #label: 'Load'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   774
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   775
			      #model: #load
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   776
			      #enableChannel: #loadEnabled
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   777
			      #extent: #(#Point 100 25)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   778
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   779
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   780
			      #name: 'dismissButton'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   781
			      #label: 'Dismiss'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   782
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   783
			      #model: #close
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   784
			      #extent: #(#Point 100 25)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   785
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   786
			)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   787
		    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   788
		    #horizontalLayout: #spreadSpaceMax
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   789
		    #verticalLayout: #center
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   790
		    #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   791
		    #verticalSpace: 3
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
	  )
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   795
      )
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   796
1674
60baa8cba008 load from repository spec. geometry
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   797
    "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
   798
! !
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   799
132
claus
parents: 131
diff changeset
   800
!BrowserView methodsFor:'change & update'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   801
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   802
delayedUpdate:something with:someArgument from:changedObject
273
0fc84937f240 check oldMethod in method-update notification
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   803
    |list selector oldMethod|
93
claus
parents: 92
diff changeset
   804
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   805
    (changedObject == Smalltalk) ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   806
        something == #methodInClassRemoved ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   807
            "/ 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
   808
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   809
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   810
        something == #methodInClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   811
            "/ 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
   812
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   813
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   814
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   815
        self updateNamespaceList.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   816
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   817
        something == #newClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   818
            (currentClass notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   819
            and:[someArgument name = currentClass name
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   820
                 or:[someArgument == currentClass]]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   821
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   822
                 the current class has changed
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   823
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   824
                (aspect == #definition
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   825
                and:[codeView modified not]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   826
                    self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   827
                    self classSelectionChanged.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   828
                ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   829
                    self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   830
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   831
                currentClass wasAutoloaded ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   832
                    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
   833
                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   834
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   835
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   836
            ((someArgument category = currentClassCategory)
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   837
            or:[currentClassCategory notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   838
                and:[currentClassCategory startsWith:$*]]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   839
                self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   840
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   841
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   842
            someArgument category ~= currentClassCategory ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   843
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   844
                 category new ?
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   845
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   846
                (classCategoryListView notNil 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   847
                and:[(list := classCategoryListView list) notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   848
                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
   849
                ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   850
                    self updateClassCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   851
                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   852
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   853
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   854
            "/ 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
   855
            "/ 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
   856
            self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   857
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   858
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   859
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   860
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   861
        something == #classRemove ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   862
            someArgument == currentClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   863
                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
   864
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   865
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   866
            " fall into general update "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   867
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   868
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   869
        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   870
         any other (unknown) change 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   871
         with the Smalltalk dictionary ...
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   872
        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   873
        self updateClassCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   874
        self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   875
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   876
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   877
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   878
    changedObject isBehavior ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   879
        "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   880
        "/ 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
   881
        "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   882
        fullClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   883
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   884
            "/ full-class browser ...
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   885
            "/ (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
   886
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   887
            (currentClass == changedObject
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   888
            or:[currentClass class == changedObject]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   889
                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
   890
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   891
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   892
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   893
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   894
        (currentClass notNil 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   895
        and:[changedObject name = currentClass name
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   896
             or:[changedObject == currentClass]]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   897
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   898
            "/ 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
   899
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   900
            ((something == #methodDictionary)
2337
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
   901
            or:[something == #methodPackage
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   902
            or:[something == #methodTrap
2337
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
   903
            or:[something == #methodPrivacy]]]) ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   904
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   905
                "/ 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
   906
                "/ the selector and the oldMethod
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   907
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   908
                someArgument isArray ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   909
                    oldMethod := someArgument at:2.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   910
                    selector := someArgument at:1.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   911
                ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   912
                    selector := someArgument
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   913
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   914
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   915
                (selector isSymbol) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   916
                    |changedMethod s1 s2 oldMethodSelection oldMethodCategorySelection|
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   917
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   918
                    "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   919
                     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
   920
                    "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   921
                    methodListView notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   922
                        oldMethodSelection := methodListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   923
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   924
                    (something ~~ #methodTrap
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   925
                    and:[something ~~ #methodPrivacy]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   926
                        methodCategoryListView notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   927
                            oldMethodCategorySelection := methodCategoryListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   928
                            self updateMethodCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   929
                            methodCategoryListView selection:oldMethodCategorySelection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   930
                        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   931
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   932
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   933
                    self updateMethodListWithScroll:false keepSelection:true.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
   934
"/                    methodListView notNil ifTrue:[
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
   935
"/                        methodListView setSelection:oldMethodSelection.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
   936
"/                    ].
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   937
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   938
                    (something == #methodTrap
2337
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
   939
                    or:[something == #methodPackage
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
   940
                    or:[something == #methodPrivacy]]) ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   941
                        selector == currentSelector ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   942
                            self refetchMethod.
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
                        ^ self.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   945
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   946
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   947
                    classMethodListView notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   948
                        oldMethodSelection := classMethodListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   949
                        self updateMethodCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   950
                        classMethodListView selection:oldMethodSelection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   951
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   952
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   953
                    selector == currentSelector ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   954
                        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   955
                         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
   956
                         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
   957
                        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   958
                        changedMethod := currentClass compiledMethodAt:currentSelector.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   959
                        changedMethod isNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   960
                            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
   961
                            ^ self
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
                        "compare the source codes"
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   964
                        currentMethod notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   965
                            s1 := self compressedCodeLinesFor:changedMethod source.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   966
                            s2 := self compressedCodeLinesFor:codeView contents.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   967
                            s1 = s2 ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   968
                                codeModified ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   969
                                    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
   970
                                ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   971
                                    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
   972
                                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   973
                            ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   974
                        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   975
                        ^ self    
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   976
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   977
                    "/ some other method has changed;
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   978
                    "/ 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
   979
                    "/ 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
   980
                    self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   981
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   982
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   983
            ].
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
            something == #comment ifTrue:[
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
                 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
   988
                 currently showing the comment
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   989
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   990
                aspect == #comment ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   991
                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   992
                        self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   993
                        self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   994
                    ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   995
                        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
   996
                    ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   997
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   998
                self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
   999
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1000
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1001
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1002
            something == #definition ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1003
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1004
                 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
  1005
                 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
  1006
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1007
                aspect notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1008
                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1009
                        self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1010
                        self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1011
                    ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1012
                        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
  1013
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1014
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1015
                    "/ 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
  1016
                    "/ 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
  1017
                    self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1018
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1019
                    ^ self
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
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1022
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1023
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1024
            "/ 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
  1025
            "/ warn if modified
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
            aspect notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1028
                codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1029
                    self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1030
                    self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1031
                ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1032
                    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
  1033
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1034
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1035
            ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1036
        
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1037
            "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1038
             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
  1039
             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
  1040
            "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1041
            self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1042
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1043
            self updateMethodCategoryListWithScroll:false.
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
            "dont update codeView ...."
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1046
            "self update"
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
            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
  1049
            ^ self
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
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1052
        (currentClass notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1053
        and:[changedObject == currentClass superclass]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1054
            something == #definition ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1055
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1056
                 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
  1057
                 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
  1058
                 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
  1059
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1060
                aspect notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1061
                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1062
                        self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1063
                        self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1064
                    ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1065
                        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
  1066
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1067
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1068
                    "/ 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
  1069
                    "/ 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
  1070
                    self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1071
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1072
                    ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1073
                ].
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
        ].
2062
8c72522dd4f2 update if superclass of current changes its name.
Claus Gittinger <cg@exept.de>
parents: 2061
diff changeset
  1076
        
2241
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
         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
  1079
         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
  1080
         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
  1081
         or hierarchy ...
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
        currentClassHierarchy notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1084
            fullProtocol ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1085
                (currentClass isSubclassOf:changedObject) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1086
                    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
  1087
                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1088
            ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1089
                ((currentClass isSubclassOf:changedObject)
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1090
                or:[changedObject isSubclassOf:currentClass]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1091
                    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
  1092
                ]                
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
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1095
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1096
        (currentClassCategory = '* hierarchy *' 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1097
        or:[ currentClassCategory = '* all *' ]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1098
            self updateClassCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1099
            self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1100
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1101
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1102
        (something == #methodDictionary) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1103
            "/ 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
  1104
            "/ 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
  1105
            self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1106
        ].
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
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1109
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1110
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  1111
    something == #statistics ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1112
        currentMethod notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1113
            changedObject isMethod ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1114
                (changedObject == currentMethod 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1115
                or:[currentMethod isWrapped 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1116
                    and:[currentMethod originalMethod == changedObject]]) 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1117
                ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1118
                    self refetchMethod.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1119
                    "/ 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
  1120
                    "/ the update ...
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1121
                    changedObject removeDependent:self.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1122
                    self updateMethodListWithScroll:false keepSelection:true.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1123
                    changedObject addDependent:self.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1124
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1125
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1126
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1127
    ]
236
d94505a6f697 release currentMethod when compiling or change notification arrives
Claus Gittinger <cg@exept.de>
parents: 229
diff changeset
  1128
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  1129
    "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
  1130
    "Modified: / 30.7.1998 / 17:33:03 / cg"
1949
d6eb2a4f5e29 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1948
diff changeset
  1131
    "Modified: / 27.10.1998 / 12:02:05 / ps"
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1132
!
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1133
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1134
refetchClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1135
    "after a class definition change in another browser,
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1136
     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
  1137
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1138
"/    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
  1139
    self changeCurrentClass:(Smalltalk at:(currentClass name asSymbol)).
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1140
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1141
"/    showInstance ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1142
"/        actualClass := currentClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1143
"/    ] ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1144
"/        actualClass := currentClass class
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1145
"/    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1146
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1147
    "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
  1148
    "Modified: / 17.6.1998 / 16:51:14 / cg"
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1149
!
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1150
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1151
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
  1152
    |argList sensor|
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1153
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1154
    (changedObject == ObjectMemory) ifTrue:[
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1155
        (something == #earlyRestart 
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1156
        or:[something == #restarted
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1157
        or:[something == #returnFromSnapshot]]) ifTrue:[
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1158
            "/ those are to be ignored.
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1159
            ^ self
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1160
        ]
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1161
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1162
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1163
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1164
    "/ avoid update/warn after my own changes
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1165
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1166
    lockUpdates == true ifTrue:[
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1167
        ^ self
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1168
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1169
927
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  1170
    "/
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  1171
    "/ quick hack: delayed update fails, if I autoload
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  1172
    "/ LabelAndIcon in the update, and another browser
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  1173
    "/ gets a chance to do an update as well, trying to
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  1174
    "/ access the (temporarily nil) LabelAndIcon.
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1175
    "/ To get that beast out, do it synchronous for now.
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1176
    "/ also do it immediately, if not yet realized (no sensor)
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1177
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1178
    (LabelAndIcon isLoaded not
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1179
    or:[(sensor := self sensor) isNil]) ifTrue:[
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1180
        ^ 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
  1181
    ].
ccbc84af922c oops - dont delay update if occurring during startup;
Claus Gittinger <cg@exept.de>
parents: 908
diff changeset
  1182
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1183
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1184
    "/ if such an update is already in the queue, ignore it.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1185
    "/ 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
  1186
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1187
    argList := Array with:something 
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1188
                     with:someArgument 
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1189
                     with:changedObject.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1190
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1191
    (sensor 
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1192
        hasEvent:#delayedUpdate:with:from:
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1193
        for:self
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1194
        withArguments:argList) ifTrue:[
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1195
        ^ self
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1196
    ].
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1197
    sensor
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1198
        pushUserEvent:#delayedUpdate:with:from:
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1199
        for:self
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  1200
        withArguments:argList
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1201
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  1202
    "Modified: 26.3.1997 / 18:29:51 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1203
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1204
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1205
!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
  1206
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1207
classCategoryClone
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1208
    "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
  1209
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1210
    SystemBrowser openInClass:actualClass selector:currentSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1211
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1212
    "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
  1213
    "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
  1214
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1215
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1216
classCategoryFileOut
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1217
    "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
  1218
     into the current projects defaultDirectory."
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1219
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1220
    self classCategoryFileOutAsk:false
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1221
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1222
    "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
  1223
!
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1224
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1225
classCategoryFileOutAs
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1226
    "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
  1227
     into a file as user-specified."
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1228
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1229
    self classCategoryFileOutAsk:true
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1230
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1231
    "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
  1232
    "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
  1233
!
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1234
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1235
classCategoryFileOutAsk:doAsk
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1236
    "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
  1237
1510
ec5dd071b570 when filing out a class category, place all class-init expressions
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
  1238
    |aStream fileName classesToInitialize|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1239
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1240
    self checkClassCategorySelected ifFalse:[^ self].
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  1241
    (currentClassCategory startsWith:$*) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1242
	self warn:(resources string:'try a real category').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1243
	^ self
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1244
    ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1245
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1246
    fileName := currentClassCategory asString , '.st'.
1316
3fefcc2e9b16 mostly filename changes
Claus Gittinger <cg@exept.de>
parents: 1313
diff changeset
  1247
    fileName replaceAll:Character space with:$_.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1248
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1249
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1250
	|saveName fileBox dir|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1251
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1252
	doAsk ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1253
	    fileBox := FileSelectionBox
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1254
			    title:(resources string:'fileOut %1 as:' with:currentClassCategory)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1255
			    okText:(resources string:'fileOut')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1256
			    abortText:(resources string:'cancel')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1257
			    action:[:fileName |saveName := fileName.].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1258
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1259
	    fileBox initialText:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1260
	    dir := FileSelectionBox lastFileSelectionDirectory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1261
	    dir isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1262
		"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1263
		 this test allows a smalltalk to be built without Projects/ChangeSets
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1264
		"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1265
		Project notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1266
		    dir := Project currentProjectDirectory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1267
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1268
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1269
	    dir notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1270
		fileBox directory:dir.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1271
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1272
	    fileBox showAtPointer.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1273
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1274
	    fileBox destroy.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1275
	    fileBox := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1276
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1277
	    saveName isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1278
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1279
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1280
	    saveName isEmpty ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1281
		self warn:'bad name given'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1282
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1283
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1284
	    FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1285
	    fileName := saveName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1286
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1287
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1288
	     this test allows a smalltalk to be built without Projects/ChangeSets
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1289
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1290
	    Project notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1291
		fileName := Project currentProjectDirectory asFilename constructString: fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1292
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1293
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1294
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1295
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1296
	 if file exists, save original in a .sav file
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1297
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1298
	fileName asFilename exists ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1299
	    self busyLabel:'saving existing %1' with:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1300
	    fileName asFilename copyTo:(fileName , '.sav')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1301
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1302
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1303
	aStream := FileStream newFileNamed:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1304
	aStream isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1305
	    self warn:'cannot create: %1' with:fileName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1306
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1307
	    self busyLabel:'writing: %1' with:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1308
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1309
	    classesToInitialize := OrderedCollection new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1310
	    self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1311
		aClass isPrivate ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1312
		    (self listOfNamespaces includesIdentical:aClass nameSpace)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1313
		    ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1314
			self busyLabel:'writing: %1' with:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1315
			aClass isLoaded ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1316
			    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
  1317
			] ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1318
			    aClass fileOutOn:aStream withTimeStamp:true withInitialize:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1319
			    (aClass class implements:#initialize) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1320
				classesToInitialize add:aClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1321
			    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1322
			    aStream cr.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1323
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1324
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1325
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1326
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1327
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1328
	    "/ all class-inits at the end
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1329
	    "/ (this makes certain, that all classes have been loaded
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1330
	    "/  before possibly used/needed in an initializer
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1331
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1332
	    classesToInitialize do:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1333
		aClass printClassNameOn:aStream. aStream nextPutAll:' initialize'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1334
		aStream nextPutChunkSeparator.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1335
		aStream cr
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1336
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1337
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1338
	    aStream close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1339
	]
199
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
    self normalLabel.
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1342
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  1343
    "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
  1344
    "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
  1345
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1346
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1347
classCategoryFileOutBinaryEach
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1348
    "fileOut each class in the current category as binary bytecode."
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1349
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1350
    |mode|
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1351
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  1352
    (currentClassCategory startsWith:$*) ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1353
        self warn:(resources string:'try a real category').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1354
        ^ self
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1355
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1356
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1357
    mode := Dialog choose:(resources string:'save including sources ?')
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1358
                   labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1359
                   values:#(nil #discard #reference #keep)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1360
                   default:#keep.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1361
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1362
    mode isNil ifTrue:[^ self].
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1363
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1364
    self withBusyCursorDo:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1365
        self allClassesInCategory:currentClassCategory do:[:aClass |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1366
            aClass isPrivate ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1367
                (self listOfNamespaces includesIdentical:aClass nameSpace)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1368
                ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1369
                    self busyLabel:'saving binary of: %1' with:aClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1370
                    Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1371
                        self warn:'cannot create: %1' with:ex parameter.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1372
                        self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1373
                        ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1374
                    ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1375
                        aClass binaryFileOutWithSourceMode:mode.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1376
                    ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1377
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1378
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1379
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1380
        self normalLabel.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1381
    ]
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1382
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  1383
    "Created: / 25.1.1996 / 17:27:45 / cg"
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  1384
    "Modified: / 5.3.1998 / 02:45:30 / cg"
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1385
!
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1386
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1387
classCategoryFileOutEach
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1388
    self classCategoryFileOutEachAsk:false.
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1389
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1390
    "Modified: / 7.8.1998 / 17:11:25 / cg"
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1391
!
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1392
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1393
classCategoryFileOutEachAsk:doAsk
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1394
    |fileBox dir dirName|
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1395
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  1396
    (currentClassCategory startsWith:$*) ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1397
        self warn:(resources string:'try a real category').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1398
        ^ self
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1399
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1400
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1401
    doAsk ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1402
        fileBox := FileSelectionBox
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1403
                        title:(resources string:'fileOut %1 in:' with:currentClassCategory)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1404
                        okText:(resources string:'fileOut')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1405
                        abortText:(resources string:'cancel')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1406
                        action:[:fileName |dirName := fileName.].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1407
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1408
        dir := FileSelectionBox lastFileSelectionDirectory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1409
        dir isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1410
            "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1411
             this test allows a smalltalk to be built without Projects/ChangeSets
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1412
            "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1413
            Project notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1414
                dir := Project currentProjectDirectory
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1415
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1416
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1417
        dir notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1418
            fileBox directory:dir.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1419
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1420
        fileBox selectingDirectory:true.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1421
        fileBox showAtPointer.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1422
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1423
        fileBox destroy.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1424
        fileBox := nil.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1425
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1426
        dirName isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1427
            ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1428
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1429
        FileSelectionBox lastFileSelectionDirectory:dirName.
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1430
    ] ifFalse:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1431
        "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1432
         this test allows a smalltalk to be built without Projects/ChangeSets
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1433
        "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1434
        Project notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1435
            dirName := Project currentProjectDirectory asFilename.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1436
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1437
            dirName := Filename currentDirectory
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1438
        ]
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1439
    ].
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1440
    self withBusyCursorDo:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1441
        self allClassesInCategory:currentClassCategory do:[:aClass |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1442
            |fn|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1443
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1444
            aClass isPrivate ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1445
                (self listOfNamespaces includesIdentical:aClass nameSpace)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1446
                ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1447
                    self busyLabel:'saving: %1' with:aClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1448
                    Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1449
                        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
  1450
                        self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1451
                        ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1452
                    ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1453
                        fn := (Smalltalk fileNameForClass:aClass) , '.st'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1454
                        aClass fileOutAs:(dirName asFilename constructString:fn).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1455
                    ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1456
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1457
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1458
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  1459
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1460
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1461
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1462
    "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
  1463
    "Modified: / 12.8.1998 / 11:13:26 / cg"
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1464
!
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1465
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1466
classCategoryFileOutEachIn
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1467
    self classCategoryFileOutEachAsk:true.
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1468
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1469
    "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
  1470
!
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
classCategoryFindClass
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1473
    "find a class - and switch by default"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1474
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
  1475
    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
  1476
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1477
    "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
  1478
!
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
  1479
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
  1480
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
  1481
    "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
  1482
     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
  1483
2050
5ef6404d6172 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2048
diff changeset
  1484
    <resource: #style (#'dialogBox.okAtLeft')>
5ef6404d6172 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2048
diff changeset
  1485
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1486
    |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
  1487
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
  1488
    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
  1489
    open ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1490
        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
  1491
        okText := 'open'.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1492
        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
  1493
    ] ifFalse:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1494
        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
  1495
        okText := 'find'.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1496
        okText2 := 'open new'.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1497
    ].
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1498
    box := self 
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1499
                enterBoxForCodeSelectionTitle:title 
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1500
                withList:(ClassHistory collect: [:clsName| clsName upTo: $ ])
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1501
                okText:okText.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1502
    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
  1503
    openButton := Button label:(resources string:okText2).
2050
5ef6404d6172 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2048
diff changeset
  1504
    (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
  1505
        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
  1506
    ] ifFalse:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1507
        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
  1508
    ].
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
  1509
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
  1510
    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
  1511
       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
  1512
       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
  1513
       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
  1514
    ].
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
  1515
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1516
    box entryCompletionBlock:[:contents |
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1517
        |s what m|
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1518
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1519
        s := contents withoutSpaces.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1520
        what := Smalltalk classnameCompletion:s.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1521
        box contents:what first.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1522
        (what at:2) size ~~ 1 ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1523
            self beep
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1524
        ]
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1525
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1526
    box action:[:aString | className := aString].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1527
    box showAtPointer.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1528
1550
a1c0d6cb1954 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1543
diff changeset
  1529
    className notNil ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1530
        open ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1531
            brwsr := SystemBrowser open.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1532
            "/ brwsr topView waitUntilVisible.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1533
        ] ifFalse:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1534
            brwsr := self
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1535
        ].
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  1536
        brwsr switchToClassNameMatching:className.
1550
a1c0d6cb1954 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1543
diff changeset
  1537
    ]
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1538
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1539
    "Created: / 1.6.1996 / 16:03:15 / cg"
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  1540
    "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
  1541
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1542
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1543
classCategoryFindMethod
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1544
    |box restart matchBlock|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1545
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1546
    box := self 
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1547
                listBoxForCodeSelectionTitle:'selector to find:\\(Tab for completion or use matchPattern)' withCRs 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1548
                okText:'find'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1549
    box label:(resources string:'find method').
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1550
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1551
    matchBlock := [ |s l|
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1552
                        s := box contents.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1553
                        s includesMatchCharacters ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1554
                            l := Set new.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1555
                            Smalltalk allClassesDo:[:cls |
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1556
                                cls selectorsAndMethodsDo:[:sel :mthd | |info|
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1557
                                    (s match:sel) ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1558
                                        l add:sel.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1559
                                    ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1560
                                ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1561
                                cls class selectorsAndMethodsDo:[:sel :mthd | |info|
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1562
                                    (s match:sel) ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1563
                                        l add:sel.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1564
                                    ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1565
                                ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1566
                            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1567
                            box list:(l asOrderedCollection sort).
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1568
                            false.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1569
                        ] ifFalse:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1570
                            true
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1571
                        ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1572
                      ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1573
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1574
    box entryCompletionBlock:[:contents |
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1575
        |s what m longest matching|
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1576
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1577
        box topView withWaitCursorDo:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1578
            s := contents withoutSpaces.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1579
            s includesMatchCharacters ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1580
                matchBlock value
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1581
            ] ifFalse:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1582
                what := Smalltalk selectorCompletion:s.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1583
                longest := what first.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1584
                matching := what last.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1585
                box list:matching.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1586
                box contents:longest.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1587
                matching size ~~ 1 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1588
                    self beep
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1589
                ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1590
            ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1591
        ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1592
    ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1593
    box acceptCheck:matchBlock.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1594
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1595
    [:restart |
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1596
        box action:[:aString | 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1597
                        aString includesMatchCharacters ifFalse:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1598
                            self switchToAnyMethod:aString.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1599
                        ] ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1600
                            restart value
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1601
                        ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1602
                    ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1603
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1604
        box showAtPointer.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1605
    ] valueWithRestart
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1606
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  1607
    "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
  1608
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1609
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1610
classCategoryMenu
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1611
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1612
    <resource: #keyboard ( #Find #Cmdn) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  1613
    <resource: #programMenu >
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1614
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  1615
    |specialMenu m items labels selectors shorties|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1616
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1617
    currentClassCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1618
	items :=  #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1619
		    ('fileOut each binary...'    classCategoryFileOutBinaryEach      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1620
		    ('-'                         nil                                 )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1621
		    ('repository history...'     classCategoryRepositoryHistory      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1622
		    ('validate class revisions'  classCategoryValidateClassRevisions )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1623
		    ('-'                         nil                                 )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1624
		    ('checkin each...'           classCategoryCheckinEach            )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1625
		    ('-'                         nil                                 )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1626
		    ('load from repository...'   classCategoryLoadFromRepository     )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1627
		   ).
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1628
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1629
	items :=  #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1630
		    ('repository history...'    classCategoryRepositoryHistory )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1631
		    ('-'                         nil                            )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1632
		    ('load from repository...'  classCategoryLoadFromRepository)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1633
		   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1634
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1635
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1636
    specialMenu := PopUpMenu 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1637
			itemList:items
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1638
			resources:resources.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1639
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1640
    (Smalltalk sourceCodeManager isNil) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1641
	specialMenu disableAll:#(classCategoryRepositoryHistory  
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1642
				 classCategoryCheckinEach
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1643
				 classCategoryValidateClassRevisions
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1644
				 classCategoryLoadFromRepository
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1645
				).
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
  1646
    ].
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1647
    (currentClassCategory = '* hierarchy *'
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1648
    or:[currentClassCategory = '* obsolete *']) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1649
	specialMenu disableAll:#(classCategoryFileOutBinaryEach
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1650
				 classCategoryCheckinEach
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1651
				 classCategoryValidateClassRevisions
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1652
				).
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1653
    ].
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
  1654
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1655
    device ctrlDown ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1656
	^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1657
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1658
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1659
    currentClassCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1660
	items := #(
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1661
"/                    ('namespace...'           namespaceDialog               )
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  1662
"/                    ('-'                       nil                           )
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  1663
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1664
		    ('clone'                   classCategoryClone            )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1665
		    ('open for class...'      classCategoryOpenInClass      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1666
		    ('spawn full class'        classCategorySpawnFullClass   )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1667
		    ('-'                       nil                           )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1668
		    ('update'                  classCategoryUpdate           )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1669
		    ('find class...'          classCategoryFindClass      #Find )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1670
		    ('find method...'         classCategoryFindMethod       )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1671
		    ('class history'           classHistoryMenu              )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1672
		    ('-'                       nil                           )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1673
		    ('new class category...'  classCategoryNewCategory    #Cmdn )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1674
		    ('='                       nil                           )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1675
		    ('others'                  otherMenu                   #Ctrl )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1676
		   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1677
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1678
	items := #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1679
		    ('fileOut'                 classCategoryFileOut            )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1680
		    ('fileOut as...'           classCategoryFileOutAs          )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1681
		    ('fileOut each'            classCategoryFileOutEach        )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1682
		    ('fileOut each in...'      classCategoryFileOutEachIn      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1683
		    ('printOut'                classCategoryPrintOut           )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1684
		    ('printOut protocol'       classCategoryPrintOutProtocol   )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1685
		    ('-'                       nil                             )
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  1686
"/                    ('namespace...'           namespaceDialog                 )
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  1687
"/                    ('-'                       nil                             )
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1688
		    ('clone'                   classCategoryClone            Cmdc )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1689
		    ('open for class...'      classCategoryOpenInClass      Cmdo )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1690
		    ('SPAWN_CATEGORY'          classCategorySpawn              )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1691
		    ('spawn full class'        classCategorySpawnFullClass     )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1692
		    ('-'                       nil                             )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1693
		    ('update'                  classCategoryUpdate             )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1694
		    ('find class...'          classCategoryFindClass        Find )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1695
		    ('find method...'         classCategoryFindMethod          )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1696
		    ('class history'           classHistoryMenu                )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1697
		    ('-'                       nil                             )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1698
		    ('new class category...'  classCategoryNewCategory      Cmdn )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1699
		    ('rename...'              classCategoryRename              )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1700
		    ('remove...'              classCategoryRemove              )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1701
		    ('='                       nil                             )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1702
		    ('others'                  otherMenu                     Ctrl )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1703
		   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1704
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1705
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1706
    m := PopUpMenu 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1707
		itemList:items
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1708
		resources:resources.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1709
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1710
    m subMenuAt:#otherMenu put:specialMenu.
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  1711
    m subMenuAt:#classHistoryMenu put:self classHistoryMenu.
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1712
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1713
    ((currentClassCategory = '* hierarchy *') 
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1714
    or:[currentClassCategory = '* obsolete *']) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1715
	m disableAll:#(classCategoryFileOut classCategoryFileOutAs classCategoryFileOutEach
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1716
		       classCategoryFileOutEachIn
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1717
		       classCategoryPrintOut classCategoryPrintOutProtocol      
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1718
		       classCategoryRename classCategoryRemove)
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1719
    ].
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1720
    (currentClassCategory = '* obsolete *') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1721
	m disableAll:#(classCategorySpawn classCategorySpawnFullClass)
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  1722
    ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1723
    ^ m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1724
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  1725
    "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
  1726
    "Modified: / 16.1.1998 / 17:16:28 / stefan"
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  1727
    "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
  1728
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1729
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1730
classCategoryNewCategory
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1731
    |box|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1732
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1733
    box := self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1734
		enterBoxTitle:'name of new class category:' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1735
		okText:'create'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1736
		label:'create category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1737
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1738
    box action:[:aString |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1739
	|categories|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1740
	categories := classCategoryListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1741
	(categories includes:aString) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1742
	    categories add:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1743
	    categories sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1744
	    classCategoryListView setContents:categories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1745
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1746
	currentClassCategory := aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1747
	classCategoryListView setSelectElement:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1748
	self changeCurrentClass:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1749
	actualClass := acceptClass := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1750
	self classCategorySelectionChanged
79
d78f92a07d5d *** empty log message ***
claus
parents: 74
diff changeset
  1751
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1752
    box showAtPointer
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1753
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1754
    "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
  1755
    "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
  1756
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1757
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  1758
classCategoryOpenInClass
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1759
    "find a class - and open a browser (by default)"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1760
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
  1761
    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
  1762
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1763
    "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
  1764
!
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  1765
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1766
classCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1767
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1768
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1769
    self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1770
	(self listOfNamespaces includesIdentical:aClass nameSpace)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1771
	ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1772
	    printStream := Printer new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1773
	    aClass printOutOn:printStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1774
	    printStream close
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1775
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1776
    ]
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1777
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1778
    "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
  1779
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1780
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1781
classCategoryPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1782
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1783
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1784
    Smalltalk allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1785
	(self listOfNamespaces includesIdentical:aClass nameSpace)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1786
	ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1787
	    printStream := Printer new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1788
	    aClass printOutProtocolOn:printStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1789
	    printStream close
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1790
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1791
    ]
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1792
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1793
    "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
  1794
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1795
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1796
classCategoryRemove
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1797
    "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
  1798
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1799
    |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
  1800
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1801
    self checkClassCategorySelected ifFalse:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1802
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1803
    classesToRemove := IdentitySet new.
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1804
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1805
    self allClassesInSelectedNamespacesDo:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1806
	aClass category = currentClassCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1807
	    classesToRemove add:aClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1808
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1809
    ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1810
    subclassesRemoved := IdentitySet new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1811
    classesToRemove do:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1812
	aClass allSubclassesDo:[:aSubclass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1813
	    (classesToRemove includes:aSubclass) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1814
		(subclassesRemoved includes:aSubclass) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1815
		    subclassesRemoved add:aSubclass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1816
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1817
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1818
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1819
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1820
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1821
    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
  1822
    t := resources 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1823
	    string:'remove all classes in ''%1'' ?' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1824
	    with:currentClassCategory asText allBold.
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1825
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1826
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1827
       count == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1828
	   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
  1829
       ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1830
	   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
  1831
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1832
       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
  1833
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1834
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1835
    count := subclassesRemoved size.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1836
    overallCount := overallCount + count.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1837
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1838
       count == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1839
	   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
  1840
       ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1841
	   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
  1842
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1843
       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
  1844
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1845
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1846
    t := t withCRs.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1847
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1848
    box := YesNoBox 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1849
	       title:t
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1850
	       yesText:(resources at:'remove')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1851
	       noText:(resources at:'cancel').
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1852
    box label:(resources at:'remove category').
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1853
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1854
    overallCount ~~ 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1855
	"/ should we disable the returnDefault here ?
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1856
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1857
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1858
    box confirm ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1859
	"after querying user - do really remove classes in list1 and list2"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1860
	|keep idx oldPosition doRemoveThis yesToAll|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1861
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1862
	yesToAll := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1863
	keep := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1864
	(subclassesRemoved asOrderedCollection , classesToRemove asOrderedCollection) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1865
	do:[:aClassToRemove |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1866
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1867
	    doRemoveThis := CheckForInstancesWhenRemovingClasses not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1868
			    or:[yesToAll
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1869
			    or:[aClassToRemove hasInstances not]].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1870
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1871
	    doRemoveThis ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1872
		doRemoveThis := Dialog
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1873
			    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
  1874
			    labels:#('cancel' 'no' 'remove all' 'remove')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1875
			    values:#(nil false #removeAll true) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1876
			    default:4.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1877
		doRemoveThis isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1878
		    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1879
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1880
		doRemoveThis == #removeAll ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1881
		    doRemoveThis := yesToAll := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1882
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1883
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1884
	    doRemoveThis ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1885
		aClassToRemove removeFromSystem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1886
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1887
		keep := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1888
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1889
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1890
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1891
	"/ self updateClassCategoryList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1892
	self updateClassCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1893
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1894
	(classCategoryListView list includes:currentClassCategory) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1895
	    currentClassCategory := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1896
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1897
	self classCategorySelectionChanged.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1898
        
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1899
	self changeCurrentClass:nil.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1900
"/        keep ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1901
"/            idx := classCategoryListView list indexOf:currentClassCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1902
"/            currentClassCategory := nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1903
"/            idx ~= 0 ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1904
"/                classCategoryListView removeIndex:idx.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1905
"/            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1906
"/        ].
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  1907
    ].
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  1908
    box destroy
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
  1909
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  1910
    "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
  1911
    "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
  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
classCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1915
    "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
  1916
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1917
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1918
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1919
    self checkClassCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1920
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1921
    box := self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1922
		enterBoxTitle:(resources 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1923
				string:'rename category ''%1'' to:' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1924
				  with:currentClassCategory asText allBold) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1925
		okText:'rename'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1926
		label:'rename category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1927
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1928
    box initialText:currentClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1929
    box action:[:aString | self renameCurrentClassCategoryTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1930
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1931
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  1932
    "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
  1933
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1934
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1935
classCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1936
    "create a new SystemBrowser browsing current classCategory"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1937
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1938
    currentClassCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1939
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1940
	    SystemBrowser browseClassCategory:currentClassCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1941
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1942
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1943
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1944
    "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
  1945
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1946
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1947
classCategorySpawnFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1948
    "create a new SystemBrowser browsing full class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1949
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1950
    |newBrowser|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1951
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1952
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1953
	newBrowser := SystemBrowser browseFullClasses
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1954
" "
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1955
	.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1956
	currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1957
	    newBrowser switchToClassNamed:(currentClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  1958
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1959
" "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1960
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1961
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1962
    "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
  1963
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1964
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1965
classCategoryUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1966
    "update class category list and dependants"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1967
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1968
    |oldClass oldClassName oldMethodCategory newClass|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1969
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1970
    classCategoryListView notNil ifTrue:[
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1971
        self setListOfNamespaces.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1972
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1973
        (oldClass := currentClass) notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1974
            oldClassName := currentClass name.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1975
            (oldClassName endsWith:'-old') ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1976
                oldClassName := oldClassName copyWithoutLast:4 "copyTo:(oldClassName size - 4)"
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1977
            ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1978
        ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1979
        oldMethodCategory := currentMethodCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1980
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1981
        classCategoryListView setContents:(self listOfAllClassCategories).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1982
        currentClassCategory notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1983
            classCategoryListView setSelectElement:currentClassCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1984
            self classCategorySelectionChanged.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1985
            oldClassName notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1986
                classListView setSelectElement:oldClassName.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1987
                oldClass isJavaClass ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1988
                    newClass := (Java at:oldClassName).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1989
                ] ifFalse:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1990
                    newClass := (Smalltalk at:oldClassName asSymbol).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1991
                ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1992
                newClass isNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1993
                    self warn:'oops - ' , oldClassName , ' is gone.'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1994
                ] ifFalse:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1995
                    self changeCurrentClass:newClass.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1996
                    self classSelectionChanged.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1997
                    oldMethodCategory notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1998
                        methodCategoryListView setSelectElement:oldMethodCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  1999
                        currentMethodCategory := oldMethodCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2000
                        self methodCategorySelectionChanged
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2001
                    ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2002
                ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2003
            ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2004
        ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2005
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2006
        self updateNamespaceList
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2007
    ]
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2008
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2009
    "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
  2010
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2011
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2012
!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
  2013
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2014
classCategoryCheckinEach
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2015
    (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
  2016
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2017
    self withBusyCursorDo:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2018
        |logMessage classes|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2019
2529
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
  2020
        logMessage := SourceCodeManagerUtilities 
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
  2021
                        getLogMessageFor:(resources
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
  2022
                                             string:'(any in classCategory ''%1'')'
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
  2023
                                             with:currentClassCategory).
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2024
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2025
        logMessage notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2026
            (currentClassCategory = '* all *'
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2027
            or:[currentClassCategory = '* hierarchy *']) ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2028
                classes := self allClasses
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2029
            ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2030
                classes := self allClassesInCategory:currentClassCategory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2031
            ].
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  2032
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  2033
            SourceCodeManagerUtilities
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  2034
                checkinClasses:classes withLog:logMessage.
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2035
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2036
        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
  2037
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2038
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2039
    "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
  2040
    "Modified: 15.6.1996 / 00:25:58 / stefan"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2041
    "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
  2042
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2043
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2044
classCategoryLoadFromRepository
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2045
    "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
  2046
     Allows load of a containers contents"
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2047
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2048
    |bindings m
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2049
     moduleList packageList containerList fileNameList
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2050
     moduleSelection packageSelection containerSelection
1671
cc16fd031dcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2051
     loadEnabled loadAction dialog|
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2052
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2053
    loadAction := [:dummy |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2054
	    |aStream module package container list packageID|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2055
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2056
	    module := moduleSelection value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2057
	    package := packageSelection value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2058
	    list := containerSelection value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2059
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2060
	    packageID := module , ':' , package.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2061
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2062
	    dialog window withWaitCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2063
		list do:[:container |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2064
		    "/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2065
		    "/ special: if its a 'loadAll' file,
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2066
		    "/ or a project-file, extract all from the repository
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2067
		    "/ and perform some special load action.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2068
		    "/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2069
		    ((container = 'loadAll') 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2070
		    or:[container asLowercase asFilename hasSuffix:'prj']) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2071
			SourceCodeManager
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2072
			    checkoutModule:module 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2073
			    package:package 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2074
			    andDo:[:tempDir |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2075
				|oldPath wasLazy|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2076
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2077
				self activityNotification:'loading ' , container , ' ...'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2078
				(container = 'loadAll') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2079
				    [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2080
					Class withoutUpdatingChangesDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2081
					    oldPath := Smalltalk systemPath.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2082
					    Smalltalk systemPath:(oldPath copy addFirst:tempDir pathName; yourself).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2083
					    wasLazy := Compiler compileLazy:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2084
					    Class packageQuerySignal answer:packageID do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2085
						(tempDir construct:container) fileIn.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2086
					    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2087
					].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2088
				    ] valueNowOrOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2089
					Compiler compileLazy:wasLazy.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2090
					Smalltalk systemPath:oldPath.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2091
				    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2092
				] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2093
				    self halt:'unimplemented: project-loading'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2094
				]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2095
			    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2096
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2097
			aStream := SourceCodeManager 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2098
				streamForClass:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2099
				fileName:container 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2100
				revision:#newest
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2101
				directory:package
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2102
				module:module
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2103
				cache:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2104
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2105
			self activityNotification:'loading ' , container , ' ...'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2106
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2107
			aStream isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2108
			    self warn:'could not load ' , container , ' from repository'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2109
			] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2110
			    self busyLabel:'loading from %1' with:(module , '/' , package , '/' , container).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2111
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2112
			    Class withoutUpdatingChangesDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2113
				[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2114
				    Class packageQuerySignal answer:packageID do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2115
					aStream fileIn.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2116
				    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2117
				] valueNowOrOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2118
				    aStream close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2119
				    self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2120
				    Smalltalk changed.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2121
				].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2122
			    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2123
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2124
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2125
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2126
		self activityNotification:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2127
	    ]
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2128
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2129
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2130
    bindings := IdentityDictionary new.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2131
    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
  2132
    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
  2133
    bindings at:#containerSelection put:(containerSelection := #() asValue).
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2134
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2135
    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
  2136
    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
  2137
    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
  2138
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2139
    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
  2140
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2141
    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
  2142
    bindings at:#containerDoubleClicked put:loadAction.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2143
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2144
    packageSelection 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2145
	onChangeSend:#value 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2146
	to:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2147
	     |list|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2148
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2149
	     dialog window withWaitCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2150
		 list := SourceCodeManager 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2151
			    getExistingContainersInModule:(moduleSelection value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2152
			    package:(packageSelection value).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2153
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2154
		 list := list select:[:nm | |lcName f|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2155
					    lcName := nm asLowercase.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2156
					    ((f := lcName asFilename) hasSuffix:'st')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2157
					    or:[false "/ (f hasSuffix:'prj')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2158
					    or:[lcName = 'loadall']]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2159
				     ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2160
		 fileNameList := list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2161
		 list := list collect:[:nm | |lcName f|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2162
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2163
					     lcName := nm asLowercase.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2164
					     ((f := lcName asFilename) hasSuffix:'st') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2165
						nm asFilename withoutSuffix name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2166
					     ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2167
						nm
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2168
					     ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2169
				      ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2170
		 containerList value:list.
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2171
"/
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2172
"/ do not auto-select the first item
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2173
"/                 list notEmpty ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2174
"/                    containerSelection value:(Array with:list first)
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2175
"/                 ]
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2176
	     ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2177
	     self activityNotification:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2178
	   ].
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2179
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2180
    moduleSelection 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2181
	onChangeSend:#value 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2182
	to:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2183
	     |list|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2184
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2185
	     dialog window withWaitCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2186
		 list := SourceCodeManager getExistingPackagesInModule:(moduleSelection value).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2187
		 packageList value:list.
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2188
"/
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2189
"/ do not auto-select the first item
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2190
"/                 list notEmpty ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2191
"/                     packageSelection value:list first
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2192
"/                 ]
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2193
	     ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2194
	     self activityNotification:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2195
	   ].
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2196
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2197
    containerSelection
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2198
	onChangeSend:#value
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2199
	to:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2200
	     loadEnabled value:(containerSelection value notEmpty).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2201
	   ].
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2202
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2203
    self withWaitCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2204
	|list|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2205
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2206
	moduleList value:(list := SourceCodeManager getExistingModules).
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2207
"/        list notEmpty ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2208
"/            "/ 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
  2209
"/            (list includes:(m := OperatingSystem getLoginName)) ifFalse:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2210
"/                "/ if there is a module named 'stx', use that one.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2211
"/                (list includes:'stx') ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2212
"/                    m := 'stx'
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2213
"/                ] ifFalse:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2214
"/                    m := list first
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2215
"/                ]
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2216
"/             ].
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2217
"/             moduleSelection setValue:m.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2218
"/             list := SourceCodeManager getExistingPackagesInModule:m.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2219
"/             packageList value:list.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2220
"/        ].
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2221
    ].
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2222
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2223
    self activityNotification:nil.
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2224
1671
cc16fd031dcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2225
    dialog := SimpleDialog new.
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2226
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2227
    Object activityNotificationSignal handle:[:ex |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2228
	|msg|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2229
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2230
	msg := 'Load from repository'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2231
	ex errorString size > 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2232
	    msg := msg , ' - ' , ex errorString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2233
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2234
	dialog window topView label:msg.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2235
	ex proceed.
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2236
    ] do:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2237
	dialog
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2238
	    openFor:self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2239
	    spec:self class repositoryLoadSpec 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2240
	    withBindings:bindings
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  2241
    ]
1671
cc16fd031dcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2242
    "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
  2243
!
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2244
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2245
classCategoryRepositoryHistory
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2246
    (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
  2247
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2248
    self withBusyCursorDo:[
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2249
        |timeGoal repositoryFilter aStream box y component 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2250
         timeGoalListPop repositoryFilterPop|
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2251
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2252
        box := Dialog new.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2253
        (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
  2254
        box addVerticalSpace:20.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2255
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2256
        timeGoal := 'yesterday' asValue. 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2257
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2258
        y := box yPosition.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2259
        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
  2260
        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
  2261
        box yPosition:y.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2262
        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
  2263
        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
  2264
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2265
        timeGoalListPop list:#('yesterday'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2266
                               'a week ago'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2267
                               'a month ago'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2268
                               'a year ago'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2269
                               'all'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2270
                              ).
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2271
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2272
        y := box yPosition.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2273
        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
  2274
        component width:0.5; adjust:#right; borderWidth:0.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2275
        box yPosition:y.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2276
        repositoryFilterPop := box addComboBoxOn:repositoryFilter tabable:true.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2277
        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
  2278
        repositoryFilterPop list:#(
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2279
                                "/ to do - get list of available repositories ...
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2280
                                'stx'
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2281
                                'exept'
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2282
                                ''
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2283
                               ).
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2284
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2285
        box addAbortAndOkButtons.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2286
        box open.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2287
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2288
        box accepted ifTrue:[
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2289
            repositoryFilter := repositoryFilter value.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2290
            repositoryFilter size == 0 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2291
                ifTrue:[repositoryFilter := nil]
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2292
                ifFalse:[repositoryFilter := Array with:repositoryFilter].
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2293
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2294
            timeGoal := timeGoal value.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2295
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2296
"/        timeGoal := Dialog 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2297
"/                         request:'list changed repository containers since (mm/dd):
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2298
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2299
"/You can also specify the date as 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2300
"/''yesterday'', ''a week ago'' or ''a month ago''
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2301
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2302
"/'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2303
"/                         initialAnswer:'yesterday'  
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2304
"/                         onCancel:nil.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2305
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2306
"/        timeGoal notNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2307
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2308
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2309
            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
  2310
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2311
            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
  2312
            Processor activeProcess 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2313
                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
  2314
            do:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2315
                SourceCodeManager notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2316
                    SourceCodeManager
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2317
                        writeHistoryLogSince:timeGoal 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2318
                        filterSTSources:true 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2319
                        filterUser:nil 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  2320
                        filterRepository:repositoryFilter
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2321
                        to:aStream.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2322
                ] ifFalse:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2323
                    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
  2324
                ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2325
            ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2326
            codeView contents:(aStream contents).
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2327
            codeView modified:false.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2328
            codeView acceptAction:nil.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2329
            self clearExplainAction.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2330
            methodListView notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2331
                methodListView setSelection:nil
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2332
            ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2333
            aspect := nil.      
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2334
            self normalLabel
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  2335
        ].
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2336
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2337
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2338
    "Created: 23.11.1995 / 11:41:38 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2339
    "Modified: 18.8.1997 / 15:42:46 / cg"
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2340
!
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2341
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2342
classCategoryValidateClassRevisions
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2343
    "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
  2344
     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
  2345
     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
  2346
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2347
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2348
	|logMessage classes repVersion clsVersion binVersion
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2349
	 count unloadedCount badCount cat needCheckIn|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2350
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2351
	cat := currentClassCategory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2352
	(cat = '* hierarchy *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2353
	    cat := '* all *'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2354
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2355
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2356
	classes := self listOfAllClassesInCategory:cat names:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2357
	classes isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2358
	    Transcript showCR:'no classes to validate'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2359
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2360
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2361
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2362
	count := unloadedCount := badCount := needCheckIn := 0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2363
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2364
	Transcript cr.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2365
	Transcript showCR:'-------------------------------------------------'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2366
	Transcript showCR:'checking class revisions vs. repository ...'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2367
	Transcript cr.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2368
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2369
	classes do:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2370
	    |clsName msg sourceCodeManager repSource currentSource aStream|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2371
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2372
	    count := count + 1.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2373
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2374
	    "/ 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
  2375
                
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2376
	    clsName := aClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2377
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2378
	    aClass isLoaded ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2379
		unloadedCount := unloadedCount + 1.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2380
		(currentClassCategory ~= '* all *'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2381
		and:[currentClassCategory ~= '* hierarchy *']) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2382
		    msg := '?? ''' , clsName , ''' is not loaded - skipped check'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2383
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2384
	    ] ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2385
		((aClass isNamespace not or:[aClass == Smalltalk])
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2386
		and:[aClass topOwningClass isNil]) ifTrue:[
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  2387
                
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  2388
"/                    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
  2389
                
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2390
		    sourceCodeManager := aClass sourceCodeManager.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2391
		    sourceCodeManager isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2392
			msg := '?? ''' , clsName , ''' has no sourceCodeManager - skipped check'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2393
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2394
			repVersion := sourceCodeManager newestRevisionOf:aClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2395
			repVersion isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2396
			    msg := '-- ' , clsName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2397
				    , ' not in repository'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2398
			] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2399
			    clsVersion := aClass revision.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2400
			    binVersion := aClass binaryRevision.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2401
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2402
			    clsName := aClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2403
			    msg := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2404
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2405
			    clsVersion ~= repVersion ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2406
				badCount := badCount + 1.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2407
				msg := '** ' , clsName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2408
					, ' is not up-to-date (this: '
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2409
					, clsVersion printString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2410
					, ' repository: '
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2411
					, repVersion printString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2412
					, ').'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2413
				msg := msg asText allBold.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2414
			    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2415
				clsVersion ~= binVersion ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2416
				    binVersion notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2417
					msg := clsName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2418
					       , ' up-to-date (but should be stc-recompiled)'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2419
				    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2420
				] ifFalse:[
1096
3e3af3c70de1 handle no-sourceCodeManager case when validating classes.
Claus Gittinger <cg@exept.de>
parents: 1095
diff changeset
  2421
    "/                              msg := clsName , ' is up-to-date.'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2422
				].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2423
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2424
				"/ compare the sources;
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2425
				"/ to find classes which need a checkin.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2426
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2427
				aStream := sourceCodeManager getMostRecentSourceStreamForClassNamed:aClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2428
				repSource := aStream contents asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2429
				aStream close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2430
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2431
				aStream := '' writeStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2432
				Method flushSourceStreamCache.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2433
				aClass fileOutOn:aStream withTimeStamp:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2434
				currentSource := aStream contents asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2435
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2436
				repSource ~= currentSource ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2437
				    msg := '-- ' , clsName , ' should be checked into the repository'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2438
				    needCheckIn := needCheckIn + 1.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2439
				].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2440
			    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2441
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2442
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2443
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2444
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2445
	    msg notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2446
		Transcript showCR:msg
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2447
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2448
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2449
	Transcript cr.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2450
	Transcript showCR:'----------------------------------------------------------'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2451
	Transcript showCR:('%1 classes / %2 unloaded / %3 need checkout / %4 need checkin.'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2452
			   bindWith:count with:unloadedCount with:badCount with:needCheckIn).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2453
	Transcript showCR:'----------------------------------------------------------'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2454
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2455
	self normalLabel.
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2456
    ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2457
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2458
    "Modified: 15.6.1996 / 00:25:58 / stefan"
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  2459
    "Created: 29.10.1996 / 13:21:08 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2460
    "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
  2461
! !
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2462
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2463
!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
  2464
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2465
checkClassCategorySelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2466
    currentClassCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2467
	self warn:'select a class category first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2468
	^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2469
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2470
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2471
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2472
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2473
classCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2474
    "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
  2475
     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
  2476
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2477
    |newCategory oldClass oldName classIndex list|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2478
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2479
    newCategory := classCategoryListView selectionValue.
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
  2480
    (newCategory = '* all *'
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  2481
     or:[newCategory = '* hierarchy *'
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  2482
     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
  2483
    ) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2484
	"switch to all or hierarchy:
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2485
	 remember current class and reselect it        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2486
	 after showing the updated class list
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2487
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2488
	oldClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2489
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2490
    currentClassCategory := newCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2491
    oldClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2492
	self classCategorySelectionChanged
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2493
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2494
	oldName := oldClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2495
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2496
	    self updateClassList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2497
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2498
	"stupid - search for class name in (indented) list"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2499
	list := classListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2500
	list notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2501
	    classIndex := list findFirst:[:elem | elem withoutSpaces = oldName asString].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2502
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2503
	    classIndex := 0
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2504
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2505
	classIndex ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2506
	    classListView setSelection:classIndex.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2507
	    self changeCurrentClass:(Smalltalk at:(oldName asSymbol))
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2508
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2509
	    self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2510
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2511
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2512
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  2513
    "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
  2514
    "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
  2515
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2516
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2517
classCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2518
    "class category has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2519
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2520
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2521
	self changeCurrentClass:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2522
	aspect := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2523
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2524
	actualClass := acceptClass := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2525
	currentMethodCategory := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2526
	self releaseMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2527
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2528
	self updateClassList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2529
	self updateMethodCategoryList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2530
	self updateMethodList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2531
	self updateCodeView.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2532
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2533
	self clearExplainAction.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2534
	codeView acceptAction:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2535
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2536
	(currentClassCategory = '* removed *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2537
	    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
  2538
but there are still referenced instances of them around.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2539
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2540
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
  2541
'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2542
	]
1363
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  2543
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2544
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  2545
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  2546
    "Modified: / 27.7.1998 / 10:56:23 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2547
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2548
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2549
listOfAllClassCategories
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2550
    "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
  2551
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2552
    |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
  2553
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  2554
    newList := Set new.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  2555
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2556
    currentNamespace = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2557
	nameSpaceList := Array with:Smalltalk.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2558
	allNameSpaces := true.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2559
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2560
	nameSpaceList := self listOfNamespaces.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2561
	allNameSpaces := false.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2562
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2563
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2564
    nameSpaceList do:[:aNamespace |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2565
	aNamespace allBehaviorsDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2566
	    aClass isMeta ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2567
		(aClass isNamespace not 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2568
		or:[aClass == Namespace 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2569
		or:[aClass == Smalltalk]]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2570
		    (allNameSpaces or:[aClass nameSpace == aNamespace]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2571
			cat := aClass category.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2572
			cat isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2573
			    cat := '* no category *'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2574
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2575
			cat ~= 'obsolete' ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2576
			    newList add:cat
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2577
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2578
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2579
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2580
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2581
	]
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  2582
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  2583
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  2584
    newList notEmpty ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2585
	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
  2586
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  2587
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2588
    ^ newList asOrderedCollection sort.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  2589
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  2590
    "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
  2591
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2592
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2593
renameCurrentClassCategoryTo:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2594
    "helper - do the rename"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2595
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2596
    |any categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2597
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2598
    currentClassCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2599
	any := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2600
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2601
	self allClassesInSelectedNamespacesDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2602
	    aClass category = currentClassCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2603
		aClass category:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2604
		any := true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2605
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2606
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2607
	any ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2608
	    categories := classCategoryListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2609
	    categories remove:currentClassCategory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2610
	    categories add:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2611
	    categories sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2612
	    classCategoryListView setContents:categories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2613
	    currentClassCategory := aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2614
	    classCategoryListView setSelectElement:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2615
	] ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2616
	    currentClassCategory := aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2617
	    self updateClassCategoryList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2618
	    self updateClassListWithScroll:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2619
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2620
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  2621
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  2622
    "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
  2623
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2624
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2625
switchToAnyMethod:aSelectorString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2626
    "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
  2627
     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
  2628
     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
  2629
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2630
    |classes sel box theClassName|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2631
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2632
    classes := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2633
    aSelectorString knownAsSymbol ifTrue:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2634
        sel := aSelectorString asSymbol.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2635
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2636
        Smalltalk allClassesDo:[:aClass |
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2637
            (aClass includesSelector:sel) ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2638
                classes add:aClass.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2639
            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2640
            (aClass class includesSelector:sel) ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2641
                classes add:aClass class.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2642
            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2643
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2644
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2645
    classes size == 0 ifTrue:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2646
        SystemBrowser showNoneFound.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2647
        ^ self
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2648
    ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2649
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2650
    classes size > 1 ifTrue:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2651
        box := ListSelectionBox 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2652
                    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
  2653
        box label:'find method'.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2654
        box okText:(resources string:'show').
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2655
        box list:(classes collect:[:aClass | aClass name]) asSortedCollection.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2656
        box action:[:aString | theClassName := aString].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2657
        box entryCompletionBlock:[:contents |
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2658
            |s l what m names|
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2659
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2660
            s := contents withoutSpaces.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2661
            s size == 0 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2662
                l := classes
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2663
            ] ifFalse:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2664
                l := classes select:[:cls | cls name startsWith:s].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2665
            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2666
            l size == 0 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2667
                l := classes select:[:cls | cls name asLowercase startsWith:s asLowercase].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2668
            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2669
            l size > 0 ifTrue:[    
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2670
                box list:(names := l collect:[:aClass | aClass name]) asSortedCollection.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2671
                box contents:(names longestCommonPrefix). "/ l first name.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2672
                l size ~~ 1 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2673
                    self beep
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2674
                ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2675
            ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2676
        ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2677
        box showAtPointer.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2678
    ] ifFalse:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2679
        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
  2680
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2681
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2682
    theClassName notNil ifTrue:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2683
        self switchToClassNamed:theClassName. 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2684
        self updateMethodCategoryList.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2685
        self switchToMethodNamed:aSelectorString.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2686
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2687
1805
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
  2688
    "Modified: / 1.9.1995 / 01:39:58 / claus"
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2689
    "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
  2690
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2691
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2692
updateClassCategoryList
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  2693
    self updateClassCategoryListWithScroll:true.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  2694
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  2695
    "Modified: 8.1.1997 / 10:58:06 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2696
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2697
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2698
updateClassCategoryListWithScroll:scroll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2699
    |oldClassCategory oldClass oldMethodCategory oldMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2700
     oldSelector newCategoryList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2701
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2702
    classMethodListView notNil ifTrue:[ ^ self ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2703
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2704
    oldClassCategory := currentClassCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2705
    oldClass := currentClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2706
    oldMethodCategory := currentMethodCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2707
    oldMethod := currentMethod.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2708
    oldMethod notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2709
	oldSelector := currentSelector
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2710
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2711
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2712
    classCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2713
	newCategoryList := self listOfAllClassCategories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2714
	newCategoryList = classCategoryListView list ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2715
	    scroll ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2716
		classCategoryListView contents:newCategoryList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2717
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2718
		classCategoryListView setContents:newCategoryList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2719
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2720
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2721
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2722
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2723
    oldClassCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2724
	classCategoryListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2725
	    classCategoryListView setSelectElement:oldClassCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2726
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2727
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2728
    classListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2729
	oldClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2730
	    classListView setSelectElement:(oldClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2731
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2732
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2733
    oldMethodCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2734
	methodCategoryListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2735
	    methodCategoryListView setSelectElement:oldMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2736
	].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2737
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2738
    oldSelector notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2739
	methodListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2740
	    methodListView setSelectElement:oldSelector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2741
	].
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  2742
    ]
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  2743
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  2744
    "Modified: / 27.7.1998 / 10:56:50 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2745
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2746
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2747
!BrowserView methodsFor:'class history'!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2748
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2749
addToClassHistory: aHistoryEntry
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2750
    "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
  2751
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2752
    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
  2753
    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
  2754
    [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
  2755
        ClassHistory removeLast
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  2756
    ]
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2757
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2758
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2759
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2760
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2761
classHistoryMenu
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2762
    "returns a popup menu containing the history of the classes"
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2763
1669
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  2764
    <resource: #programMenu >
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  2765
1528
c9e0c25f38dd no complicated cascades for the stc
tz
parents: 1524
diff changeset
  2766
    |labels selectors args|
c9e0c25f38dd no complicated cascades for the stc
tz
parents: 1524
diff changeset
  2767
1575
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
  2768
    self class checkClassHistory.
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2769
1529
af92934e130b initialize class history
tz
parents: 1528
diff changeset
  2770
    ClassHistory isEmpty
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2771
    ifFalse: 
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2772
    [
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2773
	labels := ClassHistory collect: [:clsName| clsName upTo: $ ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2774
	labels add: '-';add:(resources string:'empty history').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2775
	selectors := Array new: ClassHistory size.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2776
	selectors atAllPut: #loadFromMessage:.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2777
	selectors := selectors asOrderedCollection.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2778
	selectors add: nil; add:#emptyClassHistory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2779
	args := ClassHistory copy.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2780
	args add: nil; add: nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2781
	^PopUpMenu 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2782
	    labels:labels
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2783
	    selectors:selectors
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2784
	    args:args
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2785
	    receiver:self.
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2786
    ]
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2787
    ifTrue: 
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2788
    [
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2789
	^PopUpMenu 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2790
	    labels:(resources string:#('empty history'))
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2791
	    selectors:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2792
	    args:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2793
	    receiver:self.
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2794
    ]
1669
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  2795
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  2796
    "Modified: / 21.5.1998 / 15:42:10 / cg"
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2797
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2798
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2799
emptyClassHistory
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2800
    "removes all class history entries"
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2801
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2802
    ClassHistory removeAll
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2803
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2804
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2805
loadFromMessage: aMessage
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2806
    "switch to the class and selector by evaluating aMessage"
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2807
1635
29ae5c9bce7b '* hierarchy *' switching error fixed for classes with similar names (!!!) + consider namespaces for the class history
tz
parents: 1627
diff changeset
  2808
    |selector nameSpace|
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2809
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2810
    self switchToClassNamed: (aMessage upTo: $ ).
1635
29ae5c9bce7b '* hierarchy *' switching error fixed for classes with similar names (!!!) + consider namespaces for the class history
tz
parents: 1627
diff changeset
  2811
29ae5c9bce7b '* hierarchy *' switching error fixed for classes with similar names (!!!) + consider namespaces for the class history
tz
parents: 1627
diff changeset
  2812
    actualClass nameSpace ~~ Smalltalk 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2813
	ifTrue:  [nameSpace := actualClass nameSpace name]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2814
	ifFalse: [nameSpace := '* all *'].
1635
29ae5c9bce7b '* hierarchy *' switching error fixed for classes with similar names (!!!) + consider namespaces for the class history
tz
parents: 1627
diff changeset
  2815
29ae5c9bce7b '* hierarchy *' switching error fixed for classes with similar names (!!!) + consider namespaces for the class history
tz
parents: 1627
diff changeset
  2816
    namespaceList model value:nameSpace.    
29ae5c9bce7b '* hierarchy *' switching error fixed for classes with similar names (!!!) + consider namespaces for the class history
tz
parents: 1627
diff changeset
  2817
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2818
    self instanceProtocol:   (aMessage includesString: ' class ') not.
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2819
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2820
    (actualClass implements: (selector := (aMessage copy reverse upTo: $ ) reverse asSymbol))
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2821
    ifTrue:
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2822
    [
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2823
	self switchToMethodNamed: selector
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2824
    ]
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2825
! !
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  2826
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2827
!BrowserView methodsFor:'class list menu'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2828
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2829
classClassInstVars
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2830
    "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
  2831
     for a class-instvar-definition change"
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  2832
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  2833
    self doClassMenu:[:currentClass |
2253
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2834
        |s|
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2835
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2836
        s := WriteStream on:(String new).
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2837
        currentClass fileOutClassInstVarDefinitionOn:s withNameSpace:true.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2838
        codeView contents:(s contents).
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2839
        codeView modified:false.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2840
        codeModified := false.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2841
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2842
        codeView acceptAction:[:theCode |
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  2843
            codeView withWaitCursorDo:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  2844
                Object abortSignal catch:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  2845
                    Class nameSpaceQuerySignal answer:Smalltalk
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  2846
                    do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  2847
                        Compiler evaluate:theCode asString notifying:codeView compile:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  2848
                    ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  2849
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  2850
                    codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  2851
                    codeModified := false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  2852
                    self normalLabel.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  2853
                    self updateClassList.
2253
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2854
                ].
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2855
            ].
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2856
        ].
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2857
        self clearExplainAction.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2858
        methodListView notNil ifTrue:[
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2859
            methodListView setSelection:nil
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2860
        ].
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2861
        aspect := #classInstVars.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  2862
        self normalLabel
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  2863
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  2864
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  2865
    "Modified: / 31.3.1998 / 23:37:34 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2866
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2867
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2868
classComment
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2869
    "show the classes comment in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2870
     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
  2871
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2872
    self classShowFrom:#comment 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2873
		   set:#comment: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2874
		aspect:#comment 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2875
	       default:nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2876
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2877
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2878
classDefinition
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2879
    "show class definition in View and setup accept-action for
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2880
     a class-definition change.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2881
     Extract documentation either from a documentation method or
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2882
     from the comment - not a biggy, but beginners will like
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2883
     it when exploring the system."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2884
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2885
    self doClassMenu:[:currentClass |
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2886
        |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
  2887
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2888
        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
  2889
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2890
        cls := acceptClass ? currentClass.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2891
        cls isMeta ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2892
            cls := cls soleInstance
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2893
        ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2894
2324
638f31ec298e oops - redefinition of Smalltalk was not possible
Claus Gittinger <cg@exept.de>
parents: 2303
diff changeset
  2895
        (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
  2896
            cls fileOutDefinitionOn:aStream
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2897
        ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2898
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2899
            "/
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2900
            "/ 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
  2901
            "/ and prefer short names.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2902
            "/
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2903
            cls
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2904
                basicFileOutDefinitionOn:aStream 
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2905
                withNameSpace:true.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2906
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2907
            cls isLoaded ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2908
                "/ show the definition now...
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2909
                src := aStream contents.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2910
                codeView contents:src.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2911
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2912
                "/ ...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
  2913
                "/ 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
  2914
                "/ from the repository.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2915
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2916
                "
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2917
                 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
  2918
                "
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2919
                m := cls class compiledMethodAt:#documentation.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2920
                m notNil ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2921
                    s := m comment.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2922
                    isComment := false.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2923
                ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2924
                    "try comment"
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2925
                    s := cls comment.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2926
                    s isString ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2927
                        s isEmpty ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2928
                            s := nil
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2929
                        ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2930
                            (s includes:$") ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2931
                                s := s copyReplaceAll:$" with:$'.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2932
                            ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2933
                            isComment := true
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2934
                        ]
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2935
                    ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2936
                        "/ class redefines comment ?
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2937
                        s := nil
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2938
                    ]
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2939
                ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2940
            ].
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2941
            cls isJavaClass ifFalse:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2942
                aStream cr; cr; cr; cr; cr.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2943
                aStream emphasis:(self commentEmphasisAndColor).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2944
                s isNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2945
                    aStream nextPut:$" ; cr; nextPutLine:' no comment or documentation method found'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2946
                ] ifFalse:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2947
                    aStream nextPut:$" ; cr; nextPutLine:' Documentation:'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2948
                    aStream cr; nextPutLine:s; cr.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2949
                    aStream nextPutLine:' Notice: '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2950
                    aStream nextPutAll:'   the above text has been extracted from the classes '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2951
                    aStream nextPutLine:(isComment ifTrue:['comment.'] ifFalse:['documentation method.']).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2952
                    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
  2953
                    aStream nextPutAll:'   To change the '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2954
                    aStream nextPutAll:(isComment ifTrue:['comment'] ifFalse:['documentation']).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2955
                    aStream nextPutAll:', switch to the '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2956
                    aStream nextPutAll:(isComment ifTrue:['comment'] ifFalse:['documentation method']).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2957
                    aStream nextPutLine:' and ''accept'' any changes there.'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2958
                ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2959
                aStream nextPut:$".
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2960
                aStream emphasis:nil.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2961
            ]
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2962
        ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2963
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2964
        src := aStream contents.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2965
        UserPreferences current syntaxColoring ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2966
            highlighter := cls syntaxHighlighterClass.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2967
            highlighter notNil ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2968
                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
  2969
            ]
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2970
        ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2971
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2972
        codeView contents:src.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2973
        codeView modified:false.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2974
        codeModified := false.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2975
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  2976
        self setAcceptActionForClass.
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2977
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2978
"/        currentClass isNamespace ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2979
"/            codeView acceptAction:nil.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2980
"/        ] ifFalse:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2981
"/            codeView acceptAction:[:theCode |
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2982
"/                |ns|
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2983
"/
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2984
"/                currentClass notNil ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2985
"/                    ns := currentClass nameSpace
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2986
"/                ] ifFalse:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2987
"/                    ns := nil
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2988
"/                ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2989
"/            
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2990
"/                codeView cursor:Cursor execute.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2991
"/
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2992
"/                Class nameSpaceQuerySignal handle:[:ex |
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2993
"/                    ns isNil ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2994
"/                        ex reject
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2995
"/                    ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2996
"/                    ex proceedWith:ns
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2997
"/                ] do:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2998
"/                    Object abortSignal catch:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  2999
"/
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3000
"/                        Class nameSpaceQuerySignal answer:Smalltalk
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3001
"/                        do:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3002
"/                            (Compiler evaluate:theCode asString notifying:codeView compile:false)
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3003
"/                            isBehavior ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3004
"/                                codeView modified:false.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3005
"/                                codeModified := false.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3006
"/                                self classCategoryUpdate.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3007
"/                                self updateClassListWithScroll:false.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3008
"/                            ]
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3009
"/                        ]
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3010
"/                    ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3011
"/                ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3012
"/                codeView cursor:Cursor normal.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3013
"/            ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  3014
"/        ].
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3015
        self clearExplainAction.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3016
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3017
        methodListView notNil ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3018
            methodListView setSelection:nil
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3019
        ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3020
        aspect := #definition.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3021
        self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3022
    ]
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  3023
1727
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  3024
    "Modified: / 18.7.1998 / 22:52:50 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3025
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3026
1971
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3027
classDerivedInstancesInspect
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3028
    "inspect the current classes derived instances"
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3029
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3030
    |insts|
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3031
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3032
    self checkClassSelected ifFalse:[^ self].
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3033
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3034
    insts := currentClass allSubInstances.
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3035
    insts size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3036
	self warn:'no direct or derived instances'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3037
	^ self
1971
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3038
    ].
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3039
    insts size == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3040
	insts first inspect.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3041
	^ self.
1971
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3042
    ].
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3043
    insts inspect
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3044
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3045
    "Created: / 24.2.1996 / 16:12:14 / cg"
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3046
    "Modified: / 21.7.1998 / 11:32:49 / cg"
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3047
!
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  3048
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3049
classDocumentation
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3050
    "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
  3051
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3052
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3053
	Autoload autoloadFailedSignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3054
	    self warn:'autoload failed.
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3055
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3056
Check your source directory and/or 
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3057
the abbreviation file for the classes (correct) shortened name.'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3058
	    ex return.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3059
	] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3060
	    |text v|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3061
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3062
	    text := currentClass htmlDocumentation.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3063
	    text notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3064
		v := HTMLDocumentView
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3065
			openFullOnText:text 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3066
			inDirectory:(Smalltalk getSystemFileName:'doc/online/english/classDoc').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3067
		v nameSpaceForExecution:(currentClass nameSpace).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3068
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3069
	]
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3070
    ]
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3071
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3072
    "Created: 18.5.1996 / 12:12:20 / cg"
1188
3805f78caf95 documentationViews currentDirectory ...
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  3073
    "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
  3074
!
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  3075
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3076
classDocumentationAs
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3077
    "as for a fileName & save a classes documentation html doc into it"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3078
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3079
    |fileBox dir saveName|
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3080
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3081
    fileBox := FileSelectionBox
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3082
		    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
  3083
		    okText:(resources string:'save')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3084
		    abortText:(resources string:'cancel')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3085
		    action:[:fileName | saveName := fileName].
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3086
    fileBox initialText:((Smalltalk fileNameForClass:currentClass) , '.html').
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3087
    dir := FileSelectionBox lastFileSelectionDirectory.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3088
    dir notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3089
	fileBox directory:dir.
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3090
    ].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3091
    fileBox showAtPointer.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3092
    fileBox destroy.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3093
    saveName isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3094
	^ self
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3095
    ].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3096
    saveName isEmpty ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3097
	self warn:'bad name given'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3098
	^ self
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3099
    ].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3100
    FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3101
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3102
    self classDocumentationToFile:saveName
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3103
!
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3104
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3105
classDocumentationToFile:aFilename
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3106
    "save a classes documentation html doc into a file"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3107
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3108
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3109
	Autoload autoloadFailedSignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3110
	    self warn:'autoload failed.
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3111
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3112
Check your source directory and/or 
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3113
the abbreviation file for the classes (correct) shortened name.'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3114
	    ex return.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3115
	] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3116
	    |text v f|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3117
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3118
	    text := currentClass htmlDocumentation.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3119
	    text notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3120
		f := aFilename asFilename writeStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3121
		f nextPutAll:text asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3122
		f close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3123
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3124
	]
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3125
    ]
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3126
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3127
    "Created: 18.5.1996 / 12:12:20 / cg"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3128
    "Modified: 17.6.1997 / 13:32:40 / cg"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3129
!
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  3130
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3131
classFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3132
    "fileOut the current class.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3133
     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
  3134
     warn if any)"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3135
1139
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3136
    self classFileOutAsk:false
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3137
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3138
    "Modified: 16.4.1997 / 20:55:13 / cg"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3139
!
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3140
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3141
classFileOutAs
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3142
    "fileOut the current class, asking for a filename."
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3143
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3144
    self classFileOutAsk:true
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3145
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3146
    "Modified: 16.4.1997 / 20:55:31 / cg"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3147
!
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3148
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3149
classFileOutAsk:ask
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3150
    "fileOut the current class, possibly asking for a filename.
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3151
     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
  3152
     warn if any)"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  3153
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3154
    self doClassMenu:[:currentClass |
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3155
        |msg fileBox saveName dir|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3156
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3157
        currentClass isPrivate ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3158
            self warn:'You must fileOut the owning class: ' , currentClass owningClass name
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3159
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3160
            ask ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3161
                fileBox := FileSelectionBox
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3162
                                title:(resources string:'fileOut %1 as:' with:currentClass name)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3163
                                okText:(resources string:'fileOut')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3164
                                abortText:(resources string:'cancel')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3165
                                action:[:fileName | saveName := fileName].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3166
                fileBox initialText:((Smalltalk fileNameForClass:currentClass) , '.st').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3167
                dir := FileSelectionBox lastFileSelectionDirectory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3168
                dir notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3169
                    fileBox directory:dir.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3170
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3171
                fileBox showAtPointer.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3172
                fileBox destroy.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3173
                saveName isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3174
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3175
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3176
                saveName isEmpty ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3177
                    self warn:'bad name given'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3178
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3179
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3180
                FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3181
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3182
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3183
            self busyLabel:'saving %1' with:currentClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3184
            Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3185
                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
  3186
                self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3187
                ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3188
            ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3189
                saveName notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3190
                    currentClass fileOutAs:saveName.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3191
                ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3192
                    currentClass fileOut.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3193
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3194
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3195
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3196
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3197
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  3198
1979
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3199
    "Created: / 16.4.1997 / 20:55:01 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3200
    "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
  3201
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3202
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3203
classFileOutBinary
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3204
    "fileOut the current class as binary bytecode."
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3205
1979
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3206
    self classFileOutBinaryAsk:false
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3207
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3208
    "Modified: / 29.12.1998 / 21:42:15 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3209
!
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3210
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3211
classFileOutBinaryAs
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3212
    "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
  3213
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3214
    self classFileOutBinaryAsk:true
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3215
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3216
    "Created: / 29.12.1998 / 21:42:27 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3217
!
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3218
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3219
classFileOutBinaryAsk:ask
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3220
    "fileOut the current class as binary bytecode."
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3221
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3222
    |mode fileBox saveName dir|
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3223
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  3224
    mode := Dialog choose:(resources string:'save including sources ?')
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3225
                   labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3226
                   values:#(nil #discard #reference #keep)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3227
                   default:#keep.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3228
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  3229
    mode isNil ifTrue:[^ self].   "/ cancelled
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  3230
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3231
    self doClassMenu:[:currentClass |
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3232
        |msg|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3233
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3234
        currentClass isPrivate ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3235
            self warn:'You must fileOut the owning class: ' , currentClass owningClass name
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3236
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3237
            ask ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3238
                fileBox := FileSelectionBox
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3239
                                title:(resources string:'binary fileOut %1 as:' with:currentClass name)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3240
                                okText:(resources string:'fileOut')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3241
                                abortText:(resources string:'cancel')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3242
                                action:[:fileName | saveName := fileName].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3243
                fileBox initialText:((Smalltalk fileNameForClass:currentClass) , '.cls').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3244
                dir := FileSelectionBox lastFileSelectionDirectory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3245
                dir notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3246
                    fileBox directory:dir.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3247
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3248
                fileBox showAtPointer.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3249
                fileBox destroy.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3250
                saveName isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3251
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3252
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3253
                saveName isEmpty ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3254
                    self warn:'bad name given'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3255
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3256
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3257
                FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3258
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3259
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3260
            self busyLabel:'saving binary of %1' with:currentClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3261
            Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3262
                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
  3263
                self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3264
                ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3265
            ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3266
                saveName notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3267
                    currentClass binaryFileOutWithSourceMode:mode as:saveName.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3268
                ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3269
                    currentClass binaryFileOutWithSourceMode:mode
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3270
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3271
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3272
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  3273
        self normalLabel.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3274
    ]
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3275
1979
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3276
    "Created: / 29.12.1998 / 21:35:13 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  3277
    "Modified: / 29.12.1998 / 21:45:54 / cg"
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3278
!
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  3279
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3280
classHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3281
    "show current classes hierarchy in codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3282
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3283
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3284
	|aStream|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3285
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3286
	aStream := WriteStream on:(String new:200).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3287
	actualClass printHierarchyOn:aStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3288
	codeView contents:(aStream contents).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3289
	codeView modified:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3290
	codeModified := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3291
	codeView acceptAction:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3292
	self clearExplainAction.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3293
	methodListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3294
	    methodListView setSelection:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3295
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3296
	aspect := #hierarchy. 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3297
	self normalLabel
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3298
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3299
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  3300
    "Modified: / 31.3.1998 / 23:37:54 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3301
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3302
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3303
classInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3304
    "inspect the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3305
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3306
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3307
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3308
    currentClass inspect.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3309
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3310
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3311
classInstancesInspect
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3312
    "inspect the current classes instances"
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3313
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3314
    |insts|
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3315
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3316
    self checkClassSelected ifFalse:[^ self].
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3317
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3318
    insts := currentClass allInstances.
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3319
    insts size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3320
	self warn:'no instances'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3321
	^ self
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3322
    ].
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3323
    insts size == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3324
	insts first inspect.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3325
	^ self.
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3326
    ].
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3327
    insts inspect
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3328
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3329
    "Created: / 24.2.1996 / 16:12:14 / cg"
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  3330
    "Modified: / 21.7.1998 / 11:32:49 / cg"
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3331
!
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  3332
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3333
classLoad
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3334
    "load an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3335
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  3336
    |nm nameShown|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3337
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3338
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3339
    nm := currentClass name.
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  3340
    nameShown := self displayedClassNameOf:currentClass.
987
e24e45bd126a dont update while loading
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
  3341
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3342
    Autoload autoloadFailedSignal handle:[:ex |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3343
	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
  3344
1313
a287a275aaef remember last 'fileout as...' directory.
Claus Gittinger <cg@exept.de>
parents: 1308
diff changeset
  3345
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
  3346
and/or the abbreviation file for its (correct) shortened name.') 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3347
		with:nm with:(Smalltalk fileNameForClass:currentClass).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3348
	ex return.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3349
    ] do:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3350
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3351
	    self busyLabel:'loading %1 ...' with:currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3352
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3353
	    lockUpdates := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3354
	    [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3355
		currentClass autoload.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3356
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3357
		currentClass := actualClass := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3358
		"/ reselect the current class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3359
		showInstance ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3360
		    nameShown := nameShown , ' class'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3361
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3362
		self switchToClassNamed:nameShown.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3363
		self classSelectionChanged.
1540
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  3364
"/                self classDefinition
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3365
	    ] valueNowOrOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3366
		lockUpdates := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3367
		self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3368
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3369
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3370
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3371
1540
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  3372
    "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
  3373
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3374
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3375
classMakePrivate
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3376
    "change a class from public to private;
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3377
     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
  3378
     before doing this."
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3379
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  3380
    |ownerName owner|
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3381
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  3382
    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
  3383
    ownerName size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3384
	"/ cancelled
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3385
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3386
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3387
    owner := Smalltalk classNamed:ownerName.
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3388
    owner isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3389
	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
  3390
	^ self
1675
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  3391
    ].
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  3392
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  3393
    (owner privateClassesAt:currentClass nameWithoutPrefix) notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3394
	self warn:(resources 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3395
			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
  3396
			with:currentClass nameWithoutPrefix
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3397
			with:ownerName)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3398
		    withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3399
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3400
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3401
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3402
    currentClass makePrivateIn:owner
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3403
1675
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  3404
    "Modified: / 29.5.1998 / 19:03:19 / cg"
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3405
!
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3406
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3407
classMakePublic
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3408
    "change a class from private to public;
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3409
     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
  3410
     before doing this."
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3411
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  3412
    (Smalltalk classNamed:(currentClass nameWithoutPrefix)) notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3413
	self warn:(resources
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3414
			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
  3415
			with:currentClass nameWithoutPrefix) withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3416
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3417
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3418
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3419
    currentClass makePublic
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3420
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  3421
    "Modified: 3.7.1997 / 13:26:21 / cg"
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3422
!
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  3423
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3424
classMenu
926
a7c7814c9426 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  3425
    "sent by classListView to ask for the menu"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3426
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  3427
    <resource: #keyboard ( #Cmdl #Cmdn #Cmdd) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  3428
    <resource: #programMenu >
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  3429
2029
67a8b3ec490f allow browsee-clone from hierarchy & subclass browser.
Claus Gittinger <cg@exept.de>
parents: 2026
diff changeset
  3430
    |specialMenu items m newClassMenu spawnMenu idx spawnItems|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3431
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3432
    currentClass isNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3433
        items :=  #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3434
                       ('fileIn new from repository...' classLoadNewRevision)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3435
                    ).
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3436
    ] ifFalse:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3437
        items :=  #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3438
                       ('fileOut binary'               classFileOutBinary           )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3439
                       ('fileOut binary as...'         classFileOutBinaryAs         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3440
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3441
                       ('inspect class'                classInspect                 )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3442
                       ('inspect instances'            classInstancesInspect        )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3443
                       ('inspect derived instances'    classDerivedInstancesInspect        )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3444
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3445
                       ('make private class...'        classMakePrivate             )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3446
                       ('make public class'            classMakePublic              )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3447
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3448
                       ('primitive definitions'        classPrimitiveDefinitions    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3449
                       ('primitive variables'          classPrimitiveVariables      )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3450
                       ('primitive functions'          classPrimitiveFunctions      )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3451
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3452
                       ('package...'                   classModifyPackage         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3453
                       ('source container...'          classModifyContainer         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3454
                       ('remove source container...'   classRemoveContainer         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3455
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3456
                       ('revision log'                 classRevisionInfo            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3457
                       ('compare with repository...'   classCompareWithRepository   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3458
                       ('-'                            nil                          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3459
                       ('check into source repository...' classCheckin                 )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3460
                       ('fileIn from repository...'    classLoadRevision            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3461
                    ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3462
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3463
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3464
    specialMenu := PopUpMenu itemList:items resources:resources.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3465
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3466
    currentClass notNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3467
        currentClass sourceCodeManager isNil ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3468
            specialMenu disableAll:#(classModifyContainer classRemoveContainer
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3469
                                     classRevisionInfo 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3470
                                     classLoadRevision classCheckin 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3471
                                     classCompareWithRepository).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3472
        ].
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3473
        currentClass isPrivate ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3474
            specialMenu disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3475
                                     classFileOutBinary
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3476
                                     classMakePrivate
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3477
                                     classModifyPackage
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3478
                                     classModifyContainer 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3479
                                     classRemoveContainer
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3480
                                     classRevisionInfo 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3481
                                     classLoadRevision classCheckin
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3482
                                     classCompareWithRepository
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3483
                                     classPrimitiveDefinitions
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3484
                                     classPrimitiveVariables
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3485
                                     classPrimitiveFunctions).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3486
        ] ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3487
            specialMenu disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3488
                                     classMakePublic
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3489
                                    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3490
        ]
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3491
    ] ifFalse:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3492
        SourceCodeManager isNil ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3493
            specialMenu disableAll:#(classLoadNewRevision)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3494
        ]
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3495
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3496
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3497
    (currentClass notNil
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3498
    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
  3499
        specialMenu disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3500
                                     classInstancesInspect
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3501
                                     classDerivedInstancesInspect
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3502
                                     classFileOutBinary
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3503
                                     classFileOutBinaryAs
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3504
                                     classMakePrivate
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3505
                                     classMakePublic
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3506
                                     "/ classModifyPackage
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3507
                                     classModifyContainer 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3508
                                     classRemoveContainer
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3509
                                     classRevisionInfo 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3510
                                     classLoadRevision 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3511
                                     classCheckin
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3512
                                     classCompareWithRepository
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3513
                                     classPrimitiveDefinitions
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3514
                                     classPrimitiveVariables
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3515
                                     classPrimitiveFunctions).
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3516
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3517
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3518
    device ctrlDown ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3519
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3520
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3521
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3522
    currentClass isNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3523
        items :=    #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3524
                       ('new class'             classNewClass       Cmdn)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3525
                       ('new application'       classNewApplication)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3526
                       ('new dialog'            classNewDialog)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3527
                     ).
246
9f1583be2b81 ask class for its SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
  3528
    ] ifFalse:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3529
        currentClass isLoaded ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3530
            items :=    #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3531
                           ('documentation'              classDocumentation     )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3532
                           ('save documentation as...'  classDocumentationAs   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3533
                           ('-'                          nil                    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3534
                           ('class refs'                 classRefs              )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3535
                           ('-'                          nil                    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3536
                           ('new class'                  classNewClass          Cmdn )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3537
                           ('new application'            classNewApplication    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3538
                           ('new dialog'                 classNewDialog         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3539
                           ('remove...'                  classRemove            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3540
                           ('-'                          nil                    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3541
                           ('load'                       classLoad              Cmdl )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3542
                         ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3543
        ] ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3544
            fullProtocol ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3545
                items :=    #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3546
                               ('hierarchy'                 classHierarchy             )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3547
                               ('definition'                classDefinition            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3548
                               ('documentation'             classDocumentation    Cmdd )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3549
                               ('save documentation as...' classDocumentationAs       )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3550
                               ('comment'                   classComment               )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3551
                               ('class instvars'            classClassInstVars         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3552
                             ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3553
            ] ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3554
                items :=    #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3555
                               ('fileOut'                   classFileOut          )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3556
                               ('fileOut as...'             classFileOutAs        )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3557
                               ('printOut'                  classPrintOut         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3558
                               ('printOut protocol'         classPrintOutProtocol )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3559
                               ('-'                         nil                   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3560
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3561
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3562
                classCategoryListView isNil ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3563
                    "/ a hierarchy or subclass-browser.
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3564
                    items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3565
                               ('browse'                    classCategoryClone   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3566
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3567
                ].
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3568
                items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3569
                               ('spawn...'                 spawnMenu             )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3570
                               ('-'                         nil                  )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3571
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3572
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3573
                spawnItems := #(               
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3574
                                    ('class'           classSpawn             )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3575
                                    ('full protocol'   classSpawnFullProtocol )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3576
                                    ('hierarchy'       classSpawnHierarchy    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3577
                                    ('subclasses'      classSpawnSubclasses   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3578
                               ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3579
                spawnMenu := PopUpMenu 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3580
                                itemList:spawnItems
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3581
                                resources:resources.
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3582
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3583
                fullClass ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3584
                    items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3585
                               ('hierarchy'                 classHierarchy            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3586
                               ('definition'                classDefinition           )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3587
                               ('documentation'             classDocumentation   Cmdd )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3588
                               ('save documentation as...' classDocumentationAs      )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3589
                               ('comment'                   classComment              )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3590
                               ('class instvars'            classClassInstVars        )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3591
                               ('-'                         nil                       )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3592
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3593
                ].
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3594
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3595
                items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3596
                               ('class refs'  classRefs   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3597
                               ('-'           nil         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3598
                               ('new...'     newClassMenu)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3599
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3600
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3601
                newClassMenu := PopUpMenu 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3602
                            itemList:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3603
                                        ('class'         classNewClass          Cmdn )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3604
                                        ('subclass'      classNewSubclass            )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3605
                                        ('private class' classNewPrivateClass        )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3606
                                        ('application'   classNewApplication         )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3607
                                        ('dialog'        classNewDialog              )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3608
                                      )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3609
                            resources:resources.
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3610
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3611
                items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3612
                               ('rename...'  classRename )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3613
                               ('remove...'  classRemove )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3614
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3615
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3616
                currentClass wasAutoloaded ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3617
                    items := items , #(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3618
                               ('unload'  classUnload)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3619
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3620
                ]
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3621
            ]
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3622
        ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3623
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3624
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3625
    items := items , #(
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3626
                          ('='          nil             )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3627
                          ('others'     otherMenu   Ctrl)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3628
                        ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3629
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3630
    m := PopUpMenu itemList:items resources:resources.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3631
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3632
    newClassMenu notNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3633
        m subMenuAt:#newClassMenu put:newClassMenu.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3634
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3635
    spawnMenu notNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3636
        m subMenuAt:#spawnMenu put:spawnMenu.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3637
    ].
768
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  3638
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  3639
    (currentClass notNil
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  3640
    and:[currentClass isPrivate]) ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3641
        m disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3642
                       classFileOut
2249
fc17eb66cbec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2247
diff changeset
  3643
                       classFileOutAs
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3644
                      )
767
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  3645
    ].
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  3646
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  3647
    m subMenuAt:#otherMenu put:specialMenu.
180
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  3648
    ^ m
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  3649
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  3650
    "Modified: / 20.5.1999 / 18:36:25 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3651
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3652
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3653
classNewApplication
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3654
    "create a class-definition prototype for an application in codeview"
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3655
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3656
    |theClass cls|
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3657
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3658
    self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3659
	classClassDefinitionTemplateFor:ApplicationModel 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3660
	in:currentClassCategory 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3661
	namespace:false 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3662
	private:false.
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3663
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3664
    aspect := nil.
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3665
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3666
    "Modified: 4.1.1997 / 14:52:16 / cg"
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3667
!
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  3668
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3669
classNewClass
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3670
    "create a class-definition prototype in codeview"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3671
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3672
    |theClass cls|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3673
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3674
    currentNamespace == JAVA ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3675
        theClass := Java at:'java.lang.Object'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3676
    ] ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3677
        theClass := Object.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3678
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3679
    currentClass notNil ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3680
        (cls := currentClass superclass) notNil ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3681
            theClass := cls 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3682
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3683
    ].
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3684
    self 
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3685
        classClassDefinitionTemplateFor:theClass 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3686
        in:currentClassCategory 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3687
        namespace:false 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  3688
        private:false.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3689
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3690
    aspect := nil.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3691
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3692
    "Modified: 4.1.1997 / 14:52:16 / cg"
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3693
!
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3694
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3695
classNewDialog
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3696
    "create a class-definition prototype for a dialog in codeview"
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3697
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3698
    |theClass cls|
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3699
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3700
    self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3701
	classClassDefinitionTemplateFor:SimpleDialog 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3702
	in:currentClassCategory 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3703
	namespace:false 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3704
	private:false.
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3705
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3706
    aspect := nil.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3707
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3708
!
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  3709
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3710
classNewPrivateClass
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3711
    "create a class-definition prototype in codeview"
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3712
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3713
    self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3714
	classClassDefinitionTemplateFor:Object 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3715
	in:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3716
	namespace:false 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3717
	private:true.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3718
    aspect := nil.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3719
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3720
    "Created: 11.10.1996 / 16:01:20 / cg"
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3721
    "Modified: 4.1.1997 / 14:51:49 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3722
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3723
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3724
classNewSubclass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3725
    "create a subclass-definition prototype in codeview"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3726
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3727
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3728
	self classClassDefinitionTemplateFor:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3729
					  in:(currentClass category)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3730
					  namespace:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3731
					  private:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3732
	aspect := nil
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3733
    ]
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3734
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3735
    "Modified: 4.1.1997 / 14:51:44 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3736
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3737
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3738
classPrimitiveDefinitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3739
    "show the classes primitiveDefinition in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3740
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3741
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3742
    self classShowFrom:#primitiveDefinitionsString 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3743
		   set:#primitiveDefinitions: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3744
		aspect:#primitiveDefinitions 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3745
	       default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3746
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3747
/*
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3748
 * includes, defines, structure definitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3749
 * and typedefs come here.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3750
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3751
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3752
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3753
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3754
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3755
classPrimitiveFunctions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3756
    "show the classes primitiveFunctions in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3757
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3758
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3759
    self classShowFrom:#primitiveFunctionsString 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3760
		   set:#primitiveFunctions: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3761
		aspect:#primitiveFunctions 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3762
	       default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3763
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3764
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3765
 * any local C (helper) functions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3766
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3767
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3768
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3769
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3770
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3771
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3772
classPrimitiveVariables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3773
    "show the classes primitiveVariables in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3774
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3775
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3776
    self classShowFrom:#primitiveVariablesString 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3777
		   set:#primitiveVariables: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3778
		aspect:#primitiveVariables 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3779
	       default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3780
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3781
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3782
 * any local C variables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3783
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3784
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3785
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3786
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3787
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3788
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3789
classPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3790
    self classPrintOutWith:#printOutOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3791
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3792
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3793
classPrintOutFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3794
    self classPrintOutWith:#printOutFullProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3795
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3796
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3797
classPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3798
    self classPrintOutWith:#printOutProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3799
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3800
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3801
classPrintOutWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3802
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3803
	|printStream|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3804
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3805
	printStream := Printer new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3806
	currentClass perform:aSelector with:printStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3807
	printStream close
152
d03618e99b3c show warnbox when autoload fails (instead of running into the debugger)
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
  3808
    ]
105
claus
parents: 98
diff changeset
  3809
!
claus
parents: 98
diff changeset
  3810
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3811
classProtocols
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3812
     ^ self
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3813
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3814
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3815
classRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3816
    self doClassMenu:[:currentClass |
2408
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3817
        self withBusyCursorDo:[
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3818
            |any1 any2 nm msg|
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3819
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3820
            any1 :=true.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3821
            any2 :=false.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3822
            nm := currentClass name asSymbol.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3823
            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
  3824
            SystemBrowser 
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3825
                browseReferendsOf:nm 
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3826
                title:msg
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3827
                ifNone:[any1 := false].
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3828
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3829
            "/ 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
  3830
            (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
  3831
                any2 :=true.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3832
                SystemBrowser 
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3833
                    browseReferendsOf:nm asSymbol
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3834
                    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
  3835
                    ifNone:[any2 := false].
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3836
            ].
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3837
            (any1 or:[any2]) ifFalse:[
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3838
                SystemBrowser showNoneFound:msg.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3839
            ]
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  3840
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3841
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3842
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3843
    "Created: 23.11.1995 / 14:11:43 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  3844
    "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
  3845
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3846
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3847
classRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3848
    "user requested remove of current class and all subclasses -
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3849
     count subclasses and let user confirm removal."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3850
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3851
    |count t box|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3852
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3853
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3854
	count := currentClass allSubclasses size.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3855
	t := 'remove %1'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3856
	count ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3857
	   t := t , '\(with %2 subclass'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3858
	   count ~~ 1 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3859
		t := t , 'es'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3860
	   ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3861
	   t := (t , ')') 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3862
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3863
	t := t , ' ?'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3864
	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
  3865
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3866
	box := YesNoBox 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3867
		   title:t
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3868
		   yesText:(resources at:'remove')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3869
		   noText:(resources at:'abort').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3870
	box label:(resources string:'remove class').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3871
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3872
	box confirm ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3873
	    "after querying user - do really remove current class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3874
	     and all subclasses
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3875
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3876
	    self doClassMenu:[:currentClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3877
		|didRemove|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3878
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3879
		didRemove := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3880
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3881
		"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3882
		 query ?
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3883
		"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3884
		currentClass allSubclassesDo:[:aSubClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3885
		    (CheckForInstancesWhenRemovingClasses not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3886
		    or:[aSubClass hasInstances not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3887
		    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
  3888
			ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3889
			    aSubClass removeFromSystem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3890
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3891
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3892
		(CheckForInstancesWhenRemovingClasses not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3893
		or:[currentClass hasInstances not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3894
		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
  3895
		    ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3896
			didRemove := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3897
			currentClass removeFromSystem.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3898
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3899
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3900
		didRemove ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3901
		    self changeCurrentClass:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3902
		    Smalltalk changed.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3903
		    self updateClassList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3904
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3905
		    "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
  3906
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3907
"/                    classListView numberOfLines == 0 ifTrue:[
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3908
"/                        self updateClassCategoryListWithScroll:false
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3909
"/                    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3910
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3911
		    methodCategoryListView notNil ifTrue:[methodCategoryListView contents:nil].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3912
		    methodListView notNil ifTrue:[methodListView contents:nil].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3913
		    codeView contents:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3914
		    codeView modified:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3915
		    codeModified := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3916
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3917
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3918
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3919
	box destroy.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3920
    ]
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  3921
1948
c5d2e8aac578 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1946
diff changeset
  3922
    "Modified: / 21.10.1998 / 20:49:52 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3923
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3924
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3925
classRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3926
    "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
  3927
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3928
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3929
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3930
    self checkClassSelected ifFalse:[^ self].
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3931
    box := self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3932
		enterBoxTitle:(resources 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3933
				string:'rename %1 to:' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3934
				with:currentClass name asText allBold) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3935
		okText:'rename'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3936
		label:'rename class'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3937
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3938
    box initialText:(currentClass name).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3939
    box action:[:aString | self renameCurrentClassTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3940
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3941
1948
c5d2e8aac578 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1946
diff changeset
  3942
    "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
  3943
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3944
107
claus
parents: 106
diff changeset
  3945
classShowFrom:getSelector set:setSelector aspect:aspectSymbol default:default
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3946
    "common helper for comment, primitive-stuff etc.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3947
     show the string returned from the classes getSelector-method,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3948
     Set acceptaction to change it via setSelector."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3949
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3950
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3951
	|text|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3952
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3953
	text := currentClass perform:getSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3954
	text isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3955
	    text := default
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3956
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3957
	codeView contents:text.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3958
	codeView modified:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3959
	codeModified := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3960
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3961
	codeView acceptAction:[:theCode |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3962
	    Object abortSignal catch:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3963
		lockUpdates := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3964
		currentClass perform:setSelector with:theCode asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3965
		codeView modified:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3966
		codeModified := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3967
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3968
	    lockUpdates := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3969
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3970
	self clearExplainAction.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3971
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3972
	methodListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3973
	    methodListView setSelection:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3974
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3975
	aspect := aspectSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3976
	self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3977
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3978
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  3979
    "Modified: / 31.3.1998 / 23:38:36 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3980
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3981
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3982
classSpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3983
    "create a new SystemBrowser browsing current class,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3984
     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
  3985
     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
  3986
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3987
    self doClassMenuWithSelection:[:cls :sel |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3988
	|browser|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3989
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3990
	cls isMeta ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3991
	    self listOfNamespaces do:[:aNamespace |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3992
		aNamespace allBehaviorsDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3993
		    aClass class == cls ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3994
			browser := SystemBrowser browseClass:aClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3995
			browser instanceProtocol:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3996
			sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3997
			    browser switchToMethodNamed:sel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3998
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3999
			^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4000
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4001
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4002
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4003
	    self warn:'oops, no class for this metaclass'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4004
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4005
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4006
	browser := SystemBrowser browseClass:cls. 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4007
	cls hasMethods ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4008
	    browser instanceProtocol:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4009
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4010
	sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4011
	    browser switchToMethodNamed:sel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4012
	].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4013
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4014
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4015
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4016
     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
  4017
     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
  4018
    "
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4019
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4020
    "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
  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
classSpawnFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4024
    "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
  4025
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4026
    self doClassMenuWithSelection:[:cls :sel |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4027
	SystemBrowser browseFullClassProtocol:cls 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4028
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4029
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4030
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4031
classSpawnHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4032
    "create a new HierarchyBrowser browsing current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4033
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4034
    self doClassMenuWithSelection:[:cls :sel |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4035
	SystemBrowser browseClassHierarchy:cls 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4036
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4037
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4038
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4039
classSpawnSubclasses
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4040
    "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
  4041
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4042
    self doClassMenuWithSelection:[:cls :sel |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4043
	|subs|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4044
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4045
	subs := OrderedCollection new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4046
	self classHierarchyOf:cls withAutoloaded:false do:[:aClass :lvl |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4047
	    subs add:(String new:lvl*2) , aClass name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4048
	].
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4049
"/        subs := cls allSubclasses.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4050
	(subs notNil and:[subs size ~~ 0]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4051
	    SystemBrowser browseClasses:subs 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4052
				  title:('subclasses of ' , cls name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4053
				   sort:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4054
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4055
    ]
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4056
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  4057
    "Modified: 4.1.1997 / 13:35:55 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4058
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4059
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4060
classUnload
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4061
    "unload an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4062
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4063
    |nm|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4064
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4065
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4066
    nm := currentClass name.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4067
    currentClass unload.
1540
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  4068
    self switchToClassNamed:nm.
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  4069
    self classSelectionChanged.
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  4070
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  4071
    "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
  4072
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4073
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4074
classUses
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4075
    "a powerful tool, when trying to learn more about where
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4076
     a class is used. This one searches all uses of a class,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4077
     and shows a list of uses - try it and like it"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4078
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4079
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4080
	self withSearchCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4081
	    SystemBrowser browseUsesOf:currentClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4082
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4083
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4084
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4085
    "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
  4086
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4087
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4088
doClassMenuWithSelection:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4089
    "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
  4090
     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
  4091
     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
  4092
     current class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4093
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4094
    |string words clsName cls sel isMeta|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4095
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4096
    string := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4097
    string notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4098
	self extractClassAndSelectorFromSelectionInto:[:c :s :m |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4099
	    clsName := c.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4100
	    sel := s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4101
	    isMeta := m.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4102
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4103
	clsName isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4104
	    string := string asString withoutSeparators.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4105
	    words := string asCollectionOfWords.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4106
	    words notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4107
		clsName := words first.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4108
		(clsName endsWith:' class') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4109
		    isMeta := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4110
		    clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4111
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4112
		    isMeta := false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4113
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4114
		sel := Parser selectorInExpression:string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4115
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4116
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4117
	clsName notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4118
	    (cls := Smalltalk classNamed:clsName) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4119
		isMeta ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4120
		    cls := cls class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4121
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4122
		self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4123
		    aBlock value:cls value:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4124
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4125
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4126
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4127
		self warn:'no class named: %1 - spawning current' with:clsName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4128
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4129
	].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4130
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4131
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4132
    classMethodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4133
	sel := classMethodListView selectionValue string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4134
	sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4135
	    sel := self selectorFromClassMethodString:sel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4136
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4137
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4138
    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
  4139
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4140
    "Modified: 17.6.1996 / 16:51:49 / stefan"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  4141
    "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
  4142
! !
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4143
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4144
!BrowserView methodsFor:'class list source administration'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4145
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4146
classCheckin
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4147
    "check a class into the source repository"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4148
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4149
    self doClassMenu:[:currentClass |
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4150
        currentClass isLoaded ifFalse:[
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4151
            self warn:'cannot checkin unloaded classes.'.
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4152
            ^ self.
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4153
        ].
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4154
        self classCheckin:currentClass withLog:nil
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4155
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4156
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4157
    "Created: 23.11.1995 / 11:41:38 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4158
    "Modified: 15.4.1996 / 17:07:07 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4159
!
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4160
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4161
classCheckin:aClass withLog:aLogMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4162
    "check a class into the source repository"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4163
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4164
    SourceCodeManagerUtilities
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4165
        checkinClass:aClass withLog:aLogMessage.
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4166
    self normalLabel.
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4167
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4168
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  4169
classCompareWithRepository
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4170
    "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
  4171
     with the some version found in the repository."
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4172
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  4173
    currentClass isLoaded ifFalse:[
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4174
        self warn:'cannot compare unloaded classes.'.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4175
        ^ 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
  4176
    ].
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  4177
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4178
    self doClassMenu:[:currentClass |
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4179
        |aStream comparedSource currentSource v rev revString thisRevString mgr
2223
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4180
         nm msg comparedChangeSet currentChangeSet rev2 newestRev|
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4181
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4182
        nm := currentClass name.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4183
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4184
        rev := currentClass binaryRevision.
2223
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4185
        rev2 := currentClass revision.
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4186
        rev isNil ifTrue:[
2223
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4187
            rev := rev2
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4188
        ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4189
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4190
        mgr := currentClass sourceCodeManager.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4191
        newestRev := mgr newestRevisionOf:currentClass.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4192
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4193
        msg := resources string:'compare to revision: (empty for newest)'.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4194
        rev notNil ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4195
            msg := msg , '\\' , (resources string:'Current %1 is based upon rev %2.'
2223
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4196
                                           with:nm asText allBold with:rev).
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4197
            (rev2 notNil and:[rev2 ~= rev]) ifTrue:[
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4198
                msg := msg , '\' , (resources string:'And has been checked into the repository as %1.'
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4199
                                               with:rev2)
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4200
            ]
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4201
        ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4202
        newestRev notNil ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4203
            msg := msg , '\' , (resources string:'Newest in reporitory is %1.'
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4204
                                           with:newestRev)
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4205
        ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4206
2330
7a095f5456d3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2328
diff changeset
  4207
        self normalLabel.
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4208
        rev := Dialog request:msg withCRs onCancel:nil.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4209
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4210
        rev notNil ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4211
            rev withoutSpaces isEmpty ifTrue:[
2411
7c91c115e388 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2408
diff changeset
  4212
                msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
2403
ac9e48e91f17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2402
diff changeset
  4213
                "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
ac9e48e91f17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2402
diff changeset
  4214
                aStream := mgr getSourceStreamFor:currentClass revision:newestRev.
2411
7c91c115e388 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2408
diff changeset
  4215
                revString := '(newest: ' , (newestRev ? '???') , ')'.
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4216
            ] ifFalse:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4217
                msg := 'extracting previous %1'.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4218
                aStream := mgr getSourceStreamFor:currentClass revision:rev.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4219
                revString := rev
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4220
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4221
            self busyLabel:msg with:nm.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4223
            aStream isNil ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4224
                self warn:'could not extract source from repository'.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4225
                ^ self
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4226
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4227
            aStream class readErrorSignal handle:[:ex |
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4228
                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
  4229
                aStream close.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4230
                ^ self
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4231
            ] do:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4232
                comparedSource := aStream contents asString.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4233
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4234
            aStream close.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4235
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4236
            self busyLabel:'generating current source ...' with:nil.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4237
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4238
            aStream := '' writeStream.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4239
            Method flushSourceStreamCache.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4240
            currentClass fileOutOn:aStream withTimeStamp:false.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4241
            currentSource := aStream contents asString.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4242
            aStream close.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4243
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4244
            self busyLabel:'comparing  ...' with:nil.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4245
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4246
            comparedSource = currentSource ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4247
                self information:'versions are identical'.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4248
            ] ifFalse:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4249
                thisRevString := currentClass revision.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4250
                thisRevString isNil ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4251
                    thisRevString := 'no revision'
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4252
                ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4253
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4254
                revString = '(newest)' ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4255
                    (rev := mgr newestRevisionOf:currentClass) notNil ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4256
                        revString := '(newest is' , rev , ')'
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4257
                    ]
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4258
                ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4259
2330
7a095f5456d3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2328
diff changeset
  4260
                self busyLabel:'comparing  ...' with:nil.
7a095f5456d3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2328
diff changeset
  4261
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4262
                comparedChangeSet := ChangeSet fromStream:(comparedSource readStream).
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4263
                currentChangeSet := ChangeSet fromStream:(currentSource readStream).
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4264
2238
906331fe4118 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2232
diff changeset
  4265
                (UserPreferences current useNewVersionDiffBrowser) ifTrue:[
2223
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4266
                    VersionDiffBrowser 
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4267
                          openOnClass:currentClass
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4268
                          labelA:'current: (based on: ' , thisRevString , ')'
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4269
                          sourceA:currentSource
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4270
                          labelB:('repository: ' , revString)
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4271
                          sourceB:comparedSource.
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4272
                ] ifFalse:[
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4273
                    v := DiffTextView 
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4274
                        openOn:currentSource label:'current: (based on: ' , thisRevString , ')'
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4275
                        and:comparedSource label:'repository: ' , revString.      
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4276
                    v label:'comparing ' , nm.
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  4277
                ]
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4278
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4279
            self normalLabel.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  4280
        ]
1627
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  4281
    ]
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  4282
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  4283
    "Created: / 4.1.1997 / 15:48:20 / cg"
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  4284
    "Modified: / 28.4.1998 / 17:40:02 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4285
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4286
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  4287
classCreateSourceContainerFor:aClass
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  4288
    "let user specify the source-repository values for aClass"
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  4289
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
  4290
    ^ self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4291
	classDefineSourceContainerFor:aClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4292
	title:(resources string:'Repository information for %1' with:aClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4293
	text:(resources string:'CREATE_REPOSITORY' with:aClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4294
	createDirectories:true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4295
	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
  4296
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  4297
    "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
  4298
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4299
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4300
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
  4301
    "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
  4302
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4303
    |rslt|
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4304
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4305
    rslt := SourceCodeManagerUtilities
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4306
                defineSourceContainerForClass:aClass 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4307
                title:title 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4308
                text:boxText 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4309
                createDirectories:createDirs 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4310
                createContainer:createContainer.
2479
b7943e6621b2 eliminated some popupDialogs when changing sourceContainer
Claus Gittinger <cg@exept.de>
parents: 2478
diff changeset
  4311
    self normalLabel.
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  4312
    ^ rslt.
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4313
!
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4314
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4315
classLoadNewRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4316
    "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
  4317
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  4318
    |box
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4319
     moduleHolder packageHolder fileNameHolder
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  4320
     module package fileName aStream
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  4321
     y component mgr|
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4322
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4323
    mgr := SourceCodeManager.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4324
    mgr isNil ifTrue:[^ false].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4325
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4326
    fileNameHolder := ValueHolder newString.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4327
    moduleHolder := (OperatingSystem getLoginName) asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4328
    packageHolder := 'private' asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4329
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4330
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4331
    "/ 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
  4332
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4333
    box := DialogBox new.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4334
    box label:'container fileIn'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4335
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4336
    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
  4337
    component adjust:#left; borderWidth:0.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4338
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4339
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4340
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4341
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4342
    component := box addTextLabel:(resources string:'Module:').
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4343
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4344
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4345
    component := box addInputFieldOn:moduleHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4346
    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
  4347
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4348
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4349
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4350
    component := box addTextLabel:'Package:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4351
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4352
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4353
    component := box addInputFieldOn:packageHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4354
    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
  4355
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4356
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4357
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4358
    component := box addTextLabel:'Filename:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4359
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4360
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4361
    component := box addInputFieldOn:fileNameHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4362
    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
  4363
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4364
    box addVerticalSpace.
2048
f8c010698b75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  4365
    box addAbortAndOkButtons.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4366
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4367
    box showAtPointer.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4368
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4369
    box destroy.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4370
    box accepted ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4371
	^ false
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4372
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4373
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4374
    module := moduleHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4375
    package := packageHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4376
    fileName := fileNameHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4377
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4378
    (fileName endsWith:',v') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4379
	fileName := fileName copyWithoutLast:2
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4380
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4381
    (fileName endsWith:'.st') ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4382
	fileName := fileName , '.st'
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4383
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4384
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4385
    (mgr checkForExistingContainerInModule:module 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4386
				   package:package 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4387
				 container:fileName) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4388
	self warn:'no such container'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4389
	^ false
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4390
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4391
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4392
    aStream := mgr 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4393
	    streamForClass:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4394
	    fileName:fileName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4395
	    revision:#newest
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4396
	    directory:package
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4397
	    module:module
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4398
	    cache:false.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4399
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4400
    aStream isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4401
	self warn:'could not fileIn from repository'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4402
	^ false.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4403
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4404
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4405
    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
  4406
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4407
    Class withoutUpdatingChangesDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4408
	[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4409
	    aStream fileIn.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4410
	] valueNowOrOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4411
	    aStream close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4412
	    self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4413
	    Smalltalk changed.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4414
	].
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4415
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4416
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4417
    ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4418
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4419
    "Created: 13.9.1996 / 09:27:09 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4420
    "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
  4421
!
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4422
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4423
classLoadRevision
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4424
    "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
  4425
     upgrade a class to the newest revision"
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4426
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  4427
    currentClass isLoaded ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4428
	self warn:'cannot load specific releases of autoloaded classes.'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4429
	^ self.
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  4430
    ].
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  4431
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4432
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4433
	|aStream comparedSource currentSource v rev revString what mgr keep className
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4434
	 newClass prevCategory ok|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4435
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4436
	rev := Dialog request:'load which revision: (empty for newest)' onCancel:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4437
	rev notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4438
	    className := currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4439
	    (className includesString:'_rev_') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4440
		self warn:'select the original class and try again.'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4441
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4442
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4443
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4444
	    mgr := currentClass sourceCodeManager.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4445
	    ok := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4446
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4447
	    rev withoutSpaces isEmpty ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4448
		what := className , '(newest)'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4449
		self busyLabel:'extracting %1' with:what.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4450
		aStream := mgr getMostRecentSourceStreamForClassNamed:className.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4451
		revString := 'newest'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4452
		keep := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4453
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4454
		what := className , '(' , rev , ')'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4455
		self busyLabel:'extracting %1' with:what.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4456
		aStream := mgr getSourceStreamFor:currentClass revision:rev.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4457
		revString := rev.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4458
		keep := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4459
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4460
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4461
	    aStream isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4462
		self warn:'cannot find classes source.'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4463
		^ self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4464
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4465
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4466
	    self busyLabel:'loading %1' with:what .
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4467
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4468
	    [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4469
		Class withoutUpdatingChangesDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4470
		    |saveIt prevSkip|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4471
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4472
		    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
  4473
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4474
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
  4475
renamed before the fileIn is performed.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4476
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
  4477
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
  4478
with the class.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4479
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4480
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
  4481
without saving the existing class.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4482
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
  4483
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
  4484
running image.)' default:false.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4485
		    saveIt isNil ifTrue:[^ self].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4486
		    saveIt ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4487
			"/ rename the current class - for backup
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4488
			prevCategory := currentClass category.    
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4489
			currentClass category:'* obsolete *'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4490
			Smalltalk renameClass:currentClass to:className , '_saved'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4491
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4492
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4493
		    prevSkip := ClassCategoryReader skipUnchangedMethods.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4494
		    ClassCategoryReader skipUnchangedMethods:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4495
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4496
		    Class nameSpaceQuerySignal answer:currentClass nameSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4497
		    do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4498
			Class packageQuerySignal answer:currentClass package
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4499
			do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4500
			    lockUpdates := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4501
			    [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4502
				aStream fileIn.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4503
			    ] valueNowOrOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4504
				ClassCategoryReader skipUnchangedMethods:prevSkip.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4505
				lockUpdates := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4506
			    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4507
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4508
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4509
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4510
		    "/ did that work ?
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4511
		    newClass := Smalltalk at:className ifAbsent:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4512
		    newClass isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4513
			saveIt ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4514
			    self warn:'fileIn failed - undoing changes ...'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4515
			    Smalltalk renameClass:currentClass to:className.                        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4516
			    currentClass category:prevCategory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4517
			] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4518
			    self warn:'fileIn failed - cannot recover class'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4519
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4520
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4521
			"/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4522
			"/ if we loaded an old version, rename that one and fix the name of the
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4523
			"/ current class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4524
			"/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4525
			keep ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4526
			    saveIt ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4527
				Smalltalk renameClass:newClass to:(className , '_rev_' , rev).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4528
				newClass category:'* old versions *'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4529
				Smalltalk renameClass:currentClass to:className.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4530
				currentClass category:prevCategory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4531
			    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4532
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4533
			ok := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4534
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4535
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4536
	    ] valueNowOrOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4537
		aStream close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4538
		self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4539
		Smalltalk changed.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4540
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4541
	    ok ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4542
		self switchToClassNamed:newClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4543
	    ]    
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4544
	]
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4545
    ]
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  4546
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  4547
    "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
  4548
    "Modified: / 18.6.1998 / 14:29:40 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4549
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4550
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4551
classModifyContainer
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4552
    "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
  4553
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4554
    currentClass isLoaded ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4555
	self warn:'dont know anything about unloaded classes.'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4556
	^ self.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4557
    ].
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4558
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4559
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4560
	self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4561
	    classDefineSourceContainerFor:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4562
	    title:(resources string:'Repository information for %1' with:currentClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4563
	    text:'defining/changing the source code container'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4564
	    createDirectories:true createContainer:true. 
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4565
    ]
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4566
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4567
    "Created: 23.11.1995 / 11:41:38 / cg"
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  4568
    "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
  4569
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  4570
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4571
classModifyPackage
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4572
    "change the classes package assignment (dangerous)"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4573
2423
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  4574
    |newPackage p|
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4575
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4576
    currentClass owningClass notNil ifTrue:[
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4577
        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
  4578
        ^ self
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4579
    ].
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4580
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4581
    currentClass isLoaded ifFalse:[
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4582
        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
  4583
                   , '\\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
  4584
        ^ self.
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4585
    ].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4586
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4587
    newPackage := Dialog 
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4588
                    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
  4589
                    initialAnswer:currentClass package.
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4590
    newPackage size == 0 ifTrue:[
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  4591
        ^ self
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4592
    ].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4593
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4594
    self doClassMenu:[:currentClass |
2423
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  4595
        currentClass package:newPackage.
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  4596
        (p := Project projectNamed:newPackage) notNil ifTrue:[
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  4597
            p addClass:currentClass
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  4598
        ]
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4599
    ]
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4600
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4601
    "Created: 23.11.1995 / 11:41:38 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4602
    "Modified: 6.2.1996 / 16:58:58 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4603
!
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  4604
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4605
classRemoveContainer
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4606
    "remove a container from the source repository"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4607
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4608
    currentClass isLoaded ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4609
	self warn:'please load the class first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4610
	^ self.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4611
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4612
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4613
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4614
	self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4615
	    classRemoveSourceContainerFor:currentClass
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4616
    ]
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4617
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4618
    "Created: 23.11.1995 / 11:41:38 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4619
    "Modified: 11.9.1996 / 12:55:42 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4620
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4621
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4622
classRemoveSourceContainerFor:aClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4623
    "show container & let user confirm twice."
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4624
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  4625
    |module package fileName info mgr|
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4626
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4627
    aClass isLoaded ifFalse:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4628
        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
  4629
        ^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4630
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4631
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4632
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4633
    "/ 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
  4634
    "/ if so, take that as a default.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4635
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4636
    mgr := aClass sourceCodeManager.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4637
    mgr isNil ifTrue:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4638
        self warn:'No sourceCodeManagement.'.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4639
        ^ false
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4640
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4641
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4642
    info := mgr sourceInfoOfClass:aClass.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4643
    info notNil ifTrue:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4644
        (info includesKey:#module) ifTrue:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4645
            module := (info at:#module).
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4646
        ].
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4647
        (info includesKey:#directory) ifTrue:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4648
            package := (info at:#directory).
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4649
        ].
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4650
        fileName := mgr containerFromSourceInfo:info.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4651
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4652
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4653
    module isNil ifTrue:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4654
        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
  4655
        ^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4656
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4657
    package isNil ifTrue:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4658
        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
  4659
        ^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4660
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4661
    fileName isNil ifTrue:[
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4662
        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
  4663
        ^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4664
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4665
        
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4666
    OperatingSystem isMSDOSlike ifTrue:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4667
        module replaceAll:$\ with:$/.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4668
    ].
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4669
    OperatingSystem isMSDOSlike ifTrue:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4670
        package replaceAll:$\ with:$/.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4671
    ].
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4672
    (mgr checkForExistingContainerInModule:module 
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4673
                                   package:package 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4674
                                 container:fileName) ifFalse:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4675
        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
  4676
        ^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4677
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4678
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  4679
    (Dialog
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4680
        choose:(resources 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4681
                    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
  4682
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4683
container:    %2 / %3 / %4
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4684
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4685
Really remove ?' 
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4686
                    with:aClass name 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4687
                    with:module 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4688
                    with:package 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4689
                    with:fileName) 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4690
        labels:(Array 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4691
                    with:(resources string:'no') 
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4692
                    with:(resources string:'remove'))
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4693
        values:#(false true)
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4694
        default:false) ifFalse:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4695
        ^ self.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4696
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4697
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4698
    (mgr removeContainerFor:aClass
2178
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4699
                   inModule:module
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4700
                    package:package
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4701
                  container:fileName) ifFalse:[
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4702
        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
  4703
        self normalLabel.
ce3b8658fed4 replace $\'s with $/'s when creating/removing a source container.
Claus Gittinger <cg@exept.de>
parents: 2174
diff changeset
  4704
        ^ true.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4705
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4706
    ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4707
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4708
    "Created: 11.9.1996 / 13:06:14 / cg"
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  4709
    "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
  4710
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4711
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4712
classRevisionInfo
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4713
    "show current classes revision info in codeView"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4714
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4715
    self doClassMenu:[:currentClass |
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4716
        |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
  4717
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4718
        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
  4719
        currentClass notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4720
            Processor activeProcess 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4721
                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
  4722
            do:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4723
                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
  4724
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4725
                info := currentClass revisionInfo.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4726
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4727
                rv := currentClass binaryRevision.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4728
                rv notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4729
                    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
  4730
                    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
  4731
                    aStream cr.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4732
                ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4733
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4734
                info notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4735
                    (info includesKey:#revision) ifFalse:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4736
                        aStream nextPutLine:'WARNING:'; cr.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4737
                        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
  4738
                        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
  4739
                        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
  4740
                        aStream cr.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4741
                    ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4742
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4743
                    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
  4744
                    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
  4745
                    s notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4746
                        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
  4747
                    ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4748
                    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
  4749
                    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
  4750
                    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
  4751
                    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
  4752
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4753
                    (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
  4754
                        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
  4755
                        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
  4756
                    ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4757
                    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
  4758
                    aStream cr.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4759
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4760
                    (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
  4761
                        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
  4762
                        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
  4763
                    ]
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4764
                ] ifFalse:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4765
                    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
  4766
                    currentClass isLoaded ifFalse:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4767
                        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
  4768
                    ] ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4769
                        fn := currentClass classFilename.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4770
                        currentClass wasAutoloaded ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4771
                            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
  4772
                            fn notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4773
                                msg := msg , ' (from ''' , fn , ''')'.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4774
                            ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4775
                        ] ifFalse:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4776
                            fn notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4777
                                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
  4778
                            ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4779
                        ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4780
                        msg notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4781
                            aStream cr; nextPutAll:msg.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4782
                        ]
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4783
                    ]
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4784
                ]
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4785
            ]
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4786
        ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4787
        codeView contents:(aStream contents).
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4788
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4789
        codeView modified:false.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4790
        codeModified := false.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4791
        codeView acceptAction:nil.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4792
        self clearExplainAction.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4793
        methodListView notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4794
            methodListView setSelection:nil
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4795
        ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4796
        aspect := #revisionInfo. 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  4797
        self normalLabel
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4798
    ]
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4799
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  4800
    "Created: / 14.11.1995 / 16:43:15 / cg"
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  4801
    "Modified: / 31.3.1998 / 23:38:10 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4802
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4803
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4804
!BrowserView methodsFor:'class stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4805
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4806
allClassesInCategory:aCategory
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4807
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4808
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4809
    currentNamespace = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4810
	^ Smalltalk allClassesInCategory:currentClassCategory
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4811
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4812
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4813
    classes := Set new.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4814
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4815
    (self listOfNamespaces) do:[:aNamespace |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4816
	aNamespace allBehaviorsDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4817
	    |actualNamespace nm|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4818
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4819
	    aClass isMeta ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4820
		(aCategory = '* all *'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4821
		or:[aClass category = aCategory]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4822
		    (aClass isNamespace not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4823
		    or:[aClass == Smalltalk]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4824
			actualNamespace := aClass nameSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4825
			(actualNamespace isNamespace not "/ a private class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4826
			or:[actualNamespace == aNamespace]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4827
			    classes add:aClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4828
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4829
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4830
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4831
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4832
	]
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4833
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4834
    ^ classes
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4835
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4836
    "Created: 23.12.1996 / 10:26:28 / cg"
887
ad1d6b0ed970 namespace fixes
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  4837
    "Modified: 23.12.1996 / 11:33:13 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4838
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4839
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4840
allClassesInCategory:aCategory do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4841
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4842
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4843
    classes := self allClassesInCategory:aCategory.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4844
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4845
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4846
    "Modified: 23.12.1996 / 10:30:00 / cg"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4847
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4848
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4849
allClassesInCategory:aCategory inOrderDo:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4850
    "evaluate the argument, aBlock for all classes in aCategory;
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4851
     superclasses come first - then subclasses"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4852
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4853
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4854
1079
513fda872db0 oops - need an OC for sorting
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  4855
    classes := (self allClassesInCategory:aCategory) asOrderedCollection.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4856
    classes topologicalSort:[:a :b | b isSubclassOf:a].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4857
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4858
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4859
    "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
  4860
    "Modified: 19.3.1997 / 12:48:28 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4861
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4862
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4863
allClassesInSelectedNamespacesDo:aBlock
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4864
    |nameSpacesConsidered|
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4865
1701
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  4866
    currentNamespace = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4867
	Smalltalk allBehaviorsDo:aBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4868
	^ self
1701
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  4869
    ].
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  4870
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4871
    nameSpacesConsidered := self listOfNamespaces asIdentitySet.
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4872
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4873
    Smalltalk allBehaviorsDo:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4874
	(nameSpacesConsidered includes:aClass nameSpace)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4875
	ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4876
	    aBlock value:aClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4877
	]
1701
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  4878
    ]
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  4879
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  4880
    "Created: / 16.1.1997 / 20:18:47 / cg"
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  4881
    "Modified: / 18.6.1998 / 15:06:23 / cg"
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4882
!
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4883
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4884
changeCurrentClass:newClass
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4885
    "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
  4886
     keep instance protocol as it was.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4887
     This does not update any views."
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4888
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4889
    |cls meta|
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4890
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4891
"/    fullProtocol ifTrue:[^ self].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4892
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4893
    self releaseClass.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4894
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4895
    cls := newClass.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4896
    cls isMeta ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4897
	meta := cls.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4898
	cls := meta soleInstance
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4899
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4900
	meta := cls class
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4901
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4902
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4903
    currentClass := cls.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4904
    showInstance ifTrue:[
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4905
       actualClass := acceptClass := cls.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4906
    ] ifFalse:[
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4907
       actualClass := acceptClass := meta.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4908
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4909
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4910
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4911
	cls addDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4912
	meta addDependent:self.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4913
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4914
    self normalLabel.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4915
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4916
    "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
  4917
    "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
  4918
    "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
  4919
!
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4920
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4921
checkClassSelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4922
    "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
  4923
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4924
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4925
	self warn:'select a class first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4926
	^ false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4927
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4928
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4929
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4930
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4931
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
  4932
    "common helper for newClass and newSubclass
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4933
     - 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
  4934
     Also, set acceptaction to install the class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4935
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4936
    |theSuperClass|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4937
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4938
    currentMethodCategory := nil.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  4939
    self releaseMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4940
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  4941
    classListView setSelection:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4942
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4943
    fullClass ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4944
        methodCategoryListView contents:nil.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4945
        methodListView contents:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4946
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4947
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4948
    (aClass == Autoload
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  4949
    or:[aClass isNil or:[aClass isLoaded not]]) ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4950
        currentNamespace == JAVA ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4951
            theSuperClass := Java at:'java.lang.Object'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4952
        ] ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4953
            theSuperClass := Object
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4954
        ]
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4955
    ] ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4956
        theSuperClass := aClass
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4957
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4958
    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
  4959
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  4960
    codeModified := false.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4961
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  4962
    self changeCurrentClass:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4963
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  4964
    "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
  4965
    "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
  4966
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4967
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4968
classDoubleClick:lineNr
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  4969
    "double click on a class;
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  4970
     if its unloaded, load it.
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  4971
     if its an application-class, start the app"
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  4972
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4973
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4974
	currentClass isVisualStartable ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4975
	    self withWaitCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4976
		self busyLabel:'starting application %1' with:currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4977
		currentClass open.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4978
		self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4979
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4980
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4981
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4982
	currentClass isLoaded ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4983
	    self classLoad.
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  4984
"/            self withWaitCursorDo:[
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  4985
"/                currentClass autoload.
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  4986
"/            ].
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4987
	    self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4988
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4989
	].
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4990
    ]
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4991
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4992
    "Created: / 29.10.1997 / 15:50:26 / cg"
1478
852defc72eca Load autoloaded classes with doubleclick.
Stefan Vogel <sv@exept.de>
parents: 1451
diff changeset
  4993
    "Modified: / 16.2.1998 / 11:55:25 / stefan"
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  4994
    "Modified: / 4.3.1998 / 14:58:35 / cg"
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4995
!
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4996
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4997
classListUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4998
    RememberAspect ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4999
	aspect == #hierarchy ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5000
	    ^ self classHierarchy
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5001
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5002
	aspect == #classInstVars ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5003
	    ^ self classClassInstVars
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5004
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5005
	aspect == #comment ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5006
	    ^ self classComment
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5007
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5008
	aspect == #primitiveDefinitions ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5009
	    ^ self classPrimitiveDefinitions
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5010
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5011
	aspect == #primitiveFunctions ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5012
	    ^ self classPrimitiveFunctions
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5013
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5014
	aspect == #primitiveVariables ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5015
	    ^ self classPrimitiveVariables
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5016
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5017
	aspect == #revisionInfo ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5018
	    ^ self classRevisionInfo
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5019
	].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5020
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5021
    self classDefinition
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5022
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5023
    "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
  5024
    "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
  5025
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5026
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5027
classSelection:lineNr
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5028
    "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
  5029
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  5030
    |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
  5031
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5032
    (currentClassHierarchy notNil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5033
     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
  5034
        oldSelector := currentSelector.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5035
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5036
        self updateMethodCategoryListWithScroll:false.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5037
        self updateMethodListWithScroll:false.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5038
        fullProtocol ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5039
            self updateVariableList.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5040
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5041
        oldSelector notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5042
            self switchToMethod:oldSelector.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5043
            currentMethod isNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5044
                currentSelector := oldSelector.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5045
                codeView contents:'*** no other implementor of ' , currentSelector asText allBold , ' in that hierarchy ***'.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5046
                codeView acceptAction:nil.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5047
            ] ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5048
                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
  5049
                self methodSelectionChanged.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5050
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5051
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5052
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5053
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5054
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5055
    (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
  5056
        self classCategorySelectionChanged. 
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5057
        aspect := nil.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5058
        currentClass := actualClass := nil.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5059
        self updateCodeView.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5060
        ^ self
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5061
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5062
    nm := sel withoutSpaces.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5063
    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
  5064
    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
  5065
        self changeCurrentClass:cls.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5066
        self classSelectionChanged
836
22cdfaaf87fc namespace fixes & another check
Claus Gittinger <cg@exept.de>
parents: 834
diff changeset
  5067
    ] ifFalse:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5068
        (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
  5069
        ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5070
            "/ 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
  5071
            classes := IdentitySet new.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5072
            Class allSubInstancesDo:[:aClass |
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5073
                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
  5074
                    classes add:aClass
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5075
                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5076
            ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5077
            classes notEmpty ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5078
                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
  5079
                    cls := classes first.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5080
                    Smalltalk 
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5081
                        keysAndValuesDo:[:key :aClass |
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5082
                                (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
  5083
                                    globlName := key
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5084
                                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5085
                        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5086
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5087
                    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
  5088
                    globlName notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5089
                        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
  5090
                    ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5091
                    (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
  5092
                    ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5093
                        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
  5094
                    ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5095
                ] ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5096
                    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
  5097
                     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
  5098
                                           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
  5099
                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5100
            ] ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5101
                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
  5102
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5103
        ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5104
    ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5105
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5106
    actualClass notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5107
        self addToClassHistory: actualClass name asString
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5108
    ]
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5109
1803
59fc7e02179e fixed update of implementing class in fullProtocol mode.
Claus Gittinger <cg@exept.de>
parents: 1802
diff changeset
  5110
    "Modified: / 4.8.1998 / 20:28:33 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5111
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5112
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5113
classSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5114
    |oldMethodCategory oldMethod oldSelector|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5115
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  5116
    self withBusyCursorDo:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5117
        "/ alien classes have no methodCategories; hide that list ...
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5118
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5119
        currentClass notNil ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5120
            currentClass supportsMethodCategories ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5121
                self hideMethodCategoryList
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5122
            ] ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5123
                self showMethodCategoryList
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5124
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5125
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5126
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5127
        "/ temporarily nil the aspect, to avoid
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5128
        "/ double redraw.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5129
        aspect := nil. "/ #definition.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5130
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5131
        oldMethodCategory := currentMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5132
        oldMethod := currentMethod.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5133
        oldSelector := currentSelector.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5134
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5135
        showInstance ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5136
            actualClass := acceptClass := currentClass
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5137
        ] ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5138
            actualClass := acceptClass := currentClass class
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5139
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5140
        currentMethodCategory := nil.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5141
        self releaseMethod.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5142
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5143
        self updateMethodCategoryList.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5144
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5145
        oldMethodCategory notNil ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5146
            methodCategoryListView setSelectElement:oldMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5147
            methodCategoryListView hasSelection ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5148
                currentMethodCategory := oldMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5149
                self methodCategorySelectionChanged
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5150
            ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5151
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5152
        aspect := #definition.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5153
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5154
        self updateMethodList.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5155
        "/ self updateCodeView.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5156
        self updateVariableList.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5157
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5158
        fullClass ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5159
            self updateCodeView.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5160
            codeView acceptAction:[:theCode |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5161
                codeView withWaitCursorDo:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5162
                    Object abortSignal catch:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5163
                        self compileCode:theCode asString.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5164
                        codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5165
                        codeModified := false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5166
                    ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5167
                ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5168
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5169
        ] ifFalse:[
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5170
"/            self classDefinition.
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5171
            self classListUpdate.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5172
            self setAcceptActionForClass.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5173
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5174
        self clearExplainAction.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5175
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5176
        (classCategoryListView notNil and:[currentClass notNil]) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5177
            (currentClassCategory = currentClass category) ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5178
                currentClassCategory := currentClass category.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5179
                (classCategoryListView list includes:currentClassCategory) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5180
                    classCategoryListView setSelectElement:currentClassCategory
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5181
                ] ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5182
                    classCategoryListView setSelection:nil
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5183
                ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5184
            ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5185
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5186
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  5187
        self setDoitActionForClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5188
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5189
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  5190
    "Created: / 23.11.1995 / 11:32:03 / cg"
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  5191
    "Modified: / 27.7.1998 / 10:57:29 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5192
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5193
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5194
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
  5195
    "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
  5196
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  5197
    |cat name nameProto namePrefix i existingNames withNameSpaceDirective
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5198
     className ownerName s isJava|
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5199
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5200
    (aSuperClass notNil and:[aSuperClass isJavaClass not]) ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5201
        (currentNamespace == JAVA 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5202
        or:[aSuperClass notNil and:[aSuperClass isJavaClass]])
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5203
        ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5204
            ^ self javaClassTemplateFor:aSuperClass in:categoryString private:isPrivate
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5205
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5206
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5207
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5208
    self setAcceptActionForNewClass.
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5209
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5210
    s := TextStream on:''.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5211
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5212
    isNameSpace ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5213
        s nextPutAll:'Namespace name:''NewNameSpace'''.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5214
        s cr; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5215
        s emphasis:(self commentEmphasisAndColor).
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5216
        s nextPutAll:'"
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  5217
 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
  5218
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  5219
 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
  5220
 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
  5221
"
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5222
'.
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5223
        ^ s contents.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5224
    ].
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5225
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5226
    withNameSpaceDirective :=
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5227
        currentNamespace notNil 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5228
        and:[currentNamespace ~= '* all *'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5229
        and:[currentNamespace ~= Smalltalk]].
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5230
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5231
    withNameSpaceDirective ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5232
        className := aSuperClass nameWithoutNameSpacePrefix.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5233
        s nextPutAll:('"{ Namespace: ''' , currentNamespace name , ''' }"').
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5234
        s cr; cr.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5235
    ] ifFalse:[    
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5236
        className := aSuperClass name.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5237
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5238
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5239
    cat := categoryString.
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  5240
    (cat isNil or:[cat startsWith:$*]) ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5241
        cat := '* no category *'
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5242
    ].
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5243
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5244
    nameProto := 'NewClass'.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5245
    i := 1.
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5246
    isPrivate ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5247
        namePrefix := currentClass name , '::'.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5248
        existingNames := currentClass privateClasses.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5249
        existingNames size > 0 ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5250
            existingNames := existingNames collect:[:cls | cls name].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5251
        ]
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5252
    ] ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5253
        namePrefix := ''.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5254
        existingNames := Smalltalk keys
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5255
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5256
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5257
    name := 'NewClass' , i printString.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5258
    existingNames notNil ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5259
        nameProto := namePrefix , name.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5260
        [nameProto knownAsSymbol and:[existingNames includes:nameProto asSymbol]] whileTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5261
            i := i + 1.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5262
            name := 'NewClass' , i printString.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5263
            nameProto := namePrefix , name
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5264
        ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5265
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5266
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5267
    s nextPutAll:className.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5268
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5269
    isPrivate ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5270
        withNameSpaceDirective ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5271
            ownerName := currentClass nameWithoutNameSpacePrefix
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5272
        ] ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5273
            ownerName := currentClass name
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5274
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5275
        s nextPutAll:(' subclass:#' , name  , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5276
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5277
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5278
' , '    poolDictionaries: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5279
' , '    privateIn:' , ownerName)
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5280
    ] ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5281
        s nextPutAll:(' subclass:#' , name , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5282
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5283
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5284
' , '    poolDictionaries: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5285
' , '    category: ''').
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5286
        cat notNil ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5287
            cat printWithQuotesDoubledOn:s
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5288
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5289
        s nextPutAll: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5290
    ].
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5291
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5292
    s cr; cr.
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5293
    s emphasis:(self commentEmphasisAndColor).
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5294
    s nextPutAll:'
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5295
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5296
 Replace ''' , className , ''', ''', name , ''' and
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5297
 the empty string arguments by true values.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5298
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5299
 Install (or change) the class by ''accepting'',
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5300
 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
  5301
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5302
 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
  5303
 add some documentation; preferably under the classes documentation
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  5304
 protocol.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5305
 (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
  5306
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5307
'.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  5308
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  5309
    ^ s contents
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5310
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  5311
    "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
  5312
    "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
  5313
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5314
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5315
doClassMenu:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5316
    "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
  5317
     while showing waitCursor"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5318
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5319
    self checkClassSelected ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5320
	self withBusyCursorDo:[aBlock value:currentClass]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5321
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  5322
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  5323
    "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
  5324
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5325
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5326
javaClassTemplateFor:aSuperClass in:categoryString private:isPrivate
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5327
    "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
  5328
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5329
    |cat name nameProto namePrefix i existingNames withNameSpaceDirective
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5330
     className ownerName s superPackage|
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5331
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5332
    self setAcceptActionForNewJavaClass.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5333
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5334
    s := TextStream on:''.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5335
    s nextPutAll:('package ' , categoryString , ';').
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5336
    s cr; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5337
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5338
    s nextPutAll:('public '); cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5339
    s nextPutAll:('class ').
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5340
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5341
    i := 1.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5342
    name := 'NewClass' , i printString.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5343
    [ (Java classNamed:(categoryString , '.' , name)) notNil ] whileTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5344
        i := i + 1.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5345
        name := 'NewClass' , i printString.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5346
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5347
    s nextPutAll:name; space.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5349
    className := aSuperClass lastName.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5350
    superPackage := aSuperClass package copy replaceAll:$/ with:$..
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5351
    superPackage = categoryString ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5352
        superPackage = 'java.lang' ifFalse:[
2351
aea6ec072a3d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2350
diff changeset
  5353
            className := aSuperClass name asString copy replaceAll:$/ with:$..
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5354
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5355
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5356
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5357
    s nextPutAll:'extends '; nextPutAll:className.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5358
    s nextPutAll:' {'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5359
    s nextPutAll:'    // { private } { static } { final } type varName;'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5360
    s nextPutAll:'    // int var1;'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5361
    s nextPutAll:'    // int var2;'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5362
    s nextPutAll:'}'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5363
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5364
    s cr; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5365
    s emphasis:(self commentEmphasisAndColor).
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5366
    s nextPutAll:'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5367
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5368
// Replace ''' , className , ''', ''', name , ''' and
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5369
// change the local variable declarations as required.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5370
//
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5371
// Install (or change) the class by ''accepting'',
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5372
// either via the menu or the keyboard (usually CMD-A).
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5373
'.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5374
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5375
    ^ s contents
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5376
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5377
    "Created: / 23.12.1996 / 12:46:31 / cg"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5378
    "Modified: / 15.6.1998 / 17:23:05 / cg"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5379
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5380
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5381
listOfAllClassNamesInCategory:aCategory
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5382
    "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
  5383
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5384
    ^ self listOfAllClassesInCategory:aCategory names:true
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5385
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5386
    "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
  5387
!
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5388
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5389
listOfAllClassesInCategory:aCategory names:namesFlag
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5390
    "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
  5391
     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
  5392
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5393
    |nameSpaces listOfClassNames listOfClasses classesPresent namesPresent searchCategory 
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  5394
     match anyCategory nm allNameSpaces|
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5395
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5396
    allNameSpaces := (currentNamespace = '* all *').
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5397
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5398
    "/ keep track of added names (care for obsolete classes)
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  5399
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5400
    namesPresent := Set new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5401
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
  5402
    (aCategory = '* hierarchy *') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5403
	listOfClassNames := OrderedCollection new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5404
	listOfClasses := OrderedCollection new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5405
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5406
	self classHierarchyOf:Object withAutoloaded:true do:[:aClass :lvl|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5407
	    |indent|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5408
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5409
	    (aClass isNamespace not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5410
	    or:[aClass == Smalltalk]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5411
		aClass isObsolete ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5412
		    nm := self displayedClassNameOf:aClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5413
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5414
		    (namesPresent includes:nm) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5415
			indent := String new:lvl*2.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5416
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5417
			"/ show classes from other nameSpaces in italic
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5418
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5419
			(allNameSpaces not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5420
			 and:[(self findClassNamedInNameSpace:nm) isNil]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5421
			    nm := nm asText emphasizeAllWith:#italic.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5422
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5423
			nm := indent , nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5424
			namesPresent add:nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5425
			listOfClassNames add:nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5426
			listOfClasses add:nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5427
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5428
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5429
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5430
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5431
	namesFlag ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5432
	    ^ listOfClasses
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5433
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5434
	^ listOfClassNames
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5435
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5436
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5437
    (aCategory = '* all *') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5438
	anyCategory := true
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5439
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5440
	anyCategory := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5441
	(aCategory = '* no category *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5442
	    searchCategory := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5443
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5444
	    searchCategory := aCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5445
	].
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5446
    ].
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5447
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5448
    allNameSpaces ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5449
	nameSpaces := Array with:Smalltalk.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5450
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5451
	nameSpaces := self listOfNamespaces.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5452
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5453
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5454
    listOfClasses := OrderedCollection new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5455
    listOfClassNames := OrderedCollection new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5456
    classesPresent := IdentitySet new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5457
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5458
    nameSpaces do:[:aNamespace |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5459
	aNamespace allBehaviorsDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5460
	    |thisCategory actualNamespace nm owner|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5461
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5462
	    aClass isMeta ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5463
		(aClass isNamespace not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5464
		or:[aClass == Smalltalk]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5465
		    (classesPresent includes:aClass) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5466
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5467
			match := anyCategory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5468
			match ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5469
			    thisCategory := aClass category.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5470
			    match := ((thisCategory = searchCategory) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5471
				     or:[thisCategory = aCategory]).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5472
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5473
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5474
			match ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5475
			    fullClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5476
				aClass owningClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5477
				    match := false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5478
				]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5479
			    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5480
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5481
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5482
			match ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5483
			    nm := self displayedClassNameOf:aClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5484
			    (namesPresent includes:nm) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5485
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5486
				allNameSpaces ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5487
				    (owner := aClass topOwningClass) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5488
					actualNamespace := owner nameSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5489
				    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5490
					actualNamespace := aClass nameSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5491
				    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5492
				    match := actualNamespace isNamespace not "/ a private class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5493
					     or:[actualNamespace == aNamespace].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5494
				].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5495
				match ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5496
				    namesPresent add:nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5497
				    classesPresent add:aClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5498
				    listOfClasses add:aClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5499
				    listOfClassNames add:nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5500
				]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5501
			    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5502
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5503
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5504
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5505
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5506
	]
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5507
    ].
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5508
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5509
    fullClass ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5510
	"/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5511
	"/ mhm - must search through private classes of those
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5512
	"/ in smalltalk (they are not visible in the nameSpace,
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5513
	"/ but should also be displayed)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5514
	"/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5515
	Smalltalk allBehaviorsDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5516
	    |actualNamespace owner|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5517
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5518
	    aClass isMeta ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5519
		(classesPresent includes:aClass) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5520
		    (owner := aClass topOwningClass) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5521
			(classesPresent includes:owner) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5522
			    nm := self displayedClassNameOf:aClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5523
			    (namesPresent includes:nm) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5524
				namesPresent add:nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5525
				listOfClasses add:aClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5526
				listOfClassNames add:nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5527
			    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5528
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5529
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5530
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5531
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5532
	].
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5533
    ].
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  5534
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5535
    (listOfClasses size == 0) ifTrue:[^ nil].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5536
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5537
    "/ sort by name
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5538
    listOfClassNames sortWith:listOfClasses.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5539
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5540
    namesFlag ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5541
	^ listOfClasses
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5542
    ].
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5543
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5544
    "/ indent after sorting
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5545
    1 to:listOfClassNames size do:[:index |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5546
	|nm cls owner s|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5547
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5548
	cls := listOfClasses at:index.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5549
	owner := cls.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5550
	(owner := owner owningClass) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5551
	    nm := listOfClassNames at:index.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5552
	    s := nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5553
	    [owner notNil] whileTrue:[    
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5554
		s := '  ' , s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5555
		owner := owner owningClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5556
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5557
	    listOfClassNames at:index put:s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5558
	].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5559
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5560
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5561
    ^ listOfClassNames
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  5562
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5563
    "Created: 10.1.1997 / 13:57:34 / cg"
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
  5564
    "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
  5565
!
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5566
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5567
listOfClassNameHierarchyOf:aClass
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5568
    "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
  5569
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5570
    |startClass classes thisOne|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5571
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5572
    showInstance ifTrue:[
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  5573
        startClass := aClass
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5574
    ] ifFalse:[
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  5575
        startClass := aClass class.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5576
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5577
    classes := startClass allSuperclasses.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5578
    thisOne := Array with:startClass.
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  5579
    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
  5580
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5581
    fullProtocol ifFalse:[
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  5582
        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
  5583
    ].
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  5584
    ^ classes collect:[:c | self displayedClassNameOf:c "c name"]
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  5585
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5586
    "Created: 10.1.1997 / 14:01:06 / cg"
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  5587
    "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
  5588
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5589
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5590
renameCurrentClassTo:aString
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5591
    "helper - do the class-rename"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5592
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5593
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5594
	|oldSym oldBaseSym cls|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5595
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5596
	"/ check if the target already exists - confirm if so.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5597
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5598
	(cls := Smalltalk classNamed:aString) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5599
	    (self confirm:(resources string:'WARN_RENAME' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5600
				     with:aString 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5601
				     with:cls category) withCRs)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5602
		ifFalse:[^ self]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5603
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5604
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5605
	oldSym := currentClass name asSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5606
	oldBaseSym := currentClass nameWithoutPrefix asSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5607
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5608
	"/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5609
	"/ renaming is actually more complicated as one might
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5610
	"/ think (care for classVariables, privateClasses etc.)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5611
	"/ Smalltalk knows all about that ...
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5612
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5613
	Smalltalk renameClass:currentClass to:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5614
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5615
	self updateClassList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5616
	self updateMethodCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5617
	self updateMethodListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5618
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5619
	    Transcript showCR:('searching for users of ' , oldSym); endEntry.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5620
	    SystemBrowser browseReferendsOf:oldSym warnIfNone:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5621
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5622
	    Transcript showCR:('searching for users of ' , oldBaseSym); endEntry.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5623
	    SystemBrowser browseReferendsOf:oldBaseSym warnIfNone:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5624
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5625
    ]
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
  5626
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5627
    "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
  5628
    "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
  5629
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5630
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5631
switchToClassNameMatching:aMatchString
1889
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5632
    |classNames caselessMatchingNames 
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5633
     substringMatchingNames caselessSubstringMatchingNames
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5634
     lcMatchString subMatch lcSubMatch thisName box className
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5635
     needSearch cls|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5636
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  5637
    classNames := Set new.
1688
186e02887c30 also do caseless match in find-class
Claus Gittinger <cg@exept.de>
parents: 1687
diff changeset
  5638
    caselessMatchingNames := Set new.
1889
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5639
    substringMatchingNames := Set new.
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5640
    caselessSubstringMatchingNames := Set new.
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5641
    lcMatchString := aMatchString asLowercase.
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5642
    needSearch := true.
1889
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  5643
    aMatchString includesMatchCharacters ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5644
	subMatch := '*' , aMatchString , '*'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5645
	lcSubMatch := subMatch asLowercase.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5646
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5647
	"/ 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
  5648
	className := aMatchString asSymbolIfInterned.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5649
	className notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5650
	    cls := Smalltalk at:className ifAbsent:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5651
	    (cls notNil and:[cls isBehavior]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5652
		needSearch := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5653
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5654
	]
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5655
    ].
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5656
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5657
    needSearch ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5658
	Smalltalk allBehaviorsDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5659
	    "/ to make it look better,
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5660
	    "/ show dotted names for java
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5661
	    "/ thisName := aClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5662
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5663
	    aClass isJavaClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5664
		thisName := aClass displayString. "/ fullName copyReplaceAll:$/ with:$.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5665
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5666
		thisName := aClass name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5667
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5668
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5669
	    (aMatchString match:thisName) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5670
		classNames add:thisName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5671
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5672
		(lcMatchString match:thisName asLowercase) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5673
		    caselessMatchingNames add:thisName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5674
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5675
		    subMatch notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5676
			(subMatch match:thisName) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5677
			    substringMatchingNames add:thisName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5678
			] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5679
			    (lcSubMatch match:thisName asLowercase) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5680
				caselessSubstringMatchingNames add:thisName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5681
			    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5682
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5683
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5684
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5685
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5686
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5687
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5688
	"/ if nothing matched - try caseless matches
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5689
	classNames size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5690
	    classNames := caselessMatchingNames.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5691
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5692
	    "/ if nothing matched - try substring matches
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5693
	    classNames size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5694
		classNames := substringMatchingNames.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5695
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5696
		"/ if nothing matched - try caseless substring matches
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5697
		classNames size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5698
		    classNames := caselessSubstringMatchingNames.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5699
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5700
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5701
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5702
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5703
	(classNames size == 0) ifTrue:[^ nil].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5704
	(classNames size == 1) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5705
	    className := classNames first
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5706
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5707
	    classNames := classNames asArray sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5708
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5709
	    box := self listBoxTitle:'select class to switch to:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5710
			      okText:'ok'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5711
				list:classNames.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5712
	    box action:[:aString | className := aString].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5713
	    box showAtPointer.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5714
	].
1567
20820f265460 handle cancel in match-class-select
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
  5715
    ].
20820f265460 handle cancel in match-class-select
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
  5716
20820f265460 handle cancel in match-class-select
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
  5717
    className isNil ifTrue:[^ self].
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5718
1727
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  5719
    "/ use slashed javaName for search.
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  5720
    (className includes:$.) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5721
	className := className copyReplaceAll:$. with:$/
1727
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  5722
    ].
1563
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  5723
    self switchToClassNamed:className.
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  5724
    self classSelectionChanged.
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  5725
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  5726
    "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
  5727
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5728
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5729
switchToClassNamed:aString
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  5730
    |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
  5731
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5732
    meta := false.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  5733
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5734
    str := aString.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  5735
    (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
  5736
        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
  5737
        meta := true
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  5738
    ].
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  5739
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  5740
    theClass := self findClassNamed:str.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  5741
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  5742
    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
  5743
        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
  5744
            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
  5745
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5746
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5747
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5748
    theClass == currentClass ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5749
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5750
    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
  5751
        classCategoryListView notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5752
            currentClassHierarchy isNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5753
                ((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
  5754
                    currentClassCategory := newCat.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5755
                    newCat isNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5756
                        element := '* no category *'
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5757
                    ] ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5758
                        element := newCat.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5759
                    ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5760
                    classCategoryListView setSelectElement:element.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5761
                    "/ classCategoryListView makeSelectionVisible.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5762
                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5763
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5764
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5765
        currentClass := actualClass := nil.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5766
        self updateClassList.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5767
        self changeCurrentClass:theClass.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  5768
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5769
"/        (currentNamespace = '* all *'
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5770
"/        or:[currentNamespace ~= theClass nameSpace]) ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5771
"/            str := theClass name
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5772
"/        ] ifFalse:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5773
"/            str := theClass nameWithoutPrefix
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5774
"/        ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5775
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5776
        l := classListView list.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5777
        l notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5778
            idx := l findFirst:[:line | line withoutSpaces = str].
1612
0cc1da8e1dba avoid a redraw of classDefinition.
Claus Gittinger <cg@exept.de>
parents: 1601
diff changeset
  5779
"/            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
  5780
              classListView setSelection:idx.
839
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  5781
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  5782
"/            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
  5783
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5784
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5785
        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
  5786
        idx ~~ 0 ifTrue:[
1522
6a0cf0f9b393 avoid double redraw when selecting a class
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  5787
"/            self classSelectionChanged.
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5788
            classCategoryListView notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5789
                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
  5790
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5791
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5792
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5793
        actualClass notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  5794
            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
  5795
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5796
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5797
1522
6a0cf0f9b393 avoid double redraw when selecting a class
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  5798
    "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
  5799
    "Modified: / 17.6.1996 / 16:54:55 / stefan"
1563
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  5800
    "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
  5801
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5802
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5803
updateClassList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5804
    self updateClassListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5805
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5806
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5807
updateClassListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5808
    |classes oldClassName|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5809
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  5810
    gotClassList == true ifTrue:[^ self].
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  5811
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5812
    classListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5813
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5814
	 refetch in case we are not up to date
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5815
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5816
	(currentClass notNil and:[fullProtocol not]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5817
	    oldClassName := currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5818
	    currentClass := self findClassNamed:oldClassName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5819
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5820
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5821
	currentClassCategory notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5822
	    classes := self listOfAllClassNamesInCategory:currentClassCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5823
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5824
	    currentClassHierarchy notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5825
		classes := self listOfClassNameHierarchyOf:currentClassHierarchy
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5826
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5827
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5828
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5829
	classListView list = classes ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5830
	    scroll ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5831
		classListView contents:classes
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5832
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5833
		classListView setContents:classes
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5834
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5835
	    oldClassName notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5836
		classListView setContents:classes.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5837
		classListView setSelectElement:oldClassName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5838
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5839
		variableListView notNil ifTrue:[variableListView contents:nil]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5840
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5841
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5842
	    scroll ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5843
		fullProtocol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5844
		    classListView scrollToBottom
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5845
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5846
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5847
	].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5848
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5849
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5850
    "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
  5851
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5852
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5853
!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
  5854
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
  5855
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
  5856
    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
  5857
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
  5858
    "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
  5859
    "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
  5860
!
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
  5861
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5862
classMethodFileOutAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5863
    "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
  5864
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5865
    |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
  5866
     fileBox f|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5867
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5868
    append := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5869
    fileBox := FileSaveBox
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5870
			title:(resources string:'save methods in:')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5871
			okText:(resources string:'save')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5872
			abortText:(resources string:'cancel')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5873
			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
  5874
    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
  5875
    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
  5876
    Project notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5877
	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
  5878
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5879
    fileBox showAtPointer.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5880
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5881
    fileName isNil ifTrue:[^ self].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5882
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5883
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5884
     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
  5885
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5886
    (f := fileName asFilename) exists ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5887
	f copyTo:(f withSuffix: 'sav')
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5888
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5889
    append ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5890
	outStream := FileStream appendingOldFileNamed:fileName
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5891
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5892
	outStream := FileStream newFileNamed:fileName.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5893
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5894
    outStream isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5895
	^ self warn:'cannot create: %1' with:fileName
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5896
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5897
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5898
	list := classMethodListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5899
	list do:[:l |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5900
	    |line|
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
	    line := l asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5903
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5904
	    self busyLabel:'writing: ' with:line.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5905
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5906
	    classString := self classNameFromClassMethodString:line.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5907
	    selectorString := self selectorFromClassMethodString:line.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5908
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5909
	    cls := self findClassNamed:classString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5910
	    cls isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5911
		self warn:'oops class %1 is gone' with:classString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5912
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5913
		mth := cls compiledMethodAt:(selectorString asSymbol).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5914
		Class fileOutErrorSignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5915
		    |box answer|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5916
		    box := YesNoBox 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5917
				title:('fileOut error: ' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5918
				       , ex errorString 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5919
				       , '\\continue anyway ?') withCRs
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5920
				yesText:'continue' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5921
				noText:'abort'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5922
		    answer := box confirm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5923
		    box destroy.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5924
		    answer ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5925
			ex proceed
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5926
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5927
		    self normalLabel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5928
		    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5929
		] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5930
		    cls fileOutMethod:mth on:outStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5931
		]    
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
	outStream close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5935
	self normalLabel.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5936
    ]
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
  5937
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5938
    "Modified: / 17.6.1996 / 16:51:11 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5939
    "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
  5940
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5941
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5942
classMethodMenu
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5943
    <resource: #keyboard ( #Cmds #Cmdi #Cmdg ) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5944
    <resource: #programMenu >
587
74d27450aa79 added resource info
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
  5945
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  5946
    |items m specialMenu|
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5947
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5948
    (currentMethod notNil
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5949
    and:[currentMethod isWrapped]) ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5950
        items := #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5951
                            ('inspect method'      methodInspect            )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5952
                            ('decompile'           methodDecompile          )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5953
                            ('-'              nil               )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5954
                  ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5955
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5956
        currentMethod isCounting ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5957
            items := items , #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5958
                            ('stop counting'  methodStopCounting)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5959
                            ('reset count'    methodResetCounting)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5960
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5961
        ] ifFalse:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5962
            currentMethod isCountingMemoryUsage ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5963
                items := items , #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5964
                            ('stop mem usage'  methodStopMemoryUsage)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5965
                            ('reset mem count' methodResetMemoryUsage)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5966
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5967
            ] ifFalse:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5968
                currentMethod isTimed ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5969
                    items := items , #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5970
                            ('stop timing' methodStopTiming)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5971
                            ('reset times' methodResetTiming)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5972
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5973
                ] ifFalse:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5974
                    items := items , #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5975
                            ('remove break/trace'  methodRemoveBreakOrTrace )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5976
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5977
                ]
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5978
            ]
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5979
        ]
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5980
    ] ifFalse:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5981
        items := #(
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5982
                            ('inspect method'      methodInspect            )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5983
                            ('decompile'           methodDecompile          )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5984
                            ('-'                   nil                      )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5985
                            ('breakpoint'          methodBreakPoint         )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5986
                            ('breakpoint in...'   methodBreakPointInProcess)
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5987
                            ('-'                   nil                      )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5988
                            ('trace'               methodTrace              )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5989
                            ('trace sender'        methodTraceSender        )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5990
                            ('trace full walkback' methodTraceFull          )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5991
                            ('-'                   nil                      )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5992
                            ('start timing'        methodStartTiming        )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5993
                            ('start counting'      methodStartCounting      )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5994
                            ('start mem usage'     methodStartMemoryUsage   )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5995
                      ).
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5996
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5997
    specialMenu := PopUpMenu
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5998
                        itemList:items
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  5999
                        resources:resources.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6000
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6001
    device ctrlDown ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6002
        currentMethod isNil ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6003
            classMethodListView flash.
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6004
            ^ nil
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6005
        ].
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6006
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6007
        ^ specialMenu
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6008
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6009
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6010
    items := #(
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6011
                                ('fileOut'             methodFileOut                   )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6012
                                ('fileOut all'         classMethodFileOutAll           )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6013
                                ('printOut'            methodPrintOut                  )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6014
                                ('-'                   nil                             )
2328
21c475c3ed2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2327
diff changeset
  6015
                                ('browse full'         classMethodBrowse               )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6016
                                ('spawn'               methodSpawn                     )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6017
                                ('spawn class'         classSpawn                      )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6018
                                ('spawn full protocol' classSpawnFullProtocol          )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6019
                                ('spawn hierarchy'     classSpawnHierarchy             )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6020
                                ('-'                   nil                             )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6021
                                ('filter...'           classMethodFilter               )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6022
                                ('senders...'          methodSenders             Cmds  )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6023
                                ('implementors...'     methodImplementors        Cmdi  )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6024
                                ('globals...'          methodGlobalReferends     Cmdg  )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6025
                                ('-'                   nil                             )
2416
24ac1ac0140f allow category change from methodList browser
Claus Gittinger <cg@exept.de>
parents: 2411
diff changeset
  6026
                                ('change category...'  methodChangeCategory            )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6027
                                ('remove'              methodRemove                    )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6028
                                ('-'                   nil                             )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6029
                                ('others'              othersMenu                Ctrl  )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6030
               ).
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  6031
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6032
    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
  6033
    m subMenuAt:#othersMenu put:specialMenu.
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  6034
    ^ m
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  6035
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  6036
    "Modified: / 7.8.1998 / 17:13:47 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6037
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6038
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6039
!BrowserView methodsFor:'class-method stuff'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6040
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6041
classFromClassMethodString:aString
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6042
    "helper for classMethod-list - extract class name from the string"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6043
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6044
    |classString|
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6045
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6046
    classString := self classNameFromClassMethodString:aString.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6047
    ^ self findClassNamed:classString.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6048
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6049
    "Created: 3.3.1997 / 15:12:59 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6050
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6051
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6052
classMethodFilter
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6053
    "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
  6054
     which pass some filter."
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6055
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6056
    |aspects list allMethods filteredMethods sel str|
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6057
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6058
    aspects := IdentityDictionary new.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6059
    aspects at:#doFilterMessage         put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6060
    aspects at:#notContainingMessage    put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6061
    aspects at:#doFilterString          put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6062
    aspects at:#notContainingString     put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6063
    aspects at:#filteredMessageSelector put:nil asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6064
    aspects at:#filteredString          put:nil asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6065
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6066
    (SystemBrowser  
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6067
      openDialogInterfaceSpec:(self class methodFilterSpec)
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6068
      withBindings:aspects) ifFalse:[
2425
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6069
        ^ self
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6070
    ].
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6071
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6072
    self withBusyCursorDo:[
2425
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6073
        list := classMethodListView list.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6074
        allMethods := list collect:[:line |
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6075
            |cls sel|
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6076
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6077
            cls := self classFromClassMethodString:line.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6078
            sel := self selectorFromClassMethodString:line.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6079
            sel := sel asSymbol.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6080
            cls isNil ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6081
                nil
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6082
            ] ifFalse:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6083
                cls compiledMethodAt:sel
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6084
            ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6085
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6086
        allMethods := allMethods select:[:m | m notNil].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6087
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6088
        filteredMethods := allMethods.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6089
        (aspects at:#doFilterMessage) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6090
            sel := (aspects at:#filteredMessageSelector) value.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6091
            sel size > 0 ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6092
                sel := sel string asSymbol.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6093
                (aspects at:#notContainingMessage) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6094
                    filteredMethods := filteredMethods select:[:m | (m sends:sel) not].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6095
                ] ifFalse:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6096
                    filteredMethods := filteredMethods select:[:m | m sends:sel].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6097
                ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6098
            ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6099
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6100
        (aspects at:#doFilterString) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6101
            str := (aspects at:#filteredString) value.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6102
            str size > 0 ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6103
                str := str string.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6104
                (aspects at:#notContainingString) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6105
                    filteredMethods := filteredMethods select:[:m | (m source includesString:str) not].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6106
                ] ifFalse:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6107
                    filteredMethods := filteredMethods select:[:m | m source includesString:str].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6108
                ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6109
            ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6110
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6111
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6112
        filteredMethods = allMethods ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6113
            self information:'Filtered list is the same as shown.'.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6114
            ^ self
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6115
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6116
        filteredMethods isEmpty ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6117
            self information:'Filtered list is empty.'.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6118
            ^ self
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6119
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6120
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6121
        SystemBrowser
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6122
            browseMethods:filteredMethods 
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  6123
            title:('filtered ' , self topView label)
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6124
    ]
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6125
!
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6126
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6127
classMethodSelection:lineNr
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6128
    "user clicked on a class/method line - show code"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6129
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  6130
    |cls string classString selectorString meta sensor|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6131
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6132
    string := classMethodListView selectionValue string.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6133
    classString := self classNameFromClassMethodString:string.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6134
    selectorString := self selectorFromClassMethodString:string.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6135
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  6136
    "/ reselected with control ?
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  6137
    ((sensor := self sensor) notNil and:[sensor ctrlDown]) ifTrue:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6138
        selectorString = currentSelector ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6139
            "/ if there is a trace/break, remove it.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6140
            (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6141
                self methodRemoveBreakOrTrace.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6142
                ^ self
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6143
            ]
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6144
        ].
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  6145
    ].
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  6146
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6147
    ((classString ~= 'Metaclass') and:[classString endsWith:' class']) ifTrue:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6148
        classString := classString copyWithoutLast:6 "copyTo:(classString size - 5)".
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6149
        meta := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6150
    ] ifFalse:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6151
        meta := false.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6152
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6153
    self changeCurrentClass:(self findClassNamed:classString).
131
claus
parents: 130
diff changeset
  6154
    meta ifTrue:[cls := currentClass class] ifFalse:[cls := currentClass].
claus
parents: 130
diff changeset
  6155
    actualClass := acceptClass := cls.
129
claus
parents: 126
diff changeset
  6156
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6157
    currentClass isNil ifTrue:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6158
        self warn:'oops method is gone'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6159
    ] ifFalse:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6160
        currentClassCategory := currentClass category.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6161
        currentSelector := selectorString asSymbol.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6162
        currentClass isJavaClass ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6163
            currentMethod := currentClass compiledMethodAt:currentSelector.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6164
            currentMethod isNil ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6165
                currentClass methodDictionary keysAndValuesDo:[:sel :mthd |
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6166
                    mthd name = currentSelector ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6167
                        currentMethod := mthd
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6168
                    ]       
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6169
                ].
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6170
            ]
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6171
        ] ifFalse:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6172
            currentMethod := actualClass compiledMethodAt:currentSelector.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6173
        ].
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6174
        currentMethod isNil ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6175
            self warn:'oops method is gone'
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6176
        ] ifFalse:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6177
            currentMethodCategory := currentMethod category.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6178
        ].
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6179
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6180
        self methodSelectionChanged
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6181
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6182
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6183
    self setDoitActionForClass
131
claus
parents: 130
diff changeset
  6184
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6185
    "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
  6186
    "Modified: / 17.6.1996 / 16:51:28 / stefan"
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  6187
    "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
  6188
!
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6189
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6190
classNameFromClassMethodString:aString
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6191
    "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
  6192
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6193
    |pos s words clsName|
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6194
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6195
    s := aString string withoutSpaces.
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6196
    (s includes:${ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6197
        s := s copyTo:(s indexOf:${ ) - 1.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6198
        s := s withoutSpaces.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6199
    ].
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6200
    (s includes:$[ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6201
        s := s copyTo:(s indexOf:$[ ) - 1.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6202
        s := s withoutSpaces.
2072
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  6203
    ].
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  6204
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6205
"/ new code:
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6206
    words := s asCollectionOfWords.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6207
    clsName := words at:1.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6208
    words size > 2 ifTrue:[
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6209
        (words at:2) = 'class' ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6210
            ^ clsName , ' class'
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6211
        ]
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6212
    ].
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6213
    ^ clsName.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6214
"/ OLD code
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6215
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6216
    (s endsWith:' !!') ifTrue:[
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6217
        s := s copyWithoutLast:2
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6218
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6219
    (s endsWith:')') ifTrue:[
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6220
        s := aString copyTo:(aString lastIndexOf:$()-1.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6221
        s := s withoutSpaces.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6222
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6223
    (s endsWith:' !!') ifTrue:[
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6224
        s := s copyWithoutLast:2
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6225
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6226
    pos := s lastIndexOf:(Character space).
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6227
    ^ s copyTo:(pos - 1)
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  6228
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6229
    "Modified: / 17.6.1996 / 17:06:59 / stefan"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6230
    "Created: / 3.3.1997 / 15:11:30 / cg"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6231
    "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
  6232
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6233
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6234
selectorFromClassMethodString:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6235
    "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
  6236
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6237
    |pos s|
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6238
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  6239
    s := aString string withoutSpaces.
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6240
    (s includes:${ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6241
        s := s copyTo:(s indexOf:${ ) - 1.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6242
        s := s withoutSpaces.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6243
    ].
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6244
    (s includes:$[ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  6245
        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
  6246
        s := s withoutSpaces.
2072
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  6247
    ].
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  6248
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6249
    (s endsWith:' !!') ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6250
        s := s copyWithoutLast:2
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6251
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6252
    (s endsWith:')') ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6253
        s := aString copyTo:(aString lastIndexOf:$()-1.
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6254
        s := s withoutSpaces.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6255
    ].
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  6256
    (s endsWith:' !!') ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  6257
        s := s copyWithoutLast:2
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  6258
    ].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6259
    pos := s lastIndexOf:(Character space).
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6260
    s := s copyFrom:(pos + 1).
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6261
    s := s string.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  6262
    ^ s
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6263
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6264
    "Modified: 17.6.1996 / 17:04:38 / stefan"
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6265
    "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
  6266
!
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6267
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6268
updateClassMethodListWithScroll:scroll keepSelection:keep
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6269
    |newList selection s|
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6270
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6271
    newList := OrderedCollection new.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6272
    selection := classMethodListView selection.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6273
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6274
    "/ update the list, caring for traps.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6275
    classMethodListView list do:[:entry |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6276
	|cls sel mthd s icn|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6277
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6278
	cls := self classFromClassMethodString:entry string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6279
	sel := self selectorFromClassMethodString:entry string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6280
	(cls isNil or:[sel isNil]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6281
	    "/ method is gone ?
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6282
	    s := entry string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6283
	    (s endsWith:'???') ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6284
		s := s , ' ???'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6285
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6286
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6287
	    cls isJavaClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6288
		s := entry.
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6289
"/                cls methodDictionary keysAndValuesDo:[:sel :mthd |
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6290
"/                    mthd name = sel ifTrue:[
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6291
"/                        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
  6292
"/                    ]
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6293
"/                ]
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6294
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6295
		mthd := cls compiledMethodAt:(sel asSymbol).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6296
		s := cls name , ' ' , sel asText allBold.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6297
		mthd isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6298
		    s := s , ' ???'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6299
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6300
		    ShowMethodCategoryInClassMethodList == true ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6301
			s := s , '  {' , mthd category asText allItalic, '}'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6302
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6303
		    s := (self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6304
			    listEntryForMethod:mthd 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6305
			    selector:s)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6306
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6307
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6308
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6309
	newList add:s.
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6310
    ].
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6311
    classMethodListView setList:newList.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6312
    classMethodListView setSelection:selection.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6313
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6314
    "Modified: / 18.12.1995 / 22:54:04 / stefan"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6315
    "Created: / 3.3.1997 / 15:10:15 / cg"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  6316
    "Modified: / 17.10.1998 / 11:30:35 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6317
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6318
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6319
!BrowserView methodsFor:'event handling'!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6320
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6321
handlesKeyPress:key inView:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6322
    "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
  6323
     a keyPress in some other view ?"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6324
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  6325
    <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
  6326
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6327
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6328
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6329
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6330
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6331
    view == classCategoryListView ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6332
        (key == #Find) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6333
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6334
        (untranslatedKey == #Cmdc) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6335
        (untranslatedKey == #Cmdo) ifTrue:[^ true].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6336
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6337
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6338
    view == classListView ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6339
        (key == #Find) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6340
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6341
        (untranslatedKey == #Cmdl) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6342
        (untranslatedKey == #Cmdd) ifTrue:[^ true].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6343
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6344
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6345
    view == methodCategoryListView ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6346
        (key == #Find) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6347
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6348
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6349
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  6350
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  6351
    or:[view == classMethodListView]) ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6352
        (key == #Delete) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6353
        (untranslatedKey == #Cmdi) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6354
        (untranslatedKey == #Cmds) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6355
        (untranslatedKey == #Cmdg) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6356
        (untranslatedKey == #Cmdt) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6357
        (untranslatedKey == #Cmda) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6358
    ].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6359
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6360
    ^ false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6361
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  6362
    "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
  6363
    "Modified: / 16.1.1998 / 17:20:36 / stefan"
1557
5ecd643fc71c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1550
diff changeset
  6364
    "Modified: / 18.4.1998 / 15:54:15 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6365
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6366
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6367
keyPress:key x:x y:y view:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6368
    "this method is reached via delegation from the classCategoryListView"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6369
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  6370
    <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
  6371
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6372
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6373
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6374
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6375
    "/ have to untranslate (since we get #Inspect / #Search
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6376
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6377
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6378
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6379
    view == classCategoryListView ifTrue:[
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6380
        (key == #Find) ifTrue:[^ self classCategoryFindClass].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6381
        (untranslatedKey == #Cmdn) ifTrue:[^ self classCategoryNewCategory].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6382
        (untranslatedKey == #Cmdc) ifTrue:[^ self classCategoryClone].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6383
        (untranslatedKey == #Cmdo) ifTrue:[^ self classCategoryOpenInClass].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6384
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6385
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6386
    view == classListView ifTrue:[
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6387
        (key == #Find) ifTrue:[^ self classCategoryFindClass].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6388
        (untranslatedKey == #Cmdn) ifTrue:[^ self classNewClass].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6389
        (untranslatedKey == #Cmdl) ifTrue:[^ self classLoad].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6390
        (untranslatedKey == #Cmdd) ifTrue:[^ self classDocumentation].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6391
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6392
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6393
    view == methodCategoryListView ifTrue:[
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6394
        (key == #Find) ifTrue:[^ self methodFindAnyMethod].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6395
        (untranslatedKey == #Cmdn) ifTrue:[^ self methodCategoryNewCategory].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6396
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6397
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  6398
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  6399
    or:[view == classMethodListView]) ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  6400
        (key == #Delete) ifTrue:[^ self methodRemoveConfirmed].
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6401
        (untranslatedKey == #Cmdi) ifTrue:[^ self methodImplementors].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6402
        (untranslatedKey == #Cmds) ifTrue:[^ self methodSenders].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6403
        (untranslatedKey == #Cmdg) ifTrue:[^ self methodGlobalReferends].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6404
        (untranslatedKey == #Cmdt) ifTrue:[^ self methodStringSearch].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  6405
        (untranslatedKey == #Cmda) ifTrue:[^ self methodAproposSearch].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6406
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6407
    view keyPress:key x:x y:y
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6408
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  6409
    "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
  6410
    "Modified: / 16.1.1998 / 17:20:24 / stefan"
1557
5ecd643fc71c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1550
diff changeset
  6411
    "Modified: / 18.4.1998 / 15:56:36 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6412
! !
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6413
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6414
!BrowserView methodsFor:'help'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6415
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6416
helpTextFor:aComponent
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6417
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6418
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6419
    aComponent == classCategoryListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6420
	s := 'HELP_CCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6421
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6422
    aComponent == classListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6423
	fullProtocol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6424
	    s := 'HELP_PCLASS_LIST'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6425
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6426
	    currentClassHierarchy notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6427
		s := 'HELP_HCLASS_LIST'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6428
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6429
		s := 'HELP_CLASS_LIST'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6430
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6431
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6432
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6433
    aComponent == methodCategoryListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6434
	s := 'HELP_MCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6435
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6436
    aComponent == methodListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6437
	s := 'HELP_METHOD_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6438
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6439
    aComponent == variableListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6440
	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
  6441
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6442
    aComponent == codeView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6443
	fullClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6444
	    s := 'HELP_FULLCODE_VIEW'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6445
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6446
	    s := 'HELP_CODE_VIEW'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6447
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6448
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6449
    (aComponent == instanceToggle 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6450
    or:[aComponent == classToggle]) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6451
	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
  6452
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6453
    aComponent == classMethodListView ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6454
	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
  6455
    ].
1211
588a4d148234 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1210
diff changeset
  6456
    (aComponent isComponentOf:namespaceList) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6457
	s := 'HELP_NS_BOX'
1210
2b37259f0068 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1208
diff changeset
  6458
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6459
    s notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6460
	^ resources string:s
105
claus
parents: 98
diff changeset
  6461
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6462
    ^ nil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6463
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6464
    "Modified: 31.8.1995 / 19:11:39 / claus"
1211
588a4d148234 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1210
diff changeset
  6465
    "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
  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
!BrowserView methodsFor:'initialize / release'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6469
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6470
autoSearch:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6471
    "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
  6472
     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
  6473
     search for the searchstring in the codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6474
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6475
    self setSearchPattern:aString.
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6476
    autoSearchIgnoreCase := false.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6477
    autoSearch := aString
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6478
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6479
    "Modified: / 18.6.1998 / 16:49:50 / cg"
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6480
!
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6481
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6482
autoSearch:aString ignoreCase:ign
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6483
    "used with class-method list browsing. If true,
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6484
     selecting an entry from the list will automatically
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6485
     search for the searchstring in the codeView"
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6486
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6487
    self setSearchPattern:aString.
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6488
    autoSearchIgnoreCase := ign.
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6489
    autoSearch := aString
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6490
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  6491
    "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
  6492
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6493
1789
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6494
closeRequest
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6495
    "let user confirm, if codeView was modified and not saved"
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6496
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6497
    (self checkSelectionChangeAllowed) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6498
	super closeRequest
1789
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6499
    ]
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6500
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6501
    "Created: / 3.8.1998 / 19:52:39 / cg"
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6502
    "Modified: / 3.8.1998 / 20:02:29 / cg"
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6503
!
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  6504
1902
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  6505
closeRequestFor:aDialog
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  6506
    "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
  6507
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  6508
    aDialog closeRequest
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  6509
!
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  6510
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6511
destroy
1715
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  6512
    "release dependant - destroy popups"
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  6513
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  6514
    self stopSyntaxHighlightProcess.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6515
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  6516
    self releaseMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6517
    Smalltalk removeDependent:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6518
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6519
	self releaseClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6520
	"/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6521
	"/ just in case someone keeps a ref to myself around ...
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6522
	"/ ... release refs to my class (not really needed)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6523
	"/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6524
	currentClass := actualClass := acceptClass := nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6525
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6526
    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
  6527
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  6528
    "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
  6529
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6530
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6531
initialize
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6532
    super initialize.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6533
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6534
    showInstance := true.
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  6535
    showAllNamespaces := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6536
    fullClass := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6537
    fullProtocol := false.
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  6538
    gotClassList := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6539
    aspect := nil.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6540
    currentNamespace := '* all *'.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6541
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6542
    "inform me, when Smalltalk changes"
1529
af92934e130b initialize class history
tz
parents: 1528
diff changeset
  6543
    Smalltalk addDependent:self.
af92934e130b initialize class history
tz
parents: 1528
diff changeset
  6544
af92934e130b initialize class history
tz
parents: 1528
diff changeset
  6545
    "create a history"
af92934e130b initialize class history
tz
parents: 1528
diff changeset
  6546
    self class classHistory
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6547
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6548
1248
72832110f144 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
  6549
postRealize
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6550
    |v checkBlock|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6551
1248
72832110f144 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
  6552
    super postRealize.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6553
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6554
    checkBlock := [:lineNr | self checkSelectionChangeAllowed].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6555
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6556
    v := classCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6557
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6558
	v action:[:lineNr | self classCategorySelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6559
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6560
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6561
	v list size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6562
	    v list:(self listOfAllClassCategories).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6563
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6564
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6565
	 tell classCategoryListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6566
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6567
	v menuHolder:self; menuPerformer:self; menuMessage:#classCategoryMenu.
107
claus
parents: 106
diff changeset
  6568
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6569
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6570
    v := classListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6571
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6572
	v action:[:lineNr | self classSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6573
	v doubleClickAction:[:lineNr | self classDoubleClick:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6574
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6575
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6576
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6577
	 tell classListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6578
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6579
	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
  6580
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6581
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6582
    v := methodCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6583
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6584
	v action:[:lineNr | self methodCategorySelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6585
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6586
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6587
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6588
	 tell methodCategoryListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6589
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6590
	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
  6591
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6592
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6593
    v := methodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6594
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6595
	v action:[:lineNr | self methodSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6596
	v doubleClickAction:[:lineNr | self methodDoubleClick:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6597
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6598
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6599
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6600
	 tell methodListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6601
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6602
	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
  6603
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6604
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6605
    v := classMethodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6606
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6607
	v action:[:lineNr | self classMethodSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6608
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6609
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6610
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6611
	 tell classMethodListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6612
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6613
	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
  6614
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6615
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6616
    v := variableListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6617
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6618
	v action:[:lineNr | self variableSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6619
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6620
	v toggleSelect:true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6621
	v menuHolder:self; menuPerformer:self; menuMessage:#variableListMenu.
117
claus
parents: 114
diff changeset
  6622
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6623
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6624
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  6625
     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
  6626
     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
  6627
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  6628
    fullProtocol ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6629
	classListView scrollToBottom.
123
claus
parents: 120
diff changeset
  6630
    ]
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  6631
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6632
    "Created: / 24.7.1997 / 18:14:59 / cg"
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  6633
    "Modified: / 29.10.1997 / 15:50:26 / cg"
124
claus
parents: 123
diff changeset
  6634
!
claus
parents: 123
diff changeset
  6635
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6636
title:someString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6637
    myLabel := someString.
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  6638
    self topView label:someString.
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  6639
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  6640
    "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
  6641
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6642
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6643
!BrowserView methodsFor:'initialize subviews'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6644
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6645
createClassListViewIn:frame
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6646
    "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
  6647
1080
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6648
    |v panel spc wScr wScrHalf|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6649
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6650
    self createTogglesIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6651
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6652
    panel := VariableVerticalPanel
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6653
                    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
  6654
                    in:frame.
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  6655
    styleSheet is3D ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6656
        spc := ViewSpacing.
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  6657
    ] ifFalse:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6658
        spc := 0
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  6659
    ].
811
fde69dbb949a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 810
diff changeset
  6660
    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
  6661
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  6662
    v := HVScrollableView 
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6663
                for:SelectionInListView 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6664
                miniScrollerH:true miniScrollerV:false
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6665
                in:panel.
2277
1c664709240a classList with autoHide
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
  6666
    v autoHideHorizontalScrollBar:true.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6667
    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
  6668
    classListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6669
    classListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6670
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6671
    v := HVScrollableView 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6672
                for:SelectionInListView 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6673
                miniScrollerH:true miniScrollerV:false
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6674
                in:panel.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  6675
    v autoHideHorizontalScrollBar:true.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6676
    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
  6677
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6678
    variableListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6679
    variableListView delegate:self.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6680
1080
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6681
    wScr := v scrollBar preferredExtent x.
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6682
    wScrHalf := wScr // 2.
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6683
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6684
"/    (styleSheet at:'scrollBarPosition' default:#right) == #right ifTrue:[
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6685
"/        classToggle rightInset:(classToggle rightInset + wScr).
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6686
"/        classToggle leftInset:(classToggle leftInset - wScrHalf).
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6687
"/        instanceToggle rightInset:(instanceToggle rightInset + wScrHalf)
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6688
"/    ].
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6689
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  6690
    "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
  6691
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6692
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6693
createCodeViewIn:aView
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6694
    "setup the code view"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6695
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6696
    ^ self createCodeViewIn:aView atY:0.25
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6697
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6698
    "Modified: 2.3.1996 / 16:08:46 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6699
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6700
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6701
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
  6702
    "setup the code view"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6703
    |v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6704
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6705
    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
  6706
    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
  6707
    codeView := v scrolledView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6708
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6709
    "Created: 2.3.1996 / 16:09:03 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6710
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6711
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6712
createMethodListViewIn:aView atX:relX
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6713
    "setup the method list view"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6714
    |v|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6715
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6716
    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
  6717
    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
  6718
    methodListView := v scrolledView.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6719
    methodListView delegate:self.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6720
    ^ v
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6721
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6722
    "Created: 2.3.1996 / 16:07:10 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6723
    "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
  6724
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6725
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6726
createTogglesIn:aFrame
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6727
    "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
  6728
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6729
    |h halfSpace classAction instanceAction|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6730
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6731
    classAction := [self instanceProtocol:false].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6732
    instanceAction := [self instanceProtocol:true].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6733
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6734
    halfSpace := ViewSpacing // 2.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6735
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6736
    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
  6737
    h := instanceToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6738
    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
  6739
    instanceToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6740
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6741
    instanceToggle turnOn.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6742
    instanceToggle controller beToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6743
    instanceToggle pressAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6744
    instanceToggle releaseAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6745
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6746
    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
  6747
    h := classToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6748
    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
  6749
    classToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6750
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6751
    classToggle turnOff.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6752
    classToggle controller beToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6753
    classToggle pressAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6754
    classToggle releaseAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6755
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6756
    styleSheet is3D ifTrue:[
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6757
"/        instanceToggle bottomInset:halfSpace.
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6758
"/        classToggle bottomInset:halfSpace.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6759
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6760
	instanceToggle leftInset:halfSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6761
	classToggle leftInset:halfSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6762
	instanceToggle rightInset:ViewSpacing - halfSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6763
	classToggle rightInset:ViewSpacing - halfSpace.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6764
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6765
"/ 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
  6766
"/        styleSheet name == #motif ifTrue:[
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6767
"/            instanceToggle showLamp:true.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6768
"/            classToggle showLamp:true.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6769
"/        ]
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6770
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  6771
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6772
    "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
  6773
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6774
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6775
focusSequence
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6776
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6777
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6778
    s := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6779
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6780
    classCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6781
	s add:classCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6782
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6783
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6784
    classListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6785
	s add:classListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6786
    ].
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
"/    variableListView notNil ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6789
"/        s add:variableListView
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6790
"/    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6791
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6792
    instanceToggle notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6793
	s add:instanceToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6794
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6795
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6796
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6797
	s add:methodCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6798
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6799
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6800
    methodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6801
	s add:methodListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6802
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6803
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6804
    classMethodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6805
	s add:classMethodListView
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6806
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6807
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6808
    s add:codeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6809
    ^ s
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6810
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6811
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6812
setupForAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6813
    "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
  6814
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6815
    |vpanel hpanel frame v spc nsHolder hMax|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6816
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6817
    styleSheet is3D ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6818
	spc := ViewSpacing.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6819
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6820
	spc := 0
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6821
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6822
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6823
    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
  6824
    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
  6825
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6826
    v := HVScrollableView for:SelectionInListView
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6827
			  miniScrollerH:true miniScrollerV:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6828
			  in:hpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6829
    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
  6830
    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
  6831
    classCategoryListView := v scrolledView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6832
    classCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6833
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6834
    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
  6835
    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
  6836
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6837
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6838
    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
  6839
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  6840
    hMax := (instanceToggle height + instanceToggle borderWidth)
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6841
	    max:(namespaceList preferredExtent y).
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6842
    hMax := hMax "+ (spc // 2)".
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6843
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6844
    v bottomInset:hMax + (spc - (spc // 2)).
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6845
    nsHolder := currentNamespace asValue.
931
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6846
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6847
    namespaceList topInset:(hMax negated) "- (spc//2)" "+ (spc // 2)".
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6848
    styleSheet name ~= 'win95' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6849
	namespaceList leftInset:(ViewSpacing // 2).
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6850
    ].
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  6851
"/    namespaceList bottomInset:(spc // 2).
931
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6852
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6853
"/    styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6854
"/        namespaceList leftInset:(classCategoryListView originRelativeTo:v) x.
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6855
"/    ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6856
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6857
"/    (v scrollBar originRelativeTo:v) > (classCategoryListView originRelativeTo:v)
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6858
"/    ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6859
"/        namespaceList rightInset:((v scrollBar originRelativeTo:v)
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6860
"/                                  -
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6861
"/                                  (classCategoryListView originRelativeTo:v))
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6862
"/    ] ifFalse:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6863
"/        styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6864
"/            namespaceList rightInset:(ViewSpacing // 2).
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6865
"/        ]
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6866
"/    ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6867
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6868
"/        styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6869
"/            namespaceList rightInset:(ViewSpacing // 2).
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6870
"/        ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  6871
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6872
    self setListOfNamespaces.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6873
    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
  6874
    namespaceList label menuHolder:self; menuMessage:#nameSpaceMenu.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6875
    nsHolder onChangeSend:#value
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6876
		       to:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6877
				self changeNameSpaceTo:nsHolder value
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6878
			  ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6879
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6880
    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
  6881
    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
  6882
    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
  6883
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6884
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6885
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6886
    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
  6887
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6888
    self createCodeViewIn:vpanel
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6889
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  6890
    "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
  6891
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6892
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6893
setupForClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6894
    "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
  6895
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6896
    |vpanel hpanel frame v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6897
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6898
    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
  6899
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6900
    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
  6901
    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
  6902
    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
  6903
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6904
    self createTogglesIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6905
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6906
    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
  6907
    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
  6908
      extent:[frame width
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6909
	      @
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6910
	      (frame height 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6911
	       - ViewSpacing
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6912
	       - instanceToggle height
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6913
	       - instanceToggle borderWidth
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6914
	       + v borderWidth)].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6915
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6916
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6917
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6918
    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
  6919
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6920
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6921
    self changeCurrentClass:aClass.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6922
    actualClass := acceptClass := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6923
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6924
    self updateMethodList.
151
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  6925
    self updateCodeView.
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  6926
    self classDefinition.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6927
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  6928
    "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
  6929
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6930
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6931
setupForClass:aClass methodCategory:aMethodCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6932
    "setup subviews to browse a method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6933
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6934
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6935
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6936
    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
  6937
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6938
    v := self createMethodListViewIn:vpanel atX:0.0.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6939
    v corner:(1.0 @ 0.25).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6940
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6941
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6942
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6943
    currentClassCategory := aClass category.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6944
    self changeCurrentClass:aClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6945
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6946
    currentMethodCategory := aMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6947
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6948
    self updateCodeView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6949
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6950
    "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
  6951
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6952
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6953
setupForClass:aClass selector:selector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6954
    "setup subviews to browse a single method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6955
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6956
    |v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6957
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6958
    v := ScrollableView for:CodeView in:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6959
    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
  6960
    codeView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6961
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6962
    currentClassCategory := aClass category.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6963
    self changeCurrentClass:aClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6964
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6965
    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
  6966
    currentMethod := actualClass compiledMethodAt:selector.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6967
    currentMethodCategory := currentMethod category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6968
    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
  6969
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6970
    "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
  6971
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6972
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6973
setupForClassCategory:aClassCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6974
    "setup subviews to browse a class category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6975
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6976
    |vpanel hpanel frame v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6977
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6978
    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
  6979
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6980
    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
  6981
    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
  6982
    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
  6983
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6984
    self createClassListViewIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6985
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6986
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6987
    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
  6988
    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
  6989
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6990
    methodCategoryListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6991
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6992
    self createMethodListViewIn:hpanel atX:0.66.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6993
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6994
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6995
    currentClassCategory := aClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6996
    self updateClassList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6997
    self updateMethodCategoryList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6998
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6999
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7000
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7001
    "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
  7002
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7003
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7004
setupForClassHierarchy:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7005
    "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
  7006
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7007
    |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
  7008
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7009
    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
  7010
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
     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
  7013
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7014
    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
  7015
    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
  7016
    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
  7017
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7018
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7019
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7020
    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
  7021
    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
  7022
    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
  7023
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7024
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7025
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7026
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7027
    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
  7028
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7029
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7030
    cls isMeta ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7031
	cls := cls soleInstance
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7032
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7033
    currentClassHierarchy := currentClass := actualClass := cls.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7034
    self updateClassList.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7035
    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
  7036
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7037
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7038
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7039
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7040
    aClass isMeta ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7041
	self instanceProtocol:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7042
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7043
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7044
    "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
  7045
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7046
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7047
setupForClassList:aList
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7048
    "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
  7049
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7050
    self setupForClassList:aList sort:true
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7051
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7052
    "Modified: 28.5.1996 / 13:53:03 / cg"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7053
!
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7054
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7055
setupForClassList:aList sort:doSort
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7056
    "setup subviews to browse classes from a list"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7057
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7058
    |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
  7059
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7060
    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
  7061
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7062
    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
  7063
    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
  7064
    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
  7065
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7066
    self createClassListViewIn:frame.
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
    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
  7069
    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
  7070
    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
  7071
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7072
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7073
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7074
    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
  7075
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7076
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7077
    l := (aList collect:[:entry | 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7078
		entry isBehavior ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7079
		    entry name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7080
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7081
		    entry
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7082
		]]) asOrderedCollection.
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7083
    doSort ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7084
	l sort.
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7085
    ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7086
    classListView list:l.
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  7087
    gotClassList := true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7088
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7089
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7090
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7091
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7092
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7093
    "Created: / 28.5.1996 / 13:52:47 / cg"
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7094
    "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
  7095
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7096
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7097
setupForFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7098
    "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
  7099
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7100
    |vpanel hpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7101
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7102
    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
  7103
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7104
    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
  7105
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7106
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7107
    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
  7108
    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
  7109
    classCategoryListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7110
    classCategoryListView contents:(self listOfAllClassCategories).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7111
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7112
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7113
    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
  7114
    classListView := v scrolledView.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7115
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7116
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7117
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7118
    fullClass := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7119
    self updateCodeView
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7120
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7121
    "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
  7122
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7123
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7124
setupForFullClassProtocol:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7125
    "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
  7126
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7127
    |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
  7128
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7129
    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
  7130
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7131
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7132
     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
  7133
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7134
    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
  7135
    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
  7136
    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
  7137
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7138
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7139
    classListView multipleSelectOk:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7140
    classListView toggleSelect:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7141
    classListView strikeOut:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7142
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7143
    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
  7144
    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
  7145
    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
  7146
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7147
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7148
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7149
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7150
    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
  7151
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7152
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7153
    cls isMeta ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7154
	cls := cls soleInstance
107
claus
parents: 106
diff changeset
  7155
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7156
    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
  7157
    fullProtocol := true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7158
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7159
    self updateClassList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7160
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7161
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7162
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7163
    self updateVariableList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7164
    aClass isMeta ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7165
	self instanceProtocol:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7166
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7167
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  7168
    "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
  7169
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7170
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7171
setupForList:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7172
    "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
  7173
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7174
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7175
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7176
    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
  7177
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7178
    v := ScrollableView for:SelectionInListView in:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7179
    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
  7180
    classMethodListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7181
    classMethodListView contents:aList.
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  7182
    classMethodListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7183
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  7184
    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
  7185
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7186
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7187
    aList size == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7188
	classMethodListView setSelection:1.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7189
	self classMethodSelection:1. 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7190
    ].
1060
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  7191
    self updateCodeView.
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  7192
    "/ kludge - get trap icons
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  7193
    self updateClassMethodListWithScroll:false keepSelection:true
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  7194
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7195
    "Modified: / 25.10.1997 / 19:27:40 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7196
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7197
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7198
!BrowserView methodsFor:'method category list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7199
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7200
createAccessMethodsFor:aCollectionOfInstVarNames withChange:withChange
990
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7201
    "workhorse for creating access methods for instvars."
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7202
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7203
    aCollectionOfInstVarNames do:[:name |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7204
	|source|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7205
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7206
	"check, if method is not already present"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7207
	(currentClass includesSelector:(name asSymbol)) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7208
	    source := (name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7209
		       , '\    "return the value of the instance variable '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7210
		       , name , ''' (automatically generated)"\\    ^ ' , name) withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7211
	    Compiler compile:source forClass:currentClass inCategory:'accessing'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7212
	] ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7213
	    Transcript showCR:'method ''', name , ''' already present'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7214
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7215
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7216
	(currentClass includesSelector:((name , ':') asSymbol)) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7217
	    withChange ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7218
		source := (name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7219
			  , ':something\    "set the value of the instance variable '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7220
			  , name , ''' and send a change notification (automatically generated)"\\    '
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7221
			  , name , ' := something.') withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7222
		source := source , ('\    self changed:#' , name , '.\') withCRs
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7223
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7224
		source := (name 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7225
			  , ':something\    "set the value of the instance variable '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7226
			  , name , ''' (automatically generated)"\\    '
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7227
			  , name , ' := something.') withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7228
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7229
	    Compiler compile:source forClass:currentClass inCategory:'accessing'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7230
	] ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7231
	    Transcript showCR:'method ''', name , ':'' already present'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7232
	].
990
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7233
    ]
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7234
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7235
    "Created: / 7.8.1998 / 18:19:06 / cg"
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7236
    "Modified: / 7.8.1998 / 18:25:32 / cg"
990
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7237
!
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  7238
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7239
methodCategoryCopyCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7240
    "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
  7241
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7242
    |title box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7243
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7244
    showInstance ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7245
	title := 'class to copy instance method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7246
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7247
	title := 'class to copy class method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7248
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7249
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7250
    box := self listBoxTitle:title 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7251
		      okText:'ok' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7252
			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
  7253
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7254
    box label:(resources string:'copy methods').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7255
    box action:[:aString | self copyMethodsFromClass:aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7256
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7257
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7258
    "Modified: 16.1.1997 / 00:01:20 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7259
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7260
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7261
methodCategoryCreateAccessMethods
559
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  7262
    "create access methods for instvars.
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  7263
     If no variable is selected, for all instvars;
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  7264
     otherwise for that selected instvar."
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7265
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7266
    self methodCategoryCreateAccessMethodsWithChange:false
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7267
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7268
    "Modified: / 7.8.1998 / 18:17:34 / cg"
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7269
!
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7270
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7271
methodCategoryCreateAccessMethodsWithChange
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7272
    "create access methods for instvars.
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7273
     If no variable is selected, for all instvars;
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7274
     otherwise for that selected instvar."
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7275
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7276
    self methodCategoryCreateAccessMethodsWithChange:true
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7277
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7278
    "Modified: / 7.8.1998 / 18:17:39 / cg"
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7279
!
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7280
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7281
methodCategoryCreateAccessMethodsWithChange:aBoolean
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7282
    "create access methods for instvars.
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7283
     If no variable is selected, for all instvars;
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7284
     otherwise for that selected instvar."
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7285
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7286
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7287
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7288
    showInstance ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7289
	self warn:'select instance - and try again'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7290
	^ self.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7291
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7292
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  7293
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7294
	|nm names|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7295
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7296
	(variableListView notNil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7297
	and:[(nm := variableListView selectionValue) notNil]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7298
	    names := Array with:nm
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7299
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7300
	    names := currentClass instVarNames 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7301
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7302
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7303
	lockUpdates := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7304
	[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7305
	    self createAccessMethodsFor:names withChange:aBoolean.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7306
	] valueOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7307
	    lockUpdates := false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7308
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7309
	self updateMethodCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7310
	self updateMethodListWithScroll:false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7311
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  7312
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7313
    "Modified: / 18.8.1997 / 15:44:10 / cg"
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7314
    "Created: / 7.8.1998 / 18:17:18 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7315
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7316
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7317
methodCategoryCreateApplicationMethods
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7318
    "create an empty application framework"
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7319
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7320
    |cls fn txt isDialog|
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7321
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7322
    self checkClassSelected ifFalse:[^ self].
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7323
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7324
    isDialog := (currentClass isSubclassOf:SimpleDialog).
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7325
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7326
    cls := currentClass class.
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7327
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7328
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7329
	|nm names source|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7330
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7331
	"/ add a windowSpec method for an empty applicationWindow,
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7332
	"/ with a menuPanel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7333
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7334
	(cls includesSelector:#windowSpec) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7335
	    isDialog ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7336
		txt :=
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7337
'windowSpec
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7338
    "This resource specification was automatically generated
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7339
     by the Browser."
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7340
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7341
    "Do not manually edit this!! If it is corrupted,
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7342
     the UIPainter may not be able to read the specification."
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7343
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7344
    "
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7345
     UIPainter new openOnClass:' , currentClass name , ' andSelector:#windowSpec
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7346
    "
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7347
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7348
    <resource: #canvas>
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7349
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7350
    ^
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7351
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7352
       #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7353
	  #window: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7354
	   #(#WindowSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7355
	      #name: ''' , currentClass name , '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7356
	      #layout: #(#LayoutFrame 221 0 118 0 520 0 417 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7357
	      #level: 0
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7358
	      #label: ''' , currentClass name , '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7359
	      #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7360
	      #max: #(#Point 1024 768)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7361
	      #bounds: #(#Rectangle 221 118 521 418)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7362
	      #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7363
	  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7364
	  #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7365
	   #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7366
	      #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7367
	       #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7368
		 #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7369
		    #name: ''buttonPanel''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7370
		    #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
  7371
		    #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7372
		     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7373
			#collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7374
			 #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7375
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7376
			      #name: ''cancelButton''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7377
			      #label: ''Cancel''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7378
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7379
			      #model: #cancel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7380
			      #extent: #(#Point 125 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7381
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7382
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7383
			      #name: ''okButton''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7384
			      #label: ''OK''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7385
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7386
			      #model: #accept
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7387
			      #extent: #(#Point 125 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7388
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7389
			)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7390
		    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7391
		    #horizontalLayout: #spreadSpaceMax
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7392
		    #verticalLayout: #center
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7393
		    #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7394
		    #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7395
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7396
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7397
	  )
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7398
      )
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7399
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7400
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7401
		txt :=
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7402
'windowSpec
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7403
    "This resource specification was automatically generated
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7404
     by the Browser."
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7405
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7406
    "Do not manually edit this!! If it is corrupted,
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7407
     the UIPainter may not be able to read the specification."
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7408
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7409
    "
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7410
     UIPainter new openOnClass:' , currentClass name , ' andSelector:#windowSpec
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7411
    "
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7412
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7413
    <resource: #canvas>
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7414
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7415
    ^ #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7416
	  #window: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7417
	   #(#WindowSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7418
	      #name: ''' , currentClass name , '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7419
	      #layout: #(#LayoutFrame 204 0 162 0 503 0 461 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7420
	      #label: ''' , currentClass name , '''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7421
	      #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7422
	      #max: #(#Point 1024 768)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7423
	      #bounds: #(#Rectangle 204 162 504 462)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7424
	      #menu: #mainMenu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7425
	      #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7426
	  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7427
	  #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7428
	   #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7429
	      #collection: #()
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7430
	  )
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7431
      )
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7432
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7433
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7434
	    Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7435
		compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7436
		forClass:cls 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7437
		inCategory:'interface specs'.
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
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7440
	isDialog ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7441
	    "/ add a topMenu method 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7442
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7443
	    (cls includesSelector:#mainMenu) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7444
		txt :=
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7445
'mainMenu
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7446
    "This resource specification was automatically generated
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7447
     by the Browser."
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7448
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7449
    "Do not manually edit this!! If it is corrupted,
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7450
     the MenuEditor may not be able to read the specification."
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7451
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7452
    "
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7453
     MenuEditor new openOnClass:' , currentClass name , ' andSelector:#mainMenu
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7454
    "
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7455
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7456
    <resource: #menu>
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7457
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7458
    ^ #(#Menu
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7459
	   #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7460
	     #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7461
		#label: ''File''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7462
		#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7463
		#submenu: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7464
		 #(#Menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7465
		     #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7466
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7467
			  #label: ''New''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7468
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7469
			  #value: #menuNew
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7470
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7471
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7472
			  #label: ''-''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7473
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7474
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7475
			  #label: ''Open...''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7476
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7477
			  #value: #menuOpen
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7478
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7479
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7480
			  #label: ''-''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7481
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7482
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7483
			  #label: ''Save''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7484
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7485
			  #value: #menuSave
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7486
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7487
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7488
			  #label: ''Save As...''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7489
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7490
			  #value: #menuSaveAs
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7491
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7492
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7493
			  #label: ''-''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7494
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7495
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7496
			  #label: ''Exit''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7497
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7498
			  #value: #closeRequest
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7499
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7500
		    ) nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7501
		    nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7502
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7503
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7504
	     #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7505
		#label: ''Help''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7506
		#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7507
		#startGroup: #right
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7508
		#submenu: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7509
		 #(#Menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7510
		     #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7511
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7512
			  #label: ''Documentation''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7513
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7514
			  #value: #openDocumentation
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7515
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7516
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7517
			  #label: ''-''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7518
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7519
		       #(#MenuItem
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7520
			  #label: ''About this Application''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7521
			  #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7522
			  #value: #openAboutThisApplication
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7523
		      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7524
		    ) nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7525
		    nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7526
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7527
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7528
	  ) nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7529
	  nil
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7530
      )
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7531
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7532
		Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7533
		    compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7534
		    forClass:cls 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7535
		    inCategory:'menu specs'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7536
	    ].
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
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7539
	(cls includesSelector:#postBuildWith:) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7540
	    txt :=
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7541
'postBuildWith:aBuilder
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7542
    "This is a hook method generated by the Browser.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7543
     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
  7544
     after all of the visual components have been built, 
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7545
     but BEFORE the top window is made visible.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7546
     Add any app-specific actions here (reading files, setting up
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7547
     values etc.)"
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7548
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7549
    "/ add any code here ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7550
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7551
    ^ super postBuildWith:aBuilder
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7552
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7553
	    Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7554
		compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7555
		forClass:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7556
		inCategory:'initialization & release'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7557
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7558
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7559
	isDialog ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7560
	    (cls includesSelector:#closeRequest) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7561
		txt :=
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7562
'closeRequest
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7563
    "This is a hook method generated by the Browser.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7564
     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
  7565
     closed (and has a chance to suppress the close)."
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7566
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7567
    "/ change the code below as required ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7568
    "/ Closing can be suppressed, by returning.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7569
    "/ super closeRequest will initiate the closeDown
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7570
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7571
    ("self hasUnsavedChanges" true) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7572
	(self confirm:(resources string:''Close without saving ?'')) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7573
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7574
	]
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7575
    ].
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
    ^ super closeRequest
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7578
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7579
		Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7580
		    compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7581
		    forClass:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7582
		    inCategory:'initialization & release'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7583
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7584
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7585
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7586
	isDialog ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7587
	    (cls includesSelector:#closeDownViews) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7588
		txt :=
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7589
'closeDownViews
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7590
    "This is a hook method generated by the Browser.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7591
     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
  7592
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7593
    "/ change the code below as required ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7594
    "/ This should cleanup any leftover resources
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7595
    "/ (for example, temporary files)
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7596
    "/ super closeRequest will initiate the closeDown
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7597
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7598
    "/ add your code here
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7599
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7600
    "/ do not remove the one below ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7601
    ^ super closeDownViews
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7602
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7603
		Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7604
		    compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7605
		    forClass:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7606
		    inCategory:'initialization & release'.
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
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7609
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7610
	isDialog ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7611
	    (cls includesSelector:#accept) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7612
		txt :=
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7613
'closeAccept
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7614
    "This is a hook method generated by the Browser.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7615
     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
  7616
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7617
    "/ add any actions as required here ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7618
    Transcript showCR:''dialog accepted''.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7619
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7620
    "/ do not remove the one below ...
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7621
    ^ super closeAccept
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7622
'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7623
		Compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7624
		    compile:txt
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7625
		    forClass:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7626
		    inCategory:'user actions'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7627
	    ].
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
	self instanceProtocol:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7631
	self switchToMethodNamed:#windowSpec 
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7632
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7633
"/        self updateMethodCategoryListWithScroll:false.
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7634
"/        self updateMethodListWithScroll:false
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7635
    ]
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7636
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  7637
    "Modified: / 1.2.1998 / 16:10:03 / cg"
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
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7640
methodCategoryCreateDocumentationMethods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7641
    "create empty documentation methods"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7642
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  7643
    |cls fn txt|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7644
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7645
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7646
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7647
    cls := currentClass class.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7648
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  7649
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7650
	|nm names source|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7651
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7652
	"/ add version method containing RCS template
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7653
	"/ 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
  7654
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7655
	cls isPrivate ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7656
	    (cls includesSelector:#version) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7657
		Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7658
'version
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  7659
    ^ ''$' , 'Header$''
1208
5a2aa83494c3 dont create a #version method in private classes.
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
  7660
' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7661
		      forClass:cls 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7662
		      inCategory:'documentation'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7663
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7664
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7665
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7666
	"/ add copyright method containing your/your companies
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7667
	"/ copyright template but only if not already present.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7668
	"/ this is only added, if specified in the 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7669
	"/ COPYRIGHT_TEMPLATE_FILE resources.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7670
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7671
	(cls includesSelector:#copyright) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7672
	    fn := resources at:#'COPYRIGHT_TEMPLATE_FILE' default:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7673
	    fn notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7674
		fn := fn asFilename.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7675
		fn exists ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7676
		    txt := fn contents asString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7677
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7678
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7679
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7680
	    txt notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7681
		txt := txt bindWith:(Date today year).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7682
		Compiler compile:
1194
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  7683
'copyright
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  7684
"
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  7685
' , txt , '
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  7686
"
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  7687
'                   forClass:cls 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7688
		  inCategory:'documentation'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7689
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7690
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7691
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7692
	"/ add documentation method containing doc template
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7693
	"/ but only if not already present.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7694
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7695
	(cls includesSelector:#documentation) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7696
	    Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7697
'documentation
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7698
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7699
    documentation to be added.
1444
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7700
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7701
    [author:]
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7702
	' , OperatingSystem getFullUserName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7703
	  , ' (' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ')' , '
1444
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7704
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7705
    [see also:]
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7706
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7707
    [instance variables:]
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7708
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7709
    [class variables:]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7710
"
120
claus
parents: 118
diff changeset
  7711
'                   forClass:cls 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7712
		  inCategory:'documentation'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7713
	].
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
	"/ add examples method containing examples template
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7716
	"/ but only if not already present.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7717
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7718
	(cls includesSelector:#examples) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7719
	    Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7720
'examples
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7721
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7722
    examples to be added.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7723
								[exBegin]
1444
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7724
    ... add code fragment for 
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7725
    ... executable example here ...
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7726
								[exEnd]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7727
"
120
claus
parents: 118
diff changeset
  7728
'                   forClass:cls 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7729
		  inCategory:'documentation'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7730
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7731
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7732
	"/ add history method containing created-entry
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7733
	"/ but only if not already present.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7734
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7735
	(cls includesSelector:#history) ifFalse:[ 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7736
	    HistoryManager notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7737
		HistoryManager createInitialHistoryMethodIn:cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7738
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7739
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7740
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7741
	self instanceProtocol:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7742
	self switchToMethodNamed:#documentation 
1208
5a2aa83494c3 dont create a #version method in private classes.
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
  7743
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7744
"/        self updateMethodCategoryListWithScroll:false.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7745
"/        self updateMethodListWithScroll:false
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7746
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  7747
1444
2b198bcb0189 better initial documentation & examples methods.
Claus Gittinger <cg@exept.de>
parents: 1426
diff changeset
  7748
    "Modified: / 1.2.1998 / 16:10:03 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7749
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7750
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7751
methodCategoryFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7752
    "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
  7753
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7754
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7755
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7756
    self whenMethodCategorySelected:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  7757
        self busyLabel:'saving: %1' with:currentClass name , '-' , currentMethodCategory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  7758
        Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  7759
            self warn:'cannot create: %1' with:ex parameter.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  7760
            self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  7761
            ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  7762
        ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  7763
            actualClass fileOutCategory:currentMethodCategory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  7764
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  7765
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7766
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7767
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7768
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7769
methodCategoryFileOutAll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7770
    "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
  7771
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7772
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7773
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7774
    self whenMethodCategorySelected:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7775
	|fileName outStream|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7776
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7777
	fileName := (currentMethodCategory , '.st') asFilename.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7778
	fileName makeLegalFilename.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7779
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7780
	 this test allows a smalltalk to be built without Projects/ChangeSets
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7781
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7782
	Project notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7783
	    fileName := Project currentProjectDirectory asFilename construct: fileName name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7784
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7785
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7786
	 if file exists, save original in a .sav file
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7787
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7788
	fileName exists ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7789
	    fileName copyTo:(fileName withSuffix: 'sav')
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
	fileName := fileName pathName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7793
	outStream := FileStream newFileNamed:fileName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7794
	outStream isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7795
	    ^ self warn:'cannot create: %1' with:fileName
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7796
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7797
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7798
	self busyLabel:'saving: ' with:currentMethodCategory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7799
	Class fileOutErrorSignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7800
	    self warn:'cannot create: %1' with:ex parameter.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7801
	    ex return
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7802
	] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7803
	    Smalltalk allBehaviorsDo:[:class |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7804
		|hasMethodsInThisCategory|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7805
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7806
		hasMethodsInThisCategory := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7807
		class methodDictionary do:[:method |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7808
		    method category = currentMethodCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7809
			hasMethodsInThisCategory := true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7810
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7811
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7812
		hasMethodsInThisCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7813
		    class fileOutCategory:currentMethodCategory on:outStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7814
		    outStream cr
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7815
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7816
		hasMethodsInThisCategory := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7817
		class class methodDictionary do:[:method |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7818
		    method category = currentMethodCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7819
			hasMethodsInThisCategory := true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7820
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7821
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7822
		hasMethodsInThisCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7823
		    class class fileOutCategory:currentMethodCategory on:outStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7824
		    outStream cr
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7825
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7826
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7827
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7828
	outStream close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7829
	self normalLabel.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7830
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7831
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7832
    "Modified: / 7.6.1996 / 09:03:56 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7833
    "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
  7834
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7835
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7836
methodCategoryMenu
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  7837
    <resource: #keyboard (#Cmdn)>
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7838
    <resource: #programMenu >
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  7839
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7840
    |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
  7841
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7842
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7843
	methodCategoryListView flash.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7844
	^ nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7845
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7846
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7847
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7848
    currentClass isLoaded ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7849
	disableFlag := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7850
	showInstance ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7851
	    items := #( 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7852
			( 'create documentation stubs' methodCategoryCreateDocumentationMethods)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7853
		     ).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7854
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7855
	    (currentClass isSubclassOf:ApplicationModel) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7856
		(currentClass isSubclassOf:SimpleDialog) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7857
			items := items , #( 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7858
				( 'create initial dialog code' methodCategoryCreateApplicationMethods)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7859
			     ).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7860
		] ifFalse:[
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7861
"/                ((currentClass class implements:#windowSpec)
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7862
"/                and:[currentClass class implements:#mainMenu]) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7863
			items := items , #( 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7864
				( 'create initial application code' methodCategoryCreateApplicationMethods)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7865
			     ).
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  7866
"/                    ]
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7867
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7868
	    ] 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7869
	] ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7870
	    (variableListView notNil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7871
	    and:[(varSel := variableListView selectionValue) notNil]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7872
		s1 := 'create access methods (for ''%1'')'. 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7873
		s2 := 'create access methods with change message (for ''%1'')'. 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7874
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7875
		s1 := 'create access methods (for all)'. 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7876
		s2 := 'create access methods with change message (for all)'. 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7877
		disableFlag := currentClass instVarNames size == 0
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7878
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7879
	    s1 := resources string:s1 with:varSel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7880
	    s2 := resources string:s2 with:varSel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7881
	    items := Array with:(Array 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7882
				    with:s1 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7883
				    with:#methodCategoryCreateAccessMethods)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7884
			   with:(Array 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7885
				    with:s2 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7886
				    with:#methodCategoryCreateAccessMethodsWithChange)
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
	codeMenu := PopUpMenu itemList:items resources:resources.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7889
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7890
	disableFlag ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7891
	    codeMenu disableAll:#(methodCategoryCreateAccessMethods methodCategoryCreateAccessMethodsWithChange).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7892
	]
1237
eb435327405d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1236
diff changeset
  7893
    ].
1230
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  7894
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  7895
    currentMethodCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7896
	items := #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7897
		    ('fileOut'               methodCategoryFileOut        )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7898
		    ('fileOut all'           methodCategoryFileOutAll     )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7899
		    ('printOut'              methodCategoryPrintOut       )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7900
		    ('-'                                                  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7901
		    ('SPAWN_METHODCATEGORY'  methodCategorySpawn          )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7902
		    ('spawn category'        methodCategorySpawnCategory  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7903
		 ).
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7904
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7905
	items := #().
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7906
    ].
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7907
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7908
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7909
    items := items , #(
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7910
		('new category...'        methodCategoryNewCategory     Cmdn )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7911
		('copy category...'       methodCategoryCopyCategory    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7912
	       ).                                                       
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7913
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7914
    currentMethodCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7915
	items := items , #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7916
		    ('-'                               )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7917
		    ('rename...'  methodCategoryRename )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7918
		    ('remove...'  methodCategoryRemove )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7919
		   ).
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7920
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7921
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7922
    codeMenu notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7923
	items := items , #(
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
			('generate' codeMenu)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7926
		  ).
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7927
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7928
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  7929
    m := PopUpMenu 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7930
	itemList:items
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7931
	resources:resources.
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  7932
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  7933
    currentClass isLoaded ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7934
	m disableAll:#(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7935
			methodCategoryNewCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7936
			methodCategoryCopyCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7937
			methodCategoryCreateAccessMethods
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7938
			methodCategoryFindMethod
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7939
		      )
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  7940
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  7941
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7942
    codeMenu notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7943
	m subMenuAt:#codeMenu put:codeMenu.
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  7944
    ].
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  7945
    ^ m
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  7946
1990
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  7947
    "Modified: / 2.2.1999 / 14:40:47 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7948
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7949
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7950
methodCategoryNewCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7951
    "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
  7952
     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
  7953
     useless typing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7954
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7955
    |someCategories existingCategories box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7956
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7957
    actualClass notNil ifTrue:[
2552
faf9ae5ca5b2 present more categories to choose from in #newCategory
Claus Gittinger <cg@exept.de>
parents: 2535
diff changeset
  7958
	someCategories := actualClass allCategories asSet.
faf9ae5ca5b2 present more categories to choose from in #newCategory
Claus Gittinger <cg@exept.de>
parents: 2535
diff changeset
  7959
	actualClass superclass allSubclasses do:[:cls |
faf9ae5ca5b2 present more categories to choose from in #newCategory
Claus Gittinger <cg@exept.de>
parents: 2535
diff changeset
  7960
	    someCategories addAll:cls categories
faf9ae5ca5b2 present more categories to choose from in #newCategory
Claus Gittinger <cg@exept.de>
parents: 2535
diff changeset
  7961
	].
faf9ae5ca5b2 present more categories to choose from in #newCategory
Claus Gittinger <cg@exept.de>
parents: 2535
diff changeset
  7962
	someCategories := someCategories asOrderedCollection
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7963
    ] ifFalse:[
2151
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
	 mhmh - offer some typical categories ...
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7966
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7967
	showInstance ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7968
	    someCategories := #('accessing' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7969
				'initialization'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7970
				'private' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7971
				'printing & storing'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7972
				'queries'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7973
				'testing'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7974
			       )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7975
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7976
	    someCategories := #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7977
				'documentation'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7978
				'initialization'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7979
				'instance creation'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7980
			       ).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7981
	].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7982
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7983
    someCategories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7984
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7985
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7986
     remove existing categories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7987
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7988
    existingCategories := methodCategoryListView list.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7989
    existingCategories notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7990
	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
  7991
    ].
838
9e981e2b8158 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 836
diff changeset
  7992
    someCategories := someCategories asSet asOrderedCollection sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7993
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7994
    box := self listBoxTitle:'name of new method category:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7995
		      okText:'create'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7996
			list:someCategories.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7997
    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
  7998
    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
  7999
    box action:[:aString | self newMethodCategory:aString. lastCategory := aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8000
    box showAtPointer
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8001
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8002
    "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
  8003
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8004
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8005
methodCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8006
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8007
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8008
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8009
    self whenMethodCategorySelected:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8010
	printStream := Printer new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8011
	actualClass printOutCategory:currentMethodCategory on:printStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8012
	printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8013
    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8014
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8015
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8016
methodCategoryRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8017
    "show number of methods to remove and query user"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8018
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  8019
    |t box sels count answer|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8020
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8021
    currentMethodCategory notNil ifTrue:[
2478
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8022
        sels := OrderedCollection new.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8023
        actualClass methodDictionary keysAndValuesDo:[:selector :aMethod |
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8024
            (aMethod category = currentMethodCategory) ifTrue:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8025
                sels add:selector
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8026
            ]
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8027
        ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8028
        count := sels size.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8029
        (count ~~ 0) ifTrue:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8030
            (count == 1) ifTrue:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8031
                t := 'remove the method in category ''%1'' ?'
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8032
            ] ifFalse:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8033
                t := 'remove all %2 methods in category ''%1'' ?'
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8034
            ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8035
            t := resources string:t with:currentMethodCategory with:count printString.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8036
            t := t withCRs.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8037
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8038
            box := YesNoBox 
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8039
                       title:t
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8040
                       yesText:(resources at:'remove')
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8041
                       noText:(resources at:'abort').
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8042
            answer := box confirm.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8043
            box destroy.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8044
            answer ifFalse:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8045
                ^ self.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8046
            ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8047
            sels do:[:selector|
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8048
                actualClass removeSelector:selector.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8049
            ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8050
        ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8051
        currentMethodCategory := nil.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8052
        self releaseMethod.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8053
        self updateMethodCategoryListWithScroll:false.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8054
        self updateMethodList
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8055
    ]
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8056
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8057
    "Modified: / 7.6.1996 / 09:13:15 / stefan"
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8058
    "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
  8059
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8060
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8061
methodCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8062
    "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
  8063
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8064
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8065
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8066
    self checkMethodCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8067
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8068
    box := self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8069
		enterBoxTitle:(resources string:'rename method category ''%1'' to:' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8070
					   with:currentMethodCategory asText allBold)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8071
		okText:'rename'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8072
		label:'rename category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8073
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8074
    box initialText:currentMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8075
    box action:[:aString | 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8076
	actualClass renameCategory:currentMethodCategory to:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8077
	currentMethodCategory := aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8078
	self releaseMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8079
	self updateMethodCategoryList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8080
	self updateMethodListWithScroll:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8081
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8082
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8083
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8084
    "Modified: / 7.8.1998 / 17:42:02 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8085
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8086
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8087
methodCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8088
    "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
  8089
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8090
    currentMethodCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8091
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8092
	    SystemBrowser browseClass:actualClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8093
		    methodCategory:currentMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8094
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8095
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8096
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8097
    "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
  8098
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8099
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8100
methodCategorySpawnCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8101
    "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
  8102
     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
  8103
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8104
    self askAndBrowseMethodCategory:'category to browse methods:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8105
			     action:[:aString | 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8106
					SystemBrowser browseMethodCategory:aString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8107
				    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8108
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8109
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8110
!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
  8111
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8112
checkMethodCategorySelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8113
    currentMethodCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8114
	self warn:'select a method category first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8115
	^ false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8116
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8117
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8118
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8119
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8120
copyMethodsFromClass:aClassName
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8121
    |class box list|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8122
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8123
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8124
	class := Smalltalk classNamed:aClassName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8125
	class isBehavior ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8126
	    self warn:'no class named %1' with:aClassName.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8127
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8128
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8129
	class isLoaded ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8130
	    (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
  8131
	    ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8132
		class autoload
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8133
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8134
	].        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8135
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8136
	showInstance ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8137
	    class := class class             
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8138
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8139
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8140
	"show enterbox for category to copy from"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8141
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8142
	list := class categories asOrderedCollection sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8143
	list addFirst:'*'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8144
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8145
	box := self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8146
		enterBoxTitle:'name of category to copy from (matchpattern allowed, * for all):'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8147
		okText:'copy'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8148
		label:(resources string:'copy methods from %1' with:aClassName)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8149
		list:list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8150
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8151
	box open.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8152
	box accepted ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8153
	    self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8154
		copyMethodsFromClass:class 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8155
		category:(box aspectFor:#fieldValue) value
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8156
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8157
    ]
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8158
1384
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  8159
    "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
  8160
    "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
  8161
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8162
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8163
copyMethodsFromClass:class category:category
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8164
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8165
	Object abortSignal catch:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8166
	    class methodDictionary do:[:aMethod |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8167
		|source|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8168
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8169
		(category match:aMethod category) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8170
		    source := aMethod source.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8171
		    codeView contents:source.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8172
		    codeView modified:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8173
		    codeModified := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8174
		    actualClass compilerClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8175
			 compile:source 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8176
			 forClass:actualClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8177
			 inCategory:aMethod category
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8178
			 notifying:codeView.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8179
		    self updateMethodCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8180
		    self updateMethodListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8181
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8182
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8183
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8184
    ]
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8185
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  8186
    "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
  8187
    "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
  8188
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8189
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8190
listOfAllMethodCategoriesInClass:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8191
    "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
  8192
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8193
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8194
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8195
    newList := Set new.
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8196
    aClass methodDictionary do:[:aMethod |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8197
	|cat|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8198
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8199
	cat := aMethod category.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8200
	cat isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8201
	    cat := '* no category *'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8202
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8203
	newList add:cat
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8204
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8205
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8206
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8207
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8208
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8209
    "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
  8210
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8211
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8212
listOfAllMethodCategoriesInFullProtocolHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8213
    "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
  8214
     and all of its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8215
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8216
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8217
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8218
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8219
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8220
    self classesInFullProtocolHierarchy:aClass do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8221
	|cat|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8222
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8223
	c methodDictionary do:[:aMethod |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8224
	    cat := aMethod category.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8225
	    cat isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8226
		cat := '* no category *'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8227
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8228
	    newList add:cat
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8229
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8230
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8231
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8232
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8233
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8234
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8235
    "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
  8236
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8237
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8238
methodCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8239
    "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
  8240
1451
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8241
    |cat|
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8242
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8243
    (cat := methodCategoryListView selectionValue) isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8244
	cat := currentMethodCategory
1451
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8245
    ].
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8246
    cat notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8247
	self switchToMethodCategory:cat string.
1451
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8248
    ].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8249
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8250
    "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
  8251
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8252
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8253
methodCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8254
    "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
  8255
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8256
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8257
	self releaseMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8258
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8259
	self updateMethodList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8260
	aspect ~~ #definition ifTrue:[self updateCodeView].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8261
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8262
	currentMethodCategory notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8263
	    methodCategoryListView setSelectElement:currentMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8264
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8265
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8266
	aspect isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8267
	    self setAcceptAndExplainActionsForMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8268
	].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8269
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8270
"/ this is now done in
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8271
"/ #updateMethodList
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8272
"/
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8273
"/        (variableListView notNil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8274
"/        and:[variableListView hasSelection]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8275
"/            self hilightMethodsInMethodCategoryList:false inMethodList:true.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8276
"/        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8277
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8278
1562
3785529d7e7d avoid double-redraw;
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  8279
    "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
  8280
    "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
  8281
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8282
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8283
newMethodCategory:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8284
    |categories|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8285
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8286
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8287
	^ 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
  8288
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8289
    categories := methodCategoryListView list.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8290
    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
  8291
    (categories includes:aString) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8292
	categories add:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8293
	categories sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8294
	methodCategoryListView contents:categories
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8295
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8296
    currentMethodCategory := aString.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  8297
    aspect := nil.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8298
    self methodCategorySelectionChanged
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  8299
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  8300
    "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
  8301
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8302
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8303
switchToMethodCategory:aCategory
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8304
    |oldSelector|
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8305
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8306
    oldSelector := currentSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8307
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8308
    aspect := nil.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8309
    (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
  8310
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8311
    currentMethodCategory := aCategory.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8312
    self methodCategorySelectionChanged.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8313
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8314
    "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
  8315
    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
  8316
        methodListView setSelection:1.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8317
        self methodSelection:1
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8318
    ] ifFalse:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8319
        oldSelector notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8320
            methodListView setSelectElement:oldSelector.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8321
            methodListView hasSelection ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8322
                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
  8323
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8324
        ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8325
    ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8326
    actualClass notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8327
        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
  8328
    ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  8329
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8330
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8331
    "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
  8332
    "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
  8333
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8334
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8335
updateMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8336
    self updateMethodCategoryListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8337
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8338
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8339
updateMethodCategoryListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8340
    |categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8341
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8342
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8343
	fullProtocol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8344
	    currentClassHierarchy notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8345
		categories := self listOfAllMethodCategoriesInFullProtocolHierarchy:actualClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8346
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8347
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8348
	    currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8349
		categories := self listOfAllMethodCategoriesInClass:actualClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8350
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8351
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8352
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8353
	methodCategoryListView list = categories ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8354
	    scroll ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8355
		methodCategoryListView contents:categories
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8356
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8357
		methodCategoryListView setContents:categories
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8358
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8359
	    currentMethodCategory notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8360
		methodCategoryListView setSelectElement:currentMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8361
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8362
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8363
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  8364
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8365
    "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
  8366
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8367
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8368
whenMethodCategorySelected:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8369
    self checkMethodCategorySelected ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8370
	self withBusyCursorDo:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8371
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8372
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8373
    "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
  8374
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8375
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8376
!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
  8377
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8378
commonTraceHelperWith:aSelector
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8379
    "install a break/trace or countPoint for the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8380
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8381
    "/ 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
  8382
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8383
    currentMethod isNil ifTrue:[^ self].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8384
    currentMethod who isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8385
	self warn:'method is no longer valid'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8386
	^ self
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8387
    ].
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8388
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8389
    currentMethod perform:aSelector.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8390
    self refetchMethod.
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8391
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  8392
    Class withoutUpdatingChangesDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8393
	currentClass changed:#methodTrap with:currentSelector.
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  8394
    ]
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8395
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8396
    "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
  8397
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8398
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8399
commonTraceHelperWith:aSelector with:argument
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8400
    "install a break/trace or countPoint for the current method"
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8401
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8402
    "/ not for unbound methods (i.e. obsolete)
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8403
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8404
    currentMethod isNil ifTrue:[^ self].
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8405
    currentMethod who isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8406
	self warn:'method is no longer valid'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8407
	^ self
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8408
    ].
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8409
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8410
    currentMethod perform:aSelector with:argument.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8411
    self refetchMethod.
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8412
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  8413
    Class withoutUpdatingChangesDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8414
	currentClass changed:#methodTrap with:currentSelector.
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  8415
    ]
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  8416
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8417
    "Modified: / 27.7.1998 / 11:10:57 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8418
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8419
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8420
methodAproposSearch
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8421
    "launch an enterBox for a keyword search"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8422
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8423
    self askForSearchTitle:'keyword to search for (in selector & comment):' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8424
		  openWith:#aproposSearch:in:
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8425
		isSelector:true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8426
		searchArea:#class
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  8427
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  8428
    "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
  8429
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8430
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8431
methodBreakPoint
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8432
    "set a breakpoint on the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8433
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8434
    self commonTraceHelperWith:#setBreakPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8435
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8436
    "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
  8437
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8438
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8439
methodBreakPointInProcess
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8440
    "set a breakpoint on the current method, which only triggers if
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8441
     executed by some particular process."
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8442
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8443
    |processes processNames box windowGroups|
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8444
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8445
    windowGroups := WindowGroup allInstances.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8446
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8447
    processes := ProcessorScheduler knownProcesses asOrderedCollection.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8448
    processes := processes select:[:aProcess |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8449
			aProcess notNil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8450
			and:[aProcess id notNil]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8451
		 ].
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8452
    processes := processes sort:[:a :b | a id < b id].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8453
    processNames := processes collect:[:aProcess |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8454
			|pName theGroup top topLabel winLabel|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8455
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8456
			pName := aProcess nameOrId.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8457
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8458
			"/ if its a windowGroup process,
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8459
			"/ fetch its first topViews name and add.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8460
			"/ (allows selecting among multiple browsers ...)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8461
			winLabel := ''.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8462
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8463
			theGroup := windowGroups select:[:g | g process == aProcess].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8464
			theGroup size == 1 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8465
			    theGroup := theGroup first.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8466
			    top := theGroup topViews.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8467
			    top size > 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8468
				top := top first.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8469
				topLabel := top label.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8470
				(topLabel notNil and:[topLabel ~= pName]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8471
				     winLabel := '  "' , topLabel , '")'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8472
				]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8473
			    ].                        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8474
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8475
			aProcess id printString , ' [' , pName , ']' , winLabel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8476
		    ].
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8477
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8478
    "/ let user specify which one ...
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8479
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8480
    box := ListSelectionBox new.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8481
    box noEnterField.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8482
    box list:processNames.
1233
c5aac7105c4e more messages improved
Claus Gittinger <cg@exept.de>
parents: 1232
diff changeset
  8483
    box label:(resources string:'process selection').
c5aac7105c4e more messages improved
Claus Gittinger <cg@exept.de>
parents: 1232
diff changeset
  8484
    box title:(resources 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8485
		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
  8486
		with:(Processor activeProcess id)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8487
		with:(Processor activeProcess nameOrId)) withCRs.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8488
    box action:[:selection |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8489
	self commonTraceHelperWith:#breakPointInProcess: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8490
			      with:(processes at:box selectionIndex)
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8491
    ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8492
    box showAtPointer.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8493
    box destroy
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8494
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8495
    "Created: / 14.10.1996 / 15:40:53 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8496
    "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
  8497
    "Modified: / 2.2.1998 / 12:39:38 / stefan"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8498
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  8499
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8500
methodChangeCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8501
    "move the current method into another category -
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8502
     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
  8503
     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
  8504
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8505
    |box txt|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8506
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8507
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8508
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8509
    actualClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8510
	box := self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8511
		enterBoxTitle:'' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8512
		okText:'change'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8513
		label:'change category'.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8514
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8515
	|someCategories|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8516
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8517
	someCategories := actualClass categories sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8518
	box := self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8519
		listBoxTitle:'' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8520
		okText:'change' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8521
		list:someCategories.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8522
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8523
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8524
    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
  8525
    lastMethodCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8526
	txt := currentMethod category.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8527
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8528
	txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8529
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8530
    box initialText:txt.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8531
    box action:[:aString |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8532
		    |method|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8533
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8534
		    lastMethodCategory := aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8535
		    method := currentMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8536
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8537
		    method category:aString asSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8538
		    actualClass changed:#organization with:currentSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8539
		    method changed:#category.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8540
		    actualClass addChangeRecordForMethodCategory:method category:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8541
		    self updateMethodCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8542
		    self updateMethodListWithScroll:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8543
	       ].
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8544
    box label:(resources string:'change category').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8545
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8546
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8547
    "Created: 29.10.1995 / 19:59:22 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8548
    "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
  8549
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8550
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8551
methodCompareSource
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8552
    "compare with some other methods source"
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8553
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8554
    |prev v classAndMethod words className methodName 
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8555
     meta class method|
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8556
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8557
    self checkMethodSelected ifFalse:[^ self].
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8558
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8559
    classAndMethod := Dialog 
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8560
                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
  8561
                initialAnswer:(actualClass name , ' ' , currentSelector).
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8562
    classAndMethod size == 0 ifTrue:[^ self].
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8563
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8564
    words := classAndMethod asCollectionOfWords.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8565
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8566
    className := words at:1 ifAbsent:nil.
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8567
    className isNil ifTrue:[
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8568
        ^ self warn:'No class entered.'.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8569
    ].
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8570
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8571
    meta := false.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8572
    words size > 2 ifTrue:[
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8573
        (words at:2) ~= 'class' ifTrue:[
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8574
            ^ self warn:'Bad input.'.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8575
        ].
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8576
        methodName := words at:3.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8577
        meta := true.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8578
    ] ifFalse:[
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8579
        methodName := words at:2 ifAbsent:nil.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8580
    ].
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8581
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8582
    methodName isNil ifTrue:[
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8583
        ^ self warn:'No method entered.'.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8584
    ].
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8585
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8586
    className := className asSymbolIfInterned.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8587
    (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
  8588
        ^ self warn:'No such class.'.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8589
    ].
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8590
    meta ifTrue:[class := class class ].
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  8591
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8592
    methodName := methodName asSymbolIfInterned.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8593
    (methodName isNil or:[(method := class compiledMethodAt:methodName) isNil]) ifTrue:[
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8594
        ^ self warn:'No such method.'.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8595
    ].
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8596
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8597
    v := DiffTextView 
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8598
        openOn:codeView contents asString string
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8599
        label:(resources string:'code here')
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8600
        and:method source asString string
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8601
        label:'method compare'.      
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8602
    v label:'comparing with ' , className , ' ' , methodName.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8603
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8604
    "Modified: 7.11.1996 / 18:53:55 / cg"
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8605
!
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  8606
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8607
methodCompareWithPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8608
    "compare with previous version"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8609
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8610
    |prev v|
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8611
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8612
    self checkMethodSelected ifFalse:[^ self].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8613
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8614
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8615
    prev isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8616
	self warn:'oops - previous version is gone'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8617
	^ self
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8618
    ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8619
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8620
    v := DiffTextView 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8621
	openOn:codeView contents
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8622
	label:(resources string:'code here')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8623
	and:prev source
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8624
	label:'previous version'.      
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8625
    v label:'comparing ' , currentMethod whoString.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8626
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8627
    "Modified: 7.11.1996 / 18:53:55 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8628
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  8629
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8630
methodDecompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8631
    "decompile the current methods bytecodes.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8632
     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
  8633
     avaliable with the system."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8634
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8635
    |s|
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8636
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8637
    self checkMethodSelected ifFalse:[^ self].
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8638
    self checkSelectionChangeAllowed ifFalse:[^ self].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8639
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8640
    s := '' writeStream.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8641
    (currentMethod decompileTo:s) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8642
	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
  8643
    ].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8644
    codeView contents:s contents.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8645
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  8646
    codeModified := false.
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8647
    codeView acceptAction:nil.
2026
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
  8648
    self clearExplainAction.
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  8649
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  8650
    "Modified: / 31.3.1998 / 23:40:10 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8651
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8652
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8653
methodFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8654
    "file out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8655
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8656
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8657
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8658
    self busyLabel:'saving:' with:currentSelector.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8659
    Class fileOutErrorSignal handle:[:ex |
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8660
        self warn:'cannot create: %1' with:ex parameter.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8661
        self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8662
        ex return
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8663
    ] do:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8664
        actualClass fileOutMethod:currentMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8665
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8666
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8667
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8668
1990
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8669
methodFindAnyMethod
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8670
    |box|
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8671
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8672
    box := self enterBoxForSearchSelectorTitle:'method selector to search for:'.
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8673
    box label:(resources string:'find method').
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8674
    box action:[:aString | self switchToAnyMethodNamed:aString].
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8675
    box showAtPointer
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8676
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8677
    "Modified: / 15.1.1997 / 23:59:53 / cg"
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8678
    "Created: / 2.2.1999 / 14:40:04 / cg"
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8679
!
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8680
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8681
methodFindMethod
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8682
    |box|
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8683
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8684
    box := self enterBoxForSearchSelectorTitle:'method selector to search for:'.
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8685
    box label:(resources string:'find method').
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8686
    box action:[:aString | self switchToMethodNamed:aString].
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8687
    box showAtPointer
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8688
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8689
    "Modified: / 15.1.1997 / 23:59:27 / cg"
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8690
    "Created: / 2.2.1999 / 14:40:00 / cg"
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8691
!
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  8692
1957
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  8693
methodFlushCode
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  8694
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  8695
    self checkMethodSelected ifFalse:[^ self].
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  8696
    self checkSelectionChangeAllowed ifFalse:[^ self].
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  8697
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  8698
    currentMethod checked:false.
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  8699
    currentMethod code:nil.
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  8700
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  8701
    "Created: / 10.11.1998 / 18:30:14 / cg"
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  8702
!
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  8703
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8704
methodFormatMethod:oldText
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8705
    "prettyPrint the method (but do not accept it);
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8706
     uses the RefactoryBrowsers formatter"
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8707
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8708
    |tree newText|
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8709
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8710
    tree := BRParser 
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8711
                    parseMethod:oldText
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8712
                    onError: [:aString :position | ^ self "ignore any error"].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8713
    tree isNil ifTrue:[^ self].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8714
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8715
    newText := tree printString.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8716
    codeView contents:newText.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8717
    codeView modified:true.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8718
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8719
    "Modified: / 22.11.1999 / 11:53:55 / cg"
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8720
!
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  8721
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8722
methodGlobalReferends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8723
    "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
  8724
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8725
    self askForSearchTitle:'global variable to search users of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8726
		  openWith:#browseReferendsOf:in:
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8727
		isSelector:false
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8728
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8729
"/    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
  8730
"/                         action:[:aString | 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8731
"/                                    SystemBrowser browseReferendsOf:aString asSymbol
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8732
"/                                ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8733
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8734
    "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
  8735
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8736
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8737
methodImplementors
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8738
    "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
  8739
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8740
    self askForSearchTitle:'selector to browse implementors of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8741
		  openWith:#browseImplementorsOf:in:
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8742
		isSelector:true
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8743
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8744
    "Modified: 10.7.1996 / 12:40:07 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8745
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8746
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8747
methodInheritance
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8748
    "launch a browser showing inherited (and overwritten) methods"
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8749
2103
ab4e04bde5ec more info in inheritance-menu item.
Claus Gittinger <cg@exept.de>
parents: 2086
diff changeset
  8750
    |methodList nRedef msg whereRedef|
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8751
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8752
    currentClass isNil ifTrue:[^ self].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8753
    currentSelector isNil ifTrue:[^ self].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8754
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8755
    methodList := OrderedCollection new.
2103
ab4e04bde5ec more info in inheritance-menu item.
Claus Gittinger <cg@exept.de>
parents: 2086
diff changeset
  8756
    actualClass allSuperclasses do:[:aSuperClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8757
	|m|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8758
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8759
	m := aSuperClass compiledMethodAt:currentSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8760
	m notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8761
	    methodList addFirst:m
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8762
	]
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8763
    ].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8764
    methodList size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8765
	nRedef := 0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8766
	actualClass allSubclassesDo:[:aSubClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8767
	    (aSubClass compiledMethodAt:currentSelector) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8768
		nRedef := nRedef + 1.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8769
		whereRedef := aSubClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8770
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8771
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8772
	msg := '''%1'' does not redefine any inherited method.'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8773
	nRedef ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8774
	    nRedef == 1 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8775
		msg := msg , '\But is redefined in %3.'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8776
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8777
		msg := msg , '\But is redefined in %2 subclasses.'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8778
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8779
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8780
	^ self information:(resources
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8781
				string:msg
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8782
				with:currentSelector asText allBold
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8783
				with:nRedef
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8784
				with:whereRedef) withCRs.
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8785
    ].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8786
    methodList addLast:(actualClass compiledMethodAt:currentSelector).
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8787
    SystemBrowser 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8788
	browseMethods:methodList 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8789
	title:(resources string:'''%1'' inheritance & redefinition' with:currentSelector)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8790
	sort:false
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8791
!
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  8792
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8793
methodInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8794
    "inspect  the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8795
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8796
    self checkMethodSelected ifFalse:[^ self].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8797
    currentMethod inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8798
"/    (actualClass compiledMethodAt:currentSelector) inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8799
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8800
    "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
  8801
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8802
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8803
methodInvoke
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8804
    "invoke the current method"
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8805
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8806
    |w cls sel|
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8807
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8808
    self checkMethodSelected ifFalse:[^ self].
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8809
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8810
    w := currentMethod who.
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8811
    w notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8812
	cls := w methodClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8813
	cls notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8814
	    cls ~~ actualClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8815
		^ self warn:'oops - obsolete class; please reselect class ...'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8816
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8817
	    cls isMeta ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8818
		cls := cls soleInstance
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8819
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8820
		cls := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8821
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8822
	    cls notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8823
		sel := w methodSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8824
		sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8825
		    currentClass perform:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8826
		    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8827
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8828
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8829
	].
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8830
    ]. 
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8831
    self warn:'cannot invoke method (no class)'
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8832
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  8833
    "Modified: / 29.4.1997 / 11:24:30 / dq"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  8834
    "Modified: / 29.10.1997 / 15:50:28 / cg"
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8835
!
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  8836
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8837
methodLocalSuperSends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8838
    "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
  8839
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8840
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8841
    self withSearchCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8842
	SystemBrowser browseSuperCallsUnder:currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8843
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8844
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8845
    "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
  8846
    "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
  8847
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8848
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
  8849
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
  8850
    "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
  8851
     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
  8852
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
  8853
    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
  8854
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
  8855
    "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
  8856
!
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
  8857
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8858
methodMakePrivate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8859
    "make the current method private.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8860
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8861
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8862
    self methodPrivacy:#private 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8863
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8864
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8865
methodMakeProtected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8866
    "make the current method protected.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8867
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8868
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8869
    self methodPrivacy:#protected 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8870
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8871
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8872
methodMakePublic
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8873
    "make the current method public.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8874
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8875
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8876
    self methodPrivacy:#public 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8877
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8878
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8879
methodMenu
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8880
    "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
  8881
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  8882
    <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
  8883
    <resource: #programMenu >
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  8884
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  8885
    |specialMenu m items
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  8886
     newItems brkItems fileItems mthdItems
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  8887
     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
  8888
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  8889
    currentMethod notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8890
        currentMethod isCountingMemoryUsage ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8891
            brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8892
                                ('-'               nil)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8893
                                ('stop mem usage'  methodStopMemoryUsage)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8894
                                ('reset mem count' methodResetMemoryUsage)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8895
                          ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8896
        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8897
            currentMethod isCounting ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8898
                brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8899
                                    ('-'              nil               )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8900
                                    ('stop counting'  methodStopCounting)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8901
                                    ('reset count'    methodResetCounting)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8902
                              ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8903
            ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8904
                currentMethod isTimed ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8905
                    brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8906
                                        ('-'           nil             )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8907
                                        ('stop timing' methodStopTiming)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8908
                                        ('reset times' methodResetTiming)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8909
                                  ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8910
                ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8911
                    currentMethod isTraced ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8912
                        brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8913
                                            ('-'            nil                     )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8914
                                            ('remove trace' methodRemoveBreakOrTrace)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8915
                                      ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8916
                    ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8917
                        currentMethod isBreakpointed ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8918
                            brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8919
                                                ('-'                 nil                     )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8920
                                                ('remove breakpoint' methodRemoveBreakOrTrace)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8921
                                          ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8922
                        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8923
                            brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8924
                                                ('-'                   nil                       )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8925
                                                ('breakpoint'          methodBreakPoint          )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8926
                                                ('breakpoint in...'   methodBreakPointInProcess )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8927
                                                ('-'                   nil                       )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8928
                                                ('trace'               methodTrace               )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8929
                                                ('trace sender'        methodTraceSender         )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8930
                                                ('trace full walkback' methodTraceFull           )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8931
                                                ('-'                   nil                       )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8932
                                                ('start timing'        methodStartTiming         )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8933
                                                ('start counting'      methodStartCounting       )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8934
                                                ('start mem usage'     methodStartMemoryUsage    )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8935
                                          ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8936
                        ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8937
                    ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8938
                ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8939
            ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8940
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8941
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8942
        currentMethod isJavaMethod ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8943
            items := #(
2393
dd1cac491bb1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2387
diff changeset
  8944
                            ('compare source...'         methodCompareSource  )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8945
                            ('inspect method'            methodInspect        )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8946
                            ('decompile'                 methodDecompile      )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8947
                            ('-'                         nil                  )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8948
                            ('flush code'                methodFlushCode      )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8949
                       ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8950
            items := items , brkItems.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8951
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8952
        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8953
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  8954
            items := #(
2393
dd1cac491bb1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2387
diff changeset
  8955
                            ('compare source...'         methodCompareSource  )
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  8956
                            ('inspect method'            methodInspect        )
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  8957
                            ('stc-compile'               methodSTCCompile     )
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  8958
                            ('decompile'                 methodDecompile      )
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  8959
                            ('-'                         nil                  )
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  8960
                            ('package...'                methodModifyPackage  )
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  8961
                       ).
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  8962
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8963
            Method methodPrivacySupported ifTrue:[
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  8964
                items := items , #(
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8965
                                ('-'                         nil                  )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8966
                                ('make public'               methodMakePublic     )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8967
                                ('make private'              methodMakePrivate    )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8968
                                ('make protected'            methodMakeProtected  )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8969
                                ('make ignored'              methodMakeIgnored    )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8970
                           ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8971
            ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8972
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8973
            actualClass isMeta ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8974
                items := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8975
                              ('invoke method' methodInvoke )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8976
                              ('-'             nil          )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8977
                          )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8978
                          , items.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8979
            ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8980
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8981
            items := items , brkItems.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8982
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8983
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8984
        specialMenu := PopUpMenu itemList:items resources:resources.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8985
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  8986
        currentClass owningClass notNil ifTrue:[
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  8987
            specialMenu disable:#methodModifyPackage
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  8988
        ].
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  8989
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8990
        currentMethod isPublic ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8991
            specialMenu disable:#methodMakePublic
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8992
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8993
        currentMethod isPrivate ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8994
            specialMenu disable:#methodMakePrivate
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8995
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8996
        currentMethod isProtected ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8997
            specialMenu disable:#methodMakeProtected
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8998
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  8999
        currentMethod isIgnored ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9000
            specialMenu disable:#methodMakeIgnored
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9001
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9002
        ((currentMethod hasCode and:[currentMethod isDynamic not])
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9003
        or:[currentMethod isJavaMethod
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9004
        or:[Compiler canCreateMachineCode not]]) ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9005
            specialMenu disable:#methodSTCCompile
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9006
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9007
        currentMethod byteCode isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9008
            currentMethod isLazyMethod ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9009
                specialMenu disable:#methodDecompile
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9010
            ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9011
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9012
        currentMethod numArgs ~~ 0 ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9013
            specialMenu disable:#methodInvoke
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9014
        ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9015
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9016
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9017
    device ctrlDown ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9018
        currentMethod isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9019
            methodListView flash.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9020
            ^ nil
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9021
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9022
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9023
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9024
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9025
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9026
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9027
    sepLocalItems  := #().
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9028
    sepMthdItems  := #().
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9029
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9030
    searchItems := #(
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9031
                ('senders...'           methodSenders                 Cmds)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9032
                ('implementors...'      methodImplementors            Cmdi)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9033
                ('globals...'           methodGlobalReferends         Cmdg)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9034
                ('string search...'     methodStringSearch            Cmdt)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9035
                ('apropos...'           methodAproposSearch           )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9036
                ('-'                                                  )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9037
                ('find method here...'  methodFindMethod              )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9038
                ('find method...'       methodFindAnyMethod           )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9039
               ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9040
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9041
    currentMethodCategory notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9042
        sepLocalItems := #(('-')).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9043
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9044
        (currentClass notNil 
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9045
        and:[showInstance not
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9046
        and:[currentClass isSubclassOf:ApplicationModel]]) ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9047
            newItems :=           #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9048
                                    ('new method'       methodNewMethod     )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9049
                                    ('new window spec'  methodNewWindowSpec )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9050
                                    ('new menu spec'    methodNewMenuSpec   )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9051
                                    ('new image spec'   methodNewImageSpec   )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9052
                                    ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9053
        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9054
            newItems :=           #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9055
                                    ('new method'       methodNewMethod)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9056
                                    ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9057
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9058
        sepMthdItems := #(('-')).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9059
    ] ifFalse:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9060
        newItems := #()
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9061
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9062
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9063
    currentMethod notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9064
        fileItems :=           #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9065
                                ('fileOut'       methodFileOut  )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9066
                                ('printOut'      methodPrintOut )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9067
                                ('-'             nil            )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9068
                                ('SPAWN_METHOD'  methodSpawn    )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9069
                                ('inheritance'   methodInheritance )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9070
                                ('-'             nil            )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9071
                                ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9072
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9073
        sepLocalItems := #(('-')). 
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9074
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9075
        mthdItems :=           #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9076
                                ('change category...'      methodChangeCategory )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9077
                                ('move...'                 methodMove           )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9078
                                ('remove'                   methodRemove         )
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9079
"/                                ('-'                        nil                              )
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9080
"/                                ('compare with previous'    methodCompareWithPreviousVersion )
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9081
"/                                ('back to previous'         methodPreviousVersion            )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9082
                                ).
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9083
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9084
    ] ifFalse:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9085
        fileItems := #().
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9086
        mthdItems := #().
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9087
        sepMthdItems := #().
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9088
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9089
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9090
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9091
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9092
    items :=
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9093
                fileItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9094
                searchItems ,
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9095
"/                localSearchItems ,
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9096
                sepLocalItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9097
                newItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9098
                sepMthdItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9099
                mthdItems.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9100
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9101
    specialMenu notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9102
        items := items , #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9103
                        ('='                      )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9104
                        ('others'  otherMenu  Ctrl)
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9105
                  ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9106
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9107
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9108
    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
  9109
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9110
    specialMenu notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9111
        m subMenuAt:#otherMenu put:specialMenu.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9112
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9113
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9114
    currentMethod notNil ifTrue:[
1715
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9115
"/        currentMethod isPrivate ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9116
"/            m disable:#methodMakePrivate
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9117
"/        ].
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9118
"/        currentMethod isProtected ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9119
"/            m disable:#methodMakeProtected
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9120
"/        ].
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9121
"/        currentMethod isPublic ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9122
"/            m disable:#methodMakePublic
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9123
"/        ].
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9124
"/        currentMethod isIgnored ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9125
"/            m disable:#methodMakeIgnored
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9126
"/        ].
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9127
"/
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9128
"/        (currentMethod code notNil
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9129
"/        or:[Compiler canCreateMachineCode not]) ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9130
"/            m disable:#methodSTCCompile
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9131
"/        ].
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9132
"/        currentMethod byteCode isNil ifTrue:[
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9133
"/            m disable:#methodDecompile
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  9134
"/        ].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9135
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9136
        currentMethod previousVersion isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9137
            m disable:#methodPreviousVersion.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9138
            m disable:#methodCompareWithPreviousVersion
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9139
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9140
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9141
    ^ m
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9142
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9143
    "Created: / 23.11.1995 / 12:02:29 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9144
    "Modified: / 18.12.1995 / 16:20:07 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9145
    "Modified: / 29.4.1997 / 11:20:59 / dq"
2134
1d9ec3a3a160 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2127
diff changeset
  9146
    "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
  9147
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9148
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9149
methodModifyPackage
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9150
    "change the methods package assignment"
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9151
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9152
    |newPackage|
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9153
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9154
    currentClass owningClass notNil ifTrue:[
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9155
        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
  9156
        ^ self
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9157
    ].
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9158
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9159
    newPackage := Dialog 
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9160
                    request:(resources 
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9161
                                string:'Change the package-ID of ''%1'' to:' 
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9162
                                with:currentSelector asText allBold) withCRs
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9163
                    initialAnswer:currentClass package.
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9164
    newPackage size == 0 ifTrue:[
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9165
        ^ self
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9166
    ].
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9167
2337
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
  9168
    currentMethod package:newPackage.
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
  9169
    currentClass changed:#methodPackage with:currentSelector.
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9170
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9171
    "Created: 23.11.1995 / 11:41:38 / cg"
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9172
    "Modified: 6.2.1996 / 16:58:58 / cg"
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9173
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9174
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9175
!
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9176
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9177
methodMove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9178
    "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
  9179
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9180
    |newClass newClassName sup initial movedMethod 
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9181
     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
  9182
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9183
    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
  9184
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9185
    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
  9186
        initial := lastMethodMoveClass.
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9187
    ].
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9188
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9189
    initial isNil ifTrue:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9190
        (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
  9191
            initial := sup name
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9192
        ] ifFalse:[
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9193
            initial := nil.
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9194
        ].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  9195
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  9196
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9197
    supers := (currentClass allSuperclasses reverse collect:[:cls | cls name]).
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9198
    subs := (currentClass allSubclasses collect:[:cls | cls name]).
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9199
    list := supers.
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9200
    (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
  9201
        list := list , (Array with:'---- ' , currentClass name , ' ----')
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9202
    ].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9203
    list := list , subs.
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9204
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9205
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9206
"/ preps to use windowSpecs ...
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9207
"/
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9208
"/    holders := IdentityDictionary new.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9209
"/    holders at:#className put:initial asValue.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9210
"/    holders at:#classList put:list.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9211
"/
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9212
"/    (SystemBrowser 
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9213
"/      openDialogInterface:#methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9214
"/      withBindings:holders) ifFalse:[
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9215
"/        ^ self
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9216
"/    ].
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9217
"/    newClassName := (holders at:#className) value.
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9218
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9219
    newClassName := Dialog 
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9220
                    request:(resources string:'move current method to which class:')
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9221
                    initialAnswer:initial
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9222
                    okLabel:(resources string:'move')
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9223
                    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
  9224
                    onCancel:nil
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9225
                    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
  9226
    newClassName isNil ifTrue:[^ self].
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9227
    (newClassName startsWith:'---- ') ifTrue:[^ self].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  9228
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9229
    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
  9230
    newClass isNil ifTrue:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9231
        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
  9232
        ^ self
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9233
    ].
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9234
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9235
    showInstance ifFalse:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9236
        newClass isMeta ifFalse:[
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9237
            newClass := newClass class
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9238
        ]
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9239
    ].
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9240
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9241
    (newClass implements:currentSelector) ifTrue:[
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9242
        (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
  9243
                      , '\\Move anyway ?' withCRs)) ifFalse:[
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9244
            ^ self
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9245
        ]
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9246
    ].
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9247
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9248
    lastMethodMoveClass := newClassName.
978
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  9249
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  9250
    movedMethod := newClass 
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9251
                        compile:(currentMethod source) 
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9252
                        classified:currentMethodCategory.
978
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  9253
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  9254
    (movedMethod isNil or:[movedMethod == #Error]) ifTrue:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9255
        self warn:'not moved - compilation failed due to a compilation error'.
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
  9256
        ^ self
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9257
    ].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9258
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9259
    self methodRemove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9260
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  9261
    "Created: 13.12.1995 / 10:56:42 / cg"
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  9262
    "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
  9263
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9264
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9265
methodNewImageSpec
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9266
    "open a BitmapEditor"
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9267
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9268
    |specSel|
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9269
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9270
    currentClass isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9271
        ^ self warn:'select/create a class first'.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9272
    ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9273
    currentMethodCategory isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9274
        ^ self warn:'select/create a method category first'.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9275
    ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9276
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9277
    (actualClass implements:#someImageSpec) ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9278
        specSel := #someImageSpec
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
    ImageEditor openOnClass:currentClass andSelector:specSel
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9281
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9282
    "Created: / 28.10.1997 / 12:42:00 / cg"
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9283
!
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9284
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9285
methodNewMenuSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9286
    "open a MenuEditor"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9287
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9288
    |specSel|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9289
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9290
    currentClass isNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9291
        ^ self warn:'select/create a class first'.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9292
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9293
    currentMethodCategory isNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9294
        ^ 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
  9295
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9296
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9297
    (actualClass implements:#menuSpec) ifFalse:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9298
        specSel := #menuSpec
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9299
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9300
    MenuEditor openOnClass:currentClass andSelector:specSel
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9301
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9302
    "Created: / 28.10.1997 / 12:42:00 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9303
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9304
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9305
methodNewMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9306
    "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
  9307
     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
  9308
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9309
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9310
	^ 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
  9311
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9312
    currentMethodCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9313
	^ 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
  9314
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9315
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9316
    self releaseMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9317
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  9318
    methodListView setSelection:nil.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  9319
    codeView contents:(self methodTemplate).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9320
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  9321
    codeModified := false.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9322
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9323
    self setAcceptAndExplainActionsForMethod.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  9324
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9325
    "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
  9326
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9327
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9328
methodNewWindowSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9329
    "open GUI Painter"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9330
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9331
    |specSel|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9332
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9333
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9334
	^ self warn:'select/create a class first'.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9335
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9336
    currentMethodCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9337
	^ 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
  9338
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9339
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9340
    (actualClass implements:#windowSpec) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9341
	specSel := #windowSpec
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9342
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9343
    UIPainter openOnClass:currentClass andSelector:specSel
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9344
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9345
    "Modified: / 28.10.1997 / 12:40:35 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9346
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9347
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9348
methodPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9349
    "switch back to the previous version
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9350
     (undo last change)"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9351
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9352
    |cls sel prev|
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9353
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9354
    self checkMethodSelected ifFalse:[^ self].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9355
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9356
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9357
    prev isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9358
	self warn:'oops - previous version is gone'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9359
	^ self
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9360
    ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9361
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9362
    cls := currentMethod containingClass.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9363
    cls notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9364
	sel := actualClass selectorAtMethod:currentMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9365
	sel isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9366
	    self warn:'oops - cannot find methods selector (gone)'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9367
	] ifFalse:[        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9368
	    cls basicAddSelector:sel withMethod:prev.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9369
	    currentMethod := prev.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9370
	    self updateCodeView
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9371
	].
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9372
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9373
	self warn:'oops - cannot find containing class'
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9374
    ]
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9375
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9376
    "Modified: 7.11.1996 / 18:51:09 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9377
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9378
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9379
methodPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9380
    "print out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9381
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9382
    |printStream|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9383
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9384
    self checkMethodSelected ifFalse:[^ self].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9385
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9386
    printStream := Printer new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9387
    actualClass printOutSource:(currentMethod source) on:printStream.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9388
    printStream close
1426
aa8bda9a1964 oops - handle the case that no source is available when checking
Claus Gittinger <cg@exept.de>
parents: 1419
diff changeset
  9389
aa8bda9a1964 oops - handle the case that no source is available when checking
Claus Gittinger <cg@exept.de>
parents: 1419
diff changeset
  9390
    "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
  9391
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9392
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9393
methodPrivacy:how
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9394
    "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
  9395
     EXPERIMENTAL"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9396
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  9397
    |cls|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  9398
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9399
    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
  9400
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  9401
    (how == currentMethod privacy) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9402
	currentMethod privacy:how.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9403
	cls := currentMethod containingClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9404
	cls notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9405
	    cls addChangeRecordForMethodPrivacy:currentMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9406
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9407
	    self warn:'cannot write change record (no class)'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9408
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9409
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9410
	Class withoutUpdatingChangesDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9411
	    currentClass changed:#methodPrivacy with:currentSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9412
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9413
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9414
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  9415
    "Created: / 29.10.1995 / 20:00:00 / cg"
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  9416
    "Modified: / 8.1.1997 / 22:37:02 / cg"
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  9417
    "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
  9418
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9419
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9420
methodRemove
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9421
    "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
  9422
1054
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  9423
    |cls sel w|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  9424
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9425
    self checkMethodSelected ifFalse:[^ self].
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9426
1054
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  9427
    w := currentMethod who.
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  9428
    w notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9429
	cls := w methodClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9430
	sel := w methodSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9431
	cls notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9432
	    cls ~~ actualClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9433
		^ self warn:'oops - obsolete class; please reselect class ...'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9434
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9435
	    sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9436
		actualClass removeSelector:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9437
		self releaseMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9438
		self updateMethodListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9439
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9440
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9441
	].
1054
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  9442
    ]. 
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  9443
    self warn:'cannot remove method (no class)'
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9444
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9445
    "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
  9446
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9447
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9448
methodRemoveBreakOrTrace
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9449
    "turn off tracing of the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9450
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9451
    self commonTraceHelperWith:#clearBreakPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9452
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9453
    "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
  9454
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9455
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9456
methodRemoveConfirmed
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9457
    "confirm and remove the current method"
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9458
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9459
    |w|
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9460
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9461
    self checkMethodSelected ifFalse:[^ self].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9462
    w := currentMethod who.
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9463
    w notNil ifTrue:[
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9464
        (self confirm:'Remove ' , w methodSelector asText allBold , ' ?') ifTrue:[
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9465
            self methodRemove
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9466
        ]
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9467
    ]. 
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9468
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9469
    "Modified: / 27.7.1998 / 11:00:35 / cg"
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9470
!
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  9471
1768
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9472
methodResetCounting
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9473
    "reset the counting statstics for the current method"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9474
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9475
    self commonTraceHelperWith:#resetCountingStatistics
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9476
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9477
    "Modified: / 30.7.1998 / 17:16:26 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9478
    "Created: / 30.7.1998 / 17:39:08 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9479
!
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9480
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9481
methodResetMemoryUsage
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9482
    "reset the memory statstics for the current method"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9483
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9484
    self commonTraceHelperWith:#resetMemoryUsageStatistics
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9485
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9486
    "Modified: / 30.7.1998 / 17:16:26 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9487
    "Created: / 30.7.1998 / 17:39:20 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9488
!
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9489
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9490
methodResetTiming
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9491
    "reset the timing statstics for the current method"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9492
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9493
    self commonTraceHelperWith:#resetTimingStatistics
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9494
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9495
    "Created: / 30.7.1998 / 17:14:41 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9496
    "Modified: / 30.7.1998 / 17:16:26 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9497
!
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9498
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9499
methodSTCCompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9500
    "compile the current method to machine code.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9501
     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
  9502
     the demo version."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9503
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9504
    |prev|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9505
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9506
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9507
    prev := Compiler stcCompilation:#always.
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9508
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9509
	[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9510
	    codeView accept.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9511
	] valueNowOrOnUnwindDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9512
	    Compiler stcCompilation:prev
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9513
	]
1183
5c5ddf5dcac1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1171
diff changeset
  9514
    ].
5c5ddf5dcac1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1171
diff changeset
  9515
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9516
    "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
  9517
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9518
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9519
methodSenders
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9520
    "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
  9521
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9522
    self askForSearchTitle:'selector to browse senders of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9523
		  openWith:#browseAllCallsOn:in:
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9524
		isSelector:true
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9525
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9526
    "Modified: 10.7.1996 / 10:33:29 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9527
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9528
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9529
methodSpawn
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9530
    "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
  9531
     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
  9532
     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
  9533
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9534
    |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
  9535
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9536
    classMethodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9537
	s := classMethodListView selectionValue string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9538
	clsName := self classNameFromClassMethodString:s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9539
	sel := self selectorFromClassMethodString:s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9540
	isMeta := false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9541
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9542
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9543
    self extractClassAndSelectorFromSelectionInto:[:c :s :m |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9544
	clsName := c.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9545
	sel := s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9546
	isMeta := m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9547
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9548
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9549
    (sel notNil and:[clsName notNil]) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9550
	(clsName knownAsSymbol and:[sel knownAsSymbol]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9551
	    clsSymbol := clsName asSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9552
	    (Smalltalk includesKey:clsSymbol) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9553
		cls := Smalltalk at:clsSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9554
		isMeta ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9555
		    cls := cls class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9556
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9557
		cls isBehavior ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9558
		    cls := cls class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9559
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9560
		cls isBehavior ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9561
		    selSymbol := sel asSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9562
		    self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9563
			(cls includesSelector:selSymbol) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9564
			    cls := cls class.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9565
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9566
			(cls includesSelector:selSymbol) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9567
			    SystemBrowser browseClass:cls selector:selSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9568
			    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9569
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9570
			w := ' does not implement #' , sel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9571
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9572
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9573
		    w := ' is not a class'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9574
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9575
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9576
		w := ' is unknown'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9577
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9578
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9579
	    w := ' and/or ' , sel , ' are unknown'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9580
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9581
	self warn:(clsName , w).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9582
	^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9583
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9584
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9585
    self checkMethodSelected ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9586
	self warn:'select a method first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9587
	^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9588
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9589
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9590
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9591
	w := currentMethod who.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9592
	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
  9593
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  9594
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9595
    "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
  9596
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9597
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9598
methodStartCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9599
    "set a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9600
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9601
    self commonTraceHelperWith:#startCounting
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9602
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9603
    "Created: / 15.12.1995 / 11:00:44 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9604
    "Modified: / 12.1.1998 / 19:15:40 / cg"
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9605
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9606
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  9607
methodStartMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  9608
    "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
  9609
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9610
    self commonTraceHelperWith:#startCountingMemoryUsage
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9611
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9612
    "Created: / 18.12.1995 / 16:00:22 / stefan"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9613
    "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
  9614
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  9615
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9616
methodStartTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9617
    "set a timing on the current method"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9618
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9619
    self commonTraceHelperWith:#startTiming
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9620
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9621
    "Created: / 17.6.1996 / 17:12:06 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9622
    "Modified: / 12.1.1998 / 19:15:50 / cg"
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9623
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9624
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9625
methodStopCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9626
    "show the number of invocations & remove a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9627
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9628
    self commonTraceHelperWith:#stopCounting
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9629
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9630
    "Created: / 15.12.1995 / 11:03:22 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9631
    "Modified: / 12.1.1998 / 19:15:55 / cg"
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9632
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9633
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  9634
methodStopMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  9635
    "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
  9636
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9637
    self commonTraceHelperWith:#stopCountingMemoryUsage.
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9638
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9639
    "Created: / 18.12.1995 / 16:02:02 / stefan"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9640
    "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
  9641
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  9642
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9643
methodStopTiming
1768
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
  9644
    "stop timing the current method"
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9645
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9646
    self commonTraceHelperWith:#stopTiming
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9647
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9648
    "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
  9649
    "Modified: / 30.7.1998 / 17:15:10 / cg"
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9650
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  9651
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9652
methodStringSearch
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9653
    "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
  9654
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
  9655
    |whereDefault|
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
  9656
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
  9657
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
  9658
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9659
	whereDefault := #class.
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
  9660
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9661
	currentClassCategory notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9662
	    whereDefault := #classCategory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9663
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9664
	    currentNamespace notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9665
		whereDefault := #currentNameSpace.                
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9666
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9667
		whereDefault := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9668
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9669
	]
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
  9670
    ].
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9671
    self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9672
	askForSearchTitle:'string to search for in sources:' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9673
	openWith:#browseForString:in:ignoreCase:
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9674
	isSelector:true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9675
	searchArea:whereDefault
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9676
	withCaseIgnore:true
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  9677
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  9678
    "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
  9679
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9680
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9681
methodTrace
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9682
    "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
  9683
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9684
    self commonTraceHelperWith:#setTracePoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9685
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9686
    "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
  9687
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9688
306
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  9689
methodTraceFull
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  9690
    "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
  9691
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9692
    self commonTraceHelperWith:#setTraceFullPoint.
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9693
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9694
    "Created: / 15.12.1995 / 18:20:33 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9695
    "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
  9696
!
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  9697
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9698
methodTraceSender
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9699
    "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
  9700
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9701
    self commonTraceHelperWith:#setTraceSenderPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9702
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9703
    "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
  9704
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9705
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9706
!BrowserView methodsFor:'method stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9707
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9708
checkMethodSelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9709
    currentMethod isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9710
	self warn:'select a method first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9711
	^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9712
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9713
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9714
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9715
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9716
listEntryForMethod:aMethod selector:selector
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9717
    "answer a method list entry 
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9718
     (gimmic: adding a little image to breakPointed methods)"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9719
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9720
    |s icn resources|
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9721
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9722
    s := aMethod printStringForBrowserWithSelector:selector.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9723
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9724
    "/
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9725
    "/ wrap icons (i.e. break- or trace points)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9726
    "/ have higher prio ...
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9727
    "/
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9728
    aMethod isWrapped ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9729
	(s endsWith:' !!') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9730
	    s := s copyWithoutLast:2
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9731
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9732
	aMethod isBreakpointed ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9733
	    icn := self stopIcon
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9734
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9735
	    aMethod isTimed ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9736
		icn := self timeIcon
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9737
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9738
		icn := self traceIcon
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9739
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9740
	].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9741
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9742
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9743
    icn isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9744
	ShowResourceIcons ~~ false ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9745
	    (resources := aMethod resources) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9746
		(resources includesKey:#canvas) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9747
		    icn := self canvasIcon
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9748
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9749
		    (resources includesKey:#menu) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9750
			icn := self menuIcon
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9751
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9752
			(resources includesKey:#image) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9753
			    icn := self imageIcon
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9754
			] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9755
			    (resources includesKey:#fileImage) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9756
				icn := self fileImageIcon
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9757
			    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9758
				(resources includesKey:#help) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9759
				    icn := self helpIcon
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9760
				] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9761
				    (resources includesKey:#programMenu) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9762
					icn := self programMenuIcon
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9763
				    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9764
					(resources includesKey:#tableColumns) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9765
					    icn := self tableColumnsIcon 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9766
					] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9767
					    (resources includesKey:#tabList) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9768
						icn := self tabListIcon 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9769
					    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9770
						(resources includesKey:#hierarchicalList) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9771
						    icn := self hierarchicalListIcon 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9772
						] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9773
						    (resources includesKey:#programImage) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9774
							icn := self programImageIcon 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9775
						    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9776
						]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9777
					    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9778
					]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9779
				    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9780
				]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9781
			    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9782
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9783
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9784
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9785
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9786
	].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9787
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9788
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9789
    icn notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9790
	^ LabelAndIcon icon:icn string:s
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9791
    ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9792
    ^ s
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9793
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9794
    "Created: / 22.10.1996 / 19:51:00 / cg"
1851
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
  9795
    "Modified: / 24.8.1998 / 21:37:04 / cg"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9796
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9797
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9798
listOfAllMethodsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9799
    "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
  9800
     of the argument, aClass and its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9801
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9802
1346
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9803
    |newList selectors otherSelectors allCategories|
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9804
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9805
    newList := OrderedCollection new.
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9806
    selectors := IdentitySet new.
611
f3e973ecc846 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
  9807
    otherSelectors := IdentitySet new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9808
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9809
    allCategories := (aCategory = '* all *').
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9810
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9811
    self classesInFullProtocolHierarchy:aClass do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9812
	|searchCategory|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9813
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9814
	(aCategory = '* no category *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9815
	    searchCategory := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9816
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9817
	    searchCategory := aCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9818
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9819
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9820
	c methodDictionary keysAndValuesDo:[:selector :aMethod |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9821
	    (allCategories
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9822
	     or:[aMethod category = searchCategory]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9823
		(otherSelectors includes:selector) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9824
		    (selectors includes:selector) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9825
			selectors add:selector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9826
			newList add:(selector -> aMethod)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9827
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9828
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9829
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9830
		otherSelectors add:selector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9831
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9832
	].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9833
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9834
    (newList size == 0) ifTrue:[^ nil].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9835
    ^ newList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9836
1346
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  9837
    "Modified: 14.10.1997 / 00:19:20 / cg"
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9838
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9839
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9840
listOfAllMethodsInCategory:aCategory ofClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9841
    "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
  9842
     of the argument, aClass"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9843
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9844
    |newList searchCategory all|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9845
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9846
    all := (aCategory = '* all *').
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9847
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9848
    (aCategory = '* no category *') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9849
	searchCategory := nil
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9850
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9851
	searchCategory := aCategory
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9852
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9853
    newList := OrderedCollection new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  9854
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  9855
    aClass methodDictionary keysAndValuesDo:[:selector :aMethod |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9856
	(all or:[aMethod category = searchCategory]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9857
	    newList add:(selector -> aMethod)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9858
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9859
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9860
    (newList size == 0) ifTrue:[^ nil].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9861
    ^ newList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9862
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9863
    "Created: 30.7.1997 / 15:10:16 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9864
    "Modified: 30.7.1997 / 15:12:38 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9865
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9866
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9867
listOfAllSelectorsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9868
    "answer a list of all selectors in a given method category 
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9869
     of the argument, aClass and its superclasses.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9870
     Used with fullProtocol browsing."
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9871
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  9872
    |methodList newList|
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9873
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9874
    methodList := self listOfAllMethodsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9875
    (methodList size == 0) ifTrue:[^ nil].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9876
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9877
    aClass isJavaClass ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9878
	methodList := methodList asOrderedCollection.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9879
	methodList sort:[:a :b |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9880
			    |mA mB|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9881
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9882
			    mA := a value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9883
			    mB := b value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9884
			    mA name < mB name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9885
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9886
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9887
	selectorList := methodList collect:[:assoc | assoc key].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9888
	^ methodList collect:[:assoc |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9889
				self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9890
				    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9891
				    selector:(assoc key)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9892
			     ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9893
    ].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9894
1262
8e1263b12ec6 checkin from browser
ca
parents: 1260
diff changeset
  9895
    methodList := methodList asOrderedCollection.
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9896
    selectorList := methodList collect:[:assoc | assoc key].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9897
    newList := methodList 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9898
		    collect:[:assoc |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9899
			self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9900
			    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9901
			    selector:assoc key
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9902
		    ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9903
    ^ newList asOrderedCollection sort:[:a :b | a string < b string] with:selectorList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9904
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9905
    "Modified: 30.7.1997 / 15:28:59 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9906
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9907
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9908
listOfAllSelectorsInCategory:aCategory ofClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9909
    "answer a list of all selectors in a given method category 
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9910
     of the argument, aClass"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9911
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9912
    |methodList newList|
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9913
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9914
    methodList := self listOfAllMethodsInCategory:aCategory ofClass:aClass.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9915
    (methodList size == 0) ifTrue:[^ nil].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9916
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9917
    aClass isJavaClass ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9918
	methodList := methodList asOrderedCollection.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9919
	methodList sort:[:a :b |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9920
			    |mA mB|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9921
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9922
			    mA := a value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9923
			    mB := b value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9924
			    mA name < mB name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9925
			].
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
	selectorList := methodList collect:[:assoc | assoc key].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9928
	^ methodList collect:[:assoc |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9929
				self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9930
				    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9931
				    selector:(assoc key)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9932
			     ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9933
    ].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9934
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9935
    selectorList := methodList collect:[:assoc | assoc key].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9936
    newList := methodList 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9937
		    collect:[:assoc | 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9938
				self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9939
				    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9940
				    selector:(assoc key)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9941
			    ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9942
    ^ newList sort:[:a :b | a string < b string] with:selectorList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9943
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9944
    "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
  9945
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9946
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9947
methodDoubleClick:lineNr
1802
a654f429bc28 some obsolete code in #methodDoubleClick:
tz
parents: 1789
diff changeset
  9948
    |resources editorClass|
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9949
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9950
    currentMethod notNil ifTrue:[
2174
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9951
        resources := currentMethod resources.
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9952
        resources notNil ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9953
            (resources includesKey:#canvas) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9954
                editorClass := UIPainter
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9955
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9956
            (resources includesKey:#menu) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9957
                editorClass := MenuEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9958
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9959
            ((resources includesKey:#image) or: [resources includesKey:#fileImage]) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9960
                editorClass := ImageEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9961
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9962
            (resources includesKey:#help) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9963
                editorClass := UIHelpTool
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9964
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9965
            (resources includesKey:#tableColumns) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9966
                editorClass := DataSetBuilder
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9967
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9968
            (resources includesKey:#tabList) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9969
                editorClass := TabListEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9970
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9971
            (resources includesKey:#hierarchicalList) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9972
                editorClass := HierarchicalListEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9973
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9974
            editorClass notNil ifTrue: [
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9975
                self withWaitCursorDo:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9976
                    editorClass 
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9977
                        openOnClass:currentClass 
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9978
                        andSelector:currentSelector
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9979
                ]
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9980
            ]
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
  9981
        ]
1802
a654f429bc28 some obsolete code in #methodDoubleClick:
tz
parents: 1789
diff changeset
  9982
    ]
a654f429bc28 some obsolete code in #methodDoubleClick:
tz
parents: 1789
diff changeset
  9983
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9984
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9985
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9986
methodSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9987
    "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
  9988
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  9989
    |selection sensor|
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
  9990
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9991
"/    selection := methodListView selectionValue string.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9992
selection := selectorList at:lineNr.
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
  9993
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
  9994
    "/ reselected with control ?
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  9995
    ((sensor := self sensor) notNil and:[sensor ctrlDown]) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9996
	selection = currentSelector ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9997
	    "/ if there is a trace/break, remove it.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9998
	    (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9999
		self methodRemoveBreakOrTrace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10000
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10001
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10002
	].
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10003
    ].
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10004
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10005
    self switchToMethod:selection.
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10006
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10007
    "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
 10008
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10009
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10010
methodSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10011
    "method selection has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10012
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10013
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10014
	|index cls|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10015
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10016
	aspect := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10017
	self updateCodeView.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10018
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10019
	self refetchMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10020
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10021
	(currentMethod notNil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10022
	and:[currentMethod isCounting]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10023
	    self updateMethodListWithScroll:false keepSelection:true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10024
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10025
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10026
	self setAcceptAndExplainActionsForMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10027
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10028
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10029
	 if there is any autoSearch string, do the search
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10030
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10031
	autoSearch notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10032
	    codeView 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10033
		searchFwd:autoSearch
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10034
		ignoreCase:autoSearchIgnoreCase 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10035
		startingAtLine:1 col:0 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10036
		ifAbsent:[]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10037
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10038
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10039
	fullProtocol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10040
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10041
	     remove any bold attribute from classList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10042
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10043
	    1 to:classListView list size do:[:i |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10044
		classListView attributeAt:i remove:#bold.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10045
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10046
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10047
	     boldify the class where this method is implemented
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10048
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10049
	    currentMethod notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10050
		cls := currentMethod containingClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10051
		index := classListView list indexOf:(cls name).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10052
		(index == 0 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10053
		 and:[cls isMeta
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10054
		 and:[cls name endsWith:' class']]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10055
		    index := classListView list indexOf:(cls name copyWithoutLast:6).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10056
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10057
		index ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10058
		    classListView attributeAt:index add:#bold.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10059
		    classListView makeLineVisible:index.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10060
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10061
		currentClass := acceptClass := cls.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10062
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10063
	].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10064
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10065
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10066
    "Created: / 23.11.1995 / 14:17:44 / cg"
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10067
    "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
 10068
    "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
 10069
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10070
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10071
methodTemplate
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10072
    "return a method definition template"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10073
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10074
    |s|
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10075
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10076
    s := TextStream on:''.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10077
    s nextPutAll:'message selector and argument names
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10078
    "comment stating purpose of this message"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10079
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10080
    |temporaries|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10081
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10082
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10083
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10084
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10085
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10086
    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10087
     optional: comment giving example use
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10088
    "
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10089
'.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10090
    s cr.
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 10091
    s emphasis:(self commentEmphasisAndColor).
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10092
    s nextPutAll:'"
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10093
 change the above template into real code.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10094
 Then `accept'' either via the menu 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10095
 or via the keyboard (usually CMD-A).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10096
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10097
 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
 10098
 select any existing methods code, change it,
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10099
 and finally `accept''. The method will then be
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10100
 installed under the selector as defined in the
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10101
 actual text - no matter which method is selected
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10102
 in the browser.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10103
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10104
 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
 10105
 and install it with `accept''.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10106
"
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10107
'.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10108
    ^ s contents
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10109
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10110
    "Created: 8.2.1996 / 18:21:53 / cg"
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10111
    "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
 10112
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10113
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10114
switchToAnyMethodNamed:matchString
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 10115
    "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
 10116
     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
 10117
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
 10118
    |aSelector classToStartSearch classToSearch aClass nm|
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10119
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10120
    actualClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10121
	currentClassHierarchy notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10122
	    classToStartSearch := currentClassHierarchy
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10123
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10124
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10125
	classToStartSearch := actualClass 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10126
    ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 10127
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10128
    classToStartSearch notNil ifTrue:[
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10129
"/        showInstance ifFalse:[
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10130
"/            classToStartSearch := classToStartSearch class
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10131
"/        ].
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10132
	((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10133
	    classToSearch := classToStartSearch.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10134
	    aClass := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10135
	    [classToSearch notNil and:[aClass isNil]] whileTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10136
		aSelector := classToSearch methodDictionary findFirstKey:[:element | matchString match:element].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10137
		aSelector notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10138
		    aClass := classToSearch
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10139
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10140
		    classToSearch := classToSearch superclass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10141
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10142
	    ]
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
	    aSelector := matchString asSymbolIfInterned.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10145
	    aSelector notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10146
		aClass := classToStartSearch whichClassIncludesSelector:aSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10147
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10148
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10149
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10150
	aClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10151
	    nm := aClass name.
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10152
"/            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
 10153
"/                ((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
 10154
"/                    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
 10155
"/                ]
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10156
"/            ].
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10157
	    aClass ~~ actualClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10158
		self switchToClassNamed:nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10159
	    ].    
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10160
	    self switchToMethodNamed:aSelector "matchString".
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10161
	    ^ self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10162
	]
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10163
    ].
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10164
    self beep
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10165
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
 10166
    "Modified: 17.6.1996 / 16:52:36 / stefan"
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
 10167
    "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
 10168
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10169
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10170
switchToMethod:aString
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10171
    "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
 10172
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10173
    |selectorString selectorSymbol cat|
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10174
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10175
    (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
 10176
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10177
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10178
     kludge: extract real selector
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10179
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10180
    selectorString := aString withoutSpaces upTo:(Character space).
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 10181
    selectorSymbol := selectorString asSymbolIfInterned.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 10182
    selectorSymbol isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10183
	self beep.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10184
	^ self
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 10185
    ].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10186
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10187
    fullProtocol ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10188
	self releaseMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10189
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10190
	 search which class implements the selector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10191
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10192
	self classesInFullProtocolHierarchy:actualClass do:[:c |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10193
	    (currentMethod isNil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10194
	     and:[c includesSelector:selectorSymbol]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10195
		currentSelector := selectorSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10196
		currentMethod := c compiledMethodAt:selectorSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10197
		acceptClass := c
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10198
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10199
	]
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10200
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10201
	currentSelector := selectorSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10202
	currentMethod := actualClass compiledMethodAt:selectorSymbol.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10203
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10204
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10205
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10206
	currentMethod notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10207
	    cat := currentMethod category.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10208
	    (currentMethodCategory = cat) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10209
		currentMethodCategory := cat.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10210
		methodCategoryListView setSelectElement:currentMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10211
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10212
	]
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
 10213
    ].
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
 10214
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
 10215
    self methodSelectionChanged.
1539
971e20d7b6bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
 10216
    currentSelector notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10217
	self addToClassHistory: actualClass name asString, ' ', currentSelector
1539
971e20d7b6bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
 10218
    ]
971e20d7b6bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
 10219
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10220
    "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
 10221
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10222
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10223
switchToMethodNamed:matchString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10224
    "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
 10225
     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
 10226
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
 10227
    |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
 10228
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10229
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10230
	classToSearch := actualClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10231
	dict := classToSearch methodDictionary.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10232
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10233
	((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10234
	    aSelector := dict findFirstKey:[:element | matchString match:element].       
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10235
	    aSelector notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10236
		method := dict at:aSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10237
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10238
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10239
	    matchString knownAsSymbol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10240
		aSelector := matchString asSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10241
		method := dict at:aSelector ifAbsent:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10242
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10243
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10244
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10245
	method notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10246
	    cat := method category.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10247
	    cat isNil ifTrue:[cat := '* all *'].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10248
	    methodCategoryListView setSelectElement:cat.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10249
	    currentMethodCategory := cat.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10250
	    self updateMethodCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10251
	    self methodCategorySelectionChanged.
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
	    self releaseMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10254
	    currentMethod := method.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10255
	    currentSelector := aSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10256
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10257
	    m := aSelector , '*(*)'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10258
	    selectorList notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10259
		idx := selectorList findFirst:[:line |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10260
						    line = aSelector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10261
						    or:[m match:line]].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10262
"/            idx := methodListView list findFirst:[:line |
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10263
"/                                                line = aSelector
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10264
"/                                                or:[m match:line]].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
 10265
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10266
		methodListView setSelection:idx. "/ setSelectElement:aSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10267
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10268
	    self methodSelectionChanged.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10269
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10270
	]
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10271
    ].
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10272
    self beep.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10273
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10274
    "Modified: / 28.6.1996 / 20:28:56 / stefan"
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10275
    "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
 10276
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10277
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10278
updateMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10279
    self updateMethodListWithScroll:true keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10280
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10281
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10282
updateMethodListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10283
    self updateMethodListWithScroll:scroll keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10284
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10285
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10286
updateMethodListWithScroll:scroll keepSelection:keep
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10287
    |selectors scr first last selection searchCategory|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10288
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10289
    methodListView notNil ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10290
        selection := methodListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10291
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10292
        searchCategory := currentMethodCategory.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10293
        (currentClass notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10294
        and:[currentClass supportsMethodCategories not]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10295
            searchCategory := '* all *'
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10296
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10297
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10298
        (searchCategory notNil 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10299
        and:[actualClass notNil]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10300
            fullProtocol ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10301
                selectors := self listOfAllSelectorsInCategory:searchCategory 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10302
                                inFullProtocolHierarchyOfClass:actualClass
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10303
            ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10304
                selectors := self listOfAllSelectorsInCategory:searchCategory
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10305
                                                       ofClass:actualClass
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10306
            ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10307
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10308
        scr := scroll.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10309
        first := methodListView firstLineShown.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10310
        first ~~ 1 ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10311
            last := methodListView lastLineShown.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10312
            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
 10313
                scr := true
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10314
            ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10315
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10316
2243
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10317
        scr ifTrue:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10318
            methodListView list:selectors
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10319
        ] ifFalse:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10320
            methodListView setList:selectors
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10321
        ].
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10322
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10323
        (variableListView notNil 
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10324
        and:[variableListView hasSelection]) ifTrue:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10325
            self hilightMethodsInMethodList.
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10326
        ].
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10327
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10328
        keep ifTrue:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 10329
            methodListView setSelection:selection.
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10330
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10331
        ^ self
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 10332
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 10333
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 10334
    classMethodListView notNil ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10335
        self updateClassMethodListWithScroll:scroll keepSelection:keep
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 10336
    ].
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10337
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10338
    "Modified: 18.12.1995 / 22:54:04 / stefan"
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10339
    "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
 10340
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10341
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10342
!BrowserView methodsFor:'misc'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10343
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10344
codeChanged
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10345
    codeView modified ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10346
        self stopSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10347
        codeModified := true.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 10348
        self startSyntaxHighlightProcess.
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10349
    ]
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10350
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10351
    "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
 10352
    "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
 10353
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10354
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10355
compressedCodeLinesFor:someCode
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10356
    |s|
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10357
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10358
    s := someCode asString string asCollectionOfLines copy.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10359
    [s last isEmpty] whileTrue:[s removeLast].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10360
    s := s collect:[:s | |t|
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10361
			   s notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10362
			      t := s withoutTrailingSeparators.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10363
			      t size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10364
				  nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10365
			      ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10366
				  t
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10367
			      ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10368
			   ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10369
			      s
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10370
			   ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10371
		     ].
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10372
    ^ s
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10373
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10374
    "Created: / 17.6.1998 / 16:48:03 / cg"
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10375
!
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10376
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10377
instanceProtocol:aBoolean
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10378
    "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
 10379
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10380
    |onToggle offToggle|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10381
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10382
    showInstance ~~ aBoolean ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10383
	self checkSelectionChangeAllowed ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10384
	    instanceToggle notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10385
		aBoolean ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10386
		    offToggle := classToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10387
		    onToggle := instanceToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10388
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10389
		    onToggle := classToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10390
		    offToggle := instanceToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10391
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10392
		onToggle turnOn.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10393
		offToggle turnOff.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10394
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10395
	    showInstance := aBoolean.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10396
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10397
	    (variableListView notNil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10398
	    and:[variableListView hasSelection]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10399
		self unhilightMethodCategories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10400
		self unhilightMethods.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10401
		variableListView setSelection:nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10402
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10403
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10404
	    fullProtocol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10405
		showInstance ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10406
		    actualClass := currentClassHierarchy.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10407
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10408
		    actualClass := currentClassHierarchy class.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10409
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10410
		acceptClass := actualClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10411
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10412
		self updateClassList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10413
		self updateMethodCategoryListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10414
		self updateMethodListWithScroll:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10415
		self updateVariableList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10416
		^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10417
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10418
	    currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10419
		self classSelectionChanged
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10420
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10421
	    codeView modified:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10422
	    codeModified := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10423
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10424
	    aBoolean ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10425
		onToggle := classToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10426
		offToggle := instanceToggle
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10427
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10428
		offToggle := classToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10429
		onToggle := instanceToggle.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10430
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10431
	    onToggle turnOn.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10432
	    offToggle turnOff.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10433
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10434
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
 10435
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 10436
    "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
 10437
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10438
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10439
processName
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10440
    "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
 10441
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10442
    ^ 'System Browser'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10443
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10444
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 10445
showActivity:someMessage
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 10446
    "some activityNotification to be forwarded to the user;
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 10447
     show it in the windows title area here."
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 10448
1500
c7cac8cb021f show busyCursor while autloading or starting an app
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
 10449
    someMessage size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10450
	self normalLabel
1500
c7cac8cb021f show busyCursor while autloading or starting an app
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
 10451
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10452
	self busyLabel:someMessage with:nil
1500
c7cac8cb021f show busyCursor while autloading or starting an app
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
 10453
    ]
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 10454
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 10455
    "Created: 16.12.1995 / 18:41:37 / cg"
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 10456
    "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
 10457
!
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 10458
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10459
updateCodeView
1623
d8ec0dca0923 ask class for syntaxHighliter (avoid formatting Java classes ...)
Claus Gittinger <cg@exept.de>
parents: 1612
diff changeset
 10460
    |code sourceLineNumber doStartSyntax invalidate highlighter|
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10461
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10462
    codeView modifiedChannel retractInterestsFor:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10463
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10464
    aspect == #hierarchy ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10465
        ^ self classHierarchy
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10466
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10467
    aspect == #classInstVars ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10468
        ^ self classClassInstVars
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10469
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10470
    aspect == #comment ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10471
        ^ self classComment
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10472
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10473
    aspect == #primitiveDefinitions ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10474
        ^ self classPrimitiveDefinitions
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10475
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10476
    aspect == #primitiveFunctions ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10477
        ^ self classPrimitiveFunctions
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10478
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10479
    aspect == #primitiveVariables ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10480
        ^ self classPrimitiveVariables
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10481
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10482
    aspect == #revisionInfo ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10483
        ^ self classRevisionInfo
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10484
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10485
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10486
    fullClass ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10487
        currentClass notNil ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10488
            code := currentClass source.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10489
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10490
    ] ifFalse:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10491
        aspect == #definition ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10492
            ^ self classDefinition
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10493
        ].
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10494
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10495
        currentMethod notNil ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10496
            (codeView acceptAction isNil
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10497
            and:[actualClass notNil 
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10498
            and:[currentMethodCategory notNil]]) ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10499
                self setAcceptAndExplainActionsForMethod.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10500
            ].
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10501
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10502
            code := currentMethod source.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10503
            sourceLineNumber := currentMethod sourceLineNumber.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10504
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10505
            code isNil ifTrue:[
2422
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10506
                (sourceLineNumber isNil
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10507
                or:[currentMethod sourcePosition isNil
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10508
                or:[currentMethod getSource isNil]]) ifTrue:[
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10509
                    code := '"
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10510
Sorry, but the methods sourceCode is not available.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10511
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10512
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
 10513
"'.
2422
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10514
                ] ifFalse:[
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10515
                    code := '"
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10516
Sorry, but the methods sourceCode is not available.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10517
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10518
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
 10519
your systemPath which contains a collection of pathNames.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10520
The system searches those directories for a subdirectory named ''source'', 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10521
which itself should contain the classes source file.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10522
Also, check if that directory and/or sourceFile grants read access.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10523
The sourcePath can be accessed via 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10524
    Smalltalk systemPath 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10525
and
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10526
    Smalltalk systemPath:aCollectionOfPathStrings
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10527
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10528
To fix this (in the running system), evaluate:
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10529
    Smalltalk systemPath addFirst:''<<pathOfDirContainingSourceDir>>.''
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10530
    Smalltalk flushPathCaches.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10531
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10532
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
 10533
file - so you will not get this error again and again. 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10534
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10535
Also, check if you have the sourceCodeManagement (CVS) enabled,
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10536
and (if so) configured correctly.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10537
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10538
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
 10539
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
 10540
in the ''source'' directory.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10541
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10542
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10543
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
 10544
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
 10545
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
 10546
"'.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10547
                ].
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10548
                codeView acceptAction:nil.
2525
2573dc6b6028 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2513
diff changeset
 10549
            ] ifFalse:[       
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10550
                UserPreferences current syntaxColoring ifTrue:[
2525
2573dc6b6028 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2513
diff changeset
 10551
                    highlighter := (actualClass ? Smalltalk) syntaxHighlighterClass.
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10552
                    highlighter notNil ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10553
                        code size < 5000 ifTrue:[       
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10554
                            code := highlighter formatMethod:code in:actualClass.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10555
                            codeView modifiedChannel onChangeSend:#codeChanged to:self.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10556
                        ] ifFalse:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10557
                            doStartSyntax := true.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10558
                        ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10559
                    ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10560
                ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10561
            ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10562
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10563
    ].
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10564
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10565
    "/ 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
 10566
    "/ done soon ...
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10567
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10568
    code size > 0 ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10569
        codeView setList:(code asStringCollection) expandTabs:true redraw:false.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10570
        codeView cursorHome.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10571
        codeView unselectWithoutRedraw.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10572
        codeView invalidate.
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10573
    ] ifFalse:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10574
        codeView contents:code.
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10575
    ].
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10576
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10577
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 10578
    codeModified := false.
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 10579
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10580
    doStartSyntax == true ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10581
        self startSyntaxHighlightProcess.
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10582
    ].
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 10583
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10584
    sourceLineNumber notNil ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10585
        sourceLineNumber ~~ 1 ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10586
            codeView gotoLine:sourceLineNumber.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10587
            sourceLineNumber > 10 ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10588
                sourceLineNumber := sourceLineNumber - 10
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10589
            ].
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10590
            codeView scrollToLine:sourceLineNumber.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 10591
        ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10592
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10593
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10594
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 10595
    "Created: / 23.11.1995 / 14:16:43 / cg"
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 10596
    "Modified: / 17.6.1998 / 12:44:24 / cg"
2422
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 10597
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10598
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10599
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10600
!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
 10601
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10602
nameSpaceCheckInEach
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10603
    |classes|
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10604
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10605
    (self checkSelectionChangeAllowedWithCompare:false) ifFalse:[^ self].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10606
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10607
    classes := currentNamespace allClasses.
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10608
    classes isEmpty ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10609
        self warn:(resources 
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10610
                        string:'No classes in nameSpace ''%''.'
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10611
                        with:currentNamespace name).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10612
        ^ self
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10613
    ].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10614
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10615
    self withBusyCursorDo:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10616
        |logMessage|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10617
2529
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 10618
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 10619
        logMessage := SourceCodeManagerUtilities 
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 10620
                        getLogMessageFor:(resources 
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 10621
                                            string:'(any in nameSpace %1)'
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 10622
                                            with:currentNamespace name).
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10623
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10624
        logMessage notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10625
            "/ ignore private classes
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10626
            classes := classes select:[:aClass | aClass owningClass isNil].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10627
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10628
            classes do:[:aClass |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10629
                self busyLabel:'checking in %1' with:aClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10630
                "/ ca does not want boxes to pop up all over ...
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10631
                InformationSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10632
                    Transcript showCR:ex errorString
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10633
                ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10634
                    self classCheckin:aClass withLog:logMessage
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10635
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10636
                self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10637
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10638
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 10639
        self normalLabel.
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10640
    ]
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10641
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10642
    "Created: 23.11.1995 / 11:41:38 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10643
    "Modified: 15.6.1996 / 00:25:58 / stefan"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10644
    "Modified: 18.8.1997 / 15:42:21 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10645
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10646
!
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10647
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10648
nameSpaceMenu
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10649
    <resource: #programMenu >
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10650
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 10651
    |items|
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 10652
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 10653
    items := #( 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10654
		('new namespace' nameSpaceNewNameSpace)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10655
	      ).
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10656
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10657
"/    showAllNamespaces ifTrue:[
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 10658
"/        items := items , #( ('-') ('show topLevel namespaces only' showTopLevelNamespaces)).
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10659
"/    ] ifFalse:[
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 10660
"/        items := items , #( ('-') ('show all namespaces' showAllNamespaces)).
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10661
"/    ].
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10662
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10663
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10664
    (currentNamespace notNil
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10665
    and:[currentNamespace ~~ Smalltalk
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10666
    and:[currentNamespace ~= '* all *']]) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10667
	"/ is it all empty ?
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10668
	currentNamespace allClasses isEmpty ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10669
	    items := items , #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10670
				('-') 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10671
				('remove' nameSpaceRemove)).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10672
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10673
	    items := items , #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10674
				('-') 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10675
				('remove all classes...' nameSpaceRemoveAllClasses)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10676
				('-') 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10677
				('checkin each...'       nameSpaceCheckInEach)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10678
			      ).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10679
	]
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10680
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10681
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 10682
    ^ PopUpMenu itemList:items resources:resources performer:self
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10683
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10684
    "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
 10685
    "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
 10686
!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10687
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10688
nameSpaceNewNameSpace
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10689
    "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
 10690
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10691
    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
 10692
    aspect := nil.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10693
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10694
    "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
 10695
    "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
 10696
!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10697
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10698
nameSpaceRemove
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10699
    "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
 10700
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10701
    (currentNamespace ~~ Smalltalk
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10702
    and:[currentNamespace allClasses isEmpty]) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10703
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10704
	    Smalltalk removeClass:currentNamespace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10705
	    allNamespaces := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10706
	    self setListOfNamespaces.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10707
	    self changeNameSpaceTo:'* all *'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10708
	    namespaceList contents:'* all *'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10709
	]
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10710
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10711
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10712
    "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
 10713
!
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10714
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10715
nameSpaceRemoveAllClasses
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10716
    "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
 10717
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10718
    |classes|
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10719
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10720
    classes := currentNamespace allClasses.
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10721
    classes isEmpty ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10722
	self warn:(resources 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10723
			string:'No classes in nameSpace ''%''.'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10724
			with:currentNamespace name).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10725
	^ self
1993
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10726
    ].
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10727
    (self confirm:(resources 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10728
		    string:'Really remove all %1 classes in nameSpace ''%2'' ?' 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10729
		    with:classes size printString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10730
		    with:currentNamespace name)) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10731
	^ self
1993
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10732
    ].
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10733
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10734
    self withBusyCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10735
	classes copy do:[:cls |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10736
	    Smalltalk removeClass:cls.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10737
	]
1993
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10738
    ]
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10739
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 10740
    "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
 10741
! !
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 10742
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10743
!BrowserView methodsFor:'namespace stuff'!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10744
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10745
changeNameSpaceTo:nsName
2022
ccb6e99e1569 code density
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
 10746
    |n selectedClass str selectedCategory l newCat|
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10747
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10748
    nsName = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10749
	currentNamespace := nsName.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10750
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10751
	n := Smalltalk at:nsName asSymbol.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10752
	n isNamespace ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10753
	    currentNamespace := n.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10754
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10755
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10756
	]
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10757
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10758
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10759
    selectedClass := actualClass.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10760
    currentClass := actualClass := nil.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10761
    selectedCategory := currentClassCategory.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10762
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10763
    self updateClassCategoryListWithScroll:true.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10764
    selectedCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10765
	self classCategorySelectionChanged.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10766
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10767
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10768
    selectedClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10769
	str := self displayedClassNameOf:selectedClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10770
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10771
	self switchToClassNamed:str.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10772
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10773
	((l := classListView list) isNil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10774
	or:[(l includes:str) not]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10775
	     currentClassCategory := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10776
	     currentClass := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10777
	     aspect := nil.   
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10778
	     self updateMethodCategoryList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10779
	     self updateMethodList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10780
	     self updateCodeView.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10781
	].
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
	(classCategoryListView notNil and:[currentClass notNil]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10784
	    newCat := currentClass category.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10785
	    (currentClassCategory = newCat) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10786
		currentClassCategory := newCat.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10787
		classCategoryListView setSelectElement:newCat
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10788
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10789
	].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10790
    ]
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10791
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10792
    "Created: 3.1.1997 / 11:11:13 / cg"
1015
b3727346969f nicer version validation
Claus Gittinger <cg@exept.de>
parents: 1000
diff changeset
 10793
    "Modified: 29.1.1997 / 18:33:42 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10794
!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10795
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10796
displayedClassNameOf:aClass
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10797
    "depending on the current nameSpace, either show a classes
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10798
     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
 10799
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10800
    |owner nm ns|
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10801
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
 10802
    aClass isJavaClass ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10803
	^ aClass fullName "/ asString replaceAll:$/ with:$.
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
 10804
    ].
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
 10805
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
 10806
    "/ in which nameSpace is that class (or its owner) ?
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
 10807
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10808
    owner := aClass topOwningClass.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10809
    owner notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10810
	ns := owner nameSpace.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10811
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10812
	ns := aClass nameSpace.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10813
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10814
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10815
    "/ this 'cannot' happen (should always be Smalltalk)
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10816
    ns isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10817
	^ aClass name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10818
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10819
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10820
    currentNamespace = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10821
	(ns == Smalltalk) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10822
	    nm := aClass nameWithoutNameSpacePrefix.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10823
	    ^ nm
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10824
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10825
	nm := aClass nameWithoutNameSpacePrefix.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10826
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10827
"/        ^ aClass name        "/ full name
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10828
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10829
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10830
    nm := aClass nameWithoutNameSpacePrefix.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10831
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10832
    "/ is it in one of the selected namespaces ?
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10833
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10834
    (self findClassNamedInNameSpace:nm) isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10835
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10836
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10837
    currentNamespace = ns ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10838
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10839
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10840
    ^ nm.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10841
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10842
    "Created: 20.12.1996 / 17:46:41 / cg"
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
 10843
    "Modified: 31.7.1997 / 22:57:16 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10844
!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10845
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10846
listOfAllNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10847
    "return a list of all namespaces"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10848
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10849
    allNamespaces isNil ifTrue:[
2303
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 10850
        allNamespaces := Namespace allNamespaces.
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 10851
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 10852
        showAllNamespaces ifFalse:[
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 10853
            "/ only topLevel namespaces are shown
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 10854
            "/ i.e. ignore subspaces 
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 10855
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 10856
            allNamespaces := allNamespaces select:[:ns | ns isTopLevelNamespace].
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 10857
        ]
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10858
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10859
    ^ allNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10860
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10861
    "Modified: 31.7.1997 / 22:32:30 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10862
!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10863
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10864
listOfNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10865
    "return a list of considered namespaces"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10866
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10867
    currentNamespace isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10868
	^ Array with:Smalltalk
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10869
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10870
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10871
    currentNamespace = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10872
	^ self listOfAllNamespaces
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10873
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10874
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10875
    ^ Array with:currentNamespace
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10876
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10877
    "Created: 26.10.1996 / 11:25:39 / cg"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10878
    "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
 10879
!
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10880
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10881
setListOfNamespaces
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10882
    |l hasSmalltalk|
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10883
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10884
    namespaceList isNil ifTrue:[ ^ self ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10885
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10886
    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
 10887
    l := l asOrderedCollection.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10888
    hasSmalltalk := true.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10889
    l remove:'Smalltalk' ifAbsent:[hasSmalltalk := false].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10890
    l sort.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10891
    l addFirst:'-'.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10892
    hasSmalltalk ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10893
	l addFirst:'Smalltalk'
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10894
    ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10895
    l addFirst:'* all *'.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10896
    namespaceList list:l
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10897
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10898
    "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
 10899
!
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10900
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10901
showAllNamespaces
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10902
    "toggle to show all namespaces"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10903
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10904
    showAllNamespaces := true.
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10905
    self updateNamespaceList
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10906
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10907
    "Modified: 31.7.1997 / 22:33:16 / cg"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10908
!
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10909
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10910
showTopLevelNamespaces
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10911
    "toggle to show topLevel namespaces only"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10912
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10913
    showAllNamespaces := false.
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10914
    self updateNamespaceList
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10915
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10916
    "Created: 31.7.1997 / 22:33:29 / cg"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10917
!
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 10918
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10919
updateNamespaceList
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10920
    allNamespaces := nil.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10921
    namespaceList notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10922
	self setListOfNamespaces
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10923
    ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10924
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 10925
    "Created: 8.1.1997 / 10:54:03 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10926
! !
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 10927
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10928
!BrowserView methodsFor:'private'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10929
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10930
askAndBrowseMethodCategory:title action:aBlock
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 10931
    "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
 10932
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10933
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10934
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 10935
    box := self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10936
		enterBoxTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10937
		okText:'browse'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10938
		label:'browse category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 10939
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10940
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10941
    sel isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10942
	currentMethodCategory notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10943
	    sel := currentMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10944
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10945
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10946
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10947
	box initialText:(sel asString withoutSpaces)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10948
    ].
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10949
    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
 10950
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 10951
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 10952
    "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
 10953
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10954
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10955
askForMethodCategory
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 10956
    "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
 10957
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 10958
    |someCategories box txt retVal|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10959
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10960
    someCategories := actualClass categories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10961
    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
 10962
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10963
    lastMethodCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10964
	txt := '* as yet undefined *' "/ 'new methods'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10965
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10966
	txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10967
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10968
    box initialText:txt.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 10969
    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
 10970
    box showAtPointer.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 10971
    ^ retVal
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 10972
1727
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
 10973
    "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
 10974
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10975
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 10976
askForSearchSelectorTitle:title openWith:aSelector
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 10977
    "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
 10978
     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
 10979
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 10980
    ^ self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10981
	askForSearchTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10982
	openWith:aSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10983
	isSelector:true
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 10984
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 10985
    "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
 10986
!
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 10987
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 10988
askForSearchTitle:title openWith:aSelector isSelector:isSelector
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 10989
    "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
 10990
     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
 10991
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 10992
    ^ self
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10993
	askForSearchTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10994
	openWith:aSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10995
	isSelector:isSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10996
	searchArea:#everywhere
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 10997
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 10998
    "Modified: / 18.6.1998 / 16:40:35 / cg"
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 10999
!
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11000
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11001
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
 11002
    "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
 11003
     method for browsing based on a selector. Set action and launch box.
1155
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11004
     SearchArea may be one of #everywhere, #classCategory, #class, #classWithPrivateClasses,
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11005
     #classHierarchy or #classHierarchyWithPrivateClasses"
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11006
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11007
    ^ self
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11008
	askForSearchTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11009
	openWith:aSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11010
	isSelector:isSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11011
	searchArea:whereDefault 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11012
	withCaseIgnore:false
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11013
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11014
    "Modified: / 18.6.1998 / 16:40:26 / cg"
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11015
!
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11016
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11017
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
 11018
    "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
 11019
     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
 11020
     SearchArea may be one of 
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11021
        #everywhere, 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11022
        #currentNameSpace
2399
8da9ee60bef2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
 11023
        #currentClassesNameSpace
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11024
        #classCategory, 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11025
        #class, 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11026
        #classWithPrivateClasses,
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11027
        #classHierarchy or 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11028
        #classHierarchyWithPrivateClasses"
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 11029
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 11030
    |box panel selectorHolder where whereChannel caseHolder
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11031
     b sel classes areas toSearch cls privates inputField ns|
1155
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11032
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 11033
    areas := OrderedCollection new.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11034
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11035
    isSelector ifTrue:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11036
        sel := self selectorToSearchFor.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11037
    ] ifFalse:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11038
        sel := self stringToSearchFor.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11039
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11040
    selectorHolder := sel asValue.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11041
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11042
    box := Dialog new.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
 11043
    (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
 11044
1805
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
 11045
    inputField := box addComboBoxOn:selectorHolder tabable:true.
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
 11046
    inputField list:LastSearchPatterns.
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
 11047
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11048
    inputField selectAll.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11049
    inputField entryCompletionBlock:[:contents |
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11050
        |s what m|
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11051
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11052
        s := contents withoutSpaces.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11053
        box topView withWaitCursorDo:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11054
            what := Smalltalk selectorCompletion:s.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11055
            inputField contents:what first.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11056
            (what at:2) size ~~ 1 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11057
                self beep
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11058
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11059
        ]
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11060
    ].
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11061
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11062
    withCaseIgnore ifTrue:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11063
        box addCheckBox:(resources string:'ignore case') on:(caseHolder := false asValue).
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11064
    ].
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11065
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11066
    (currentClassCategory notNil 
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11067
    or:[currentClass notNil]) ifTrue:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11068
        box addHorizontalLine.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11069
        box addVerticalSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11070
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11071
        (box addTextLabel:(resources string:'search in:')) adjust:#left.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11072
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11073
        panel := VerticalPanelView new.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11074
        panel horizontalLayout:#fitSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11075
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11076
        whereChannel := RadioButtonGroup new.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11077
        b := CheckBox label:(resources string:'everywhere').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11078
        panel add:b. whereChannel add:b value:#everywhere.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11079
        areas add:#everywhere.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11080
        box makeTabable:b.
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11081
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11082
"/        classMethodListView notNil ifTrue:[
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11083
"/            b := CheckBox label:(resources string:'shown methods').
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11084
"/            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
 11085
"/            areas add:#currentMethodList.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11086
"/            box makeTabable:b.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11087
"/        ].
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11088
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11089
        currentNamespace ~= '* all *' ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11090
            b := CheckBox label:(resources string:'current nameSpace').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11091
            panel add:b. whereChannel add:b value:#currentNameSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11092
            areas add:#currentNameSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11093
            box makeTabable:b.
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11094
        ] ifFalse:[
2402
1b1143acfaca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
 11095
            (currentClass notNil 
1b1143acfaca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
 11096
            and:[(ns := currentClass nameSpace) notNil 
1b1143acfaca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
 11097
            and:[ns ~~ Smalltalk]]) ifTrue:[
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11098
                b := CheckBox label:(resources string:'classes nameSpace (''%1'')' with:ns name).
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11099
                panel add:b. whereChannel add:b value:#currentClassesNameSpace.
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11100
                areas add:#currentClassesNameSpace.
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11101
                box makeTabable:b.
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11102
            ]
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11103
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11104
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11105
        currentClassCategory notNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11106
            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
 11107
            panel add:b. whereChannel add:b value:#classCategory.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11108
            areas add:#classCategory.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11109
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11110
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11111
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11112
        currentClass notNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11113
            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
 11114
            panel add:b. whereChannel add:b value:#class.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11115
            areas add:#class.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11116
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11117
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11118
            b := CheckBox label:(resources string:'class & superclasses').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11119
            panel add:b. whereChannel add:b value:#classAndSuperclasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11120
            areas add:#classAndSuperclasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11121
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11122
            currentClass superclass isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11123
                b disable
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11124
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11125
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11126
            b := CheckBox label:(resources string:'class & subclasses').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11127
            panel add:b. whereChannel add:b value:#classHierarchy.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11128
            areas add:#classHierarchy.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11129
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11130
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11131
            currentClass subclasses size == 0 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11132
                b disable.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11133
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11134
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11135
            b := CheckBox label:(resources string:'class & private classes').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11136
            panel add:b. whereChannel add:b value:#classWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11137
            areas add:#classWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11138
            box makeTabable:b.
1811
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 11139
        
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11140
            fullProtocol ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11141
                cls := actualClass.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11142
                cls isMeta ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11143
                    cls := cls soleInstance
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11144
                ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11145
            ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11146
                cls := currentClass
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11147
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11148
            cls privateClasses size == 0 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11149
                b disable
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11150
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11151
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11152
            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
 11153
            panel add:b. whereChannel add:b value:#classHierarchyWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11154
            areas add:#classHierarchyWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11155
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11156
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11157
            currentClass subclasses size == 0 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11158
                b disable.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11159
            ] ifFalse:[
1236
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11160
"/ this takes too long ...
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11161
"/                toSearch := IdentitySet new.
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11162
"/                currentClass withAllSubclasses do:[:cls | toSearch add:cls privateClasses].
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11163
"/                toSearch size == 0 ifTrue:[
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11164
"/                    b disable
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 11165
"/                ]
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11166
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11167
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11168
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11169
        whereDefault notNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11170
            (areas includes:whereDefault) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11171
                where := whereDefault asSymbol
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11172
            ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11173
                where := areas first.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11174
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11175
        ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11176
            where := #everywhere.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11177
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11178
        whereChannel value:where.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11179
        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
 11180
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11181
        box addVerticalSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11182
        box addHorizontalLine.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11183
    ] ifFalse:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11184
        whereChannel := #everywhere asValue.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11185
    ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11186
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11187
    box addAbortButton.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
 11188
    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
 11189
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11190
    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
 11191
    box open.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11192
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11193
    box accepted ifTrue:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11194
        sel := selectorHolder value.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11195
        where := whereChannel value.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11196
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11197
        sel isEmpty ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11198
            self warn:'nothing entered for search'.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11199
            ^ self.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11200
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11201
        where isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11202
            self warn:'no class(es) for search'.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11203
            ^ self.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11204
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11205
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11206
        LastSearchPatterns isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11207
            LastSearchPatterns := OrderedCollection new.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11208
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11209
        (LastSearchPatterns includes:sel) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11210
            LastSearchPatterns remove:sel.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11211
        ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11212
            LastSearchPatterns size > 15 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11213
                LastSearchPatterns removeFirst
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11214
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11215
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11216
        LastSearchPatterns addFirst:sel.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11217
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11218
        where == #everywhere ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11219
            classes := Smalltalk allClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11220
        ] ifFalse:[ where == #currentNameSpace ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11221
            classes := currentNamespace allClassesWithAllPrivateClasses
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11222
        ] ifFalse:[ where == #currentClassesNameSpace ifTrue:[
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11223
            classes := currentClass nameSpace allClassesWithAllPrivateClasses
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11224
        ] ifFalse:[ where == #classCategory ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11225
            classes := Smalltalk allClassesInCategory:currentClassCategory
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11226
        ] ifFalse:[(where == #class or:[where == #classWithPrivateClasses]) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11227
            currentClass isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11228
                classes := #()
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11229
            ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11230
                classes := Array with:currentClass
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11231
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11232
        ] ifFalse:[ (where == #classHierarchy or:[where == #classHierarchyWithPrivateClasses]) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11233
            classes := currentClass withAllSubclasses
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11234
        ] ifFalse:[ (where == #classAndSuperclasses) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11235
            classes := currentClass withAllSuperclasses
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11236
        ]]]]]]].
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11237
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11238
        (where == #classWithPrivateClasses 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11239
        or:[where == #classHierarchyWithPrivateClasses]) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11240
            toSearch := IdentitySet withAll:classes.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11241
            classes := IdentitySet withAll:toSearch.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11242
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11243
            [toSearch notEmpty] whileTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11244
                cls := toSearch removeFirst.
2273
a28341a7fbfc quicker search for allPrivateClasses
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
 11245
                classes addAll:cls allPrivateClasses.
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11246
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11247
            classes := classes asOrderedCollection.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11248
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11249
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11250
        classes isEmpty ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11251
            self warn:'no class(es) given for search'.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11252
        ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11253
            self withSearchCursorDo:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11254
                withCaseIgnore ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11255
                    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
 11256
                ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11257
                    SystemBrowser perform:aSelector with:sel with:classes
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11258
                ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11259
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11260
        ]
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11261
    ]
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11262
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11263
    "Created: / 18.6.1998 / 16:39:44 / cg"
1805
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
 11264
    "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
 11265
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11266
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11267
busyLabel:what with:someArgument
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11268
    "set the title for some warning"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11269
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 11270
    self topView
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11271
	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
 11272
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 11273
    "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
 11274
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11275
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11276
checkSelectionChangeAllowed
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11277
    "return true, if selection change is ok;
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11278
     its not ok, if code has been changed.
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11279
     in this case, return the result of a user query"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11280
1811
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 11281
    |what m cls src1 src2 list1 list2 v|
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11282
447
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
 11283
    codeView modified ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11284
	codeModified == true ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11285
	    ^ true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11286
	]
447
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
 11287
    ].
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
 11288
1811
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 11289
    cls := acceptClass ? actualClass.
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 11290
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 11291
    (currentMethod notNil and:[cls notNil]) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11292
	self withBusyCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11293
	    m := cls compiledMethodAt:currentSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11294
	    m notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11295
		src1 := m source.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11296
		src1 notNil ifTrue:[src1 := src1 string].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11297
		src2 := codeView contents.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11298
		src2 notNil ifTrue:[src2 := src2 string].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11299
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11300
		(src1 ~= src2) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11301
		    src1 size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11302
			list1 := #()
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11303
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11304
			list1 := src1 asCollectionOfLines 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11305
					collect:[:line | 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11306
						    line isNil ifTrue:['']
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11307
						    ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11308
							line 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11309
							    withoutTrailingSeparators
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11310
								withTabsExpanded
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11311
						    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11312
						].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11313
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11314
		    list2 := src2 asCollectionOfLines collect:[:line | line isNil ifTrue:['']
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11315
							       ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11316
								    line 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11317
									withoutTrailingSeparators
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11318
									    withTabsExpanded
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11319
							       ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11320
						      ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11321
		    HistoryManager notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11322
			list1 := HistoryManager withoutHistoryLines:list1 asStringCollection asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11323
			list2 := HistoryManager withoutHistoryLines:list2 asStringCollection asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11324
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11325
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11326
		    list1 = list2 ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11327
			what := self checkSelectionChangeAllowedWithCompare:true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11328
			what == #compare ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11329
			    v := DiffTextView 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11330
				    openOn:src2 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11331
				    label:(resources string:'code here (to be accepted ?)')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11332
				    and:src1
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11333
				    label:(resources string:'methods actual code').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11334
			    v label:(resources string:'comparing method versions').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11335
			    ^ false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11336
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11337
			^ what
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11338
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11339
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11340
		^ true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11341
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11342
	]
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11343
    ].
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11344
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11345
    ^ self checkSelectionChangeAllowedWithCompare:false
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11346
1426
aa8bda9a1964 oops - handle the case that no source is available when checking
Claus Gittinger <cg@exept.de>
parents: 1419
diff changeset
 11347
    "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
 11348
    "Modified: / 7.4.1998 / 09:49:52 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11349
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 11350
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11351
checkSelectionChangeAllowedWithCompare:compareOffered
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11352
    "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
 11353
     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
 11354
     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
 11355
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11356
    |action labels values|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11357
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11358
    codeView modified ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11359
	codeModified ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11360
	    ^ true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11361
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11362
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11363
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11364
    compareOffered ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11365
	labels := #('cancel' 'compare' 'accept' 'continue').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11366
	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
 11367
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11368
	labels := #('cancel' 'accept' 'continue').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11369
	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
 11370
    ].
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11371
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11372
    action := OptionBox 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11373
		  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
 11374
		  label:(resources string:'Attention')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11375
		  form:(WarningBox iconBitmap)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11376
		  buttonLabels:(resources array:labels)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11377
		  values:values
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11378
		  default:true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11379
    action ~~ #accept ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11380
	^ action
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11381
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11382
    codeView accept. 
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11383
    ^ true
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11384
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 11385
    "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
 11386
    "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
 11387
!
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 11388
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11389
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
 11390
    "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
 11391
     passing class and nesting level to the block."
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11392
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11393
    |names subclasses|
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11394
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11395
    remainSet remove:aClass ifAbsent:[].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11396
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11397
    aBlock value:aClass value:level.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11398
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11399
    subclasses := subclassDictionary at:aClass ifAbsent:[nil].
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11400
    (subclasses size == 0) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11401
	names := subclasses collect:[:class | class name].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11402
	names sortWith:subclasses.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11403
	subclasses do:[:aSubClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11404
	    self classHierarchyOf:aSubClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11405
			    level:(level + 1) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11406
			       do:aBlock 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11407
			    using:subclassDictionary
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11408
		       removeFrom:remainSet
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11409
	]
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11410
    ]
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11411
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11412
    "Created: 20.12.1996 / 17:05:06 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11413
    "Modified: 5.1.1997 / 18:45:41 / cg"
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11414
!
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11415
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11416
classHierarchyOf:topClass withAutoloaded:withAutoloaded do:aBlock
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11417
    "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
 11418
     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
 11419
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11420
    |classes s subclassDict l remaining allNameSpaces nameSpaceList|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11421
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11422
    classes := IdentitySet new.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11423
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11424
    "/ first, collect the list of classes to consider
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11425
    "/ thats all classes which are in the selected NameSpaces,
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11426
    "/ or private ones, owned by a class which is
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11427
    "/ also all of its superclasses are added.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11428
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11429
    allNameSpaces := (currentNamespace = '* all *').
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11430
    nameSpaceList := self listOfNamespaces.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11431
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11432
    Smalltalk allBehaviorsDo:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11433
	|actualNamespace match owner|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11434
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11435
	aClass isMeta ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11436
	    (aClass isNamespace not
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11437
	    or:[aClass == Smalltalk]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11438
		match := allNameSpaces.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11439
		match ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11440
		    (owner := aClass topOwningClass) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11441
			actualNamespace := owner nameSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11442
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11443
			actualNamespace := aClass nameSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11444
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11445
		    match := nameSpaceList includesIdentical:actualNamespace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11446
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11447
		match ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11448
		    classes addAll:(aClass withAllSuperclasses).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11449
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11450
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11451
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11452
    ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11453
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11454
    "/ now, generate a dictionary, which associates a set of subclasses
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11455
    "/ to each ...
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11456
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11457
    subclassDict := IdentityDictionary new:classes size.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11458
    classes do:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11459
	s := aClass superclass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11460
	s notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11461
	    l := subclassDict at:s ifAbsent:[nil].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11462
	    l isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11463
		l := OrderedCollection new:5.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11464
		subclassDict at:s put:l
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11465
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11466
	    l add:aClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11467
	]
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
 11468
    ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11469
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11470
    "/
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11471
    "/ walk this ..
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11472
    "/
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11473
    remaining := classes.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11474
    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
 11475
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11476
    "/
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11477
    "/ if autoloaded classes are wanted ...
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11478
    "/
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11479
    withAutoloaded ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11480
	(remaining includes:Autoload) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11481
	    self classHierarchyOf:Autoload level:0 do:aBlock using:subclassDict removeFrom:remaining.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11482
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11483
	(remaining asSortedCollection:[:a :b | a name < b name]) do:[:aNilSubclass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11484
	    aBlock value:aNilSubclass value:0
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11485
	]
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 11486
    ].
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
 11487
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
 11488
    "Created: 28.5.1996 / 13:46:23 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11489
    "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
 11490
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11491
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11492
classesInFullProtocolHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11493
    "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
 11494
     the hierarchy"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11495
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11496
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11497
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11498
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11499
    aClass withAllSuperclasses do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11500
	(classListView isInSelection:index) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11501
	    aBlock value:c
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11502
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11503
	index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11504
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11505
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11506
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11507
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11508
classesInHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11509
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11510
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11511
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11512
    aClass withAllSuperclasses do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11513
	(classListView isInSelection:index) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11514
	    aBlock value:c
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11515
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11516
	index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11517
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11518
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11519
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11520
2026
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11521
clearExplainAction
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11522
    "tell the codeView that there is nothing to explain"
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11523
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11524
    codeView explainAction:nil.
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11525
    codeView pointerOverWordAction:nil
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11526
!
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 11527
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11528
compileCode:someCode
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11529
    (ReadStream on:someCode) fileIn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11530
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11531
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11532
enterBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11533
    "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
 11534
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11535
    ^ self enterBoxForCodeSelectionTitle:title withList:nil okText:okText
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11536
!
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11537
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11538
enterBoxForCodeSelectionTitle:title withList:listOrNil okText:okText
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11539
    "convenient method: setup enterBox with text from codeview"
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11540
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
 11541
    |sel box initialText superclass|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11542
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11543
    box := self 
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11544
                enterBoxTitle:(resources string:title) 
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11545
                withList:listOrNil
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11546
                okText:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11547
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11548
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11549
    sel notNil ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11550
        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
 11551
    ] ifFalse:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11552
        (currentClass notNil 
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11553
        and:[(superclass := currentClass superclass) notNil]) ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11554
            initialText := superclass name
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11555
        ]
2012
b4c2dc90f899 present superclass in find-class dialog, if nothing is selected.
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
 11556
    ].
b4c2dc90f899 present superclass in find-class dialog, if nothing is selected.
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
 11557
    initialText notNil ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11558
        box initialText:initialText
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11559
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11560
    ^ box
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11561
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
 11562
    "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
 11563
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11564
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11565
enterBoxForSearchSelectorTitle:title
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11566
    "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
 11567
     method for browsing based on a selector"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11568
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11569
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11570
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11571
    box := self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11572
		enterBoxTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11573
		okText:'search'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11574
		label:'search selector'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11575
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11576
    box initialText:(self selectorToSearchFor).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11577
    ^ box
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11578
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11579
    "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
 11580
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11581
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11582
enterBoxTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11583
    "convenient method: setup enterBox"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11584
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11585
    ^ 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
 11586
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11587
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11588
enterBoxTitle:title okText:okText label:label
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11589
    "convenient method: setup enterBox"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11590
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11591
    |box|
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11592
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11593
    box := EnterBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11594
    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11595
    box title:(resources string:title) 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11596
	okText:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11597
    ^ box
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11598
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11599
    "Created: 15.1.1997 / 23:01:04 / cg"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11600
    "Modified: 16.1.1997 / 00:26:31 / cg"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11601
!
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11602
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11603
enterBoxTitle:title okText:okText label:label list:aList
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11604
    "convenient method: setup enterBox"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11605
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11606
    |box fieldHolder|
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11607
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11608
    fieldHolder := ValueHolder new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11609
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11610
    box := DialogBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11611
    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11612
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11613
    (box addTextLabel:(resources string:title)) adjust:#left.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11614
    box addVerticalSpace.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11615
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11616
    aList isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11617
	box addInputFieldOn:fieldHolder.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11618
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11619
	(box addComboBoxOn:fieldHolder) list:aList
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11620
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11621
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11622
    box addVerticalSpace:15.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11623
    box addAbortButton;
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11624
	addOkButtonLabelled:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11625
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
 11626
    box aspectAt:#fieldValue put:fieldHolder.
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
 11627
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11628
"/    box showAtPointer.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11629
"/
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11630
"/    box := EnterBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11631
"/    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11632
"/    box title:(resources string:title) 
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11633
"/        okText:(resources string:okText).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11634
    ^ box
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11635
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11636
    "Created: 15.1.1997 / 23:01:04 / cg"
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
 11637
    "Modified: 16.1.1997 / 20:13:28 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11638
!
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11639
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11640
enterBoxTitle:title withList:aListOrNil okText:okText
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11641
    "convenient method: setup enterBox"
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11642
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11643
    |box|
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11644
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11645
    aListOrNil notNil ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11646
        box := EnterBoxWithList new.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11647
        box list:aListOrNil.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11648
    ] ifFalse:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11649
        box := EnterBox new.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11650
    ].
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11651
    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
 11652
    ^ box
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11653
!
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 11654
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11655
extractClassAndSelectorFromSelectionInto:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11656
    "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
 11657
     '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
 11658
    the result."
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
    |sel clsName isMeta sep s|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11661
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11662
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11663
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11664
	sel := sel asString withoutSeparators.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11665
	('*>>*' match:sel) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11666
	    sep := $>
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11667
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11668
	    ('* *' match:sel) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11669
		sep := Character space
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11670
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11671
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11672
	sep notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11673
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11674
	     extract class/sel from selection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11675
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11676
	    s := ReadStream on:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11677
	    clsName := s upTo:sep.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11678
	    [s peek == sep] whileTrue:[s next].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11679
	    sel := s upToEnd.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11680
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11681
	    (clsName endsWith:' class') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11682
		isMeta := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11683
		clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11684
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11685
		isMeta := false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11686
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11687
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11688
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11689
    aBlock value:clsName value:sel value:isMeta
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11690
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
 11691
    "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
 11692
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11693
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11694
findClassNamed:aClassName
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11695
    "search through namespaces for aClassName."
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11696
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 11697
    |nm nameSym cls meta|
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 11698
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 11699
    meta := false.
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 11700
    nm := aClassName.
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 11701
    (nm endsWith:' class') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11702
	meta := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11703
	nm := nm copyWithoutLast:6.
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 11704
    ].
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 11705
    nameSym := nm asSymbol.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11706
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
 11707
    currentNamespace = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11708
	(cls := Smalltalk at:nameSym) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11709
	    meta ifTrue:[^ cls class].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11710
	    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11711
	]
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
 11712
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11713
    self listOfNamespaces do:[:aNamespace |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11714
	(cls := aNamespace at:nameSym) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11715
	    meta ifTrue:[^ cls class].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11716
	    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11717
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11718
    ].
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
 11719
    currentNamespace ~= '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11720
	(cls := Smalltalk at:nameSym) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11721
	    meta ifTrue:[^ cls class].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11722
	    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11723
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11724
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11725
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 11726
    (nm startsWith:'Smalltalk::') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11727
	cls := Smalltalk classNamed:(nm copyFrom:'Smalltalk::' size + 1).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11728
	cls notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11729
	    meta ifTrue:[^ cls class].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11730
	    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11731
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11732
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11733
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11734
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11735
    "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
 11736
    "Modified: 23.1.1997 / 14:21:00 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11737
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11738
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11739
findClassNamedInNameSpace:aClassName
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
 11740
    "search through current namespaces for aClassName.
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
 11741
     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
 11742
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
 11743
    |cls owner|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11744
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11745
    self listOfNamespaces do:[:aNamespace |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11746
	(cls := aNamespace at:aClassName asSymbol) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11747
	    (owner := cls topOwningClass) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11748
		owner nameSpace == aNamespace ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11749
		    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11750
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11751
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11752
		cls nameSpace == aNamespace ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11753
		    ^ cls
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
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11756
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11757
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11758
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11759
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11760
    "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
 11761
    "Modified: 3.1.1997 / 19:30:53 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11762
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 11763
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11764
findClassOfVariable:aVariableName accessWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11765
    "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
 11766
     is defined; 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11767
     needs either #instVarNames or #classVarNames as aSelector."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11768
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11769
    |cls homeClass list|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11770
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11771
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11772
     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
 11773
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11774
    cls := currentClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11775
    [cls notNil] whileTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11776
	aSelector == #classInstVarNames ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11777
	    list := cls class instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11778
	] ifFalse:[                             
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11779
	    list := cls perform:aSelector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11780
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11781
	(list includes:aVariableName) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11782
	    homeClass := cls.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11783
	    cls := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11784
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11785
	    cls := cls superclass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11786
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11787
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11788
    homeClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11789
	"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
 11790
	 for the declaring class ...
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11791
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11792
	homeClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11793
    ] ifFalse:[
552
c61c0758c10b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 547
diff changeset
 11794
"/        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
 11795
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11796
    ^ homeClass
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11797
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11798
    "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
 11799
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11800
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 11801
hideMethodCategoryList
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 11802
    classCategoryListView isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11803
	classListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11804
	    methodCategoryListView superView extent:0.0 @ 1.0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11805
	    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
 11806
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11807
	^ self.
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 11808
    ].
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 11809
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 11810
    methodCategoryListView superView extent:0.0 @ 1.0.
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 11811
    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
 11812
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 11813
    "Created: 30.7.1997 / 17:50:27 / cg"
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 11814
    "Modified: 30.7.1997 / 18:00:02 / cg"
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 11815
!
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 11816
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11817
listBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11818
    "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
 11819
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11820
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11821
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11822
    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
 11823
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11824
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11825
	box initialText:(sel asString withoutSeparators)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11826
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11827
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11828
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11829
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11830
listBoxTitle:title okText:okText list:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11831
    "convenient method: setup a listBox & return it"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11832
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11833
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11834
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11835
    box := ListSelectionBox 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11836
		title:(resources string:title)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11837
		okText:(resources string:okText)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11838
		action:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11839
    box list:aList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11840
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11841
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11842
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11843
normalLabel
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11844
    "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
 11845
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11846
    |l il|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11847
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11848
    myLabel notNil ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11849
        "if I have been given an explicit label,
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11850
         and its not the default, take that one"
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11851
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11852
        myLabel ~= 'System Browser' ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11853
            l := il := myLabel
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11854
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11855
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11856
    l isNil ifTrue:[    
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11857
        l := resources string:'System Browser'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11858
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11859
        currentClass notNil ifTrue:[
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
 11860
"/            l := l, ': ', currentClass name.
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11861
            l := self displayedClassNameOf:currentClass.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11862
            classListView isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11863
                currentSelector notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11864
                    l := l , ' ' ,  currentSelector
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11865
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11866
            ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11867
                currentClass isLoaded ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11868
                    l := l , ' (unloaded)'
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11869
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11870
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11871
            il := currentClass nameWithoutPrefix
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11872
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11873
            il := l.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11874
        ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11875
    ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11876
    self topView label:l; iconLabel:il.
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 11877
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 11878
    "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
 11879
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11880
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11881
refetchMethod
1803
59fc7e02179e fixed update of implementing class in fullProtocol mode.
Claus Gittinger <cg@exept.de>
parents: 1802
diff changeset
 11882
    |sel cls stillSearching ignoredClasses|
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11883
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11884
    sel := currentSelector.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11885
    self releaseMethod.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11886
    currentSelector := sel.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11887
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11888
	currentMethod := (acceptClass ? actualClass) compiledMethodAt:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11889
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11890
	(currentMethod notNil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11891
	and:[currentMethod isWrapped]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11892
	    currentMethod originalMethod  addDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11893
	    currentMethod addDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11894
	]
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11895
    ]
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11896
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11897
    "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
 11898
    "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
 11899
!
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11900
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
 11901
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
 11902
    |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
 11903
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
 11904
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11905
	cls := currentClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11906
	cls isMeta ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11907
	    meta := cls.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11908
	    cls := meta soleInstance
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11909
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11910
	    meta := cls class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11911
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11912
	cls removeDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11913
	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
 11914
    ].
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
 11915
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
 11916
    "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
 11917
!
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
 11918
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11919
releaseMethod
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11920
    currentMethod notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11921
	currentMethod removeDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11922
	currentMethod isWrapped ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11923
	    currentMethod originalMethod removeDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11924
	]
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11925
    ].
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11926
    currentMethod := currentSelector := nil.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11927
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11928
    "Created: / 27.7.1998 / 10:56:00 / cg"
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11929
    "Modified: / 27.7.1998 / 11:26:52 / cg"
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11930
!
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11931
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11932
selectorToSearchFor
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11933
    "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
 11934
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11935
    |sel t|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11936
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11937
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11938
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11939
	sel := sel asString string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11940
	sel withoutSeparators knownAsSymbol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11941
	    "/ might be already correct ...
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11942
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11943
	    t := Parser selectorInExpression:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11944
	    t notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11945
		sel := t
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11946
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11947
	    sel := sel withoutSpaces.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11948
	    sel == #>> ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11949
		"oops - thats probably not what we want here ..."
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11950
		self extractClassAndSelectorFromSelectionInto:[:c :s :m |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11951
		    sel := s
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11952
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11953
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11954
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11955
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11956
	methodListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11957
	    methodListView selection notNil ifTrue:[
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 11958
sel := selectorList at:(methodListView selection).
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 11959
"/                sel := methodListView selectionValue string
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11960
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11961
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11962
	    classMethodListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11963
		classMethodListView selection notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11964
		    sel := classMethodListView selectionValue string.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11965
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11966
		sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11967
		    sel := self selectorFromClassMethodString:sel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11968
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11969
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11970
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11971
	sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11972
	    sel := sel withoutSpaces upTo:(Character space)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11973
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11974
	    sel := ''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11975
	]
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 11976
    ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 11977
    ^ sel string
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 11978
1778
5c244fb31e02 care for valid selector selected when searching;
Claus Gittinger <cg@exept.de>
parents: 1773
diff changeset
 11979
    "Modified: / 31.7.1998 / 15:26:18 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11980
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11981
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 11982
setAcceptActionForClass
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 11983
    "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
 11984
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 11985
    currentClass isJavaClass ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 11986
        ^ self setAcceptActionForJavaClass.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 11987
    ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 11988
2324
638f31ec298e oops - redefinition of Smalltalk was not possible
Claus Gittinger <cg@exept.de>
parents: 2303
diff changeset
 11989
    (currentClass isNamespace and:[currentClass ~~ Smalltalk]) ifTrue:[
2217
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 11990
        codeView acceptAction:nil
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 11991
    ] ifFalse:[
2217
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 11992
        codeView acceptAction:[:theCode |
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 11993
            |ns|
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 11994
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 11995
            currentClass notNil ifTrue:[
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 11996
                ns := currentClass nameSpace
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 11997
            ] ifFalse:[
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 11998
                ns := nil
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 11999
            ].
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12000
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12001
            codeView withWaitCursorDo:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12002
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12003
                Class nameSpaceQuerySignal handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12004
                    ns isNil ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12005
                        ex reject
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12006
                    ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12007
                    ex proceedWith:ns
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12008
                ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12009
                    Object abortSignal catch:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12010
                        UndefinedObject createMinimumProtocolInNewSubclassQuery
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12011
                        answer:true
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12012
                        do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12013
                            (Class classRedefinitionSignal)handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12014
                                |answer oldVsNew oldPkg newPkg|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12015
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12016
                                oldVsNew := ex parameter.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12017
                                oldPkg := oldVsNew key package.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12018
                                newPkg := oldVsNew value package.
2485
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12019
"/ cg: now always keep the old packageID
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12020
                                answer := OptionBox 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12021
                                              request: 
2485
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12022
('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
 12023
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
 12024
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12025
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
 12026
                                                  bindWith:(oldPkg asText allBold))
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12027
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12028
                                              label:'Class redefinition'
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12029
                                              form:(WarningBox iconBitmap)
2485
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12030
                                              buttonLabels:#('cancel' 'continue')
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12031
                                              values:#(#cancel #keep)
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12032
                                              default:#keep.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12033
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12034
                                (answer ~~ #cancel) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12035
                                    ex proceedWith:answer
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12036
                                ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12037
                            ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12038
                                |rslt|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12039
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12040
                                rslt := Compiler 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12041
                                            evaluate:theCode asString 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12042
                                            notifying:codeView 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12043
                                            compile:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12044
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12045
                                rslt isBehavior ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12046
                                    self classCategoryUpdate.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12047
                                    self updateClassListWithScroll:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12048
                                    codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12049
                                    codeModified := false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12050
                                ].
2217
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12051
                            ]
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12052
                        ]
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12053
                    ].
2217
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12054
                ].
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12055
            ].
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12056
        ].
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12057
    ]
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12058
2485
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12059
    "Modified: / 14.12.1999 / 15:01:43 / cg"
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12060
!
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12061
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12062
setAcceptActionForJavaClass
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12063
    "tell the codeView what to do on accept and explain"
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12064
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12065
    self setAcceptActionForNewJavaClass 
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12066
!
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12067
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12068
setAcceptActionForNewClass
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12069
    "tell the codeView what to do on accept and explain"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12070
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12071
    codeView acceptAction:[:theCode |
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12072
        codeView withWaitCursorDo:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12073
            Object abortSignal catch:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12074
                |cls|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12075
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12076
                Object errorSignal handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12077
                    codeView error:ex errorString
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12078
                             position:1 to:nil from:nil.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12079
                ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12080
                    Class nameSpaceQuerySignal answer:Smalltalk
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12081
                    do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12082
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12083
                        cls := (Compiler evaluate:theCode asString notifying:codeView compile:false).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12084
                        cls isBehavior ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12085
                            codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12086
                            self classCategoryUpdate.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12087
                            self updateClassListWithScroll:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12088
                            cls isNamespace ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12089
                                self switchToClassNamed:(cls name).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12090
                            ]
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12091
                        ]
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12092
                    ]
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12093
                ]
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12094
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12095
        ].
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12096
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12097
    self clearExplainAction.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12098
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12099
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12100
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12101
setAcceptActionForNewJavaClass
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12102
    "tell the codeView what to do on accept and explain"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12103
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12104
    codeView acceptAction:[:theCode |
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12105
        codeView withWaitCursorDo:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12106
            Object abortSignal catch:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12107
                |cls|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12108
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12109
                Object errorSignal handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12110
                    ex signal == Object haltSignal ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12111
                        ex reject
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12112
                    ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12113
                    codeView error:ex errorString position:1 to:nil from:nil.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12114
                ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12115
                    cls := JavaCompiler 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12116
                                evaluateClassDefinition:theCode asString 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12117
                                notifying:codeView.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12118
                    cls isBehavior ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12119
                        codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12120
                        self classCategoryUpdate.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12121
                        self updateClassListWithScroll:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12122
                        self switchToClassNamed:(cls name).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12123
                        self classDefinition.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12124
                    ]
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12125
                ]
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12126
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12127
        ].
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12128
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12129
    self clearExplainAction.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12130
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12131
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12132
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12133
setAcceptAndExplainActionsForMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12134
    "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
 12135
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12136
    codeView acceptAction:[:theCode |
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12137
        |cat cls rslt|
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12138
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12139
        fullProtocol ifTrue:[
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12140
            cls := acceptClass 
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12141
        ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12142
        cls isNil ifTrue:[
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12143
            cls := actualClass.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12144
            cls isNil ifTrue:[
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12145
                self warn:'oops class is gone; reselect and try again'.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12146
                ^ self
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12147
            ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12148
        ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12149
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12150
        codeView withWaitCursorDo:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12151
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12152
            (cat := currentMethodCategory) = '* all *' ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12153
                "must check from which category this code came from ...
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12154
                 ... thanks to Arno for pointing this out"
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12155
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12156
                cat := self askForMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12157
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12158
            (cat notNil and:[cat notEmpty]) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12159
                Object abortSignal catch:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12160
                    lockUpdates := true.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12161
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12162
                    (Class methodRedefinitionSignal) handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12163
                        |answer oldVsNew oldPkg newPkg|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12164
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12165
                        oldVsNew := ex parameter.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12166
                        oldPkg := oldVsNew key package.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12167
                        newPkg := oldVsNew value package.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12168
                        answer := OptionBox 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12169
                                      request: 
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12170
('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
 12171
The methods original packageID was ''%1''. 
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12172
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
 12173
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
 12174
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
 12175
but the old packageID will be preserved.
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12176
Otherwise, hit ''cancel'' to leave the code unchanged.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12177
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12178
PS: you can disable these checks in the launchers settings-compilation dialog.' 
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12179
                                            bindWith:(oldPkg asText allBold)
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12180
                                                with:(newPkg asText allBold))
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12181
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12182
                                      label:'Method redefinition'
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12183
                                      form:(WarningBox iconBitmap)
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12184
                                      buttonLabels:#('cancel' 'keep' 'continue')
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12185
                                      values:#(#cancel #keep #continue)
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12186
                                      default:#continue.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12187
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12188
                        (answer ~~ #cancel) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12189
                            ex proceedWith:answer
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12190
                        ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12191
                    ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12192
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12193
                        rslt := actualClass compilerClass 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12194
                            compile:theCode asString
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12195
                            forClass:cls
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12196
                            inCategory:cat 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12197
                            notifying:codeView.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12198
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12199
                        codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12200
                        codeModified := false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12201
                        currentMethod := actualClass compiledMethodAt:currentSelector.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12202
                        methodCategoryListView notNil ifTrue:[    
2513
e8f2d01f7ff3 care for no methodCategoryList
Claus Gittinger <cg@exept.de>
parents: 2506
diff changeset
 12203
                            ((methodCategoryListView list ? #()) includes:cat) ifFalse:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12204
                                self updateMethodCategoryListWithScroll:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12205
                            ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12206
                        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12207
                        self updateMethodListWithScroll:false keepSelection:(rslt == currentMethod).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12208
                        self normalLabel.
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12209
                    ]
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12210
                ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12211
                lockUpdates := false.
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12212
            ].
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 12213
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12214
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12215
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12216
    codeView explainAction:[:theCode :theSelection |
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12217
        self showExplanation:(Explainer 
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12218
                                explain:theSelection 
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12219
                                in:theCode
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12220
                                forClass:actualClass)
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12221
    ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12222
    BRFormatter notNil ifTrue:[
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12223
        "/ use the refactoryBrowser for formatting, if present
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12224
        codeView formatAction:[:theCode |
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12225
            self methodFormatMethod:theCode.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12226
        ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12227
    ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12228
2026
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12229
"/ future feature ...
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12230
"/    codeView pointerOverWordAction:[:word :line :col |
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12231
"/        word isAlphaNumeric ifTrue:[
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12232
"/            Transcript showCR:(Explainer 
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12233
"/                                explain:word 
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12234
"/                                in:codeView contents
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12235
"/                                forClass:actualClass)
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12236
"/        ]
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12237
"/    ].
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12238
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 12239
    "Modified: / 22.11.1999 / 11:50:43 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12240
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12241
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12242
setDoitActionForClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12243
    "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
 12244
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12245
    "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
 12246
     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
 12247
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12248
    codeView doItAction:[:theCode |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12249
	|compiler ns|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12250
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12251
	currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12252
	    ns := currentClass nameSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12253
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12254
	    ns := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12255
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12256
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12257
	Class nameSpaceQuerySignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12258
	    ns isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12259
		ex reject
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12260
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12261
	    ex proceedWith:ns
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12262
	] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12263
	    currentClass isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12264
		compiler := Compiler
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12265
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12266
		compiler := currentClass evaluatorClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12267
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12268
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12269
	    compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12270
		evaluate:theCode 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12271
		in:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12272
		receiver:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12273
		notifying:codeView 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12274
		logged:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12275
		ifFail:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12276
	]
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12277
    ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12278
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12279
    "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
 12280
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12281
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12282
setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12283
    codeView setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12284
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12285
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12286
showExplanation:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12287
    "show explanation from Parser"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12288
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12289
    self information:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12290
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12291
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12292
showMethodCategoryList
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12293
    classCategoryListView isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12294
	classListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12295
	    methodCategoryListView superView extent:0.33 @ 1.0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12296
	    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
 12297
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12298
	^ self.
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12299
    ].
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 12300
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12301
	methodCategoryListView superView extent:0.25 @ 1.0.
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 12302
    ].
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 12303
    methodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12304
	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
 12305
    ].
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12306
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12307
    "Created: 30.7.1997 / 17:50:20 / cg"
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 12308
    "Modified: 16.8.1997 / 03:28:23 / cg"
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12309
!
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12310
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12311
stringToSearchFor
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12312
    "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
 12313
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12314
    |sel|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12315
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12316
    sel := codeView selection.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12317
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12318
	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
 12319
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12320
	sel isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12321
	    currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12322
		sel := currentClass name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12323
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12324
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12325
	sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12326
	    sel := sel withoutSpaces
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12327
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12328
	    sel := ''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12329
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12330
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12331
    ^ sel
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12332
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12333
    "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
 12334
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12335
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12336
warnLabel:what
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12337
    "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
 12338
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12339
    self topView label:('System Browser WARNING: ' , what)
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12340
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12341
    "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
 12342
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12343
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12344
warnObsoleteCode:whatHappened
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12345
    "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
 12346
     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
 12347
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12348
    self warnLabel:whatHappened.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12349
    codeView contents:(codeView contents asText 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12350
			emphasizeAllWith:(#color->Color red))
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12351
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12352
    "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
 12353
    "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
 12354
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12355
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12356
withBusyCursorDo:aBlock
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12357
    ^ self topView withWaitCursorDo:aBlock
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12358
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12359
    "Created: 18.8.1997 / 15:41:52 / cg"
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12360
!
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12361
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12362
withSearchCursorDo:aBlock
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12363
    ^ 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
 12364
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12365
    "Created: 23.11.1995 / 14:11:14 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 12366
    "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
 12367
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12368
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12369
!BrowserView methodsFor:'private - defaults'!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12370
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12371
canvasIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12372
    "answer an icon to mark canvas (windowSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12373
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12374
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12375
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12376
    ^ icons at:#canvas ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12377
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12378
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12379
	CanvasIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12380
	    CanvasIcon := self class canvasIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12381
	    CanvasIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12382
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12383
	CanvasIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12384
	    (CanvasIcon magnifiedBy:(fh / CanvasIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12385
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12386
	    CanvasIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12387
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12388
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12389
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12390
    "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
 12391
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12392
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12393
commentEmphasisAndColor
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12394
    |prefs|
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12395
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12396
    prefs := UserPreferences current.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 12397
    ^ Text 
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12398
        addEmphasis:(prefs commentEmphasis) to:(#color->prefs commentColor).
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12399
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 12400
!
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 12401
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12402
fileImageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12403
    "answer an icon to mark fileImage methods"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12404
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12405
    ^ self imageIcon
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12406
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12407
    "Modified: / 7.4.1997 / 17:31:40 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12408
    "Created: / 29.10.1997 / 03:32:05 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12409
!
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 12410
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12411
globalClassIdentifierEmphasisAndColor
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12412
    |prefs|
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12413
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12414
    prefs := UserPreferences current.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12415
    ^ Text 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12416
        addEmphasis:(prefs globalClassIdentifierEmphasis) to:(#color->prefs globalClassIdentifierColor).
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12417
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12418
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 12419
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12420
helpIcon
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12421
    "answer an icon to mark help spec methods"
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12422
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12423
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12424
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12425
    ^ icons at:#help ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12426
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12427
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12428
	HelpIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12429
	    HelpIcon := self class helpIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12430
	    HelpIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12431
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12432
	HelpIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12433
	    (HelpIcon magnifiedBy:(fh / HelpIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12434
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12435
	    HelpIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12436
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12437
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12438
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12439
    "Modified: / 26.7.1998 / 14:03:50 / cg"
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12440
!
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12441
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12442
hierarchicalListIcon
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12443
    "answer an icon to mark hierarchicalList spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12444
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12445
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12446
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12447
    ^ icons at:#hierarchicalList ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12448
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12449
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12450
	HierarchicalListIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12451
	    HierarchicalListIcon := self class hierarchicalListIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12452
	    HierarchicalListIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12453
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12454
	HierarchicalListIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12455
	    (HierarchicalListIcon magnifiedBy:(fh / ImageIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12456
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12457
	    HierarchicalListIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12458
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12459
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12460
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12461
    "Modified: / 26.7.1998 / 14:03:31 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12462
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12463
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12464
imageIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 12465
    "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
 12466
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12467
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12468
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12469
    ^ icons at:#image ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12470
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12471
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12472
	ImageIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12473
	    ImageIcon := self class imageIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12474
	    ImageIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12475
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12476
	ImageIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12477
	    (ImageIcon magnifiedBy:(fh / ImageIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12478
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12479
	    ImageIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12480
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12481
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12482
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12483
    "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
 12484
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12485
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12486
menuIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12487
    "answer an icon to mark menu spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12488
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12489
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12490
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12491
    ^ icons at:#menu ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12492
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12493
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12494
	MenuIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12495
	    MenuIcon := self class menuIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12496
	    MenuIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12497
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12498
	MenuIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12499
	    (MenuIcon magnifiedBy:(fh / MenuIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12500
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12501
	    MenuIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12502
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12503
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12504
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12505
    "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
 12506
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12507
1851
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12508
programImageIcon
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12509
    "answer an icon to mark program-image spec methods"
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12510
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12511
    ^ self imageIcon
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12512
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12513
    "Created: / 24.8.1998 / 21:37:38 / cg"
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12514
!
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 12515
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12516
programMenuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12517
    "answer an icon to mark programmed-menu (menuSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12518
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12519
    ^ self menuIcon
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12520
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12521
    "Modified: / 7.4.1997 / 17:31:40 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12522
    "Created: / 28.10.1997 / 13:35:16 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12523
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12524
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12525
stopIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12526
    "answer an icon to mark breakPointed methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12527
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12528
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12529
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12530
    ^ icons at:#stop ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12531
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12532
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12533
	StopIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12534
	    StopIcon := self class stopIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12535
	    StopIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12536
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12537
	StopIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12538
	    (StopIcon magnifiedBy:(fh / StopIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12539
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12540
	    StopIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12541
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12542
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12543
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12544
    "Modified: / 26.7.1998 / 13:58:00 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12545
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12546
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12547
tabListIcon
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12548
    "answer an icon to mark tabList spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12549
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12550
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12551
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12552
    ^ icons at:#tabList ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12553
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12554
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12555
	TabListIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12556
	    TabListIcon := self class tabListIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12557
	    TabListIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12558
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12559
	TabListIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12560
	    (TabListIcon magnifiedBy:(fh / TabListIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12561
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12562
	    TabListIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12563
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12564
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12565
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12566
    "Modified: / 26.7.1998 / 14:02:11 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12567
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12568
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12569
tableColumnsIcon
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12570
    "answer an icon to mark tableColumns spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 12571
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12572
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12573
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12574
    ^ icons at:#tableColumns ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12575
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12576
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12577
	TableColumnsIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12578
	    TableColumnsIcon := self class tableColumnsIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12579
	    TableColumnsIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12580
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12581
	TableColumnsIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12582
	    (TableColumnsIcon magnifiedBy:(fh / TableColumnsIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12583
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12584
	    TableColumnsIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12585
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12586
    ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12587
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12588
    "Modified: / 26.7.1998 / 14:01:41 / cg"
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12589
!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12590
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12591
timeIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12592
    "answer an icon to mark timed methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12593
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12594
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12595
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12596
    ^ icons at:#time ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12597
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12598
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12599
	TimeIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12600
	    TimeIcon := self class timeIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12601
	    TimeIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12602
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12603
	TimeIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12604
	    (TimeIcon magnifiedBy:(fh / TimeIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12605
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12606
	    TimeIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12607
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12608
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12609
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12610
    "Modified: / 26.7.1998 / 14:00:34 / cg"
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12611
!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12612
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12613
traceIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12614
    "answer an icon to mark traced methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12615
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12616
    icons isNil ifTrue:[icons := IdentityDictionary new].
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12617
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12618
    ^ icons at:#trace ifAbsentPut:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12619
	|fh|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12620
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12621
	TraceIcon isNil ifTrue: [
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12622
	    TraceIcon := self class traceIcon onDevice:Display.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12623
	    TraceIcon clearMaskedPixels.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12624
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12625
	TraceIcon height > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12626
	    (TraceIcon magnifiedBy:(fh / TraceIcon height)) onDevice:device
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12627
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12628
	    TraceIcon onDevice:device.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12629
	].
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12630
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12631
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 12632
    "Modified: / 26.7.1998 / 14:01:02 / cg"
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12633
! !
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 12634
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12635
!BrowserView methodsFor:'syntax coloring'!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12636
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12637
startSyntaxHighlightProcess
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12638
    "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
 12639
     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
 12640
     text. 
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12641
     (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
 12642
      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
 12643
      any modifications in the meanwhile)"
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12644
2264
036fa673217d lower prio of syntaxProcess even more, if topView is not visible
Claus Gittinger <cg@exept.de>
parents: 2261
diff changeset
 12645
    |oldCodeList highlighter t prio|
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12646
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12647
    coloringProcess notNil ifTrue:[
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12648
        coloringProcess terminate.
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12649
        coloringProcess := nil.
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12650
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12651
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12652
    currentMethod isNil ifTrue:[^ self].
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12653
    UserPreferences current syntaxColoring == true ifFalse:[^ self].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12654
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12655
    highlighter := actualClass syntaxHighlighterClass.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12656
    highlighter isNil ifTrue:[^ self].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12657
2272
6eda2d09f226 even lower syntaxHighlighting prio
Claus Gittinger <cg@exept.de>
parents: 2264
diff changeset
 12658
    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
 12659
    self topView shown ifFalse:[
2272
6eda2d09f226 even lower syntaxHighlighting prio
Claus Gittinger <cg@exept.de>
parents: 2264
diff changeset
 12660
        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
 12661
    ].
036fa673217d lower prio of syntaxProcess even more, if topView is not visible
Claus Gittinger <cg@exept.de>
parents: 2261
diff changeset
 12662
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12663
    coloringProcess := [
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12664
        |oldCode newCode cls sensor|
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12665
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12666
        [
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12667
            codeView modified ifFalse:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12668
                oldCodeList := codeView list copy.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12669
                codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12670
                    oldCodeList isNil ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12671
                        oldCode := oldCodeList asStringWithoutEmphasis.
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12672
                        codeView modified ifFalse:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12673
                            "/ oldCode := oldCodeList asStringWithoutEmphasis.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12674
                            cls := actualClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12675
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12676
                            codeView modified ifFalse:[
2431
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 12677
                                Screen currentScreenQuerySignal answer:device
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 12678
                                do:[
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 12679
                                    newCode := highlighter formatMethod:oldCode in:cls.
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 12680
                                ].
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 12681
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12682
                                "/ 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
 12683
                                "/ by any arriving key-event.
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12684
                                codeView modified ifFalse:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12685
                                    newCode := newCode asStringCollection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12686
                                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12687
                                        coloringProcess := nil.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12688
                                        (sensor := self sensor) notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12689
                                            sensor
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12690
                                                pushUserEvent:#syntaxHighlightedCode: for:self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12691
                                                withArguments:(Array with:newCode).
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12692
                                        ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12693
                                    ]
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12694
                                ]
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12695
                            ].
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12696
                        ].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12697
                    ].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12698
                ].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12699
            ].
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12700
        ] valueNowOrOnUnwindDo:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12701
            coloringProcess := nil.
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 12702
        ].
2264
036fa673217d lower prio of syntaxProcess even more, if topView is not visible
Claus Gittinger <cg@exept.de>
parents: 2261
diff changeset
 12703
    ] forkAt:prio.
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12704
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12705
    codeView modified:false.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12706
    codeView modifiedChannel onChangeSend:#codeChanged to:self.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12707
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12708
    "Created: / 31.3.1998 / 14:25:29 / cg"
1715
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
 12709
    "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
 12710
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12711
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12712
stopSyntaxHighlightProcess
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12713
    "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
 12714
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12715
    |p|
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12716
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12717
    (p := coloringProcess) notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12718
        coloringProcess := nil.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12719
        p terminate.
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12720
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12721
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12722
    "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
 12723
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12724
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12725
syntaxHighlightedCode:newCode
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12726
    "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
 12727
     with highlighted syntax.
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 12728
     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
 12729
2428
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12730
    |firstShown lastShown sensor cursorWasOn anyChange newLines l
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12731
     replaceAction|
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12732
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12733
    codeView modified ifTrue:[
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12734
        "/ new input arrived in the meantime
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12735
        ^ self
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12736
    ].
2254
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 12737
"/    codeView hasSelection ifTrue:[
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 12738
"/        "/ something selected - dont overwrite (is this agood idea ?)
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 12739
"/        ^ self
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 12740
"/    ].
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12741
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12742
    coloringProcess notNil ifTrue:[
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12743
        "/ 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
 12744
        "/ ignore this (leftover) code.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12745
        ^ self
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12746
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12747
    currentMethod isNil ifTrue:[
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12748
        "/ 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
 12749
        "/ or closed.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12750
        ^ self
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12751
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12752
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12753
    firstShown := codeView firstLineShown.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12754
    lastShown := codeView lastLineShown.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12755
    sensor := self sensor.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12756
2428
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12757
    replaceAction := [:lNr :line |
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12758
        |oldLine|
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12759
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12760
        oldLine := codeView listAt:lNr.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12761
        oldLine notNil ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12762
            line notNil ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12763
                "/ 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
 12764
                "/ 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
 12765
                "/ resulting error.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12766
                "/ Certainly a kludge. 
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12767
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12768
                oldLine string = line string ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12769
                    oldLine emphasis ~= line emphasis ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12770
                        codeView withoutRedrawAt:lNr put:line.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12771
                        (lNr between:firstShown and:lastShown) ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12772
                            anyChange ifFalse:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12773
                                anyChange := true.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12774
                                cursorWasOn := codeView hideCursor
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12775
                            ].
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12776
                            codeView redrawLine:lNr.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12777
                        ]
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12778
                    ]
1720
d76ee513d34e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
 12779
"/                ] ifFalse:[
d76ee513d34e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
 12780
"/                    oldLine string printCR.
d76ee513d34e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
 12781
"/                    line string printCR.
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12782
                ]
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12783
            ]
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12784
        ].
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12785
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12786
        "/ stop when keyboard input arrives ...
2429
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 12787
"/ cg: commented - thats done when text is modified ...
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 12788
"/        (sensor hasUserEvents) ifTrue:[
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 12789
"/            (sensor hasKeyPressEventFor:nil) ifTrue:[
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 12790
"/                (anyChange and:[cursorWasOn]) ifTrue:[codeView showCursor].
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 12791
"/                ^ self.
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 12792
"/            ]
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 12793
"/        ]
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12794
    ].
2428
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12795
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12796
    anyChange := false.
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12797
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12798
    newLines := newCode asStringCollection.
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12799
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12800
    "/ 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
 12801
    (l := codeView cursorLine) notNil ifTrue:[
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12802
        l <= newLines size ifTrue:[
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12803
            replaceAction value:l value:(newLines at:l)
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12804
        ]
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12805
    ].
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12806
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12807
    newLines keysAndValuesDo:replaceAction.
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 12808
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 12809
    (anyChange and:[cursorWasOn]) ifTrue:[codeView showCursor].
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12810
1995
ef8e49bf56d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1993
diff changeset
 12811
    "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
 12812
! !
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 12813
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12814
!BrowserView methodsFor:'unused'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12815
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12816
listOfAllMethodCategoriesInHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12817
    "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
 12818
     and all of its superclasses"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12819
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12820
    |newList cat|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12821
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12822
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12823
    self classesInHierarchy:aClass do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12824
	c methodDictionary do:[:aMethod |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12825
	    cat := aMethod category.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12826
	    cat isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12827
		cat := '* no category *'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12828
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12829
	    newList add:cat
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12830
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12831
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12832
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12833
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12834
    ^ newList asOrderedCollection sort
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12835
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 12836
    "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
 12837
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12838
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12839
listOfAllSelectorsInCategory:aCategory inHierarchyOfClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12840
    "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
 12841
     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
 12842
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12843
    |newList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12844
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12845
    newList := Set new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12846
    self classesInHierarchy:aClass do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12847
	|searchCategory|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12848
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12849
	(aCategory = '* all *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12850
	    newList addAll:(c methodDictionary keys)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12851
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12852
	    (aCategory = '* no category *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12853
		searchCategory := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12854
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12855
		searchCategory := aCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12856
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12857
	    c methodDictionary keysAndValuesDo:[:selector :aMethod |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12858
		(aMethod category = searchCategory) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12859
		    newList add:selector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12860
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12861
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12862
	].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12863
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12864
    (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
 12865
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 12866
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 12867
    "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
 12868
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12869
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 12870
!BrowserView methodsFor:'variable list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 12871
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12872
allClassInstVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12873
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12874
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12875
    self allVarRefsTitle:'class instance variable to browse all modifications of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12876
		  access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12877
		    mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12878
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12879
    "Modified: / 25.10.1997 / 20:19:49 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12880
    "Created: / 25.10.1997 / 20:21:48 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12881
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12882
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12883
allClassInstVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12884
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12885
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12886
    self allVarRefsTitle:'class instance variable to browse all references to:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12887
		  access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12888
		    mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12889
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12890
    "Modified: / 25.10.1997 / 20:20:09 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12891
    "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
 12892
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12893
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12894
allClassVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12895
    "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
 12896
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12897
    self allVarRefsTitle:'class variable to browse all modifications of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12898
		  access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12899
		    mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12900
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12901
    "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
 12902
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12903
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12904
allClassVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12905
    "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
 12906
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12907
    self allVarRefsTitle:'class variable to browse all references to:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12908
		  access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12909
		    mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12910
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12911
    "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
 12912
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12913
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12914
allInstVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12915
    "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
 12916
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12917
    self allVarRefsTitle:'instance variable to browse all modifications of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12918
		  access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12919
		    mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12920
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12921
    "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
 12922
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12923
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12924
allInstVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12925
    "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
 12926
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12927
    self allVarRefsTitle:'instance variable to browse all references to:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12928
		  access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12929
		    mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12930
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12931
    "Modified: / 25.10.1997 / 20:22:40 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12932
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12933
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12934
allVarRefsTitle:title access:access mods:modifications
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12935
    "show an enterbox for instVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12936
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12937
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12938
	|box|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12939
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12940
	box := self enterBoxForVariableSearch:title.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12941
	box action:[:aVariableName |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12942
	    |homeClass|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12943
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12944
	    aVariableName isEmpty ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12945
		self withSearchCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12946
		    homeClass := self findClassOfVariable:aVariableName accessWith:access.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12947
		    access == #classVarNames ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12948
			SystemBrowser 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12949
			    browseClassRefsTo:aVariableName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12950
			    under:homeClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12951
			    modificationsOnly:modifications
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12952
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12953
			access == #classInstVarNames ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12954
			    SystemBrowser 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12955
				browseInstRefsTo:aVariableName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12956
				under:homeClass class
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12957
				modificationsOnly:modifications
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12958
			] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12959
			    SystemBrowser 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12960
				browseInstRefsTo:aVariableName 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12961
				under:homeClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12962
				modificationsOnly:modifications
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12963
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12964
		     ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12965
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12966
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12967
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12968
	box showAtPointer
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
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12971
    "Created: / 25.10.1997 / 20:19:26 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12972
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12973
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12974
classInstVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12975
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12976
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12977
    self varRefsOrModsTitle:'class instance variable to browse modifications of:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12978
		     access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12979
		       mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12980
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12981
    "Modified: / 25.10.1997 / 20:17:41 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12982
    "Created: / 25.10.1997 / 20:21:04 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12983
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12984
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12985
classInstVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12986
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12987
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12988
    self varRefsOrModsTitle:'class instance variable to browse references to:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12989
		     access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12990
		       mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12991
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12992
    "Modified: / 25.10.1997 / 20:17:23 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12993
    "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
 12994
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12995
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12996
classVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12997
    "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
 12998
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12999
    self varRefsOrModsTitle:'class variable to browse modifications of:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13000
		     access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13001
		       mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13002
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13003
    "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
 13004
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13005
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13006
classVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13007
    "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
 13008
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13009
    self varRefsOrModsTitle:'class variable to browse references to:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13010
		     access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13011
		       mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13012
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13013
    "Modified: / 25.10.1997 / 20:17:23 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13014
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13015
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13016
enterBoxForVariableSearch:title
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13017
    |box sel|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13018
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13019
    box := self enterBoxForCodeSelectionTitle:title okText:'browse'.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13020
    variableListView notNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13021
        codeView hasSelection ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13022
            (sel := variableListView selectionValue) notNil ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13023
                (sel startsWith:'-') ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13024
                    box initialText:sel
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13025
                ]
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13026
            ]
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13027
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13028
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13029
    ^ box
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13030
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13031
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13032
instVarMods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13033
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13034
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13035
    self varRefsOrModsTitle:'instance variable to browse modifications of:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13036
		     access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13037
		       mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13038
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13039
    "Modified: / 25.10.1997 / 20:14:52 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13040
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13041
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13042
instVarRefs
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13043
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13044
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13045
    self varRefsOrModsTitle:'instance variable to browse references to:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13046
		     access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13047
		       mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13048
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13049
    "Modified: / 25.10.1997 / 20:14:27 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13050
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13051
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13052
showClassInstVars
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13053
    classInstVarsInVarList := true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13054
    self updateVariableList.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13055
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13056
    "Created: / 25.10.1997 / 19:43:04 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13057
    "Modified: / 25.10.1997 / 19:43:41 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13058
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13059
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13060
showClassVars
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13061
    classInstVarsInVarList := false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13062
    self updateVariableList.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13063
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13064
    "Created: / 25.10.1997 / 19:42:55 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13065
    "Modified: / 25.10.1997 / 19:43:35 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13066
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13067
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13068
varInspect
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13069
    "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
 13070
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13071
    |name searchClass dict|
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13072
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13073
    name := variableListView selectionValue.
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13074
    name isNil ifTrue:[^ self].
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13075
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13076
    showInstance ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13077
	"/ inspect an instVar
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13078
	"/ create a dictionary of all instances with their current value there
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13079
	dict := IdentityDictionary new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13080
	currentClass allInstancesDo:[:i |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13081
	    dict at:i put:(i instVarNamed:name).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13082
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13083
	(dict size == 0) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13084
	    self warn:'there are currently no instances of ' , currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13085
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13086
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13087
	dict inspect
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13088
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13089
	(classInstVarsInVarList) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13090
	    "/ inspect a classVar
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13091
	    searchClass := currentClass whichClassDefinesClassVar:name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13092
	    (searchClass classVarAt:(name asSymbol)) inspect
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13093
	] ifTrue:[        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13094
	    "/ inspect a classInstVar
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13095
	    (currentClass instVarNamed:name) inspect.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13096
	].
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13097
    ].
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13098
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
 13099
    "Modified: / 16.10.1998 / 00:37:58 / cg"
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13100
!
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13101
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13102
varRefsOrModsTitle:title access:accessor mods:mods
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13103
    "show an enterbox for instvar to search for"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13104
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13105
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13106
	|box|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13107
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13108
	box := self enterBoxForVariableSearch:title.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13109
	box action:[:aString |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13110
	    aString notEmpty ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13111
		self withSearchCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13112
		    |sel classes|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13113
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13114
		    sel := #'browseInstRefsTo:in:modificationsOnly:'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13115
		    accessor == #classInstVarNames ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13116
			classes := Array with:currentClass class.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13117
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13118
			classes := Array with:currentClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13119
			accessor == #classVarNames ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13120
			    sel := #'browseClassRefsTo:in:modificationsOnly:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13121
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13122
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13123
		    SystemBrowser perform:sel with:aString with:classes with:mods 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13124
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13125
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13126
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13127
	box showAtPointer
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13128
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13129
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13130
    "Created: / 25.10.1997 / 20:12:52 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13131
    "Modified: / 25.10.1997 / 21:10:34 / cg"
93
claus
parents: 92
diff changeset
 13132
!
claus
parents: 92
diff changeset
 13133
claus
parents: 92
diff changeset
 13134
varTypeInfo
claus
parents: 92
diff changeset
 13135
    "show typical usage of a variable"
claus
parents: 92
diff changeset
 13136
claus
parents: 92
diff changeset
 13137
    |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
 13138
     searchClass s canInspect|
93
claus
parents: 92
diff changeset
 13139
claus
parents: 92
diff changeset
 13140
    name := variableListView selectionValue.
claus
parents: 92
diff changeset
 13141
    name isNil ifTrue:[^ self].
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13142
    name := name asText allBold.
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13143
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13144
    canInspect := false.
93
claus
parents: 92
diff changeset
 13145
1390
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 13146
    (classInstVarsInVarList or:[showInstance]) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13147
	searchClass := currentClass whichClassDefinesClassVar:name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13148
	value := searchClass classVarAt:(name asSymbol).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13149
	s := value displayString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13150
	s size > 60 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13151
	    s := (s copyTo:60) , ' ...'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13152
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13153
	msg := name , ' is (currently):\\' , s.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13154
	s ~= value classNameWithArticle ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13155
	    msg := msg , '\\(' , value class name , ')'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13156
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13157
	canInspect := true.
1390
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 13158
    ] ifTrue:[        
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13159
	searchClass := actualClass whichClassDefinesInstVar:name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13160
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13161
	idx := searchClass instVarOffsetOf:name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13162
	idx isNil ifTrue:[^ self].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13163
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13164
	classes := IdentitySet new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13165
	values := IdentitySet new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13166
	instCount := 0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13167
	subInstCount := 0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13168
	searchClass allSubInstancesDo:[:i |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13169
	    |val|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13170
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13171
	    val := i instVarAt:idx.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13172
	    val notNil ifTrue:[values add:val].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13173
	    classes add:val class.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13174
	    (i isMemberOf:searchClass) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13175
		instCount := instCount + 1.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13176
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13177
		subInstCount := subInstCount + 1
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13178
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13179
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13180
	(instCount == 0 and:[subInstCount == 0]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13181
	    self warn:'there are currently no instances of ' , currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13182
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13183
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13184
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13185
	instCount ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13186
	    msg := 'in (currently: ' , instCount printString,') instances '.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13187
	    subInstCount ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13188
		msg := msg , 'and '
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13189
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13190
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13191
	    msg := 'in '.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13192
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13193
	subInstCount ~~ 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13194
	    msg := msg , '(currently: ' , subInstCount printString, ') derived instances '
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13195
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13196
	msg := msg, 'of ' , searchClass name , ',\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13197
	msg := msg , name , ' '.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13198
	((values size == 1) 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13199
	or:[classes size == 1 and:[classes first == UndefinedObject]]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13200
	    values size == 1 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13201
		value := values first.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13202
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13203
	    (value isNumber or:[value isString]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13204
		msg := msg , 'is always the same:\\      ' , 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13205
			     value class name , ' (' , value storeString , ')'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13206
		canInspect := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13207
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13208
		(value isNil or:[value == true or:[value == false]]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13209
		    msg := msg , 'is always:\\      ' , 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13210
				 value printString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13211
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13212
		    msg := msg , 'is always the same:\\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13213
		    msg := msg , '      ' , value class name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13214
		    value isLiteral ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13215
			msg := msg , ' (' , value storeString , ')'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13216
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13217
		    canInspect := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13218
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13219
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13220
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13221
	    classes size == 1 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13222
		msg := msg , 'is always:\\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13223
		msg := msg , '      ' , classes first name , '\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13224
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13225
		msg := msg , 'is one of:\\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13226
		classes := classes asOrderedCollection.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13227
		classes size > 20 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13228
		    classes := classes copyFrom:1 to:20.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13229
		    cut := true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13230
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13231
		    cut := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13232
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13233
		names := classes collect:[:cls |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13234
		    cls == UndefinedObject ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13235
			'nil'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13236
		    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13237
			cls == True ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13238
			    'true'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13239
			] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13240
			    cls == False ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13241
				'false'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13242
			    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13243
				cls name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13244
			    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13245
			]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13246
		    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13247
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13248
		names sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13249
		names do:[:nm |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13250
		    msg := msg , '      ' , nm , '\'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13251
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13252
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13253
	].
93
claus
parents: 92
diff changeset
 13254
    ].
claus
parents: 92
diff changeset
 13255
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13256
    canInspect ifTrue:[
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13257
       (OptionBox 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13258
		      request:msg withCRs
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13259
		      label:'Variable Type Information'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13260
		      form:(InfoBox iconBitmap)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13261
		      buttonLabels:#('OK' 'inspect')
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13262
		      values:#(true #inspect)) == #inspect
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13263
	ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13264
	    value inspect
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13265
	]
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13266
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13267
	box := InfoBox title:msg withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13268
	box label:'Variable Type Information'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13269
	box showAtPointer
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 13270
    ].
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 13271
1390
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 13272
    "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
 13273
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13274
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13275
variableListMenu
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13276
    <resource: #programMenu >
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13277
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 13278
    |items m|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13279
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13280
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13281
	variableListView flash.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13282
	^ nil
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13283
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13284
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13285
    showInstance ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13286
	items := #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13287
		    ('class instvar refs...'      classInstVarRefs    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13288
		    ('class instvar mods...'      classInstVarMods    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13289
		    ('classvar refs...'           classVarRefs        )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13290
		    ('classvar mods...'           classVarMods        )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13291
		    ('-'                           nil                 )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13292
		    ('all class instvar refs...'  allClassInstVarRefs )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13293
		    ('all class instvar mods...'  allClassInstVarMods )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13294
		    ('all classvar refs...'       allClassVarRefs     )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13295
		    ('all classvar mods...'       allClassVarMods     )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13296
		   ).
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13297
    ] ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13298
	items := #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13299
		    ('instvar refs...'            instVarRefs         )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13300
		    ('instvar mods...'            instVarMods         )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13301
		    ('classvar refs...'           classVarRefs        )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13302
		    ('classvar mods...'           classVarMods        )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13303
		    ('-'                           nil                 )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13304
		    ('all instvar refs...'        allInstVarRefs      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13305
		    ('all classvar refs...'       allClassVarRefs     )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13306
		    ('all instvar mods...'        allInstVarMods      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13307
		    ('all classvar mods...'       allClassVarMods     )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13308
		   ).
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13309
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13310
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13311
    showInstance ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13312
	classInstVarsInVarList == true ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13313
	    items := items , #(('-') ('show classVars' showClassVars)).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13314
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13315
	    items := items , #(('-') ('show classInstVars' showClassInstVars)).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13316
	].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13317
    ].
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 13318
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 13319
    ("showInstance and:[" variableListView hasSelection "]" ) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13320
	items := items , #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13321
				('-'                           )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13322
				('type information' varTypeInfo)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13323
			   ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 13324
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 13325
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13326
    ("showInstance not and:["variableListView hasSelection"]") ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13327
	items := items , #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13328
				('inspect' varInspect)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13329
			   ).
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13330
    ].
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 13331
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 13332
    m := PopUpMenu itemList:items resources:resources.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13333
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13334
    currentClass instSize == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13335
	m disableAll:#(instVarRefs instVarMods).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13336
	currentClass subclasses size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13337
	    m disableAll:#(allInstVarRefs allInstVarMods).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13338
	]
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13339
    ].
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 13340
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 13341
    currentClass isLoaded ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13342
	m disableAll
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 13343
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 13344
    ^ m
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 13345
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 13346
    "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
 13347
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13348
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13349
variableSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13350
    "variable selection changed"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13351
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13352
    |name idx|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13353
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13354
    name := variableListView selectionValue.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13355
    name isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13356
	self unhilightMethodCategories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13357
	self unhilightMethods.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13358
	self autoSearch:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13359
	^ self
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13360
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13361
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13362
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13363
     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
 13364
     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
 13365
     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
 13366
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13367
    idx := variableListView list findLast:[:entry | entry = name].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13368
    idx ~~ lineNr ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13369
	"select it - user will see whats going on"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13370
	variableListView setSelection:idx
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13371
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13372
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13373
    "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
 13374
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13375
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13376
    self hilightMethodsInMethodCategoryList:true inMethodList:true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13377
    self autoSearch:name.
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
 13378
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
 13379
    "Modified: 25.5.1996 / 12:26:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13380
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13381
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13382
!BrowserView methodsFor:'variable stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13383
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13384
hilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13385
    "helper; given a list itme, highlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13386
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13387
    |e|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13388
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13389
    methodCategoryListView font bold ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13390
	"/ already bold; use different color then
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13391
	methodCategoryListView foregroundColor brightness > 0.5 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13392
	    methodCategoryListView backgroundColor brightness < 0.25 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13393
		e := #color->Color blue
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13394
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13395
		e := #color->Color black
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13396
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13397
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13398
	    methodCategoryListView backgroundColor brightness > 0.75 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13399
		e := #color->Color red darkened
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13400
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13401
		e := #color->Color white.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13402
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13403
	]
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13404
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13405
	e := #bold.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13406
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13407
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13408
    entry isString ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13409
	^ entry asText emphasizeAllWith:e.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13410
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13411
    ^ 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
 13412
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13413
    "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
 13414
    "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
 13415
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13416
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13417
hilightMethodsInMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13418
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13419
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13420
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13421
    self hilightMethodsInMethodCategoryList:true inMethodList:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13422
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13423
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13424
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13425
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13426
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13427
hilightMethodsInMethodCategoryList:inCat inMethodList:inMethods 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13428
    "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
 13429
     variable, and highlight them"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13430
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13431
    |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
 13432
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13433
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13434
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13435
    inCat ifTrue:[self unhilightMethodCategories].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13436
    inMethods ifTrue:[self unhilightMethods].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13437
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13438
    actualClass isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13439
    (methodCategoryListView isNil 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13440
    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
 13441
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13442
    name := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13443
    name isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13444
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13445
    self withSearchCursorDo:[
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13446
        |classes filter any supers|
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13447
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13448
        classes := Array with:actualClass.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13449
        (currentClassHierarchy notNil and:[fullProtocol]) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13450
            supers := actualClass allSuperclasses.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13451
            classes := classes , supers.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13452
            redefinedSelectors := IdentitySet new.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13453
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13454
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13455
        filter := SystemBrowser 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13456
                        filterToSearchRefsTo:name 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13457
                        classVars:(showInstance not and:[classInstVarsInVarList ~~ true]) 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13458
                        modificationsOnly:false. 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13459
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13460
        methodListView notNil ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13461
            methodList := methodListView list.
2361
c1f1e0b88d1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2357
diff changeset
 13462
            methodList notNil ifTrue:[
c1f1e0b88d1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2357
diff changeset
 13463
                methodList := methodList collect:[:s | self selectorFromClassMethodString:s].
c1f1e0b88d1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2357
diff changeset
 13464
            ]
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13465
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13466
        methodCategoryListView notNil ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13467
            methodCategoryList := methodCategoryListView list.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13468
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13469
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13470
        any := false.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13471
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13472
        "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13473
         highlight the method that ref this variable
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13474
        "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13475
        classes do:[:someClass |
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13476
            (fullProtocol
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13477
            and:[classListView valueIsInSelection:(someClass name)]) ifFalse:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13478
                someClass methodDictionary keysAndValuesDo:[:selector :method |
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13479
                    (inCat
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13480
                    or:[methodList notNil
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13481
                        and:[methodList includes:selector]])
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13482
                    ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13483
                        (redefinedSelectors isNil
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13484
                        or:[(redefinedSelectors includes:selector) not])
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13485
                       ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13486
                           (filter value:someClass value:method value:selector) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13487
                               |idx cat|
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13488
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13489
                               (inCat
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13490
                               and:[methodCategoryList notNil]) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13491
                                   cat := method category.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13492
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13493
                                    highlight the methodCategory
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13494
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13495
                                   idx := methodCategoryListView list indexOf:cat.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13496
                                   idx ~~ 0 ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13497
                                        entry := methodCategoryListView at:idx.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13498
                                        entry := self hilightEntryFor:entry.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13499
                                        methodCategoryListView at:idx put:entry
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13500
"/                                       methodCategoryListView attributeAt:idx put:#bold.
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13501
                                   ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13502
                               ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13503
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13504
                               (inMethods
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13505
                               and:[methodList notNil]) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13506
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13507
                                    highlight the method
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13508
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13509
                                   idx := methodListView list 
2354
d6c68a5408be variable access highlighting fixed
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
 13510
                                                findFirst:[:item | |s|
d6c68a5408be variable access highlighting fixed
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
 13511
                                                                (s := item string) = selector
d6c68a5408be variable access highlighting fixed
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
 13512
                                                                or:[s startsWith:(selector , ' ')]
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13513
                                                          ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13514
                                   idx ~~ 0 ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13515
                                        entry := methodListView at:idx.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13516
                                        entry := self hilightEntryFor:entry.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13517
                                        methodListView at:idx put:entry
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13518
"/                                        methodListView attributeAt:idx put:#bold.
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13519
                                   ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13520
                                   any := true
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13521
                               ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13522
                           ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13523
                           redefinedSelectors notNil ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13524
                               redefinedSelectors add:selector
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13525
                           ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13526
                        ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13527
                    ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13528
                ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13529
            ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13530
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13531
        any ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13532
            self setSearchPattern:name
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 13533
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13534
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13535
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13536
    "Created: / 23.11.1995 / 14:12:08 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13537
    "Modified: / 5.6.1996 / 11:38:19 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13538
    "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
 13539
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13540
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13541
hilightMethodsInMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13542
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13543
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13544
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13545
    self hilightMethodsInMethodCategoryList:false inMethodList:true 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13546
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13547
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13548
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13549
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13550
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13551
unhilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13552
    "helper; given a list itme, unhighlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13553
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13554
    entry isString ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13555
	^ entry string
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13556
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13557
    ^ entry copy string:(entry string)
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13558
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13559
    "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
 13560
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13561
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13562
unhilightMethodCategories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13563
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13564
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13565
    |list entry sz "{ Class: SmallInteger }"|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13566
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13567
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13568
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13569
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13570
	list := methodCategoryListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13571
	sz := list size.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13572
	1 to:sz do:[:idx |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13573
	    entry := list at:idx.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13574
	    entry := self unhilightEntryFor:entry.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13575
	    methodCategoryListView at:idx put:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13576
"/            methodCategoryListView attributeAt:idx put:nil.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13577
	]
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13578
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13579
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13580
    "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
 13581
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13582
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13583
unhilightMethods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13584
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13585
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13586
    |list entry sz "{Class: SmallInteger }" |
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13587
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13588
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13589
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13590
    methodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13591
	list := methodListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13592
	sz := list size.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13593
	1 to:sz do:[:idx |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13594
	    entry := list at:idx.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13595
	    entry := self unhilightEntryFor:entry.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13596
	    methodListView at:idx put:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13597
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13598
"/            methodListView attributeAt:idx put:nil.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13599
	].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13600
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 13601
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 13602
    "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
 13603
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13604
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13605
updateVariableList
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13606
    "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
 13607
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13608
    |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
 13609
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13610
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13611
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13612
    oldSelection := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13613
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13614
    l := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13615
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13616
     show classVars/classInstVars, 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13617
     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
 13618
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13619
    askMeta := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13620
    showInstance ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13621
        nameAccessSelector := #instVarNames
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13622
    ] ifFalse:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13623
        classInstVarsInVarList == true ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13624
            nameAccessSelector := #instVarNames.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13625
            askMeta := true.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13626
        ] ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13627
            nameAccessSelector := #classVarNames
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13628
        ]
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13629
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 13630
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 13631
    class := currentClassHierarchy notNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13632
        currentClassHierarchy
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 13633
    ] ifFalse:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13634
        currentClass
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 13635
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 13636
    class := currentClass.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 13637
    fullProtocol ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13638
        class := currentClassHierarchy
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 13639
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 13640
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 13641
    class isNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13642
        variableListView list:nil.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13643
        ^ self
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 13644
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 13645
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13646
    class withAllSuperclasses do:[:aClass |
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13647
        |ignore clsName|
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13648
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13649
        ignore := fullProtocol 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13650
                  and:[classListView valueIsInSelection:(aClass name asString)].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13651
        ignore ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13652
            askMeta ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13653
                subList := aClass class perform:nameAccessSelector.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13654
            ] ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13655
                subList := aClass perform:nameAccessSelector.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13656
            ].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13657
            subList size ~~ 0 ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13658
                l := l , (subList asOrderedCollection reverse).
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13659
                aClass nameSpace == currentNamespace ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13660
                    clsName := aClass nameWithoutNameSpacePrefix
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13661
                ] ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13662
                    clsName := aClass name
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13663
                ].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13664
                showInstance ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13665
                    clsName := clsName , ' class'
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13666
                ].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13667
                l := l , (OrderedCollection with:'--- ' , clsName , ' ---').
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13668
            ]
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13669
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13670
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13671
    l reverse.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13672
    variableListView setAttributes:nil.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 13673
    l ~= variableListView list ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13674
        variableListView list:l.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 13675
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 13676
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13677
    l keysAndValuesDo:[:index :entry |
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13678
        (entry startsWith:'-') ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13679
            variableListView attributeAt:index put:#disabled.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13680
            last := index
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13681
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13682
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13683
    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
 13684
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13685
    oldSelection notNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13686
        variableListView setSelectElement:oldSelection.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13687
        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
 13688
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
 13689
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
 13690
    "Modified: / 17.9.1998 / 13:45:02 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13691
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13692
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
 13693
!BrowserView class methodsFor:'documentation'!
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
 13694
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
 13695
version
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
 13696
    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.588 2000-01-27 12:01:26 cg Exp $'
263
7b9622ce4fcc more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
 13697
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13698
BrowserView initialize!