BrowserView.st
author Claus Gittinger <cg@exept.de>
Tue, 05 Nov 2002 12:22:03 +0100
changeset 4185 fba4e4c51395
parent 4126 ac786156a2e0
child 4194 9b38894baedf
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3179
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
     1
"
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
     3
	      All Rights Reserved
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
     4
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
     5
 This software is furnished under a license and may be used
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
     6
 only in accordance with the terms of that license and with the
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
     8
 be provided or otherwise made available to, or used by, any
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
     9
 other person.  No title to or ownership of the software is
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    10
 hereby transferred.
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    11
"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    12
2649
e4b2bcafaf2f no package info in class definition
Claus Gittinger <cg@exept.de>
parents: 2648
diff changeset
    13
"{ Package: 'stx:libtool' }"
e4b2bcafaf2f no package info in class definition
Claus Gittinger <cg@exept.de>
parents: 2648
diff changeset
    14
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    15
StandardSystemView subclass:#BrowserView
1763
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    16
	instanceVariableNames:'classCategoryListView classListView methodCategoryListView
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    17
		methodListView classMethodListView codeView classToggle
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    18
		instanceToggle currentNamespace currentClassCategory
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    19
		currentClassHierarchy currentClass currentMethodCategory
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    20
		currentMethod currentSelector showInstance actualClass fullClass
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    21
		lastMethodCategory aspect variableListView fullProtocol
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    22
		lockUpdates autoSearch myLabel acceptClass lastSourceLogMessage
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    23
		lastCategory lastModule lastPackage lastMethodMoveClass
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    24
		namespaceList allNamespaces gotClassList classList selectorList
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    25
		showAllNamespaces classInstVarsInVarList coloringProcess
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
    26
		codeModified autoSearchIgnoreCase icons environment'
1763
1ad876d46ada added search in class & superclasses.
Claus Gittinger <cg@exept.de>
parents: 1748
diff changeset
    27
	classVariableNames:'CheckForInstancesWhenRemovingClasses RememberAspect DefaultIcon
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
    28
		ShowResourceIcons LastSearchPatterns
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
    29
		ShowMethodCategoryInClassMethodList LastRenames Icons'
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
3179
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    36
copyright
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    37
"
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    38
 COPYRIGHT (c) 1989 by Claus Gittinger
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    39
	      All Rights Reserved
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    40
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    41
 This software is furnished under a license and may be used
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    42
 only in accordance with the terms of that license and with the
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    43
 inclusion of the above copyright notice.   This software may not
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    44
 be provided or otherwise made available to, or used by, any
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    45
 other person.  No title to or ownership of the software is
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
diff changeset
    46
 hereby transferred.
93ec7dca2107 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3176
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
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    63
    Notice: 
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    64
        SystemBrowser is currently being rewritten to be an instance
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    65
        of ApplicationModel - this transition is not yet complete and you see
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    66
        here intermediate versions of BrowserView/SystemBrowser. 
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    67
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    68
        All action is (currently) still done here in BrowserView, although the
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    69
        SystemBrowsers class methods are used to startup a browser.
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    70
        (which is done to make the upcoming switch transparent)
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    71
        This will certainly change ...
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    72
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    73
    PS:
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    74
        why did we add more and more here, instead of rewriting ?
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    75
        - because nobody pays us for it ;-),
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    76
        and the browser is not too bad to use, as long as you do not look into code.
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    77
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    78
    [author:]
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
    79
        Claus Gittinger
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    80
"
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
    81
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    82
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    83
!BrowserView class methodsFor:'initialization'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    84
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    85
initialize
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    86
    "Browser configuration;
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    87
     (values can be changed from your private startup file)"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    88
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    89
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    90
    "
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    91
     setting 'ShowMethodCategoryInClassMethodList' to false will suppress the display
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    92
     of a methods category in the search-result browsers..
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    93
    "
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    94
    ShowMethodCategoryInClassMethodList := true.
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    95
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    96
    "
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    97
     setting 'ShowResourceIcons' to false will suppress the display
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    98
     of image-, menu-, canvas- etc. icons beside the method name in
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
    99
     the method list.
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
   100
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   101
    ShowResourceIcons := true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   102
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   103
    "
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
   104
     setting 'CheckForInstancesWhenRemovingClasses' to false, the removeClass function will remove
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   105
     classes WITHOUT checking for instances. Otherwise,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   106
     it will check and let you confirm in case there are instances.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   107
     Checking for instances may be a bit time consuming, though.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   108
     The default is true - therefore, it will check
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   109
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   110
    CheckForInstancesWhenRemovingClasses := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   111
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   112
    "
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
   113
     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
   114
     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
   115
     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
   116
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   117
    RememberAspect := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   118
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   119
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   120
     CheckForInstancesWhenRemovingClasses := true
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   121
     CheckForInstancesWhenRemovingClasses := false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   122
     RememberAspect := true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   123
     RememberAspect := false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   124
     ShowResourceIcons := true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   125
     ShowResourceIcons := false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   126
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   127
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   128
    "Created: / 23.11.1995 / 11:35:58 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   129
    "Modified: / 27.10.1997 / 17:34:25 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   130
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   131
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   132
!BrowserView class methodsFor:'class history'!
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   133
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   134
addToClassHistory:aClass selector:aSelector
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   135
    SystemBrowser addToHistory:aClass selector:aSelector
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   136
!
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   137
1575
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   138
checkClassHistory
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
   139
    "checks the class history for non-existing classes"
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
   140
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   141
    SystemBrowser checkClassHistory
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   142
! !
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   143
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   144
!BrowserView class methodsFor:'cleanup'!
1575
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
   145
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   146
lowSpaceCleanup
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
   147
    Icons := DefaultIcon := nil.
1747
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
    "
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   150
     self lowSpaceCleanup
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   151
    "
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   152
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
   153
    "Modified: / 26.7.1998 / 14:12:23 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   154
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   155
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   156
preSnapshot
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
   157
    Icons := DefaultIcon := nil.
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   158
! !
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   159
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   160
!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
   161
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   162
changeHistoryMaxSize
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   163
    "returns maximum size of the change history"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   164
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   165
    Screen current height < 768 ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   166
        ^ 15
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   167
    ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   168
    ^ 20 "/ 15
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   169
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   170
    "Created: / 10.2.2000 / 14:03:27 / cg"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   171
    "Modified: / 10.2.2000 / 14:07:01 / cg"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   172
!
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   173
1524
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
    "returns the class history"
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   176
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   177
    ^ SystemBrowser classHistory
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   178
!
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   179
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   180
classHistory:newCollection
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   181
    "returns the class history"
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   182
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   183
    SystemBrowser classHistory:newCollection
1524
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
classHistoryMaxSize
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   187
    "returns maximum size of the visited class history"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   188
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   189
    Screen current height < 768 ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   190
        ^ 15
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   191
    ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   192
    ^ 20 "/ 15
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   193
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
   194
    "Modified: / 10.2.2000 / 14:07:07 / cg"
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   195
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
   196
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   197
defaultIcon
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   198
    "return the browsers default window icon"
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   199
1288
9f6e0e8c3ab8 fixed icon
Claus Gittinger <cg@exept.de>
parents: 1282
diff changeset
   200
    <resource: #style (#SYSTEMBROWSER_ICON #SYSTEMBROWSER_ICON_FILE)>
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   201
2127
67083916cc02 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
   202
    |nm i resources|
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   203
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   204
    (i := DefaultIcon) isNil ifTrue:[
2342
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   205
        resources := self classResources.
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   206
        i := resources at:'SYSTEMBROWSER_ICON' default:nil.
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   207
        i isNil ifTrue:[
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   208
            nm := resources at:'SYSTEMBROWSER_ICON_FILE' default:'SBrowser.xbm'.
2478
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
   209
            i := Smalltalk imageFromFileNamed:nm inPackage:#'stx:libtool'.
2342
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   210
            i isNil ifTrue:[
2451
2a01088e75d3 try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents: 2449
diff changeset
   211
                i := StandardSystemView defaultIcon
2342
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   212
            ]
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   213
        ].
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   214
        i notNil ifTrue:[
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   215
            DefaultIcon := i := i onDevice:Display
728473067961 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2337
diff changeset
   216
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   217
    ].
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   218
    ^ i
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   219
2127
67083916cc02 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
   220
    "Modified: / 19.3.1997 / 20:48:34 / ca"
67083916cc02 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2123
diff changeset
   221
    "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
   222
!
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   223
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   224
fileImageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   225
    "answer an icon to mark file-loading image  methods"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   226
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   227
    ^ self imageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   228
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   229
    "Created: / 29.10.1997 / 03:32:43 / cg"
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   230
! !
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
   231
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   232
!BrowserView class methodsFor:'interface specs'!
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   233
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   234
methodFilterSpec
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   235
    "This resource specification was automatically generated
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   236
     by the UIPainter of ST/X."
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   237
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   238
    "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
   239
     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
   240
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   241
    "
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   242
     UIPainter new openOnClass:BrowserView andSelector:#methodFilterSpec
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   243
    "
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   244
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   245
    <resource: #canvas>
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   246
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   247
    ^ 
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   248
     #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   249
	#name: #methodFilterSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   250
	#window: 
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   251
       #(#WindowSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   252
	  #label: 'Method Filter:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   253
	  #name: 'Method Filter:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   254
	  #layout: #(#LayoutFrame 41 0 142 0 556 0 320 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   255
	  #level: 0
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   256
	  #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   257
	  #max: #(#Point 1280 1024)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   258
	  #bounds: #(#Rectangle 41 142 557 321)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   259
	  #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   260
	  #returnIsOKInDialog: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   261
	  #escapeIsCancelInDialog: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   262
	)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   263
	#component: 
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   264
       #(#SpecCollection
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   265
	  #collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   266
	   #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   267
	      #label: 'Browse methods from list, which:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   268
	      #name: 'Label1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   269
	      #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
   270
	      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   271
	      #adjust: #left
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   272
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   273
	   #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   274
	      #name: 'HorizontalPanel2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   275
	      #layout: #(#LayoutFrame 0 0 44 0 -2 1 84 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   276
	      #horizontalLayout: #leftFit
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   277
	      #verticalLayout: #center
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   278
	      #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   279
	      #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   280
	      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   281
	     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   282
		#collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   283
		 #(#ToggleSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   284
		    #label: 'Do not'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   285
		    #name: 'Toggle1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   286
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   287
		    #model: #notContainingMessage
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   288
		    #isTriggerOnDown: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   289
		    #showLamp: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   290
		    #lampColor: #(#Color 100.0 100.0 0.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   291
		    #extent: #(#Point 70 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   292
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   293
		 #(#CheckBoxSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   294
		    #label: 'Send the message:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   295
		    #name: 'CheckBox1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   296
		    #model: #doFilterMessage
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   297
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   298
		    #extent: #(#Point 200 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   299
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   300
		 #(#InputFieldSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   301
		    #name: 'EntryField1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   302
		    #enableChannel: #doFilterMessage
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   303
		    #model: #filteredMessageSelector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   304
		    #extent: #(#Point 238 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   305
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   306
		 )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   307
               
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   308
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   309
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   310
	   #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   311
	      #name: 'HorizontalPanel3'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   312
	      #layout: #(#LayoutFrame 0 0 84 0 -2 1 124 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   313
	      #horizontalLayout: #leftFit
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   314
	      #verticalLayout: #center
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   315
	      #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   316
	      #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   317
	      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   318
	     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   319
		#collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   320
		 #(#ToggleSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   321
		    #label: 'Do not'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   322
		    #name: 'Toggle2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   323
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   324
		    #model: #notContainingString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   325
		    #isTriggerOnDown: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   326
		    #showLamp: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   327
		    #lampColor: #(#Color 100.0 100.0 0.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   328
		    #extent: #(#Point 70 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   329
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   330
		 #(#CheckBoxSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   331
		    #label: 'Contain the String:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   332
		    #name: 'CheckBox2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   333
		    #model: #doFilterString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   334
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   335
		    #extent: #(#Point 200 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   336
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   337
		 #(#InputFieldSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   338
		    #name: 'EntryField2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   339
		    #enableChannel: #doFilterString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   340
		    #model: #filteredString
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   341
		    #extent: #(#Point 238 22)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   342
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   343
		 )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   344
               
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   345
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   346
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   347
	   #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   348
	      #name: 'HorizontalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   349
	      #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
   350
	      #horizontalLayout: #fitSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   351
	      #verticalLayout: #centerMax
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   352
	      #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   353
	      #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   354
	      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   355
	     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   356
		#collection: #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   357
		 #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   358
		    #label: 'Cancel'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   359
		    #name: 'Button1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   360
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   361
		    #model: #cancel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   362
		    #extent: #(#Point 253 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   363
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   364
		 #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   365
		    #label: 'Browse'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   366
		    #name: 'Button2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   367
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   368
		    #model: #accept
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   369
		    #isDefault: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   370
		    #actionValue: ''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   371
		    #extent: #(#Point 254 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   372
		  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   373
		 )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   374
               
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   375
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   376
	    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   377
	   )
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   378
         
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   379
	)
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   380
      )
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   381
!
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
   382
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   383
methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   384
    "This resource specification was automatically generated
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   385
     by the UIPainter of ST/X."
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   386
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   387
    "Do not manually edit this!! If it is corrupted,
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   388
     the UIPainter may not be able to read the specification."
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   389
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   390
    "
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   391
     UIPainter new openOnClass:BrowserView andSelector:#methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   392
     BrowserView new openInterface:#methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   393
    "
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   394
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   395
    <resource: #canvas>
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   396
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   397
    ^
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   398
     
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   399
       #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   400
	  #window: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   401
	   #(#WindowSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   402
	      #name: 'Move method to:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   403
	      #layout: #(#LayoutFrame 290 0 207 0 628 0 334 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   404
	      #label: 'Move method to:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   405
	      #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   406
	      #max: #(#Point 1280 1024)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   407
	      #bounds: #(#Rectangle 290 207 629 335)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   408
	      #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   409
	  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   410
	  #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   411
	   #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   412
	      #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   413
	       #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   414
		 #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   415
		    #name: 'Label1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   416
		    #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
   417
		    #label: 'Move method to which class:'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   418
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   419
		    #adjust: #left
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   420
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   421
		 #(#ComboBoxSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   422
		    #name: 'ComboBox1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   423
		    #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
   424
		    #model: #className
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   425
		    #comboList: #classList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   426
		    #useIndex: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   427
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   428
		 #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   429
		    #name: 'HorizontalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   430
		    #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
   431
		    #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   432
		     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   433
			#collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   434
			 #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   435
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   436
			      #name: 'Button1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   437
			      #label: 'Cancel'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   438
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   439
			      #model: #cancel
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   440
			      #extent: #(#Point 165 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   441
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   442
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   443
			      #name: 'Button2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   444
			      #label: 'Move'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   445
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   446
			      #model: #accept
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   447
			      #isDefault: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   448
			      #extent: #(#Point 165 27)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   449
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   450
			)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   451
		    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   452
		    #horizontalLayout: #fitSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   453
		    #verticalLayout: #centerMax
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   454
		    #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   455
		    #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   456
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   457
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   458
	  )
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   459
      )
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   460
!
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
   461
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   462
repositoryLoadSpec
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   463
    "This resource specification was automatically generated
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   464
     by the UIPainter of ST/X."
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   465
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   466
    "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
   467
     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
   468
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   469
    "
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   470
     UIPainter new openOnClass:BrowserView andSelector:#repositoryLoadSpec
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   471
     BrowserView new openInterface:#repositoryLoadSpec
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   472
    "
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   473
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   474
    <resource: #canvas>
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   475
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   476
    ^
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   477
     
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   478
       #(#FullSpec
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   479
	  #window: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   480
	   #(#WindowSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   481
	      #name: 'Load from repository'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   482
	      #layout: #(#LayoutFrame 216 0 173 0 618 0 737 0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   483
	      #label: 'Load from repository'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   484
	      #min: #(#Point 10 10)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   485
	      #max: #(#Point 1280 1024)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   486
	      #bounds: #(#Rectangle 216 173 619 738)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   487
	      #usePreferredExtent: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   488
	  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   489
	  #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   490
	   #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   491
	      #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   492
	       #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   493
		 #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   494
		    #name: 'Label1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   495
		    #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
   496
		    #label: 'Load class(es) from the repository ...'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   497
		    #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   498
		    #adjust: #left
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   499
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   500
		 #(#VariableVerticalPanelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   501
		    #name: 'VariableVerticalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   502
		    #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
   503
		    #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   504
		     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   505
			#collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   506
			 #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   507
			   #(#ViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   508
			      #name: 'Box1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   509
			      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   510
			       #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   511
				  #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   512
				   #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   513
				     #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   514
					#name: 'Label6'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   515
					#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
   516
					#label: 'Modules'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   517
					#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   518
					#adjust: #right
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
				     #(#SequenceViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   521
					#name: 'moduleSelectionList'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   522
					#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
   523
					#model: #moduleSelection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   524
					#hasHorizontalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   525
					#hasVerticalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   526
					#miniScrollerHorizontal: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   527
					#useIndex: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   528
					#sequenceList: #moduleList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   529
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   530
				  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   531
			      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   532
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   533
			   #(#ViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   534
			      #name: 'Box2'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   535
			      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   536
			       #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   537
				  #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   538
				   #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   539
				     #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   540
					#name: 'Label5'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   541
					#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
   542
					#label: 'Packages'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   543
					#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   544
					#adjust: #right
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
				     #(#SequenceViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   547
					#name: 'packageSelectionList'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   548
					#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
   549
					#model: #packageSelection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   550
					#hasHorizontalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   551
					#hasVerticalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   552
					#miniScrollerHorizontal: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   553
					#useIndex: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   554
					#sequenceList: #packageList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   555
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   556
				  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   557
			      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   558
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   559
			   #(#ViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   560
			      #name: 'Box3'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   561
			      #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   562
			       #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   563
				  #collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   564
				   #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   565
				     #(#LabelSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   566
					#name: 'Label4'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   567
					#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
   568
					#label: 'Containers'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   569
					#translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   570
					#adjust: #right
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   571
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   572
				     #(#SequenceViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   573
					#name: 'containerList'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   574
					#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
   575
					#model: #containerSelection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   576
					#hasHorizontalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   577
					#hasVerticalScrollBar: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   578
					#miniScrollerHorizontal: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   579
					#isMultiSelect: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   580
					#useIndex: false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   581
					#sequenceList: #containerList
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   582
					#doubleClickChannel: #containerDoubleClicked
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   583
				    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   584
				  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   585
			      )
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
			)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   588
		    )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   589
		    #handles: #(#Any 0.21165 0.539806 1.0)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   590
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   591
		 #(#HorizontalPanelViewSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   592
		    #name: 'HorizontalPanel1'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   593
		    #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
   594
		    #component: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   595
		     #(#SpecCollection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   596
			#collection: 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   597
			 #(
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   598
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   599
			      #name: 'loadButton'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   600
			      #label: 'Load'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   601
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   602
			      #model: #load
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   603
			      #enableChannel: #loadEnabled
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   604
			      #extent: #(#Point 100 25)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   605
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   606
			   #(#ActionButtonSpec
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   607
			      #name: 'dismissButton'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   608
			      #label: 'Dismiss'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   609
			      #translateLabel: true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   610
			      #model: #close
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   611
			      #extent: #(#Point 100 25)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   612
			  )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   613
			)
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
		    #horizontalLayout: #spreadSpaceMax
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   616
		    #verticalLayout: #center
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   617
		    #horizontalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   618
		    #verticalSpace: 3
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   619
		)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   620
	      )
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
   621
	  )
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   622
      )
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   623
1674
60baa8cba008 load from repository spec. geometry
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   624
    "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
   625
! !
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
   626
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   627
!BrowserView class methodsFor:'menu specs'!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   628
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   629
menuSpec
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   630
    "This resource specification was automatically generated
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   631
     by the MenuEditor of ST/X."
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   632
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   633
    "Do not manually edit this!! If it is corrupted,
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   634
     the MenuEditor may not be able to read the specification."
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   635
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   636
    "
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   637
     MenuEditor new openOnClass:BrowserView andSelector:#menuSpec
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   638
     (Menu new fromLiteralArrayEncoding:(BrowserView menuSpec)) startUp
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   639
    "
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   640
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   641
    <resource: #menu>
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   642
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   643
    ^ 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   644
     #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   645
        #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   646
         #(#MenuItem
4185
fba4e4c51395 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4126
diff changeset
   647
            #label: '&Browse'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   648
            #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   649
            #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   650
           #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   651
              #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   652
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   653
                  #label: 'Clone'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   654
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   655
                  #value: #browserClone
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   656
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   657
               #(#MenuItem
3116
66e5486e23f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3115
diff changeset
   658
                  #label: '-'
66e5486e23f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3115
diff changeset
   659
                )
66e5486e23f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3115
diff changeset
   660
               #(#MenuItem
66e5486e23f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3115
diff changeset
   661
                  #label: 'Class...'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   662
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   663
                  #value: #browserOpenInClass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   664
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   665
               #(#MenuItem
3116
66e5486e23f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3115
diff changeset
   666
                  #label: '-'
66e5486e23f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3115
diff changeset
   667
                )
66e5486e23f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3115
diff changeset
   668
               #(#MenuItem
66e5486e23f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3115
diff changeset
   669
                  #label: 'Full Class Source'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   670
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   671
                  #value: #browserSpawnFullClass
3115
422c381b86b0 more image browsing fixes
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
   672
                  #enabled: #isNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   673
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   674
               #(#MenuItem
3116
66e5486e23f7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3115
diff changeset
   675
                  #label: 'Class Extensions'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   676
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   677
                  #value: #browserSpawnExtensions
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   678
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   679
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   680
                  #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   681
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   682
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   683
                  #label: 'Exit'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   684
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   685
                  #value: #closeRequest
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   686
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   687
               )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   688
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   689
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   690
            )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   691
          )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   692
         #(#MenuItem
3600
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   693
            #label: 'Find'
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   694
            #translateLabel: true
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   695
            #submenu: 
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   696
           #(#Menu
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   697
              #(
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   698
               #(#MenuItem
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   699
                  #label: 'Class...'
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   700
                  #translateLabel: true
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   701
                  #value: #classCategoryFindClass
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   702
                )
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   703
               #(#MenuItem
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   704
                  #label: 'Visited Classes'
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   705
                  #translateLabel: true
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   706
                  #submenuChannel: #classHistoryMenu
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   707
                )
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   708
               #(#MenuItem
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   709
                  #label: '-'
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   710
                )
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   711
               #(#MenuItem
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   712
                  #label: 'Method...'
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   713
                  #translateLabel: true
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   714
                  #value: #classCategoryFindMethod
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   715
                )
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   716
               #(#MenuItem
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   717
                  #label: 'Changed Methods'
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   718
                  #translateLabel: true
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   719
                  #submenuChannel: #changeHistoryMenu
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   720
                )
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   721
               )
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   722
              nil
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   723
              nil
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   724
            )
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   725
          )
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
   726
         #(#MenuItem
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   727
            #label: 'Category'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   728
            #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   729
            #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   730
           #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   731
              #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   732
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
   733
                  #label: 'FileOut'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   734
                  #translateLabel: true
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   735
                  #submenu: 
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   736
                 #(#Menu
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   737
                    #(
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   738
                     #(#MenuItem
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   739
                        #label: 'FileOut As...'
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   740
                        #translateLabel: true
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   741
                        #value: #classCategoryFileOutAs
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   742
                        #enabled: #hasClassCategorySelected
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   743
                      )
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   744
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
   745
                        #label: 'FileOut Each In...'
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   746
                        #translateLabel: true
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   747
                        #value: #classCategoryFileOutEachIn
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   748
                        #enabled: #hasClassCategorySelected
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   749
                      )
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   750
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
   751
                        #label: 'FileOut Each Binary In...'
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   752
                        #translateLabel: true
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   753
                        #value: #classCategoryFileOutBinaryEach
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   754
                        #enabled: #hasClassCategorySelected
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   755
                      )
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   756
                     )
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   757
                    nil
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   758
                    nil
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   759
                  )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   760
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   761
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   762
                  #label: 'Repository'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   763
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   764
                  #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   765
                 #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   766
                    #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   767
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   768
                        #label: 'Repository history...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   769
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   770
                        #value: #classCategoryRepositoryHistory
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   771
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   772
                     #(#MenuItem
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
   773
                        #label: 'Validate Class Revisions'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   774
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   775
                        #value: #classCategoryValidateClassRevisions
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   776
                        #enabled: #hasClassCategorySelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   777
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   778
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   779
                        #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   780
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   781
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
   782
                        #label: 'CheckIn Each...'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   783
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   784
                        #value: #classCategoryCheckinEach
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   785
                        #enabled: #hasClassCategorySelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   786
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   787
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   788
                        #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   789
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   790
                     #(#MenuItem
3117
b90d83acd384 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3116
diff changeset
   791
                        #label: 'Load from Repository...'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   792
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   793
                        #value: #classCategoryLoadFromRepository
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
   794
                        #enabled: #isNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   795
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   796
                     )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   797
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   798
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   799
                  )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   800
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   801
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
   802
                  #label: 'PrintOut'
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   803
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   804
                  #value: #classCategoryPrintOut
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   805
                  #enabled: #hasClassCategorySelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   806
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   807
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
   808
                  #label: 'PrintOut Protocol'
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   809
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   810
                  #value: #classCategoryPrintOutProtocol
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   811
                  #enabled: #hasClassCategorySelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   812
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   813
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   814
                  #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   815
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   816
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   817
                  #label: 'Spawn Category'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   818
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   819
                  #value: #classCategorySpawn
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   820
                  #enabled: #hasClassCategorySelectedAndIsNotSimulatedEnvironment
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   821
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   822
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   823
                  #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   824
                  #isVisible: false
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   825
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   826
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   827
                  #label: 'Find Class...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   828
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   829
                  #isVisible: false
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   830
                  #value: #classCategoryFindClass
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   831
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   832
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   833
                  #label: 'Find Method...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   834
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   835
                  #isVisible: false
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   836
                  #value: #classCategoryFindMethod
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   837
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   838
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   839
                  #label: 'Visited Classes'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   840
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   841
                  #isVisible: false
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   842
                  #submenuChannel: #classHistoryMenu
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   843
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   844
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   845
                  #label: 'Changed Classes'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   846
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   847
                  #isVisible: false
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   848
                  #submenuChannel: #changeHistoryMenu
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   849
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   850
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   851
                  #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   852
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   853
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   854
                  #label: 'New Class Category...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   855
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   856
                  #value: #classCategoryNewCategory
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   857
                  #enabled: #isNotSimulatedEnvironment
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   858
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   859
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   860
                  #label: 'Rename...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   861
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   862
                  #value: #classCategoryRename
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   863
                  #enabled: #hasClassCategorySelectedAndIsNotSimulatedEnvironment
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   864
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   865
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   866
                  #label: 'Remove...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   867
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   868
                  #value: #classCategoryRemove
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   869
                  #enabled: #hasClassCategorySelectedAndIsNotSimulatedEnvironment
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   870
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   871
               #(#MenuItem
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   872
                  #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   873
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   874
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   875
                  #label: 'Update'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   876
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   877
                  #value: #classCategoryUpdate
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
   878
                  #enabled: #isNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   879
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   880
               )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   881
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   882
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   883
            )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   884
          )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   885
         #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   886
            #label: 'Class'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   887
            #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   888
            #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   889
           #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   890
              #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   891
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
   892
                  #label: 'FileOut'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   893
                  #translateLabel: true
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   894
                  #submenu: 
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   895
                 #(#Menu
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   896
                    #(
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   897
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
   898
                        #label: 'FileOut As...'
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   899
                        #translateLabel: true
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   900
                        #value: #classFileOutAs
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   901
                        #enabled: #hasLoadedClassSelected
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   902
                      )
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   903
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
   904
                        #label: 'FileOut Binary As...'
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   905
                        #translateLabel: true
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   906
                        #value: #classFileOutBinaryAs
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   907
                        #enabled: #hasLoadedClassSelected
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   908
                      )
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   909
                     )
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   910
                    nil
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   911
                    nil
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
   912
                  )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   913
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   914
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   915
                  #label: 'Repository'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   916
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   917
                  #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   918
                 #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   919
                    #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   920
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   921
                        #label: 'Package...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   922
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   923
                        #value: #classModifyPackage
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
   924
                        #enabled: #hasClassSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   925
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   926
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   927
                        #label: 'Source Container...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   928
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   929
                        #value: #classModifyContainer
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
   930
                        #enabled: #hasLoadedClassSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   931
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   932
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   933
                        #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   934
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   935
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   936
                        #label: 'Remove Source Container...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   937
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   938
                        #value: #classRemoveContainer
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
   939
                        #enabled: #hasClassSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   940
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   941
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   942
                        #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   943
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   944
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   945
                        #label: 'Revision Log...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   946
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   947
                        #value: #classRevisionInfo
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   948
                        #enabled: #hasClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   949
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   950
                     #(#MenuItem
3117
b90d83acd384 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3116
diff changeset
   951
                        #label: 'Compare with Repository...'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   952
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   953
                        #value: #classCompareWithRepository
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   954
                        #enabled: #hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   955
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   956
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   957
                        #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   958
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   959
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   960
                        #label: 'Check into Source Repository...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   961
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   962
                        #value: #classCheckin
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   963
                        #enabled: #hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   964
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   965
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   966
                        #label: 'Load from Repository...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   967
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   968
                        #value: #classLoadRevision
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
   969
                        #enabled: #isNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   970
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   971
                     )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   972
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   973
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   974
                  )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   975
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   976
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   977
                  #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   978
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
   979
               #(#MenuItem
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   980
                  #label: 'Documentation'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   981
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   982
                  #submenu: 
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   983
                 #(#Menu
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   984
                    #(
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   985
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
   986
                        #label: 'PrintOut'
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   987
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   988
                        #value: #classPrintOut
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   989
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   990
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   991
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
   992
                        #label: 'PrintOut Protocol'
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   993
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   994
                        #value: #classPrintOutProtocol
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   995
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   996
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   997
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   998
                        #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
   999
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1000
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1001
                        #label: 'HTML Documentation'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1002
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1003
                        #value: #classDocumentation
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1004
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1005
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1006
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1007
                        #label: 'Save HTML Documentation As...'
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1008
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1009
                        #value: #classDocumentationAs
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1010
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1011
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1012
                     )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1013
                    nil
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1014
                    nil
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1015
                  )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1016
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1017
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1018
                  #label: 'Show'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1019
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1020
                  #enabled: #hasClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1021
                  #submenu: 
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1022
                 #(#Menu
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1023
                    #(
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1024
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1025
                        #label: 'Hierarchy'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1026
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1027
                        #value: #classHierarchy
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1028
                        #enabled: #hasClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1029
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1030
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1031
                        #label: 'Definition'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1032
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1033
                        #value: #classDefinition
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1034
                        #enabled: #hasClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1035
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1036
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1037
                        #label: 'Comment'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1038
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1039
                        #value: #classComment
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1040
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1041
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1042
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1043
                        #label: 'Class Instvars'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1044
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1045
                        #value: #classClassInstVars
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1046
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1047
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1048
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1049
                        #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1050
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1051
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1052
                        #label: 'Primitive Definitions'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1053
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1054
                        #value: #classPrimitiveDefinitions
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1055
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1056
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1057
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1058
                        #label: 'Primitive Variables'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1059
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1060
                        #value: #classPrimitiveVariables
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1061
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1062
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1063
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1064
                        #label: 'Primitive Functions'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1065
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1066
                        #value: #classPrimitiveFunctions
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1067
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1068
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1069
                     )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1070
                    nil
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1071
                    nil
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1072
                  )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1073
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1074
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1075
                  #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1076
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1077
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1078
                  #label: 'Spawn'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1079
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1080
                  #enabled: #hasClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1081
                  #submenu: 
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1082
                 #(#Menu
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1083
                    #(
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1084
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1085
                        #label: 'Class'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1086
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1087
                        #value: #classSpawn
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1088
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1089
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1090
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1091
                        #label: 'Full Protocol'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1092
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1093
                        #value: #classSpawnFullProtocol
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1094
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1095
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1096
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1097
                        #label: 'Hierarchy'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1098
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1099
                        #value: #classSpawnHierarchy
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1100
                        #enabled: #hasClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1101
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1102
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1103
                        #label: 'Subclasses'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1104
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1105
                        #value: #classSpawnSubclasses
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1106
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1107
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1108
                     )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1109
                    nil
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1110
                    nil
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1111
                  )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1112
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1113
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1114
                  #label: 'References to Class'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1115
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1116
                  #value: #classRefs
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1117
                  #enabled: #hasClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1118
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1119
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1120
                  #label: 'Find Response to...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1121
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1122
                  #value: #methodFindAnyMethod
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1123
                  #enabled: #hasClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1124
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1125
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1126
                  #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1127
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1128
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1129
                  #label: 'New'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1130
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1131
                  #enabled: #isNotSimulatedEnvironment
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1132
                  #submenu: 
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1133
                 #(#Menu
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1134
                    #(
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1135
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1136
                        #label: 'Class...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1137
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1138
                        #value: #classNewClass
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1139
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1140
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1141
                        #label: 'Subclass...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1142
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1143
                        #value: #classNewSubclass
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1144
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1145
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1146
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1147
                        #label: 'Private Class...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1148
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1149
                        #value: #classNewPrivateClass
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1150
                        #enabled: #hasLoadedClassSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1151
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1152
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1153
                        #label: 'Application...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1154
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1155
                        #value: #classNewApplication
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1156
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1157
                     #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1158
                        #label: 'Dialog...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1159
                        #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1160
                        #value: #classNewDialog
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1161
                      )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1162
                     )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1163
                    nil
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1164
                    nil
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1165
                  )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1166
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1167
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1168
                  #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1169
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1170
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1171
                  #label: 'Rename...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1172
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1173
                  #value: #classRename
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1174
                  #enabled: #hasLoadedClassSelectedAndIsNotSimulatedEnvironment
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1175
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1176
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1177
                  #label: 'Remove...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1178
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1179
                  #value: #classRemove
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1180
                  #enabled: #hasClassSelectedAndIsNotSimulatedEnvironment
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1181
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1182
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1183
                  #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1184
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1185
               #(#MenuItem
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1186
                  #label: 'Others'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1187
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1188
                  #enabled: #hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1189
                  #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1190
                 #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1191
                    #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1192
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1193
                        #label: 'Inspect Class'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1194
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1195
                        #value: #classInspect
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1196
                        #enabled: #hasClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1197
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1198
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1199
                        #label: 'Inspect Instances'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1200
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1201
                        #value: #classInstancesInspect
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1202
                        #enabled: #hasClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1203
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1204
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1205
                        #label: 'Inspect Derived Instances'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1206
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1207
                        #value: #classDerivedInstancesInspect
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1208
                        #enabled: #hasClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1209
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1210
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1211
                        #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1212
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1213
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1214
                        #label: 'Make Private Class In...'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1215
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1216
                        #value: #classMakePrivate
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1217
                        #enabled: #hasClassSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1218
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1219
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1220
                        #label: 'Make Public Class'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1221
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1222
                        #value: #classMakePublic
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1223
                        #enabled: #hasClassSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1224
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1225
                     )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1226
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1227
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1228
                  )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1229
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1230
               )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1231
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1232
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1233
            )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1234
          )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1235
         #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1236
            #label: 'Protocol'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1237
            #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1238
            #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1239
           #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1240
              #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1241
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1242
                  #label: 'FileOut'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1243
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1244
                  #value: #methodCategoryFileOut
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1245
                  #enabled: #hasMethodCategorySelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1246
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1247
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1248
                  #label: 'FileOut All'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1249
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1250
                  #value: #methodCategoryFileOutAll
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1251
                  #enabled: #hasMethodCategorySelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1252
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1253
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1254
                  #label: 'PrintOut'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1255
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1256
                  #value: #methodCategoryPrintOut
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1257
                  #enabled: #hasMethodCategorySelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1258
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1259
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1260
                  #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1261
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1262
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1263
                  #label: 'Spawn'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1264
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1265
                  #value: #methodCategorySpawn
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1266
                  #enabled: #hasMethodCategorySelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1267
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1268
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1269
                  #label: 'Spawn Category...'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1270
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1271
                  #value: #methodCategorySpawnCategory
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1272
                  #enabled: #hasMethodCategorySelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1273
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1274
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1275
                  #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1276
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1277
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1278
                  #label: 'New Category...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1279
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1280
                  #value: #methodCategoryNewCategory
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1281
                  #enabled: #hasLoadedClassSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1282
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1283
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1284
                  #label: 'Copy Category...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1285
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1286
                  #value: #methodCategoryCopyCategory
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1287
                  #enabled: #hasLoadedClassSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1288
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1289
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1290
                  #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1291
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1292
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1293
                  #label: 'Rename...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1294
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1295
                  #value: #methodCategoryRename
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1296
                  #enabled: #hasMethodCategorySelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1297
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1298
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1299
                  #label: 'Remove...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1300
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1301
                  #value: #methodCategoryRemove
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1302
                  #enabled: #hasMethodCategorySelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1303
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1304
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1305
                  #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1306
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1307
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1308
                  #label: 'Generate'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1309
                  #translateLabel: true
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1310
                  #enabled: #hasLoadedClassSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1311
                  #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1312
                 #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1313
                    #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1314
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1315
                        #label: 'Documentation Stubs'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1316
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1317
                        #isVisible: #showingClass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1318
                        #enabled: #hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1319
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1320
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1321
                        #label: 'Initial Application Code'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1322
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1323
                        #isVisible: #showingClassAndIsApplicationSubclass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1324
                        #value: #methodCategoryCreateApplicationMethods
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1325
                        #enabled: #hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1326
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1327
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1328
                        #label: 'Initial Dialog Code'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1329
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1330
                        #isVisible: #showingClassAndIsDialogSubclass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1331
                        #value: #methodCategoryCreateApplicationMethods
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1332
                        #enabled: #hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1333
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1334
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1335
                        #label: 'Access Methods (for Selected Variable)'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1336
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1337
                        #isVisible: #showingInstanceAndHasVariableSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1338
                        #value: #methodCategoryCreateAccessMethods
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1339
                        #enabled: #hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1340
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1341
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1342
                        #label: 'Access Methods with Change Notification (for Selected Variable)'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1343
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1344
                        #isVisible: #showingInstanceAndHasVariableSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1345
                        #value: #methodCategoryCreateAccessMethodsWithChange
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1346
                        #enabled: #hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1347
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1348
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1349
                        #label: 'Access Methods (for All)'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1350
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1351
                        #value: #methodCategoryCreateAccessMethods
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1352
                        #enabled: #hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1353
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1354
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1355
                        #label: 'Access Methods with Change Notification (for All)'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1356
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1357
                        #value: #methodCategoryCreateAccessMethodsWithChange
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1358
                        #enabled: #hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1359
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1360
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1361
                        #label: 'Standard update Method Template'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1362
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1363
                        #isVisible: #showingInstance
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1364
                        #value: #methodCategoryCreateUpdateMethod
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1365
                        #enabled: #hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1366
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1367
                     )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1368
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1369
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1370
                  )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1371
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1372
               )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1373
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1374
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1375
            )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1376
          )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1377
         #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1378
            #label: 'Selector'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1379
            #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1380
            #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1381
           #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1382
              #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1383
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1384
                  #label: 'FileOut'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1385
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1386
                  #value: #methodFileOut
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1387
                  #enabled: #hasMethodSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1388
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1389
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1390
                  #label: 'PrintOut'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1391
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1392
                  #value: #methodPrintOut
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1393
                  #enabled: #hasMethodSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1394
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1395
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1396
                  #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1397
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1398
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1399
                  #label: 'Spawn'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1400
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1401
                  #value: #methodSpawn
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1402
                  #enabled: #hasMethodSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1403
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1404
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1405
                  #label: 'Inheritance'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1406
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1407
                  #value: #methodInheritance
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1408
                  #enabled: #hasMethodSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1409
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1410
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1411
                  #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1412
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1413
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1414
                  #label: 'Senders...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1415
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1416
                  #value: #methodSenders
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1417
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1418
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1419
                  #label: 'Implementors...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1420
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1421
                  #value: #methodImplementors
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1422
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1423
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1424
                  #label: 'Globals...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1425
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1426
                  #value: #methodGlobalReferends
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1427
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1428
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1429
                  #label: 'String Search...'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1430
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1431
                  #value: #methodStringSearch
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1432
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1433
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1434
                  #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1435
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1436
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1437
                  #label: 'New'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1438
                  #translateLabel: true
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1439
                  #enabled: #isNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1440
                  #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1441
                 #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1442
                    #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1443
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1444
                        #label: 'Method'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1445
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1446
                        #value: #methodNewMethod
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1447
                        #enabled: #hasMethodCategorySelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1448
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1449
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1450
                        #label: 'Window Spec'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1451
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1452
                        #isVisible: #showingClassAndHasMethodCategorySelectedAndIsApplicationSubclass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1453
                        #value: #methodNewWindowSpec
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1454
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1455
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1456
                        #label: 'Menu Spec'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1457
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1458
                        #isVisible: #showingClassAndHasMethodCategorySelectedAndIsApplicationSubclass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1459
                        #value: #methodNewMenuSpec
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1460
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1461
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1462
                        #label: 'Image Spec'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1463
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1464
                        #isVisible: #showingClassAndHasMethodCategorySelectedAndIsApplicationSubclass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1465
                        #value: #methodNewImageSpec
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1466
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1467
                     )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1468
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1469
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1470
                  )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1471
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1472
               #(#MenuItem
3659
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  1473
                  #label: 'Change Category...'
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  1474
                  #translateLabel: true
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  1475
                  #value: #methodChangeCategory
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  1476
                  #enabled: #hasMethodSelectedAndIsNotReadOnlyEnvironment
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  1477
                )
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  1478
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1479
                  #label: 'Copy To...'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1480
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1481
                  #value: #methodCopy
3659
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  1482
                  #enabled: #hasMethodSelectedAndIsNotReadOnlyEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1483
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1484
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1485
                  #label: 'Move To...'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1486
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1487
                  #value: #methodMove
3659
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  1488
                  #enabled: #hasMethodSelectedAndIsNotReadOnlyEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1489
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1490
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1491
                  #label: 'Remove...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1492
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1493
                  #value: #methodRemove
3659
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  1494
                  #enabled: #hasMethodSelectedAndIsNotReadOnlyEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1495
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1496
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1497
                  #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1498
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1499
               #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1500
                  #label: 'Others'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1501
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1502
                  #enabled: #hasMethodSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1503
                  #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1504
                 #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1505
                    #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1506
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1507
                        #label: 'Compare with Previous'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1508
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1509
                        #value: #methodCompareWithPreviousVersion
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1510
                        #enabled: #hasMethodSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1511
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1512
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1513
                        #label: 'Compare Against...'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1514
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1515
                        #value: #methodCompareSource
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1516
                        #enabled: #hasMethodSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1517
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1518
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1519
                        #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1520
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1521
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1522
                        #label: 'Inspect Method'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1523
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1524
                        #value: #methodInspect
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1525
                        #enabled: #hasMethodSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1526
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1527
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1528
                        #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1529
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1530
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1531
                        #label: 'stc-Compile'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1532
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1533
                        #value: #methodSTCCompile
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1534
                        #enabled: #hasMethodSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1535
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1536
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1537
                        #label: 'Decompile'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1538
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1539
                        #value: #methodDecompile
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1540
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1541
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1542
                        #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1543
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1544
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1545
                        #label: 'Package...'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1546
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1547
                        #value: #methodModifyPackage
3659
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
  1548
                        #enabled: #hasMethodSelectedAndIsNotReadOnlyEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1549
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1550
                     #(#MenuItem
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1551
                        #label: '-'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1552
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1553
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1554
                        #label: 'Make Public'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1555
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1556
                        #value: #methodMakePublic
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1557
                        #enabled: #hasMethodSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1558
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1559
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1560
                        #label: 'Make Private'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1561
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1562
                        #value: #methodMakePrivate
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1563
                        #enabled: #hasMethodSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1564
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1565
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1566
                        #label: 'Make Protected'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1567
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1568
                        #value: #methodMakeProtected
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1569
                        #enabled: #hasMethodSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1570
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1571
                     #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1572
                        #label: 'Make Ignored'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1573
                        #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1574
                        #value: #methodMakeIgnored
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  1575
                        #enabled: #hasMethodSelectedAndIsNotSimulatedEnvironment
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1576
                      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1577
                     )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1578
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1579
                    nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1580
                  )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1581
                )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1582
               )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1583
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1584
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1585
            )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1586
          )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1587
         #(#MenuItem
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1588
            #label: 'Debug'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1589
            #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1590
            #submenu: 
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1591
           #(#Menu
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1592
              #(
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1593
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1594
                  #label: 'Remove Break/Trace'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1595
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1596
                  #value: #methodRemoveBreakOrTrace
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1597
                  #enabled: #hasWrappedMethodSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1598
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1599
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1600
                  #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1601
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1602
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1603
                  #label: 'BreakPoint'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1604
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1605
                  #value: #methodBreakPoint
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1606
                  #enabled: #hasUnwrappedMethodSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1607
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1608
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1609
                  #label: 'BreakPoint in...'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1610
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1611
                  #value: #methodBreakPointInprocess
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1612
                  #enabled: #hasUnwrappedMethodSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1613
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1614
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1615
                  #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1616
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1617
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1618
                  #label: 'Trace'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1619
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1620
                  #value: #methodTrace
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1621
                  #enabled: #hasUnwrappedMethodSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1622
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1623
               #(#MenuItem
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1624
                  #label: '-'
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1625
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1626
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1627
                  #label: 'Start Timing'
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1628
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1629
                  #value: #methodStartTiming
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1630
                  #enabled: #hasUnwrappedMethodSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1631
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1632
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1633
                  #label: 'Start Counting'
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1634
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1635
                  #value: #methodStartCounting
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1636
                  #enabled: #hasUnwrappedMethodSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1637
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1638
               #(#MenuItem
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  1639
                  #label: 'Start Mem Usage'
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1640
                  #translateLabel: true
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1641
                  #value: #methodStartMemoryUsage
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1642
                  #enabled: #hasUnwrappedMethodSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1643
                )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1644
               )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1645
              nil
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1646
              nil
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1647
            )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1648
          )
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  1649
         #(#MenuItem
4185
fba4e4c51395 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4126
diff changeset
  1650
            #label: '&Help'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1651
            #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1652
            #startGroup: #right
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1653
            #submenu: 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1654
           #(#Menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1655
              #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1656
               #(#MenuItem
3176
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1657
                  #label: 'Documentation'
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1658
                  #translateLabel: true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1659
                  #value: #openBrowserDocumentation
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1660
                )
3176
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1661
               #(#MenuItem
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1662
                  #label: 'Keyword Index'
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1663
                  #translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1664
                  #value: #openKeywordIndexDocumentation
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
  1665
                )
3502
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
  1666
               #(#MenuItem
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
  1667
                  #label: '-'
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
  1668
                )
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
  1669
               #(#MenuItem
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
  1670
                  #label: 'About SystemBrowser...'
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
  1671
                  #translateLabel: true
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
  1672
                  #value: #openAboutThisApplication
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
  1673
                )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1674
               )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1675
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1676
              nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1677
            )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1678
          )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1679
         )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1680
        nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1681
        nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1682
      )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1683
! !
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  1684
132
claus
parents: 131
diff changeset
  1685
!BrowserView methodsFor:'change & update'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1686
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  1687
delayedUpdate:something with:someArgument from:changedObject
273
0fc84937f240 check oldMethod in method-update notification
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
  1688
    |list selector oldMethod|
93
claus
parents: 92
diff changeset
  1689
3578
d92a384c03d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3571
diff changeset
  1690
    (changedObject == environment) ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1691
        something == #methodInClassRemoved ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1692
            "/ 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
  1693
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1694
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1695
        something == #methodInClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1696
            "/ 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
  1697
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1698
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1699
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1700
        self updateNamespaceList.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1701
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1702
        something == #newClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1703
            (currentClass notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1704
            and:[someArgument name = currentClass name
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1705
                 or:[someArgument == currentClass]]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1706
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1707
                 the current class has changed
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1708
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1709
                (aspect == #definition
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1710
                and:[codeView modified not]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1711
                    self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1712
                    self classSelectionChanged.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1713
                ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1714
                    self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1715
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1716
                currentClass wasAutoloaded ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1717
                    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
  1718
                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1719
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1720
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1721
            ((someArgument category = currentClassCategory)
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1722
            or:[currentClassCategory notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1723
                and:[currentClassCategory startsWith:$*]]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1724
                self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1725
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1726
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1727
            someArgument category ~= currentClassCategory ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1728
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1729
                 category new ?
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1730
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1731
                (classCategoryListView notNil 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1732
                and:[(list := classCategoryListView list) notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1733
                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
  1734
                ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1735
                    self updateClassCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1736
                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1737
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1738
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1739
            "/ 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
  1740
            "/ 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
  1741
            self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1742
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1743
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1744
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1745
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1746
        something == #classRemove ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1747
            someArgument == currentClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1748
                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
  1749
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1750
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1751
            " fall into general update "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1752
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1753
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1754
        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1755
         any other (unknown) change 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1756
         with the Smalltalk dictionary ...
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1757
        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1758
        self updateClassCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1759
        self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1760
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1761
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1762
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1763
    changedObject isBehavior ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1764
        "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1765
        "/ 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
  1766
        "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1767
        fullClass ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1768
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1769
            "/ full-class browser ...
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1770
            "/ (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
  1771
            "/
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  1772
            (currentClass theNonMetaclass == changedObject
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  1773
            or:[currentClass theMetaclass == changedObject]) ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1774
                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
  1775
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1776
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1777
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1778
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1779
        (currentClass notNil 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1780
        and:[changedObject name = currentClass name
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1781
             or:[changedObject == currentClass]]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1782
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1783
            "/ 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
  1784
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1785
            ((something == #methodDictionary)
2860
85a90a10798f method category: and package: now send change notifications.
Claus Gittinger <cg@exept.de>
parents: 2859
diff changeset
  1786
            or:[something == #methodPackage         "/ will vanish
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1787
            or:[something == #methodTrap
2337
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
  1788
            or:[something == #methodPrivacy]]]) ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1789
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1790
                "/ 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
  1791
                "/ the selector and the oldMethod
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1792
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1793
                someArgument isArray ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1794
                    oldMethod := someArgument at:2.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1795
                    selector := someArgument at:1.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1796
                ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1797
                    selector := someArgument
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1798
                ].
2685
ed1e3d861cf5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2684
diff changeset
  1799
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1800
                (selector isSymbol) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1801
                    |changedMethod s1 s2 oldMethodSelection oldMethodCategorySelection|
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1802
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1803
                    "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1804
                     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
  1805
                    "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1806
                    methodListView notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1807
                        oldMethodSelection := methodListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1808
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1809
                    (something ~~ #methodTrap
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1810
                    and:[something ~~ #methodPrivacy]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1811
                        methodCategoryListView notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1812
                            oldMethodCategorySelection := methodCategoryListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1813
                            self updateMethodCategoryListWithScroll:false.
2684
c4507a0a9517 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
  1814
                            oldMethodCategorySelection size > 0 ifTrue:[
c4507a0a9517 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
  1815
                                codeView modified ifFalse:[
c4507a0a9517 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
  1816
                                    methodCategoryListView selection:oldMethodCategorySelection.
c4507a0a9517 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
  1817
                                ]
c4507a0a9517 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2679
diff changeset
  1818
                            ]
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1819
                        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1820
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1821
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1822
                    self updateMethodListWithScroll:false keepSelection:true.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  1823
"/                    methodListView notNil ifTrue:[
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  1824
"/                        methodListView setSelection:oldMethodSelection.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  1825
"/                    ].
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  1826
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1827
                    (something == #methodTrap
2337
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
  1828
                    or:[something == #methodPackage
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
  1829
                    or:[something == #methodPrivacy]]) ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1830
                        selector == currentSelector ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1831
                            self refetchMethod.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1832
                        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1833
                        ^ self.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1834
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1835
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1836
                    classMethodListView notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1837
                        oldMethodSelection := classMethodListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1838
                        self updateMethodCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1839
                        classMethodListView selection:oldMethodSelection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1840
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1841
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1842
                    selector == currentSelector ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1843
                        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1844
                         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
  1845
                         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
  1846
                        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1847
                        changedMethod := currentClass compiledMethodAt:currentSelector.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1848
                        changedMethod isNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1849
                            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
  1850
                            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1851
                        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1852
                        "compare the source codes"
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1853
                        currentMethod notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1854
                            s1 := self compressedCodeLinesFor:changedMethod source.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1855
                            s2 := self compressedCodeLinesFor:codeView contents.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1856
                            s1 = s2 ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1857
                                codeModified ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1858
                                    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
  1859
                                ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1860
                                    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
  1861
                                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1862
                            ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1863
                        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1864
                        ^ self    
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1865
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1866
                    "/ some other method has changed;
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1867
                    "/ 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
  1868
                    "/ 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
  1869
                    self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1870
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1871
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1872
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1873
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1874
            something == #comment ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1875
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1876
                 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
  1877
                 currently showing the comment
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1878
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1879
                aspect == #comment ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1880
                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1881
                        self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1882
                        self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1883
                    ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1884
                        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
  1885
                    ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1886
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1887
                self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1888
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1889
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1890
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1891
            something == #definition ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1892
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1893
                 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
  1894
                 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
  1895
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1896
                aspect notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1897
                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1898
                        self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1899
                        self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1900
                    ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1901
                        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
  1902
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1903
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1904
                    "/ 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
  1905
                    "/ 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
  1906
                    self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1907
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1908
                    ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1909
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1910
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1911
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1912
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1913
            "/ 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
  1914
            "/ warn if modified
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1915
            "/
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1916
            aspect notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1917
                codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1918
                    self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1919
                    self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1920
                ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1921
                    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
  1922
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1923
                ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1924
            ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1925
        
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1926
            "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1927
             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
  1928
             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
  1929
            "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1930
            self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1931
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1932
            self updateMethodCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1933
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1934
            "dont update codeView ...."
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1935
            "self update"
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1936
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1937
            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
  1938
            ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1939
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1940
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1941
        (currentClass notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1942
        and:[changedObject == currentClass superclass]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1943
            something == #definition ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1944
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1945
                 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
  1946
                 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
  1947
                 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
  1948
                "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1949
                aspect notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1950
                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1951
                        self refetchClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1952
                        self updateCodeView
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1953
                    ] ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1954
                        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
  1955
                    ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1956
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1957
                    "/ 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
  1958
                    "/ 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
  1959
                    self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1960
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1961
                    ^ self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1962
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1963
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1964
        ].
2062
8c72522dd4f2 update if superclass of current changes its name.
Claus Gittinger <cg@exept.de>
parents: 2061
diff changeset
  1965
        
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1966
        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1967
         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
  1968
         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
  1969
         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
  1970
         or hierarchy ...
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1971
        "
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1972
        currentClassHierarchy notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1973
            fullProtocol ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1974
                (currentClass isSubclassOf:changedObject) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1975
                    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
  1976
                ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1977
            ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1978
                ((currentClass isSubclassOf:changedObject)
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1979
                or:[changedObject isSubclassOf:currentClass]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1980
                    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
  1981
                ]                
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1982
            ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1983
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1984
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1985
        (currentClassCategory = '* hierarchy *' 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1986
        or:[ currentClassCategory = '* all *' ]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1987
            self updateClassCategoryListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1988
            self updateClassListWithScroll:false.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1989
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1990
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1991
        (something == #methodDictionary) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1992
            "/ 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
  1993
            "/ 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
  1994
            self startSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1995
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1996
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  1997
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1998
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1999
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  2000
    something == #statistics ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2001
        currentMethod notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2002
            changedObject isMethod ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2003
                (changedObject == currentMethod 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2004
                or:[currentMethod isWrapped 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2005
                    and:[currentMethod originalMethod == changedObject]]) 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2006
                ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2007
                    self refetchMethod.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2008
                    "/ 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
  2009
                    "/ the update ...
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2010
                    changedObject removeDependent:self.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2011
                    self updateMethodListWithScroll:false keepSelection:true.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2012
                    changedObject addDependent:self.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2013
                ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2014
            ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
  2015
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2016
    ]
236
d94505a6f697 release currentMethod when compiling or change notification arrives
Claus Gittinger <cg@exept.de>
parents: 229
diff changeset
  2017
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  2018
    "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
  2019
    "Modified: / 30.7.1998 / 17:33:03 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2020
    "Modified: / 27.10.1998 / 12:02:05 / ps"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2021
!
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2022
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2023
refetchClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2024
    "after a class definition change in another browser,
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2025
     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
  2026
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2027
"/    currentClass := Smalltalk at:(currentClass name asSymbol).
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  2028
    self changeCurrentClass:(environment at:(currentClass name asSymbol)).
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2029
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2030
"/    showInstance ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2031
"/        actualClass := currentClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2032
"/    ] ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2033
"/        actualClass := currentClass class
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2034
"/    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2035
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2036
    "Created: / 8.2.1996 / 13:22:27 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2037
    "Modified: / 17.6.1998 / 16:51:14 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2038
!
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2039
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2040
update:something with:someArgument from:changedObject
2829
d6e4369d4a20 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  2041
    "enqueue a delayed update"
d6e4369d4a20 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2827
diff changeset
  2042
909
ccbc84af922c oops - dont delay update if occurring during startup;
Claus Gittinger <cg@exept.de>
parents: 908
diff changeset
  2043
    |argList sensor|
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2044
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2045
    (changedObject == ObjectMemory) ifTrue:[
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2046
        (something == #earlyRestart 
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2047
        or:[something == #restarted
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2048
        or:[something == #returnFromSnapshot]]) ifTrue:[
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2049
            "/ those are to be ignored.
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2050
            ^ self
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2051
        ]
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2052
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2053
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2054
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2055
    "/ avoid update/warn after my own changes
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2056
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2057
    lockUpdates == true ifTrue:[
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2058
        ^ self
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2059
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2060
927
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  2061
    "/
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  2062
    "/ quick hack: delayed update fails, if I autoload
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  2063
    "/ LabelAndIcon in the update, and another browser
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  2064
    "/ gets a chance to do an update as well, trying to
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
  2065
    "/ access the (temporarily nil) LabelAndIcon.
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  2066
    "/ To get that beast out, do it synchronous for now.
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  2067
    "/ also do it immediately, if not yet realized (no sensor)
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  2068
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  2069
    (LabelAndIcon isLoaded not
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  2070
    or:[(sensor := self sensor) isNil]) ifTrue:[
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2071
        ^ 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
  2072
    ].
ccbc84af922c oops - dont delay update if occurring during startup;
Claus Gittinger <cg@exept.de>
parents: 908
diff changeset
  2073
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2074
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2075
    "/ if such an update is already in the queue, ignore it.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2076
    "/ 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
  2077
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2078
    argList := Array with:something 
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2079
                     with:someArgument 
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2080
                     with:changedObject.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2081
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  2082
    (sensor 
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2083
        hasEvent:#delayedUpdate:with:from:
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2084
        for:self
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2085
        withArguments:argList) ifTrue:[
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2086
        ^ self
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2087
    ].
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  2088
    sensor
2347
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2089
        pushUserEvent:#delayedUpdate:with:from:
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2090
        for:self
1164de5147ea update methodList on methodPackage changes
Claus Gittinger <cg@exept.de>
parents: 2342
diff changeset
  2091
        withArguments:argList
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2092
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  2093
    "Modified: 26.3.1997 / 18:29:51 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2094
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2095
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2096
!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
  2097
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2098
browserClone
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2099
    "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
  2100
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2101
    |brwsr|
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2102
3258
43cdc2591e4d ctrl-clone -> NewSystemBrowser
Claus Gittinger <cg@exept.de>
parents: 3242
diff changeset
  2103
    self window sensor ctrlDown ifTrue:[
43cdc2591e4d ctrl-clone -> NewSystemBrowser
Claus Gittinger <cg@exept.de>
parents: 3242
diff changeset
  2104
        brwsr := NewSystemBrowser openInClass:actualClass selector:currentSelector.
43cdc2591e4d ctrl-clone -> NewSystemBrowser
Claus Gittinger <cg@exept.de>
parents: 3242
diff changeset
  2105
        ^ self.
43cdc2591e4d ctrl-clone -> NewSystemBrowser
Claus Gittinger <cg@exept.de>
parents: 3242
diff changeset
  2106
    ].
43cdc2591e4d ctrl-clone -> NewSystemBrowser
Claus Gittinger <cg@exept.de>
parents: 3242
diff changeset
  2107
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2108
    brwsr := SystemBrowser openInClass:actualClass selector:currentSelector.
2827
2eb407e5c9d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2823
diff changeset
  2109
    brwsr notNil ifTrue:[
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2110
        brwsr extent:(self topView extent).
2827
2eb407e5c9d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2823
diff changeset
  2111
        environment ~~ Smalltalk ifTrue:[
2eb407e5c9d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2823
diff changeset
  2112
            brwsr environment:environment.
3115
422c381b86b0 more image browsing fixes
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
  2113
            actualClass notNil ifTrue:[
422c381b86b0 more image browsing fixes
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
  2114
                brwsr switchToClassNamed:actualClass name. 
422c381b86b0 more image browsing fixes
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
  2115
                brwsr classSelectionChanged.
422c381b86b0 more image browsing fixes
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
  2116
            ].
2827
2eb407e5c9d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2823
diff changeset
  2117
            currentSelector notNil ifTrue:[
2eb407e5c9d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2823
diff changeset
  2118
                brwsr switchToMethodNamed:currentSelector.
2eb407e5c9d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2823
diff changeset
  2119
            ].
2eb407e5c9d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2823
diff changeset
  2120
        ].
2eb407e5c9d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2823
diff changeset
  2121
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2122
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2123
    "Created: 14.9.1995 / 10:55:20 / claus"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2124
    "Modified: 14.9.1995 / 10:59:31 / claus"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2125
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2126
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2127
browserOpenInClass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2128
    "find a class - and open a browser (by default)"
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2129
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2130
    self classCategoryFindClassOpen:true
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2131
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2132
    "Modified: 15.1.1997 / 22:55:32 / cg"
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2133
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2134
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2135
browserSpawnExtensions
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2136
    "create a new SystemBrowser browsing all extensions"
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2137
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  2138
    self withWaitCursorDo:[
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2139
        |brwsr methods|
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2140
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2141
        methods := IdentitySet new.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2142
        environment allClassesDo:[:eachClass |
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2143
            |classPackage|
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2144
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2145
            classPackage := eachClass package.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2146
            eachClass methodDictionary keysAndValuesDo:[:sel :mthd |
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2147
                mthd package ~= classPackage ifTrue:[ methods add:mthd ].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2148
            ].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2149
            eachClass theMetaclass methodDictionary keysAndValuesDo:[:sel :mthd |
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2150
                mthd package ~= classPackage ifTrue:[ methods add:mthd ].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2151
            ].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2152
        ].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2153
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2154
        brwsr := SystemBrowser browseMethods:methods title:'All Class extensions'.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2155
        brwsr notNil ifTrue:[brwsr environment:environment].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2156
    ]
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2157
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2158
    "Modified: 18.8.1997 / 15:42:58 / cg"
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2159
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2160
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2161
browserSpawnFullClass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2162
    "create a new SystemBrowser browsing full class"
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2163
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2164
    |brwsr|
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2165
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  2166
    self withWaitCursorDo:[
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2167
        brwsr := SystemBrowser browseFullClasses.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2168
        brwsr environment:environment.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2169
" "
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2170
        currentClass notNil ifTrue:[
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2171
            brwsr switchToClassNamed:(currentClass name)
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2172
        ]
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2173
" "
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2174
    ]
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2175
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2176
    "Modified: 18.8.1997 / 15:43:01 / cg"
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2177
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2178
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2179
classCategoryFileOut
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2180
    "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
  2181
     into the current projects defaultDirectory."
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2182
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2183
    self classCategoryFileOutAsk:false
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2184
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2185
    "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
  2186
!
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2187
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2188
classCategoryFileOutAs
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2189
    "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
  2190
     into a file as user-specified."
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2191
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2192
    self classCategoryFileOutAsk:true
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2193
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2194
    "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
  2195
    "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
  2196
!
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2197
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2198
classCategoryFileOutAsk:doAsk
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2199
    "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
  2200
1510
ec5dd071b570 when filing out a class category, place all class-init expressions
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
  2201
    |aStream fileName classesToInitialize|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2202
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2203
    self checkClassCategorySelected ifFalse:[^ self].
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  2204
    (currentClassCategory startsWith:$*) ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2205
        self warn:(resources string:'try a real category').
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2206
        ^ self
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2207
    ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2208
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2209
    fileName := currentClassCategory asString , '.st'.
1316
3fefcc2e9b16 mostly filename changes
Claus Gittinger <cg@exept.de>
parents: 1313
diff changeset
  2210
    fileName replaceAll:Character space with:$_.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2211
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  2212
    self withWaitCursorDo:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2213
        |saveName fileBox dir|
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2214
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2215
        doAsk ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2216
            fileBox := FileSelectionBox
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2217
                            title:(resources string:'fileOut %1 as:' with:currentClassCategory)
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2218
                            okText:(resources string:'FileOut')
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2219
                            abortText:(resources string:'Cancel')
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2220
                            action:[:fileName |saveName := fileName.].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2221
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2222
            fileBox initialText:fileName.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2223
            dir := FileSelectionBox lastFileSelectionDirectory.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2224
            dir isNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2225
                "
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2226
                 this test allows a smalltalk to be built without Projects/ChangeSets
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2227
                "
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2228
                Project notNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2229
                    dir := Project currentProjectDirectory
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2230
                ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2231
            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2232
            dir notNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2233
                fileBox directory:dir.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2234
            ].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2235
            fileBox open.
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2236
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2237
            fileBox destroy.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2238
            fileBox := nil.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2239
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2240
            saveName isNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2241
                ^ self
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2242
            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2243
            saveName isEmpty ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2244
                self warn:'bad name given'.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2245
                ^ self
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2246
            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2247
            FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2248
            fileName := saveName.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2249
        ] ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2250
            "
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2251
             this test allows a smalltalk to be built without Projects/ChangeSets
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2252
            "
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2253
            Project notNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2254
                fileName := Project currentProjectDirectory asFilename constructString: fileName.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2255
            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2256
        ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2257
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2258
        "
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2259
         if file exists, save original in a .sav file
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2260
        "
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2261
        fileName asFilename exists ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2262
            self busyLabel:'saving existing %1' with:fileName.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2263
            fileName asFilename copyTo:(fileName , '.sav')
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2264
        ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2265
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2266
        aStream := FileStream newFileNamed:fileName.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2267
        aStream isNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2268
            self warn:'cannot create: %1' with:fileName
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2269
        ] ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2270
            self busyLabel:'writing: %1' with:fileName.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2271
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2272
            classesToInitialize := OrderedCollection new.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2273
            self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2274
                aClass isPrivate ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2275
                    (self listOfNamespaces includesIdentical:aClass nameSpace)
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2276
                    ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2277
                        self busyLabel:'writing: %1' with:fileName.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2278
                        aClass isLoaded ifFalse:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2279
                            self warn:'cannot fileOut unloaded class: %1\\skipped.' with:aClass name allBold.
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2280
                        ] ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2281
                            aClass fileOutOn:aStream withTimeStamp:true withInitialize:false.
3591
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
  2282
                            (aClass theMetaclass includesSelector:#initialize) ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2283
                                classesToInitialize add:aClass
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2284
                            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2285
                            aStream cr.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2286
                        ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2287
                    ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2288
                ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2289
            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2290
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2291
            "/ all class-inits at the end
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2292
            "/ (this makes certain, that all classes have been loaded
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2293
            "/  before possibly used/needed in an initializer
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2294
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2295
            classesToInitialize do:[:aClass |
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2296
                aClass printClassNameOn:aStream. aStream nextPutAll:' initialize'.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2297
                aStream nextPutChunkSeparator.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2298
                aStream cr
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2299
            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2300
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2301
            aStream close.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  2302
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2303
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2304
    self normalLabel.
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  2305
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2306
    "Created: / 11.10.1997 / 16:38:29 / cg"
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2307
    "Modified: / 12.8.1998 / 11:04:11 / cg"
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2308
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2309
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2310
classCategoryFileOutBinaryEach
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2311
    "fileOut each class in the current category as binary bytecode."
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2312
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2313
    |mode|
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2314
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  2315
    (currentClassCategory startsWith:$*) ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2316
        self warn:(resources string:'try a real category').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2317
        ^ self
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2318
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2319
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2320
    mode := Dialog choose:(resources string:'save including sources ?')
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2321
                   labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2322
                   values:#(nil #discard #reference #keep)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2323
                   default:#keep.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2324
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2325
    mode isNil ifTrue:[^ self].
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2326
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  2327
    self withWaitCursorDo:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2328
        self allClassesInCategory:currentClassCategory do:[:aClass |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2329
            aClass isPrivate ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2330
                (self listOfNamespaces includesIdentical:aClass nameSpace)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2331
                ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2332
                    self busyLabel:'saving binary of: %1' with:aClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2333
                    Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2334
                        self warn:'cannot create: %1' with:ex parameter.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2335
                        self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2336
                        ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2337
                    ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2338
                        aClass binaryFileOutWithSourceMode:mode.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2339
                    ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2340
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2341
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2342
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2343
        self normalLabel.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2344
    ]
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2345
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  2346
    "Created: / 25.1.1996 / 17:27:45 / cg"
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  2347
    "Modified: / 5.3.1998 / 02:45:30 / cg"
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2348
!
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2349
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2350
classCategoryFileOutEach
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2351
    self classCategoryFileOutEachAsk:false.
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2352
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2353
    "Modified: / 7.8.1998 / 17:11:25 / cg"
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2354
!
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2355
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2356
classCategoryFileOutEachAsk:doAsk
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2357
    |fileBox dir dirName|
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2358
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  2359
    (currentClassCategory startsWith:$*) ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2360
        self warn:(resources string:'try a real category').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2361
        ^ self
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2362
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2363
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2364
    doAsk ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2365
        fileBox := FileSelectionBox
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2366
                        title:(resources string:'fileOut %1 in:' with:currentClassCategory)
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2367
                        okText:(resources string:'FileOut')
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2368
                        abortText:(resources string:'Cancel')
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2369
                        action:[:fileName |dirName := fileName.].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2370
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2371
        dir := FileSelectionBox lastFileSelectionDirectory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2372
        dir isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2373
            "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2374
             this test allows a smalltalk to be built without Projects/ChangeSets
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2375
            "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2376
            Project notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2377
                dir := Project currentProjectDirectory
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2378
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2379
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2380
        dir notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2381
            fileBox directory:dir.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2382
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2383
        fileBox selectingDirectory:true.
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2384
        fileBox open.
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2385
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2386
        fileBox destroy.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2387
        fileBox := nil.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2388
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2389
        dirName isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2390
            ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2391
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2392
        FileSelectionBox lastFileSelectionDirectory:dirName.
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2393
    ] ifFalse:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2394
        "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2395
         this test allows a smalltalk to be built without Projects/ChangeSets
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2396
        "
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2397
        Project notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2398
            dirName := Project currentProjectDirectory asFilename.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2399
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2400
            dirName := Filename currentDirectory
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2401
        ]
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2402
    ].
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  2403
    self withWaitCursorDo:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2404
        self allClassesInCategory:currentClassCategory do:[:aClass |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2405
            |fn|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2406
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2407
            aClass isPrivate ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2408
                (self listOfNamespaces includesIdentical:aClass nameSpace)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2409
                ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2410
                    self busyLabel:'saving: %1' with:aClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2411
                    Class fileOutErrorSignal handle:[:ex |
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2412
                        self warn:'cannot fileOut: %1\(%2)\\skipped.' with:(aClass name allBold) with:ex errorString.
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2413
                        self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2414
                        ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2415
                    ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2416
                        fn := (Smalltalk fileNameForClass:aClass) , '.st'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2417
                        aClass fileOutAs:(dirName asFilename constructString:fn).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2418
                    ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2419
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2420
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2421
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2422
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2423
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  2424
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2425
    "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
  2426
    "Modified: / 12.8.1998 / 11:13:26 / cg"
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2427
!
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2428
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2429
classCategoryFileOutEachIn
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2430
    self classCategoryFileOutEachAsk:true.
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2431
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2432
    "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
  2433
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2434
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2435
classCategoryFindClass
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2436
    "find a class - and switch by default"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2437
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
  2438
    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
  2439
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2440
    "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
  2441
!
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
  2442
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
  2443
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
  2444
    "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
  2445
     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
  2446
2050
5ef6404d6172 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2048
diff changeset
  2447
    <resource: #style (#'dialogBox.okAtLeft')>
5ef6404d6172 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2048
diff changeset
  2448
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2449
    |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
  2450
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
  2451
    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
  2452
    open ifTrue:[
3508
a81680fe2ffb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3504
diff changeset
  2453
        title := 'Class to browse:\(TAB to complete or use matchPattern)'.
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2454
        okText := 'Open'.
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2455
        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
  2456
    ] ifFalse:[
3508
a81680fe2ffb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3504
diff changeset
  2457
        title := 'Class to find:\(TAB to complete or use matchPattern)'.
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2458
        okText := 'Find'.
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2459
        okText2 := 'Open new'.
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2460
    ].
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2461
    box := self 
3508
a81680fe2ffb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3504
diff changeset
  2462
                enterBoxForCodeSelectionTitle:title withCRs
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  2463
                withList:(self class classHistory collect: [:histEntry| histEntry className ])
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2464
                okText:okText.
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2465
    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
  2466
    openButton := Button label:(resources string:okText2).
2050
5ef6404d6172 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2048
diff changeset
  2467
    (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
  2468
        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
  2469
    ] ifFalse:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2470
        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
  2471
    ].
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
  2472
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
  2473
    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
  2474
       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
  2475
       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
  2476
       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
  2477
    ].
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
  2478
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2479
    box entryCompletionBlock:[:contents |
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2480
        |s what m|
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2481
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2482
        s := contents withoutSpaces.
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  2483
        what := Smalltalk classnameCompletion:s inEnvironment:(environment ? Smalltalk).
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2484
        box contents:what first.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2485
        (what at:2) size ~~ 1 ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2486
            self beep
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2487
        ]
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2488
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2489
    box action:[:aString | className := aString].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2490
    box open.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2491
1550
a1c0d6cb1954 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1543
diff changeset
  2492
    className notNil ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2493
        open ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2494
            brwsr := SystemBrowser open.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2495
            "/ brwsr topView waitUntilVisible.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2496
        ] ifFalse:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2497
            brwsr := self
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2498
        ].
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
  2499
        brwsr switchToClassNameMatching:className.
1550
a1c0d6cb1954 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1543
diff changeset
  2500
    ]
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2501
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2502
    "Created: / 1.6.1996 / 16:03:15 / cg"
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2503
    "Modified: / 12.10.2001 / 19:40:10 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2504
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2505
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2506
classCategoryFindMethod
3301
129c60ebc2b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
  2507
    |box matchBlock|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2508
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2509
    box := self 
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2510
                listBoxForCodeSelectionTitle:'selector to find:\\(Tab for completion or use matchPattern)' withCRs 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2511
                okText:'find'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2512
    box label:(resources string:'find method').
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2513
3267
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2514
    matchBlock := [ 
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2515
                    |s l|
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2516
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2517
                    s := box contents.
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2518
                    s includesMatchCharacters ifTrue:[
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2519
                        l := Set new.
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2520
                        environment allClassesDo:[:cls |
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2521
                            cls instAndClassSelectorsAndMethodsDo:[:sel :mthd | 
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2522
                                (s match:sel) ifTrue:[
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2523
                                    l add:sel.
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2524
                                ]
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2525
                            ].
3267
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2526
                        ].
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2527
                        box list:(l asOrderedCollection sort).
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2528
                        false.
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2529
                    ] ifFalse:[
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2530
                        true
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2531
                    ]
4b70e02d1549 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 3258
diff changeset
  2532
                  ].
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2533
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2534
    box entryCompletionBlock:[:contents |
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2535
        |s what m longest matching|
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2536
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2537
        box topView withWaitCursorDo:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2538
            s := contents withoutSpaces.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2539
            s includesMatchCharacters ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2540
                matchBlock value
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2541
            ] ifFalse:[
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  2542
                what := Smalltalk selectorCompletion:s inEnvironment:(environment ? Smalltalk).
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2543
                longest := what first.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2544
                matching := what last.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2545
                box list:matching.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2546
                box contents:longest.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2547
                matching size ~~ 1 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2548
                    self beep
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2549
                ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2550
            ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2551
        ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2552
    ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2553
    box acceptCheck:matchBlock.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2554
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2555
    [:restart |
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2556
        box action:[:aString | 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2557
                        aString includesMatchCharacters ifFalse:[
2690
b791d50868d6 findMethod fixed
Claus Gittinger <cg@exept.de>
parents: 2687
diff changeset
  2558
                            self switchToAnyMethod:aString string.
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2559
                        ] ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2560
                            restart value
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2561
                        ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2562
                    ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2563
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2564
        box open.
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2565
    ] valueWithRestart
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  2566
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2567
    "Modified: / 25.1.2000 / 21:51:59 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2568
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2569
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2570
classCategoryMenu
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  2571
    <resource: #keyboard ( #Find #Cmdn) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2572
    <resource: #programMenu >
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  2573
3301
129c60ebc2b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
  2574
    |specialMenu m items subMenu|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2575
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2576
    currentClassCategory notNil ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2577
        items :=  #(
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  2578
                    ('FileOut Each Binary...'    classCategoryFileOutBinaryEach      )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2579
                    ('-'                         nil                                 )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2580
                    ('Repository History...'     classCategoryRepositoryHistory      )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2581
                    ('Validate Class Revisions'  classCategoryValidateClassRevisions )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2582
                    ('-'                         nil                                 )
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  2583
                    ('CheckIn Each...'           classCategoryCheckinEach            )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2584
                    ('-'                         nil                                 )
3117
b90d83acd384 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3116
diff changeset
  2585
                    ('Load from Repository...'   classCategoryLoadFromRepository     )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2586
                   ).
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2587
    ] ifFalse:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2588
        items :=  #(
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2589
                    ('Repository History...'    classCategoryRepositoryHistory )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2590
                    ('-'                         nil                            )
3117
b90d83acd384 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3116
diff changeset
  2591
                    ('Load from Repository...'  classCategoryLoadFromRepository)
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2592
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2593
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2594
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2595
    specialMenu := PopUpMenu 
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2596
                        itemList:items
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2597
                        resources:resources.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  2598
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  2599
    (self hasSourceCodeManager) ifFalse:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2600
        specialMenu disableAll:#(classCategoryRepositoryHistory  
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2601
                                 classCategoryCheckinEach
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2602
                                 classCategoryValidateClassRevisions
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2603
                                 classCategoryLoadFromRepository
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2604
                                ).
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
  2605
    ].
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2606
    (currentClassCategory = '* hierarchy *'
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2607
    or:[currentClassCategory = '* obsolete *']) ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2608
        specialMenu disableAll:#(classCategoryFileOutBinaryEach
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2609
                                 classCategoryCheckinEach
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2610
                                 classCategoryValidateClassRevisions
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2611
                                ).
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2612
    ].
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
  2613
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  2614
    self isSimulatedEnvironment ifTrue:[
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2615
        specialMenu disableAll:#(classCategoryValidateClassRevisions classCategoryCheckinEach
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2616
                                 classCategoryLoadFromRepository classCategoryFileOutBinaryEach
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2617
                      )
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2618
    ].
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2619
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2620
    device ctrlDown ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2621
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2622
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2623
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2624
    currentClassCategory isNil ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2625
        items := #(
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2626
"/                    ('namespace...'           namespaceDialog               )
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2627
"/                    ('-'                       nil                           )
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2628
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2629
                    ('Clone'                    browserClone                  )
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2630
                    ('Browse Class...'          browserOpenInClass            )
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2631
                    ('Browse Full Class Source' browserSpawnFullClass   )
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2632
                    ('Browse Class Extensions'  browserSpawnExtensions  )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2633
                    ('-'                       nil                           )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2634
                    ('Update'                  classCategoryUpdate           )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2635
                    ('Find Class...'           classCategoryFindClass      #Find )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2636
                    ('Find Method...'          classCategoryFindMethod       )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2637
                    ('Visited History'         classHistoryMenu              )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2638
                    ('Changed History'         changeHistoryMenu             )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2639
                    ('-'                       nil                           )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2640
                    ('New Class Category...'  classCategoryNewCategory    #Cmdn )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2641
                    ('='                       nil                           )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2642
                    ('Others'                  otherMenu                   #Ctrl )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2643
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2644
    ] ifFalse:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2645
        items := #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2646
                    ('FileOut'                 classCategoryFileOut            )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  2647
                    ('FileOut As...'           classCategoryFileOutAs          )
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  2648
                    ('FileOut Each'            classCategoryFileOutEach        )
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  2649
                    ('FileOut Each In...'      classCategoryFileOutEachIn      )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2650
                    ('PrintOut'                classCategoryPrintOut           )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  2651
                    ('PrintOut Protocol'       classCategoryPrintOutProtocol   )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2652
                    ('-'                       nil                             )
1815
2f7ee0e7d408 added classCategory-fileout each in...
Claus Gittinger <cg@exept.de>
parents: 1812
diff changeset
  2653
"/                    ('namespace...'           namespaceDialog                 )
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  2654
"/                    ('-'                       nil                             )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2655
                    ('Clone'                   browserClone                  Cmdc )
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2656
                    ('Browse Class...'          browserOpenInClass            Cmdo )
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2657
                    ('SPAWN_CATEGORY'           classCategorySpawn              )
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2658
                    ('Browse Full Class Source' browserSpawnFullClass     )
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2659
                    ('Browse Class Extensions'  browserSpawnExtensions  )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2660
                    ('-'                       nil                             )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2661
                    ('Update'                  classCategoryUpdate             )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2662
                    ('Find Class...'           classCategoryFindClass        Find )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2663
                    ('Find Method...'          classCategoryFindMethod         )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2664
                    ('Visited History'         classHistoryMenu                )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2665
                    ('Changed History'         changeHistoryMenu               )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2666
                    ('-'                       nil                             )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  2667
                    ('New Class Category...'   classCategoryNewCategory      Cmdn )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2668
                    ('Rename...'               classCategoryRename             )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2669
                    ('Remove...'               classCategoryRemove             )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2670
                    ('='                       nil                             )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2671
                    ('Others'                  otherMenu                     Ctrl )
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2672
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2673
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2674
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2675
    m := PopUpMenu 
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2676
                itemList:items
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2677
                resources:resources.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  2678
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2679
    m subMenuAt:#otherMenu put:specialMenu.
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2680
    m subMenuAt:#classHistoryMenu put:self classHistoryPopUpMenu.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2681
    ((ChangeSet current size == 0) or:[(subMenu := self changeHistoryPopUpMenu) isNil]) ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2682
        m disable:#changeHistoryMenu
2602
acb63d8895b9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2600
diff changeset
  2683
    ] ifFalse:[
2610
cda4830c40a6 checkin from browser
ca
parents: 2605
diff changeset
  2684
        m subMenuAt:#changeHistoryMenu put:subMenu.
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2685
    ].
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2686
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2687
    ((currentClassCategory = '* hierarchy *') 
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2688
    or:[currentClassCategory = '* obsolete *']) ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2689
        m disableAll:#(classCategoryFileOut classCategoryFileOutAs classCategoryFileOutEach
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2690
                       classCategoryFileOutEachIn
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2691
                       classCategoryPrintOut classCategoryPrintOutProtocol      
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  2692
                       classCategoryRename classCategoryRemove)
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2693
    ].
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2694
    (currentClassCategory = '* obsolete *') ifTrue:[
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  2695
        m disableAll:#(classCategorySpawn browserSpawnFullClass)
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  2696
    ].
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2697
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  2698
    self isReadOnlyEnvironment ifTrue:[
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  2699
        m disableAll:#(classCategoryRename classCategoryRemove classCategoryNewCategory changeHistoryMenu
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  2700
                      )
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  2701
    ].
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
  2702
    self isSimulatedEnvironment ifTrue:[
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  2703
        m disableAll:#(
3115
422c381b86b0 more image browsing fixes
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
  2704
                       classCategoryUpdate browserSpawnFullClass
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  2705
                       classCategorySpawn browserOpenInClass browserClone
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2706
                      )
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2707
    ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2708
    ^ m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2709
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2710
    "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
  2711
    "Modified: / 16.1.1998 / 17:16:28 / stefan"
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2712
    "Modified: / 7.8.1998 / 18:39:46 / cg"
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2713
!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2714
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2715
classCategoryNewCategory
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2716
    |box|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2717
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2718
    box := self 
3650
b0f02473e777 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3649
diff changeset
  2719
                enterBoxTitle:'Name of new class category:' 
b0f02473e777 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3649
diff changeset
  2720
                okText:'Create'
b0f02473e777 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3649
diff changeset
  2721
                label:'Create category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2722
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2723
    box action:[:aString |
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2724
        |categories|
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2725
        categories := classCategoryListView list.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2726
        (categories includes:aString) ifFalse:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2727
            categories add:aString.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2728
            categories sort.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2729
            classCategoryListView setContents:categories.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2730
        ].
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2731
        currentClassCategory := aString.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2732
        classCategoryListView setSelectElement:aString.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2733
        self changeCurrentClass:nil.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2734
        actualClass := acceptClass := nil.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2735
        self classCategorySelectionChanged
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2736
    ].
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2737
    box open
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  2738
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2739
    "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
  2740
    "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
  2741
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2742
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2743
classCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2744
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2745
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2746
    self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2747
	(self listOfNamespaces includesIdentical:aClass nameSpace)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2748
	ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2749
	    printStream := Printer new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2750
	    aClass printOutOn:printStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2751
	    printStream close
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  2752
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2753
    ]
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2754
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  2755
    "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
  2756
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2757
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2758
classCategoryPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2759
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2760
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  2761
    environment allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  2762
        (self listOfNamespaces includesIdentical:aClass nameSpace)
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  2763
        ifTrue:[
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  2764
            printStream := Printer new.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  2765
            aClass printOutProtocolOn:printStream.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  2766
            printStream close
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  2767
        ]
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  2768
    ]
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  2769
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2770
    "Modified: 16.1.1997 / 20:22:12 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2771
!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2772
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2773
classCategoryRemove
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2774
    "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
  2775
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2776
    |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
  2777
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2778
    self checkClassCategorySelected ifFalse:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2779
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  2780
    classesToRemove := IdentitySet new.
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  2781
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  2782
    self allClassesInSelectedNamespacesDo:[:aClass |
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2783
        aClass category = currentClassCategory ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2784
            classesToRemove add:aClass
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2785
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2786
    ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  2787
    subclassesRemoved := IdentitySet new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2788
    classesToRemove do:[:aClass |
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2789
        aClass allSubclassesDo:[:aSubclass |
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2790
            (classesToRemove includes:aSubclass) ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2791
                (subclassesRemoved includes:aSubclass) ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2792
                    subclassesRemoved add:aSubclass
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2793
                ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2794
            ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2795
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2796
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2797
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2798
    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
  2799
    t := resources 
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2800
            string:'Remove all classes in ''%1'' ?' 
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2801
            with:currentClassCategory allBold.
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  2802
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2803
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2804
       count == 1 ifTrue:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2805
           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
  2806
       ] ifFalse:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2807
           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
  2808
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  2809
       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
  2810
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2811
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2812
    count := subclassesRemoved size.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2813
    overallCount := overallCount + count.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2814
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2815
       count == 1 ifTrue:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2816
           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
  2817
       ] ifFalse:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2818
           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
  2819
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  2820
       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
  2821
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2822
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2823
    t := t withCRs.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2824
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2825
    box := YesNoBox 
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2826
               title:t
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2827
               yesText:(resources at:'Remove')
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2828
               noText:(resources at:'Cancel').
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2829
    box label:(resources at:'Remove category').
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  2830
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2831
    overallCount ~~ 0 ifTrue:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2832
        "/ should we disable the returnDefault here ?
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2833
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2834
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2835
    box confirm ifTrue:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2836
        "after querying user - do really remove classes in list1 and list2"
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2837
        |keep idx oldPosition doRemoveThis yesToAll|
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2838
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2839
        yesToAll := false.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2840
        keep := false.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2841
        (subclassesRemoved asOrderedCollection , classesToRemove asOrderedCollection) 
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2842
        do:[:aClassToRemove |
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2843
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2844
            doRemoveThis := CheckForInstancesWhenRemovingClasses not
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2845
                            or:[yesToAll
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2846
                            or:[aClassToRemove hasInstances not]].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2847
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2848
            doRemoveThis ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2849
                doRemoveThis := Dialog
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2850
                            confirmWithCancel:(resources string:'%1 has instances - remove anyway ?' with:aClassToRemove name allBold) withCRs
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2851
                            labels:#('cancel' 'no' 'remove all' 'remove')
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2852
                            values:#(nil false #removeAll true) 
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2853
                            default:4.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2854
                doRemoveThis isNil ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2855
                    ^ self
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2856
                ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2857
                doRemoveThis == #removeAll ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2858
                    doRemoveThis := yesToAll := true.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2859
                ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2860
            ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2861
            doRemoveThis ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2862
                aClassToRemove removeFromSystem
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2863
            ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2864
                keep := true.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2865
            ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2866
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2868
        "/ self updateClassCategoryList.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2869
        self updateClassCategoryListWithScroll:false.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2870
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2871
        (classCategoryListView list includes:currentClassCategory) ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2872
            currentClassCategory := nil.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2873
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2874
        self classCategorySelectionChanged.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2875
        
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2876
        self changeCurrentClass:nil.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2877
"/        keep ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2878
"/            idx := classCategoryListView list indexOf:currentClassCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2879
"/            currentClassCategory := nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2880
"/            idx ~= 0 ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2881
"/                classCategoryListView removeIndex:idx.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2882
"/            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2883
"/        ].
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  2884
    ].
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  2885
    box destroy
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
  2886
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2887
    "Modified: / 19.8.1996 / 23:22:35 / stefan"
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2888
    "Modified: / 12.10.2001 / 19:45:51 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2889
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2890
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2891
classCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2892
    "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
  2893
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2894
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2895
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2896
    self checkClassCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2897
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2898
    box := self 
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2899
                enterBoxTitle:(resources 
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2900
                                string:'Rename category ''%1'' to:' 
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  2901
                                  with:currentClassCategory allBold) 
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2902
                okText:'Rename'
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2903
                label:'Rename category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2904
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2905
    box initialText:currentClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2906
    box action:[:aString | self renameCurrentClassCategoryTo:aString].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  2907
    box open
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2908
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  2909
    "Modified: / 12.10.2001 / 19:45:20 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2910
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2911
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2912
classCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2913
    "create a new SystemBrowser browsing current classCategory"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2914
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2915
    currentClassCategory notNil ifTrue:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  2916
        self withWaitCursorDo:[
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2917
            |brwsr|
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2918
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  2919
            brwsr := SystemBrowser browseClassCategory:currentClassCategory.
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2920
            brwsr environment:environment
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2921
        ]
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2922
    ]
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2923
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2924
    "Modified: 18.8.1997 / 15:42:58 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2925
!
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  2926
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2927
classCategoryUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2928
    "update class category list and dependants"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2929
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2930
    |oldClass oldClassName oldMethodCategory newClass|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2931
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2932
    classCategoryListView notNil ifTrue:[
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2933
        self setListOfNamespaces.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2934
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2935
        (oldClass := currentClass) notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2936
            oldClassName := currentClass name.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2937
            (oldClassName endsWith:'-old') ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2938
                oldClassName := oldClassName copyWithoutLast:4 "copyTo:(oldClassName size - 4)"
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2939
            ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2940
        ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2941
        oldMethodCategory := currentMethodCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2942
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2943
        classCategoryListView setContents:(self listOfAllClassCategories).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2944
        currentClassCategory notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2945
            classCategoryListView setSelectElement:currentClassCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2946
            self classCategorySelectionChanged.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2947
            oldClassName notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2948
                classListView setSelectElement:oldClassName.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2949
                oldClass isJavaClass ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2950
                    newClass := (Java at:oldClassName).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2951
                ] ifFalse:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  2952
                    newClass := (environment at:oldClassName asSymbol).
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2953
                ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2954
                newClass isNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2955
                    self warn:'oops - ' , oldClassName , ' is gone.'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2956
                ] ifFalse:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2957
                    self changeCurrentClass:newClass.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2958
                    self classSelectionChanged.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2959
                    oldMethodCategory notNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2960
                        methodCategoryListView setSelectElement:oldMethodCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2961
                        currentMethodCategory := oldMethodCategory.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2962
                        self methodCategorySelectionChanged
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2963
                    ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2964
                ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2965
            ]
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2966
        ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2967
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  2968
        self updateNamespaceList
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2969
    ]
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  2970
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2971
    "Modified: / 10.4.1998 / 12:25:38 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  2972
! !
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2973
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2974
!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
  2975
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2976
classCategoryCheckinEach
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  2977
    (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
  2978
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  2979
    self withWaitCursorDo:[
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2980
        |logMessage classes allSelected|
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2981
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2982
        allSelected := (currentClassCategory = '* all *'
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2983
                        or:[currentClassCategory = '* hierarchy *']).
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2984
2529
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
  2985
        logMessage := SourceCodeManagerUtilities 
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
  2986
                        getLogMessageFor:(resources
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2987
                                             string:(allSelected ifTrue:['all classes'] ifFalse:[' any in classCategory ''%1'''])
2529
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
  2988
                                             with:currentClassCategory).
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2989
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2990
        logMessage notNil ifTrue:[
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2991
            allSelected ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2992
                classes := self allClasses
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2993
            ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2994
                classes := self allClassesInCategory:currentClassCategory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2995
            ].
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2996
            classes := classes select:[:eachClass | eachClass isPrivate not].
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  2997
            SourceCodeManagerUtilities checkinClasses:classes withLog:logMessage.
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2998
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2999
        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
  3000
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  3001
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  3002
    "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
  3003
    "Modified: 15.6.1996 / 00:25:58 / stefan"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  3004
    "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
  3005
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  3006
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3007
classCategoryLoadFromRepository
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3008
    "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
  3009
     Allows load of a containers contents"
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3010
3301
129c60ebc2b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
  3011
    |bindings
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3012
     moduleList packageList containerList fileNameList
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3013
     moduleSelection packageSelection containerSelection
1671
cc16fd031dcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3014
     loadEnabled loadAction dialog|
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3015
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3016
    loadAction := [:dummy |
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3017
            |aStream module package container list packageID|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3018
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3019
            module := moduleSelection value.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3020
            package := packageSelection value.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3021
            list := containerSelection value.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3022
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3023
            packageID := module , ':' , package.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3024
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3025
            dialog window withWaitCursorDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3026
                list do:[:container |
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3027
                    "/
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3028
                    "/ special: if its a 'loadAll' file,
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3029
                    "/ or a project-file, extract all from the repository
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3030
                    "/ and perform some special load action.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3031
                    "/
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3032
                    ((container = 'loadAll') 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3033
                    or:[container asLowercase asFilename hasSuffix:'prj']) ifTrue:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3034
                        SourceCodeManager
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3035
                            checkoutModule:module 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3036
                            package:package 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3037
                            andDo:[:tempDir |
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3038
                                |oldPath wasLazy|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3039
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3040
                                self activityNotification:'loading ' , container , ' ...'.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3041
                                (container = 'loadAll') ifTrue:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3042
                                    [
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3043
                                        Class withoutUpdatingChangesDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3044
                                            oldPath := Smalltalk systemPath.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3045
                                            Smalltalk systemPath:(oldPath copy addFirst:tempDir pathName; yourself).
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3046
                                            wasLazy := Compiler compileLazy:false.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3047
                                            Class packageQuerySignal answer:packageID do:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3048
                                                (tempDir construct:container) fileIn.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3049
                                            ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3050
                                        ].
3597
2e7fc0ae28c9 #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3051
                                    ] ensure:[
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3052
                                        Compiler compileLazy:wasLazy.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3053
                                        Smalltalk systemPath:oldPath.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3054
                                    ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3055
                                ] ifFalse:[
3993
f7cda711af87 Use #error: insead of #halt.
Stefan Vogel <sv@exept.de>
parents: 3771
diff changeset
  3056
                                    self error:'unimplemented: project-loading' mayProceed:true.
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3057
                                ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3058
                            ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3059
                    ] ifFalse:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3060
                        aStream := SourceCodeManager 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3061
                                streamForClass:nil 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3062
                                fileName:container 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3063
                                revision:#newest
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3064
                                directory:package
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3065
                                module:module
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3066
                                cache:false.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3067
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3068
                        self activityNotification:'loading ' , container , ' ...'.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3069
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3070
                        aStream isNil ifTrue:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3071
                            self warn:'could not load ' , container , ' from repository'.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3072
                        ] ifFalse:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3073
                            self busyLabel:'loading from %1' with:(module , '/' , package , '/' , container).
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3074
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3075
                            Class withoutUpdatingChangesDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3076
                                [
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3077
                                    Class packageQuerySignal answer:packageID do:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3078
                                        aStream fileIn.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3079
                                    ]
3597
2e7fc0ae28c9 #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  3080
                                ] ensure:[
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3081
                                    aStream close.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3082
                                    self normalLabel.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3083
                                    Smalltalk changed.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3084
                                ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3085
                            ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3086
                        ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3087
                    ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3088
                ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3089
                self activityNotification:nil
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3090
            ]
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3091
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3092
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3093
    bindings := IdentityDictionary new.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3094
    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
  3095
    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
  3096
    bindings at:#containerSelection put:(containerSelection := #() asValue).
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3097
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3098
    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
  3099
    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
  3100
    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
  3101
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3102
    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
  3103
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3104
    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
  3105
    bindings at:#containerDoubleClicked put:loadAction.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3106
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3107
    packageSelection 
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3108
        onChangeEvaluate:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3109
             |list|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3110
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3111
             dialog window withWaitCursorDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3112
                 list := SourceCodeManager 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3113
                            getExistingContainersInModule:(moduleSelection value)
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3114
                            package:(packageSelection value).
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3115
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3116
                 list := list select:[:nm | |lcName f|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3117
                                            lcName := nm asLowercase.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3118
                                            ((f := lcName asFilename) hasSuffix:'st')
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3119
                                            or:[false "/ (f hasSuffix:'prj')
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3120
                                            or:[lcName = 'loadall']]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3121
                                     ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3122
                 fileNameList := list.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3123
                 list := list collect:[:nm | |lcName f|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3124
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3125
                                             lcName := nm asLowercase.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3126
                                             ((f := lcName asFilename) hasSuffix:'st') ifTrue:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3127
                                                nm asFilename withoutSuffix name
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3128
                                             ] ifFalse:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3129
                                                nm
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3130
                                             ]
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3131
                                      ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3132
                 containerList value:list.
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3133
"/
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3134
"/ do not auto-select the first item
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3135
"/                 list notEmpty ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3136
"/                    containerSelection value:(Array with:list first)
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3137
"/                 ]
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3138
             ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3139
             self activityNotification:nil
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3140
           ].
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3141
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3142
    moduleSelection 
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3143
        onChangeEvaluate:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3144
             |list|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3145
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3146
             dialog window withWaitCursorDo:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3147
                 list := SourceCodeManager getExistingPackagesInModule:(moduleSelection value).
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3148
                 packageList value:list.
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3149
"/
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3150
"/ do not auto-select the first item
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3151
"/                 list notEmpty ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3152
"/                     packageSelection value:list first
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3153
"/                 ]
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3154
             ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3155
             self activityNotification:nil
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3156
           ].
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3157
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3158
    containerSelection
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3159
        onChangeEvaluate:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3160
             loadEnabled value:(containerSelection value notEmpty).
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3161
           ].
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3162
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3163
    self withWaitCursorDo:[
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3164
        |list|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3165
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3166
        moduleList value:(list := SourceCodeManager getExistingModules).
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3167
"/        list notEmpty ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3168
"/            "/ 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
  3169
"/            (list includes:(m := OperatingSystem getLoginName)) ifFalse:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3170
"/                "/ if there is a module named 'stx', use that one.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3171
"/                (list includes:'stx') ifTrue:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3172
"/                    m := 'stx'
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3173
"/                ] ifFalse:[
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3174
"/                    m := list first
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3175
"/                ]
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3176
"/             ].
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3177
"/             moduleSelection setValue:m.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3178
"/             list := SourceCodeManager getExistingPackagesInModule:m.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3179
"/             packageList value:list.
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3180
"/        ].
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3181
    ].
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3182
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3183
    self activityNotification:nil.
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3184
1671
cc16fd031dcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3185
    dialog := SimpleDialog new.
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3186
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3187
    Object activityNotificationSignal handle:[:ex |
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3188
        |msg|
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3189
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3190
        msg := 'Load from repository'.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3191
        ex errorString size > 0 ifTrue:[
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3192
            msg := msg , ' - ' , ex errorString
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3193
        ].
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3194
        dialog window topView label:msg.
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3195
        ex proceed.
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3196
    ] do:[
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3197
        dialog
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3198
            openFor:self
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3199
            spec:self class repositoryLoadSpec 
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  3200
            withBindings:bindings
2113
ea776ca21939 nicer load-from-repository
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  3201
    ]
1671
cc16fd031dcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3202
    "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
  3203
!
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  3204
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  3205
classCategoryRepositoryHistory
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  3206
    (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
  3207
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  3208
    self withWaitCursorDo:[
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3209
        |timeGoal repositoryFilter aStream box y component 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3210
         timeGoalListPop repositoryFilterPop|
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3211
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3212
        box := Dialog new.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3213
        (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
  3214
        box addVerticalSpace:20.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3215
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3216
        timeGoal := 'yesterday' asValue. 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3217
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3218
        y := box yPosition.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3219
        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
  3220
        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
  3221
        box yPosition:y.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3222
        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
  3223
        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
  3224
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3225
        timeGoalListPop list:#('yesterday'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3226
                               'a week ago'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3227
                               'a month ago'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3228
                               'a year ago'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3229
                               'all'
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3230
                              ).
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3231
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3232
        y := box yPosition.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3233
        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
  3234
        component width:0.5; adjust:#right; borderWidth:0.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3235
        box yPosition:y.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3236
        repositoryFilterPop := box addComboBoxOn:repositoryFilter tabable:true.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3237
        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
  3238
        repositoryFilterPop list:#(
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3239
                                "/ to do - get list of available repositories ...
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3240
                                'stx'
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3241
                                'exept'
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3242
                                ''
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3243
                               ).
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3244
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3245
        box addAbortAndOkButtons.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3246
        box open.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3247
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3248
        box accepted ifTrue:[
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3249
            repositoryFilter := repositoryFilter value.
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3250
            repositoryFilter size == 0 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3251
                ifTrue:[repositoryFilter := nil]
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3252
                ifFalse:[repositoryFilter := Array with:repositoryFilter].
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3253
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3254
            timeGoal := timeGoal value.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3255
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3256
"/        timeGoal := Dialog 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3257
"/                         request:'list changed repository containers since (mm/dd):
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3258
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3259
"/You can also specify the date as 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3260
"/''yesterday'', ''a week ago'' or ''a month ago''
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3261
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3262
"/'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3263
"/                         initialAnswer:'yesterday'  
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3264
"/                         onCancel:nil.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3265
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3266
"/        timeGoal notNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3267
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3268
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3269
            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
  3270
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3271
            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
  3272
            Processor activeProcess 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3273
                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
  3274
            do:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3275
                SourceCodeManager notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3276
                    SourceCodeManager
2480
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3277
                        writeHistoryLogSince:timeGoal 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3278
                        filterSTSources:true 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3279
                        filterUser:nil 
8b8af77f0e6c added repository filter to history
Claus Gittinger <cg@exept.de>
parents: 2479
diff changeset
  3280
                        filterRepository:repositoryFilter
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3281
                        to:aStream.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3282
                ] ifFalse:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3283
                    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
  3284
                ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3285
            ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3286
            codeView contents:(aStream contents).
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3287
            codeView modified:false.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3288
            self clearAcceptAction.
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3289
            self clearExplainAction.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3290
            methodListView notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3291
                methodListView setSelection:nil
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3292
            ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3293
            aspect := nil.      
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3294
            self normalLabel
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  3295
        ].
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  3296
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  3297
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3298
    "Created: / 23.11.1995 / 11:41:38 / cg"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3299
    "Modified: / 10.2.2000 / 14:13:46 / cg"
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  3300
!
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  3301
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  3302
classCategoryValidateClassRevisions
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  3303
    "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
  3304
     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
  3305
     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
  3306
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  3307
    self withWaitCursorDo:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3308
        |logMessage classes repVersion clsVersion binVersion
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3309
         count unloadedCount badCount cat needCheckIn|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3310
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3311
        cat := currentClassCategory.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3312
        (cat = '* hierarchy *') ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3313
            cat := '* all *'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3314
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3315
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3316
        classes := self listOfAllClassesInCategory:cat names:false.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3317
        classes isNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3318
            Transcript showCR:'no classes to validate'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3319
            ^ self
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3320
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3321
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3322
        count := unloadedCount := badCount := needCheckIn := 0.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3323
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3324
        Transcript cr.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3325
        Transcript showCR:'-------------------------------------------------'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3326
        Transcript showCR:'checking class revisions vs. repository ...'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3327
        Transcript cr.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3328
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3329
        classes do:[:aClass |
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3330
            |clsName msg sourceCodeManager repSource currentSource aStream|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3331
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3332
            count := count + 1.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3333
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3334
            "/ 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
  3335
                
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3336
            clsName := aClass name.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3337
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3338
            aClass isLoaded ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3339
                unloadedCount := unloadedCount + 1.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3340
                (currentClassCategory ~= '* all *'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3341
                and:[currentClassCategory ~= '* hierarchy *']) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3342
                    msg := '?? ''' , clsName , ''' is not loaded - skipped check'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3343
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3344
            ] ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3345
                ((aClass isNameSpace not or:[aClass == Smalltalk])
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3346
                and:[aClass topOwningClass isNil]) ifTrue:[
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  3347
                
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  3348
"/                    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
  3349
                
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3350
                    sourceCodeManager := aClass sourceCodeManager.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3351
                    sourceCodeManager isNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3352
                        msg := '?? ''' , clsName , ''' has no sourceCodeManager - skipped check'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3353
                    ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3354
                        repVersion := sourceCodeManager newestRevisionOf:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3355
                        repVersion isNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3356
                            msg := '-- ' , clsName 
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3357
                                    , ' not in repository'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3358
                        ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3359
                            clsVersion := aClass revision.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3360
                            binVersion := aClass binaryRevision.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3361
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3362
                            clsName := aClass name.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3363
                            msg := nil.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3364
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3365
                            clsVersion ~= repVersion ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3366
                                badCount := badCount + 1.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3367
                                msg := '** ' , clsName 
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3368
                                        , ' is not up-to-date (this: '
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3369
                                        , clsVersion printString
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3370
                                        , ' repository: '
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3371
                                        , repVersion printString
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3372
                                        , ').'.
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  3373
                                msg := msg allBold.
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3374
                            ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3375
                                clsVersion ~= binVersion ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3376
                                    binVersion notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3377
                                        msg := clsName
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3378
                                               , ' up-to-date (but should be stc-recompiled)'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3379
                                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3380
                                ] ifFalse:[
1096
3e3af3c70de1 handle no-sourceCodeManager case when validating classes.
Claus Gittinger <cg@exept.de>
parents: 1095
diff changeset
  3381
    "/                              msg := clsName , ' is up-to-date.'
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3382
                                ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3383
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3384
                                "/ compare the sources;
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3385
                                "/ to find classes which need a checkin.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3386
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3387
                                aStream := sourceCodeManager getMostRecentSourceStreamForClassNamed:aClass name.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3388
                                repSource := aStream contents asString.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3389
                                aStream close.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3390
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3391
                                aStream := '' writeStream.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3392
                                Method flushSourceStreamCache.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3393
                                aClass fileOutOn:aStream withTimeStamp:false.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3394
                                currentSource := aStream contents asString.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3395
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3396
                                repSource ~= currentSource ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3397
                                    msg := '-- ' , clsName , ' should be checked into the repository'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3398
                                    needCheckIn := needCheckIn + 1.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3399
                                ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3400
                            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3401
                        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3402
                    ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3403
                ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3404
            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3405
            msg notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3406
                Transcript showCR:msg
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3407
            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3408
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3409
        Transcript cr.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3410
        Transcript showCR:'----------------------------------------------------------'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3411
        Transcript showCR:('%1 classes / %2 unloaded / %3 need checkout / %4 need checkin.'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3412
                           bindWith:count with:unloadedCount with:badCount with:needCheckIn).
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3413
        Transcript showCR:'----------------------------------------------------------'.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3414
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3415
        self normalLabel.
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  3416
    ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  3417
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  3418
    "Modified: 15.6.1996 / 00:25:58 / stefan"
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  3419
    "Created: 29.10.1996 / 13:21:08 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  3420
    "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
  3421
! !
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  3422
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3423
!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
  3424
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3425
checkClassCategorySelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3426
    currentClassCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3427
	self warn:'select a class category first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3428
	^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3429
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3430
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3431
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3432
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3433
classCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3434
    "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
  3435
     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
  3436
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3437
    |newCategory oldClass oldName classIndex list|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3438
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3439
    newCategory := classCategoryListView selectionValue.
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
  3440
    (newCategory = '* all *'
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  3441
     or:[newCategory = '* hierarchy *'
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  3442
     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
  3443
    ) ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3444
        "switch to all or hierarchy:
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3445
         remember current class and reselect it        
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3446
         after showing the updated class list
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3447
        "
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3448
        oldClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3449
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3450
    currentClassCategory := newCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3451
    oldClass isNil ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3452
        self classCategorySelectionChanged
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3453
    ] ifFalse:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3454
        oldName := oldClass name.
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  3455
        self withWaitCursorDo:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3456
            self updateClassList
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3457
        ].
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3458
        "stupid - search for class name in (indented) list"
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3459
        list := classListView list.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3460
        list notNil ifTrue:[
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3461
            classIndex := list findFirst:[:elem | elem withoutSpaces = oldName asString].
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3462
        ] ifFalse:[
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3463
            classIndex := 0
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3464
        ].
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3465
        classIndex ~~ 0 ifTrue:[
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3466
            classListView setSelection:classIndex.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3467
            self changeCurrentClass:(environment at:(oldName asSymbol))
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3468
        ] ifFalse:[
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3469
            self normalLabel.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3470
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3471
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3472
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  3473
    "Modified: / 16.1.1998 / 17:12:24 / stefan"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  3474
    "Modified: / 10.4.1998 / 12:25:34 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  3475
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3476
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3477
classCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3478
    "class category has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3479
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  3480
    self withWaitCursorDo:[
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3481
        self changeCurrentClass:nil.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3482
        aspect := nil.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3483
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3484
        actualClass := acceptClass := nil.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3485
        currentMethodCategory := nil.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3486
        self releaseMethod.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3487
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3488
        self updateClassList.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3489
        self updateMethodCategoryList.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3490
        self updateMethodList.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3491
        self updateCodeView.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3492
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3493
        self clearExplainAction.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3494
        self clearAcceptAction.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3495
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3496
        (currentClassCategory = '* removed *') ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3497
            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
  3498
but there are still referenced instances of them around.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  3499
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  3500
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
  3501
'
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3502
        ]
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3503
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3504
    ]
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3505
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3506
    "Modified: / 10.2.2000 / 14:13:52 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3507
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3508
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3509
listOfAllClassCategories
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3510
    "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
  3511
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  3512
    |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
  3513
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3514
    newList := Set new.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  3515
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  3516
    currentNamespace = '* all *' ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3517
        nameSpaceList := Array with:environment.
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3518
        allNameSpaces := true.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  3519
    ] ifFalse:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3520
        nameSpaceList := self listOfNamespaces.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3521
        allNameSpaces := false.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  3522
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  3523
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  3524
    nameSpaceList do:[:aNamespace |
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  3525
        aNamespace allClassesDo:[:aClass |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3526
            aClass isMeta ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3527
                (aClass isNameSpace not 
2646
bb22d1b835e6 renamed Namespace to NameSpace
Claus Gittinger <cg@exept.de>
parents: 2645
diff changeset
  3528
                or:[aClass == NameSpace 
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3529
                or:[aClass == Smalltalk]]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3530
                    (allNameSpaces or:[aClass nameSpace == aNamespace]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3531
                        cat := aClass category.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3532
                        cat isNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3533
                            cat := '* no category *'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3534
                        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3535
                        cat ~= 'obsolete' ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3536
                            newList add:cat
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3537
                        ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3538
                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3539
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3540
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3541
        ]
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  3542
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  3543
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3544
    newList notEmpty ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3545
        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
  3546
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3547
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3548
    ^ newList asOrderedCollection sort.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  3549
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  3550
    "Modified: 5.1.1997 / 17:12:01 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  3551
!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3552
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3553
renameCurrentClassCategoryTo:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3554
    "helper - do the rename"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3555
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3556
    |any categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3557
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3558
    currentClassCategory notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3559
	any := false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3560
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3561
	self allClassesInSelectedNamespacesDo:[:aClass |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3562
	    aClass category = currentClassCategory ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3563
		aClass category:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3564
		any := true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3565
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3566
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3567
	any ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3568
	    categories := classCategoryListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3569
	    categories remove:currentClassCategory.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3570
	    categories add:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3571
	    categories sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3572
	    classCategoryListView setContents:categories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3573
	    currentClassCategory := aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3574
	    classCategoryListView setSelectElement:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3575
	] ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3576
	    currentClassCategory := aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3577
	    self updateClassCategoryList.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3578
	    self updateClassListWithScroll:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  3579
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3580
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3581
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  3582
    "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
  3583
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3584
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3585
switchToAnyMethod:aSelectorString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3586
    "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
  3587
     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
  3588
     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
  3589
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3590
    |classes sel box theClassName|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3591
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3592
    classes := OrderedCollection new.
3125
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
  3593
    (sel := aSelectorString asSymbolIfInterned) notNil ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  3594
        environment allClassesDo:[:aClass |
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3595
            (aClass includesSelector:sel) ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3596
                classes add:aClass.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3597
            ].
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  3598
            (aClass theMetaclass includesSelector:sel) ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  3599
                classes add:aClass theMetaclass.
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3600
            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3601
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3602
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3603
    classes size == 0 ifTrue:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3604
        SystemBrowser showNoneFound.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3605
        ^ self
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3606
    ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3607
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3608
    classes size > 1 ifTrue:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3609
        box := ListSelectionBox 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3610
                    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
  3611
        box label:'find method'.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3612
        box okText:(resources string:'show').
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3613
        box list:(classes collect:[:aClass | aClass name]) asSortedCollection.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3614
        box action:[:aString | theClassName := aString].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3615
        box entryCompletionBlock:[:contents |
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3616
            |s l what m names|
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3617
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3618
            s := contents withoutSpaces.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3619
            s size == 0 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3620
                l := classes
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3621
            ] ifFalse:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3622
                l := classes select:[:cls | cls name startsWith:s].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3623
            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3624
            l size == 0 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3625
                l := classes select:[:cls | cls name asLowercase startsWith:s asLowercase].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3626
            ].
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3627
            l size > 0 ifTrue:[    
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3628
                box list:(names := l collect:[:aClass | aClass name]) asSortedCollection.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3629
                box contents:(names longestCommonPrefix). "/ l first name.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3630
                l size ~~ 1 ifTrue:[
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3631
                    self beep
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3632
                ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3633
            ]
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3634
        ].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  3635
        box open.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3636
    ] ifFalse:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3637
        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
  3638
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3639
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3640
    theClassName notNil ifTrue:[
2565
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3641
        self switchToClassNamed:theClassName. 
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3642
        self updateMethodCategoryList.
a0487f27becc fixed method search
Claus Gittinger <cg@exept.de>
parents: 2552
diff changeset
  3643
        self switchToMethodNamed:aSelectorString.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3644
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3645
1805
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
  3646
    "Modified: / 1.9.1995 / 01:39:58 / claus"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  3647
    "Modified: / 25.1.2000 / 20:43:35 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  3648
!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3649
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3650
updateClassCategoryList
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  3651
    self updateClassCategoryListWithScroll:true.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  3652
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  3653
    "Modified: 8.1.1997 / 10:58:06 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3654
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3655
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3656
updateClassCategoryListWithScroll:scroll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3657
    |oldClassCategory oldClass oldMethodCategory oldMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3658
     oldSelector newCategoryList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3659
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3660
    classMethodListView notNil ifTrue:[ ^ self ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3661
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3662
    oldClassCategory := currentClassCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3663
    oldClass := currentClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3664
    oldMethodCategory := currentMethodCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3665
    oldMethod := currentMethod.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3666
    oldMethod notNil ifTrue:[
2889
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3667
        oldSelector := currentSelector
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3668
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3669
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3670
    classCategoryListView notNil ifTrue:[
2889
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3671
        newCategoryList := self listOfAllClassCategories.
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3672
        newCategoryList = classCategoryListView list ifFalse:[
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3673
            scroll ifTrue:[
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3674
                classCategoryListView contents:newCategoryList
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3675
            ] ifFalse:[
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3676
                classCategoryListView setContents:newCategoryList
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3677
            ]
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3678
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3679
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3680
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3681
    oldClassCategory notNil ifTrue:[
2889
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3682
        classCategoryListView notNil ifTrue:[
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3683
            classCategoryListView setSelectElement:oldClassCategory
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3684
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3685
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3686
    classListView notNil ifTrue:[
2889
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3687
        oldClass notNil ifTrue:[
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3688
            classListView multipleSelectOk ifTrue:[
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3689
                classListView setSelectElement:(Array with:oldClass name)
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3690
            ] ifFalse:[
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3691
                classListView setSelectElement:(oldClass name)
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3692
            ]
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3693
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3694
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3695
    oldMethodCategory notNil ifTrue:[
2889
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3696
        methodCategoryListView notNil ifTrue:[
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3697
            methodCategoryListView setSelectElement:oldMethodCategory
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3698
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3699
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3700
    oldSelector notNil ifTrue:[
2889
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3701
        methodListView notNil ifTrue:[
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3702
            methodListView setSelectElement:oldSelector
59a2683c8dbe multipleSelect fix
ps
parents: 2887
diff changeset
  3703
        ].
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  3704
    ]
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  3705
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  3706
    "Modified: / 27.7.1998 / 10:56:50 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3707
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3708
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3709
!BrowserView methodsFor:'class history'!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3710
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3711
changeHistoryMenu
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3712
    "returns a popup menu to navigate
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3713
     to the last few changes"
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3714
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3715
    <resource: #programMenu >
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3716
3301
129c60ebc2b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
  3717
    |labels changes hist menu n nMax|
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3718
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3719
    changes := ChangeSet current.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3720
    hist := OrderedCollection new.
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3721
    labels := Set new.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3722
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3723
    menu := Menu new receiver:self.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3724
    n := 0.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3725
    nMax := self class classHistoryMaxSize.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3726
    changes reverseDo:[:aChange |
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3727
        |item|
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3728
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3729
        n < nMax ifTrue:[
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3730
            aChange isMethodChange ifTrue:[
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3731
                item := aChange printString.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3732
                (labels includes:item) ifFalse:[
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3733
                    labels add:item.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3734
                    n := n + 1.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3735
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3736
                    menu addItem:(MenuItem new 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3737
                        label: item; 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3738
                        value: #switchBackToMessageNamed:; 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3739
                        argument: item; 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3740
                        activeHelpKey: #historyMenuItem).
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3741
                ]
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3742
            ].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3743
        ].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3744
    ].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3745
    n = 0 ifTrue:[
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3746
        ^ nil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3747
    ].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3748
    ^ menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3749
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3750
    "Modified: / 10.2.2000 / 14:05:34 / cg"
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3751
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3752
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3753
changeHistoryPopUpMenu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3754
    "returns a popup menu to navigate
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3755
     to the last few changes"
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3756
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3757
    <resource: #programMenu >
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3758
3301
129c60ebc2b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
  3759
    |labels changes hist n nMax|
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3760
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3761
    changes := ChangeSet current.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3762
    hist := OrderedCollection new.
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3763
    labels := OrderedCollection new.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3764
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3765
    n := 0.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3766
    nMax := self class classHistoryMaxSize.
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3767
    changes reverseDo:[:aChange |
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3768
        |item|
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3769
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3770
        n < nMax ifTrue:[
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3771
            aChange isMethodChange ifTrue:[
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3772
                item := aChange printString.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3773
                (labels includes:item) ifFalse:[
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3774
                    labels add:item.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3775
                    n := n + 1.
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3776
                ]
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3777
            ].
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3778
        ].
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3779
    ].
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3780
    n = 0 ifTrue:[
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3781
        ^ nil
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3782
    ].
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3783
    ^ PopUpMenu 
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3784
        labels:labels
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  3785
        selector:#switchBackToMessageNamed:
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3786
        args:labels
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3787
        receiver:self
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3788
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3789
    "Modified: / 10.2.2000 / 14:05:34 / cg"
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3790
!
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3791
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3792
classHistoryMenu
3600
d03c7ae488e1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3597
diff changeset
  3793
    "returns a menu to navigate to
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3794
     the last visited classes"
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3795
1669
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  3796
    <resource: #programMenu >
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  3797
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  3798
    |menu classHistory|
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3799
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3800
    self class checkClassHistory.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3801
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  3802
    classHistory := self class classHistory.
3142
c49df8b21284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
  3803
    classHistory isEmpty ifTrue: [ ^ nil ].
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3804
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3805
    menu := Menu new receiver:self.
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  3806
    classHistory do:[:histEntry |
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3807
        menu addItem:(MenuItem new 
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  3808
            label: histEntry className; 
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3809
            value: #switchBackToMessageNamed:; 
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  3810
            argument: histEntry className).
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3811
    ].    
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3812
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3813
"/    menu addSeparator.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3814
"/    menu addItem:(MenuItem new 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3815
"/        label: (resources string:'empty history'); 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3816
"/        value: #emptyClassHistory:).
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3817
"/
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3818
    ^ menu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3819
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3820
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3821
classHistoryPopUpMenu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3822
    "returns a popup menu to navigate to
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3823
     the last visited classes"
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3824
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3825
    <resource: #programMenu >
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  3826
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  3827
    |labels selectors args classHistory|
1528
c9e0c25f38dd no complicated cascades for the stc
tz
parents: 1524
diff changeset
  3828
1575
d1ec15618c24 #checkClassHistory moved to the class protocol for common use
tz
parents: 1574
diff changeset
  3829
    self class checkClassHistory.
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3830
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  3831
    classHistory := self class classHistory.
3142
c49df8b21284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
  3832
    classHistory isEmpty ifTrue: [
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  3833
        ^ nil
3142
c49df8b21284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
  3834
    ].
c49df8b21284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
  3835
c49df8b21284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
  3836
    labels := classHistory collect: [:histEntry| histEntry className ].
c49df8b21284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
  3837
    selectors := Array new: classHistory size.
c49df8b21284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
  3838
    selectors atAllPut:#switchBackToMessageNamed:.
c49df8b21284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3138
diff changeset
  3839
    selectors := selectors asOrderedCollection.
3184
5f5e9153f496 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3179
diff changeset
  3840
    args := labels. "/ classHistory collect: [:histEntry| histEntry selector ].
2594
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3841
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3842
    ^ PopUpMenu 
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3843
        labels:labels
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3844
        selectors:selectors
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3845
        args:args
8ecaf24cd47f added last-changed menu
Claus Gittinger <cg@exept.de>
parents: 2593
diff changeset
  3846
        receiver:self.
1669
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  3847
18ea61127a9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1667
diff changeset
  3848
    "Modified: / 21.5.1998 / 15:42:10 / cg"
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3849
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3850
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3851
emptyClassHistory
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3852
    "removes all class history entries"
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3853
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  3854
    SystemBrowser emptyClassHistory
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3855
!
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3856
2618
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  3857
loadFromMessage:aMessageString
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  3858
    "switch to the class and selector specified by aMessage,
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  3859
     which has the form: '<className> {class} <selector>'
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  3860
     Backward compatibility - should no longer be used."
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  3861
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  3862
    self switchBackToMessageNamed:aMessageString
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  3863
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  3864
!
0d7833f6f9c4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2610
diff changeset
  3865
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  3866
switchBackToMessageNamed: aMessage
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  3867
    "switch to the class and selector specified by aMessage,
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  3868
     which has the form: '<className> {class} <selector>'"
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  3869
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  3870
    |selector nameSpace words meta savedHistory ns|
2593
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3871
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3872
    words := aMessage asCollectionOfWords.
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3873
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  3874
    savedHistory := self class classHistory copy.
2593
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3875
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3876
    self switchToClassNamed:(words first).
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3877
    self classSelectionChanged.
1635
29ae5c9bce7b '* hierarchy *' switching error fixed for classes with similar names (!!!) + consider namespaces for the class history
tz
parents: 1627
diff changeset
  3878
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  3879
    (ns := actualClass nameSpace ? Smalltalk) ~~ Smalltalk 
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  3880
        ifTrue:  [nameSpace := ns name]
2593
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3881
        ifFalse: [nameSpace := '* all *'].
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3882
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3883
    namespaceList model value ~= nameSpace ifTrue:[
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3884
        namespaceList model value:nameSpace.    
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3885
    ].
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3886
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3887
    meta := (aMessage includesString: ' class ').
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3888
    meta not ~~ showInstance ifTrue:[
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3889
        self instanceProtocol:meta not.
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3890
        self classSelectionChanged.
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3891
    ].
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3892
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3893
    (words size > 1
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
  3894
    and:[(words last) ~= 'class']) ifTrue:[
2593
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3895
        selector := words last asSymbolIfInterned.
3591
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
  3896
        (selector notNil and:[actualClass includesSelector:selector])
2593
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3897
        ifTrue:[
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3898
            self switchToMethodNamed: selector.
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3899
        ]
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3900
    ].
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  3901
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  3902
    self class classHistory:savedHistory.
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3903
! !
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
  3904
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3905
!BrowserView methodsFor:'class list menu'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3906
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3907
classClassInstVars
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3908
    "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
  3909
     for a class-instvar-definition change"
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  3910
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  3911
    self doClassMenu:[:currentClass |
2253
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3912
        |s|
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3913
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3914
        s := WriteStream on:(String new).
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3915
        currentClass fileOutClassInstVarDefinitionOn:s withNameSpace:true.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3916
        codeView contents:(s contents).
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3917
        codeView modified:false.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3918
        codeModified := false.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3919
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3920
        self setAcceptActionForClassInstVars.
2253
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3921
        self clearExplainAction.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3922
2253
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3923
        methodListView notNil ifTrue:[
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3924
            methodListView setSelection:nil
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3925
        ].
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3926
        aspect := #classInstVars.
40b7987f144c oops - include namespace in class-instar definition
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
  3927
        self normalLabel
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  3928
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3929
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  3930
    "Modified: / 10.2.2000 / 14:12:32 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3931
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3932
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3933
classComment
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3934
    "show the classes comment in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3935
     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
  3936
3019
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  3937
    self classShowFrom:#comment set:#comment: aspect:#comment 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3938
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3939
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3940
classDefinition
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  3941
    "show class definition in View and setup accept-action for
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3942
     a class-definition change.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3943
     Extract documentation either from a documentation method or
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3944
     from the comment - not a biggy, but beginners will like
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3945
     it when exploring the system."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3946
3559
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  3947
    currentClass isNil ifTrue:[
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  3948
        ^ self
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  3949
    ].
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  3950
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3951
    self doClassMenu:[:currentClass |
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3952
        |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
  3953
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3954
        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
  3955
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3956
        cls := acceptClass ? currentClass.
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  3957
        cls := cls theNonMetaclass.
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3958
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  3959
        (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
  3960
            cls fileOutDefinitionOn:aStream
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3961
        ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3962
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3963
            "/
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3964
            "/ 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
  3965
            "/ and prefer short names.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3966
            "/
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3967
            cls
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3968
                basicFileOutDefinitionOn:aStream 
2649
e4b2bcafaf2f no package info in class definition
Claus Gittinger <cg@exept.de>
parents: 2648
diff changeset
  3969
                withNameSpace:true
e4b2bcafaf2f no package info in class definition
Claus Gittinger <cg@exept.de>
parents: 2648
diff changeset
  3970
                withPackage:false.
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3971
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3972
            cls isLoaded ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3973
                "/ show the definition now...
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3974
                src := aStream contents.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3975
                codeView contents:src.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3976
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3977
                "/ ...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
  3978
                "/ 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
  3979
                "/ from the repository.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3980
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3981
                "
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3982
                 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
  3983
                "
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  3984
                m := cls theMetaclass compiledMethodAt:#documentation.
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3985
                m notNil ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3986
                    s := m comment.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3987
                    isComment := false.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3988
                ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3989
                    "try comment"
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3990
                    s := cls comment.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3991
                    s isString ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3992
                        s isEmpty ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3993
                            s := nil
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3994
                        ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3995
                            (s includes:$") ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3996
                                s := s copyReplaceAll:$" with:$'.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3997
                            ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3998
                            isComment := true
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  3999
                        ]
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4000
                    ] ifFalse:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4001
                        "/ class redefines comment ?
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4002
                        s := nil
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4003
                    ]
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4004
                ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4005
            ].
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4006
            cls isJavaClass ifFalse:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4007
                aStream cr; cr; cr; cr; cr.
2605
56cf1ae89b39 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  4008
                aStream emphasis:(UserPreferences current commentEmphasisAndColor).
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4009
                s isNil ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4010
                    aStream nextPut:$" ; cr; nextPutLine:' no comment or documentation method found'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4011
                ] ifFalse:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4012
                    aStream nextPut:$" ; cr; nextPutLine:' Documentation:'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4013
                    aStream cr; nextPutLine:s; cr.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4014
                    aStream nextPutLine:' Notice: '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4015
                    aStream nextPutAll:'   the above text has been extracted from the classes '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4016
                    aStream nextPutLine:(isComment ifTrue:['comment.'] ifFalse:['documentation method.']).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4017
                    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
  4018
                    aStream nextPutAll:'   To change the '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4019
                    aStream nextPutAll:(isComment ifTrue:['comment'] ifFalse:['documentation']).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4020
                    aStream nextPutAll:', switch to the '.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4021
                    aStream nextPutAll:(isComment ifTrue:['comment'] ifFalse:['documentation method']).
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4022
                    aStream nextPutLine:' and ''accept'' any changes there.'.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4023
                ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4024
                aStream nextPut:$".
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4025
                aStream emphasis:nil.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
  4026
            ]
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4027
        ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4028
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4029
        src := aStream contents.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4030
        UserPreferences current syntaxColoring ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4031
            highlighter := cls syntaxHighlighterClass.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4032
            highlighter notNil ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4033
                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
  4034
            ]
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4035
        ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4036
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4037
        codeView contents:src.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4038
        codeView modified:false.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4039
        codeModified := false.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4040
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4041
        self setAcceptActionForClass.
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4042
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4043
"/        currentClass isNamespace ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4044
"/            codeView acceptAction:nil.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4045
"/        ] ifFalse:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4046
"/            codeView acceptAction:[:theCode |
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4047
"/                |ns|
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4048
"/
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4049
"/                currentClass notNil ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4050
"/                    ns := currentClass nameSpace
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4051
"/                ] ifFalse:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4052
"/                    ns := nil
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4053
"/                ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4054
"/            
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4055
"/                codeView cursor:Cursor execute.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4056
"/
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4057
"/                Class nameSpaceQuerySignal handle:[:ex |
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4058
"/                    ns isNil ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4059
"/                        ex reject
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4060
"/                    ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4061
"/                    ex proceedWith:ns
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4062
"/                ] do:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4063
"/                    Object abortSignal catch:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4064
"/
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4065
"/                        Class nameSpaceQuerySignal answer:Smalltalk
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4066
"/                        do:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4067
"/                            (Compiler evaluate:theCode asString notifying:codeView compile:false)
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4068
"/                            isBehavior ifTrue:[
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4069
"/                                codeView modified:false.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4070
"/                                codeModified := false.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4071
"/                                self classCategoryUpdate.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4072
"/                                self updateClassListWithScroll:false.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4073
"/                            ]
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4074
"/                        ]
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4075
"/                    ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4076
"/                ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4077
"/                codeView cursor:Cursor normal.
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4078
"/            ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
  4079
"/        ].
2232
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4080
        self clearExplainAction.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4081
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4082
        methodListView notNil ifTrue:[
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4083
            methodListView setSelection:nil
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4084
        ].
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4085
        aspect := #definition.
a46837dc0c5c show a classes definition immediately, then fetch the documentation.
Claus Gittinger <cg@exept.de>
parents: 2223
diff changeset
  4086
        self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4087
    ]
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  4088
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  4089
    "Modified: / 5.11.2001 / 16:29:44 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4090
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4091
1971
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4092
classDerivedInstancesInspect
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4093
    "inspect the current classes derived instances"
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4094
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4095
    |insts|
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4096
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4097
    self checkClassSelected ifFalse:[^ self].
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4098
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4099
    insts := currentClass allSubInstances.
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4100
    insts size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4101
	self warn:'no direct or derived instances'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4102
	^ self
1971
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4103
    ].
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4104
    insts size == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4105
	insts first inspect.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4106
	^ self.
1971
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4107
    ].
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4108
    insts inspect
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4109
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4110
    "Created: / 24.2.1996 / 16:12:14 / cg"
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4111
    "Modified: / 21.7.1998 / 11:32:49 / cg"
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4112
!
4b88d5f657cd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1959
diff changeset
  4113
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  4114
classDocumentation
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  4115
    "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
  4116
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  4117
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4118
	Autoload autoloadFailedSignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4119
	    self warn:'autoload failed.
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4120
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4121
Check your source directory and/or 
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4122
the abbreviation file for the classes (correct) shortened name.'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4123
	    ex return.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4124
	] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4125
	    |text v|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4126
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4127
	    text := currentClass htmlDocumentation.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4128
	    text notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4129
		v := HTMLDocumentView
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4130
			openFullOnText:text 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4131
			inDirectory:(Smalltalk getSystemFileName:'doc/online/english/classDoc').
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4132
		v nameSpaceForExecution:(currentClass nameSpace).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4133
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4134
	]
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  4135
    ]
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  4136
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  4137
    "Created: 18.5.1996 / 12:12:20 / cg"
1188
3805f78caf95 documentationViews currentDirectory ...
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  4138
    "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
  4139
!
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  4140
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4141
classDocumentationAs
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4142
    "as for a fileName & save a classes documentation html doc into it"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4143
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4144
    |fileBox dir saveName|
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4145
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4146
    fileBox := FileSelectionBox
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  4147
                    title:(resources string:'Save HTML doc of ''%1'' as:' with:currentClass name)
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  4148
                    okText:(resources string:'Save')
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  4149
                    abortText:(resources string:'Cancel')
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  4150
                    action:[:fileName | saveName := fileName].
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4151
    fileBox initialText:((Smalltalk fileNameForClass:currentClass) , '.html').
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4152
    dir := FileSelectionBox lastFileSelectionDirectory.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4153
    dir notNil ifTrue:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  4154
        fileBox directory:dir.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  4155
    ].
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  4156
    fileBox open.
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4157
    fileBox destroy.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4158
    saveName isNil ifTrue:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  4159
        ^ self
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4160
    ].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4161
    saveName isEmpty ifTrue:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  4162
        self warn:'bad name given'.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  4163
        ^ self
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4164
    ].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4165
    FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4166
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4167
    self classDocumentationToFile:saveName
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  4168
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  4169
    "Modified: / 12.10.2001 / 19:47:28 / cg"
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4170
!
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4171
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4172
classDocumentationToFile:aFilename
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4173
    "save a classes documentation html doc into a file"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4174
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4175
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4176
	Autoload autoloadFailedSignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4177
	    self warn:'autoload failed.
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4178
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4179
Check your source directory and/or 
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4180
the abbreviation file for the classes (correct) shortened name.'.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4181
	    ex return.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4182
	] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4183
	    |text v f|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4184
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4185
	    text := currentClass htmlDocumentation.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4186
	    text notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4187
		f := aFilename asFilename writeStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4188
		f nextPutAll:text asString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4189
		f close.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4190
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4191
	]
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4192
    ]
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4193
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4194
    "Created: 18.5.1996 / 12:12:20 / cg"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4195
    "Modified: 17.6.1997 / 13:32:40 / cg"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4196
!
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  4197
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4198
classFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4199
    "fileOut the current class.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4200
     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
  4201
     warn if any)"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4202
1139
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4203
    self classFileOutAsk:false
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4204
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4205
    "Modified: 16.4.1997 / 20:55:13 / cg"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4206
!
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4207
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4208
classFileOutAs
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4209
    "fileOut the current class, asking for a filename."
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4210
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4211
    self classFileOutAsk:true
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4212
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4213
    "Modified: 16.4.1997 / 20:55:31 / cg"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4214
!
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4215
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4216
classFileOutAsk:ask
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4217
    "fileOut the current class, possibly asking for a filename.
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4218
     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
  4219
     warn if any)"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  4220
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4221
    self doClassMenu:[:currentClass |
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4222
        |msg fileBox saveName dir|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4223
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4224
        currentClass isPrivate ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4225
            self warn:'You must fileOut the owning class: ' , currentClass owningClass name
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4226
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4227
            ask ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4228
                fileBox := FileSelectionBox
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4229
                                title:(resources string:'fileOut %1 as:' with:currentClass name)
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  4230
                                okText:(resources string:'FileOut')
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  4231
                                abortText:(resources string:'Cancel')
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4232
                                action:[:fileName | saveName := fileName].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4233
                fileBox initialText:((Smalltalk fileNameForClass:currentClass) , '.st').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4234
                dir := FileSelectionBox lastFileSelectionDirectory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4235
                dir notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4236
                    fileBox directory:dir.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4237
                ].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  4238
                fileBox open.
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4239
                fileBox destroy.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4240
                saveName isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4241
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4242
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4243
                saveName isEmpty ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4244
                    self warn:'bad name given'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4245
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4246
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4247
                FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4248
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4249
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4250
            self busyLabel:'saving %1' with:currentClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4251
            Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4252
                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
  4253
                self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4254
                ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4255
            ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4256
                saveName notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4257
                    currentClass fileOutAs:saveName.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4258
                ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4259
                    currentClass fileOut.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4260
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4261
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4262
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4263
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4264
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  4265
1979
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4266
    "Created: / 16.4.1997 / 20:55:01 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4267
    "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
  4268
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4269
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  4270
classFileOutBinary
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  4271
    "fileOut the current class as binary bytecode."
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  4272
1979
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4273
    self classFileOutBinaryAsk:false
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4274
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4275
    "Modified: / 29.12.1998 / 21:42:15 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4276
!
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4277
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4278
classFileOutBinaryAs
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4279
    "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
  4280
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4281
    self classFileOutBinaryAsk:true
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4282
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4283
    "Created: / 29.12.1998 / 21:42:27 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4284
!
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4285
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4286
classFileOutBinaryAsk:ask
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4287
    "fileOut the current class as binary bytecode."
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4288
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4289
    |mode fileBox saveName dir|
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  4290
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  4291
    mode := Dialog choose:(resources string:'save including sources ?')
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4292
                   labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4293
                   values:#(nil #discard #reference #keep)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4294
                   default:#keep.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  4295
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  4296
    mode isNil ifTrue:[^ self].   "/ cancelled
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  4297
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  4298
    self doClassMenu:[:currentClass |
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4299
        |msg|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4300
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4301
        currentClass isPrivate ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4302
            self warn:'You must fileOut the owning class: ' , currentClass owningClass name
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4303
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4304
            ask ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4305
                fileBox := FileSelectionBox
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4306
                                title:(resources string:'binary fileOut %1 as:' with:currentClass name)
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4307
                                okText:(resources string:'fileOut')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4308
                                abortText:(resources string:'cancel')
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4309
                                action:[:fileName | saveName := fileName].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4310
                fileBox initialText:((Smalltalk fileNameForClass:currentClass) , '.cls').
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4311
                dir := FileSelectionBox lastFileSelectionDirectory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4312
                dir notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4313
                    fileBox directory:dir.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4314
                ].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  4315
                fileBox open.
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4316
                fileBox destroy.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4317
                saveName isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4318
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4319
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4320
                saveName isEmpty ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4321
                    self warn:'bad name given'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4322
                    ^ self
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4323
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4324
                FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4325
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4326
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4327
            self busyLabel:'saving binary of %1' with:currentClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4328
            Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4329
                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
  4330
                self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4331
                ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4332
            ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4333
                saveName notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4334
                    currentClass binaryFileOutWithSourceMode:mode as:saveName.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4335
                ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4336
                    currentClass binaryFileOutWithSourceMode:mode
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4337
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4338
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4339
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  4340
        self normalLabel.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  4341
    ]
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  4342
1979
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4343
    "Created: / 29.12.1998 / 21:35:13 / cg"
681b0263b4fb added saveBinaryAs menu item.
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  4344
    "Modified: / 29.12.1998 / 21:45:54 / cg"
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  4345
!
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  4346
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4347
classHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4348
    "show current classes hierarchy in codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4349
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4350
    self doClassMenu:[:currentClass |
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4351
        |aStream|
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4352
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4353
        aStream := WriteStream on:(String new:200).
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4354
        actualClass printHierarchyOn:aStream.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4355
        codeView contents:(aStream contents).
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4356
        codeView modified:false.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4357
        codeModified := false.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4358
        self clearAcceptAction.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4359
        self clearExplainAction.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4360
        methodListView notNil ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4361
            methodListView setSelection:nil
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4362
        ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4363
        aspect := #hierarchy. 
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4364
        self normalLabel
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4365
    ]
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4366
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  4367
    "Modified: / 10.2.2000 / 14:14:04 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4368
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4369
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4370
classInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4371
    "inspect the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4372
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4373
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4374
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4375
    currentClass inspect.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4376
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4377
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  4378
classInstancesInspect
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  4379
    "inspect the current classes instances"
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  4380
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  4381
    |insts|
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  4382
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  4383
    self checkClassSelected ifFalse:[^ self].
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  4384
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  4385
    insts := currentClass allInstances.
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  4386
    insts size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4387
	self warn:'no instances'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4388
	^ self
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  4389
    ].
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  4390
    insts size == 1 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4391
	insts first inspect.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4392
	^ self.
1734
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  4393
    ].
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  4394
    insts inspect
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  4395
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  4396
    "Created: / 24.2.1996 / 16:12:14 / cg"
0e10cff12822 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1730
diff changeset
  4397
    "Modified: / 21.7.1998 / 11:32:49 / cg"
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  4398
!
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  4399
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4400
classLoad
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4401
    "load an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4402
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  4403
    |nm nameShown|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4404
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4405
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4406
    nm := currentClass name.
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  4407
    nameShown := self displayedClassNameOf:currentClass.
987
e24e45bd126a dont update while loading
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
  4408
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4409
    Autoload autoloadFailedSignal handle:[:ex |
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4410
        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
  4411
1313
a287a275aaef remember last 'fileout as...' directory.
Claus Gittinger <cg@exept.de>
parents: 1308
diff changeset
  4412
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
  4413
and/or the abbreviation file for its (correct) shortened name.') 
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4414
                with:nm with:(Smalltalk fileNameForClass:currentClass).
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4415
        ex return.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4416
    ] do:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4417
        self withWaitCursorDo:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4418
            self busyLabel:'loading %1 ...' with:currentClass name.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4419
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4420
            lockUpdates := true.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4421
            [
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4422
                currentClass autoload.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4423
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4424
                currentClass := actualClass := nil.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4425
                "/ reselect the current class
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4426
                showInstance ifFalse:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4427
                    nameShown := nameShown , ' class'
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4428
                ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4429
                self switchToClassNamed:nameShown.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4430
                self classSelectionChanged.
1540
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  4431
"/                self classDefinition
3597
2e7fc0ae28c9 #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  4432
            ] ensure:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4433
                lockUpdates := false.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4434
                self normalLabel.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4435
            ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4436
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4437
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4438
1540
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  4439
    "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
  4440
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4441
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4442
classMakePrivate
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4443
    "change a class from public to private;
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4444
     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
  4445
     before doing this."
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4446
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  4447
    |ownerName owner|
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4448
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  4449
    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
  4450
    ownerName size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4451
	"/ cancelled
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4452
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4453
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4454
    owner := Smalltalk classNamed:ownerName.
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4455
    owner isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4456
	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
  4457
	^ self
1675
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  4458
    ].
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  4459
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  4460
    (owner privateClassesAt:currentClass nameWithoutPrefix) notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4461
	self warn:(resources 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4462
			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
  4463
			with:currentClass nameWithoutPrefix
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4464
			with:ownerName)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4465
		    withCRs.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4466
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4467
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4468
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4469
    currentClass makePrivateIn:owner
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4470
1675
b124c6aa661e fixed makePrivate
Claus Gittinger <cg@exept.de>
parents: 1674
diff changeset
  4471
    "Modified: / 29.5.1998 / 19:03:19 / cg"
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4472
!
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4473
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4474
classMakePublic
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4475
    "change a class from private to public;
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4476
     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
  4477
     before doing this."
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4478
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4479
    |ns baseName|
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4480
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4481
    baseName := currentClass nameWithoutPrefix.
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4482
    (ns := currentClass topOwningClass nameSpace) ~~ Smalltalk ifTrue:[
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4483
        ns := Dialog confirmWithCancel:(resources string:'Make public in ''Smalltalk'' or in its nameSpace ''%1'' ?' with:ns name)
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4484
                labels:(Array with:'cancel' with:'in Smalltalk' with:'in ' , ns name)
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4485
                values:(Array with:nil with:Smalltalk with:ns)
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4486
                default:3.
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4487
        ns isNil ifTrue:[^ self].
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4488
    ].
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4489
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4490
    (ns classNamed:baseName) notNil ifTrue:[
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4491
        self warn:(resources
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4492
                        string:'A public class named ''%1'' already exists in %2.\\Please remove/rename that one first,\or rename the private class ''%1'' here\and try again.'
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4493
                        with:baseName with:ns name) withCRs.
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4494
        ^ self
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4495
    ].
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4496
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  4497
    currentClass makePublicIn:ns
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4498
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  4499
    "Modified: 3.7.1997 / 13:26:21 / cg"
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4500
!
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  4501
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4502
classMenu
926
a7c7814c9426 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  4503
    "sent by classListView to ask for the menu"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4504
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  4505
    <resource: #keyboard ( #Cmdl #Cmdn #Cmdd) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4506
    <resource: #programMenu >
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  4507
3301
129c60ebc2b2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
  4508
    |specialMenu items m newClassMenu spawnMenu spawnItems|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4509
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4510
    currentClass isNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4511
        items :=  #(
3117
b90d83acd384 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3116
diff changeset
  4512
                       ('Load from Repository...' classLoadRevision)
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4513
                    ).
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4514
    ] ifFalse:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4515
        items :=  #(
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  4516
                       ('FileOut Binary'               classFileOutBinary           )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  4517
                       ('FileOut Binary As...'         classFileOutBinaryAs         )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4518
                       ('-'                            nil                          )
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  4519
                       ('Inspect Class'                classInspect                 )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  4520
                       ('Inspect Instances'            classInstancesInspect        )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  4521
                       ('Inspect Derived Instances'    classDerivedInstancesInspect        )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4522
                       ('-'                            nil                          )
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  4523
                       ('Make Private Class In...'     classMakePrivate             )
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  4524
                       ('Make Public Class'            classMakePublic              )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4525
                       ('-'                            nil                          )
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  4526
                       ('Primitive Definitions'        classPrimitiveDefinitions    )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  4527
                       ('Primitive Variables'          classPrimitiveVariables      )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  4528
                       ('Primitive Functions'          classPrimitiveFunctions      )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4529
                       ('-'                            nil                          )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4530
                       ('Package...'                   classModifyPackage         )
3118
bfa434a433d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3117
diff changeset
  4531
                       ('Source Container...'          classModifyContainer         )
bfa434a433d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3117
diff changeset
  4532
                       ('Remove Source Container...'   classRemoveContainer         )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4533
                       ('-'                            nil                          )
3118
bfa434a433d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3117
diff changeset
  4534
                       ('Revision Log'                 classRevisionInfo            )
3117
b90d83acd384 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3116
diff changeset
  4535
                       ('Compare with Repository...'   classCompareWithRepository   )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4536
                       ('-'                            nil                          )
3118
bfa434a433d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3117
diff changeset
  4537
                       ('Check into Source Repository...' classCheckin                 )
3117
b90d83acd384 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3116
diff changeset
  4538
                       ('Load from Repository...'         classLoadRevision            )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4539
                    ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4540
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4541
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4542
    specialMenu := PopUpMenu itemList:items resources:resources.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4543
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4544
    currentClass notNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4545
        currentClass sourceCodeManager isNil ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4546
            specialMenu disableAll:#(classModifyContainer classRemoveContainer
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4547
                                     classRevisionInfo 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4548
                                     classLoadRevision classCheckin 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4549
                                     classCompareWithRepository).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4550
        ].
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4551
        currentClass isPrivate ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4552
            specialMenu disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4553
                                     classFileOutBinary
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4554
                                     classMakePrivate
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4555
                                     classModifyPackage
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4556
                                     classModifyContainer 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4557
                                     classRemoveContainer
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4558
                                     classRevisionInfo 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4559
                                     classLoadRevision classCheckin
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4560
                                     classCompareWithRepository
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4561
                                     classPrimitiveDefinitions
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4562
                                     classPrimitiveVariables
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4563
                                     classPrimitiveFunctions).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4564
        ] ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4565
            specialMenu disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4566
                                     classMakePublic
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4567
                                    )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4568
        ]
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  4569
    ] ifFalse:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4570
        SourceCodeManager isNil ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4571
            specialMenu disableAll:#(classLoadNewRevision)
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4572
        ]
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4573
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4574
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4575
    (currentClass notNil
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4576
    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
  4577
        specialMenu disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4578
                                     classInstancesInspect
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4579
                                     classDerivedInstancesInspect
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4580
                                     classFileOutBinary
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4581
                                     classFileOutBinaryAs
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4582
                                     classMakePrivate
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4583
                                     classMakePublic
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4584
                                     "/ classModifyPackage
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4585
                                     classModifyContainer 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4586
                                     classRemoveContainer
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4587
                                     classRevisionInfo 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4588
                                     classLoadRevision 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4589
                                     classCheckin
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4590
                                     classCompareWithRepository
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4591
                                     classPrimitiveDefinitions
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4592
                                     classPrimitiveVariables
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4593
                                     classPrimitiveFunctions).
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4594
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4595
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  4596
    self environment ~~ Smalltalk ifTrue:[
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  4597
        specialMenu disableAll:#(classMakePrivate classMakePublic classModifyContainer classRemoveContainer
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  4598
                                 classRevisionInfo classLoadRevision classCheckin classModifyPackage
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  4599
                                 classLoadNewRevision classFileOutBinary classFileOutBinaryAs
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  4600
                      )
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  4601
    ].
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  4602
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4603
    device ctrlDown ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4604
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4605
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4606
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4607
    currentClass isNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4608
        items :=    #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4609
                       ('New Class'             classNewClass       Cmdn)
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4610
                       ('New Application'       classNewApplication)
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4611
                       ('New Dialog'            classNewDialog)
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4612
                     ).
246
9f1583be2b81 ask class for its SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
  4613
    ] ifFalse:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4614
        currentClass isLoaded ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4615
            items :=    #(
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  4616
                           ('HTML Documentation'            classDocumentation     )
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  4617
                           ('Save HTML Documentation As...' classDocumentationAs   )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4618
                           ('-'                          nil                    )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4619
                           ('References to Class'        classRefs              )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4620
                           ('-'                          nil                    )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4621
                           ('New Class'                  classNewClass          Cmdn )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4622
                           ('New Application'            classNewApplication    )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4623
                           ('New Dialog'                 classNewDialog         )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4624
                           ('Remove...'                  classRemove            )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4625
                           ('-'                          nil                    )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4626
                           ('Load'                       classLoad              Cmdl )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4627
                         ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4628
        ] ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4629
            fullProtocol ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4630
                items :=    #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4631
                               ('Hierarchy'                 classHierarchy             )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4632
                               ('Definition'                classDefinition            )
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  4633
                               ('HTML Documentation'             classDocumentation    Cmdd )
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  4634
                               ('Save HTML Documentation As...'  classDocumentationAs       )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4635
                               ('Comment'                   classComment               )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4636
                               ('Class Instvars'            classClassInstVars         )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4637
                             ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4638
            ] ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4639
                items :=    #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4640
                               ('FileOut'                   classFileOut          )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  4641
                               ('FileOut As...'             classFileOutAs        )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4642
                               ('PrintOut'                  classPrintOut         )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  4643
                               ('PrintOut Protocol'         classPrintOutProtocol )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4644
                               ('-'                         nil                   )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4645
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4646
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4647
                classCategoryListView isNil ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4648
                    "/ a hierarchy or subclass-browser.
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4649
                    items := items , #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4650
                               ('Browse'                    browserClone   )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4651
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4652
                ].
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4653
                items := items , #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4654
                               ('Spawn...'                 spawnMenu             )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4655
                               ('-'                         nil                  )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4656
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4657
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4658
                spawnItems := #(               
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4659
                                    ('Class'           classSpawn             )
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  4660
                                    ('Full Protocol'   classSpawnFullProtocol )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4661
                                    ('Hierarchy'       classSpawnHierarchy    )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4662
                                    ('Subclasses'      classSpawnSubclasses   )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4663
                               ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4664
                spawnMenu := PopUpMenu 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4665
                                itemList:spawnItems
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4666
                                resources:resources.
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4667
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4668
                fullClass ifFalse:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4669
                    items := items , #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4670
                               ('Hierarchy'                 classHierarchy            )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4671
                               ('Definition'                classDefinition           )
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  4672
                               ('HTML Documentation'             classDocumentation   Cmdd )
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  4673
                               ('Save HTML Documentation As...'  classDocumentationAs      )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4674
                               ('Comment'                   classComment              )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4675
                               ('Class Instvars'            classClassInstVars        )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4676
                               ('-'                         nil                       )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4677
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4678
                ].
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4679
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4680
                items := items , #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4681
                               ('References to Class'   classRefs   )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4682
                               ('-'                     nil         )
3118
bfa434a433d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3117
diff changeset
  4683
                               ('New'                   newClassMenu)
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4684
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4685
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4686
                newClassMenu := PopUpMenu 
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4687
                            itemList:#(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4688
                                        ('Class'         classNewClass          Cmdn )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4689
                                        ('Subclass'      classNewSubclass            )
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  4690
                                        ('Private Class' classNewPrivateClass        )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4691
                                        ('Application'   classNewApplication         )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4692
                                        ('Dialog'        classNewDialog              )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4693
                                      )
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4694
                            resources:resources.
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4695
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4696
                items := items , #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4697
                               ('Rename...'  classRename )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4698
                               ('Remove...'  classRemove )
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4699
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4700
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4701
                currentClass wasAutoloaded ifTrue:[
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4702
                    items := items , #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4703
                               ('Unload'  classUnload)
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4704
                              ).
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4705
                ]
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4706
            ]
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4707
        ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4708
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4709
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4710
    items := items , #(
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4711
                          ('='          nil             )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  4712
                          ('Others'     otherMenu   Ctrl)
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4713
                        ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4714
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  4715
    m := PopUpMenu itemList:items resources:resources.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4716
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4717
    newClassMenu notNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4718
        m subMenuAt:#newClassMenu put:newClassMenu.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4719
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4720
    spawnMenu notNil ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4721
        m subMenuAt:#spawnMenu put:spawnMenu.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4722
    ].
768
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  4723
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  4724
    (currentClass notNil
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  4725
    and:[currentClass isPrivate]) ifTrue:[
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4726
        m disableAll:#(
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4727
                       classFileOut
2249
fc17eb66cbec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2247
diff changeset
  4728
                       classFileOutAs
2163
2e5d99376c84 you cannot change tha package of a private class
Claus Gittinger <cg@exept.de>
parents: 2153
diff changeset
  4729
                      )
767
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  4730
    ].
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  4731
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  4732
    m subMenuAt:#otherMenu put:specialMenu.
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  4733
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  4734
    self isReadOnlyEnvironment ifTrue:[
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  4735
        m disableAll:#(classUnload classRename classRemove classNewDialog classNewApplication
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  4736
                       classNewPrivateClass classNewSubclass classNewClass newClassMenu
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  4737
                      )
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  4738
    ].
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  4739
    self isSimulatedEnvironment ifTrue:[
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  4740
        m disableAll:#(classUnload 
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  4741
                       classRefs classDocumentation classDocumentationAs classSpawn
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  4742
                      )
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  4743
    ].
180
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  4744
    ^ m
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  4745
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  4746
    "Modified: / 20.5.1999 / 18:36:25 / cg"
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  4747
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4748
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  4749
classNewApplication
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  4750
    "create a class-definition prototype for an application in codeview"
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  4751
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  4752
    self 
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  4753
        classClassDefinitionTemplateFor:ApplicationModel 
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  4754
        in:currentClassCategory 
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  4755
        namespace:false 
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  4756
        private:false.
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  4757
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  4758
    aspect := nil.
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  4759
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  4760
    "Modified: 4.1.1997 / 14:52:16 / cg"
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  4761
!
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  4762
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4763
classNewClass
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4764
    "create a class-definition prototype in codeview"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4765
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4766
    |theClass cls|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4767
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4768
    currentNamespace == JAVA ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4769
        theClass := Java at:'java.lang.Object'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4770
    ] ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4771
        theClass := Object.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4772
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4773
    currentClass notNil ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4774
        (cls := currentClass superclass) notNil ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4775
            theClass := cls 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4776
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4777
    ].
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4778
    self 
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4779
        classClassDefinitionTemplateFor:theClass 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4780
        in:currentClassCategory 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4781
        namespace:false 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  4782
        private:false.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4783
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4784
    aspect := nil.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4785
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4786
    "Modified: 4.1.1997 / 14:52:16 / cg"
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4787
!
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4788
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  4789
classNewDialog
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  4790
    "create a class-definition prototype for a dialog in codeview"
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  4791
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  4792
    self 
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  4793
        classClassDefinitionTemplateFor:SimpleDialog 
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  4794
        in:currentClassCategory 
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  4795
        namespace:false 
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  4796
        private:false.
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  4797
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  4798
    aspect := nil.
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  4799
!
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  4800
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4801
classNewPrivateClass
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4802
    "create a class-definition prototype in codeview"
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4803
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4804
    self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4805
	classClassDefinitionTemplateFor:Object 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4806
	in:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4807
	namespace:false 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4808
	private:true.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4809
    aspect := nil.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4810
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4811
    "Created: 11.10.1996 / 16:01:20 / cg"
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4812
    "Modified: 4.1.1997 / 14:51:49 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4813
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4814
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4815
classNewSubclass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4816
    "create a subclass-definition prototype in codeview"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4817
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4818
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4819
	self classClassDefinitionTemplateFor:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4820
					  in:(currentClass category)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4821
					  namespace:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4822
					  private:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4823
	aspect := nil
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4824
    ]
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4825
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4826
    "Modified: 4.1.1997 / 14:51:44 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4827
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4828
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4829
classPrimitiveDefinitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4830
    "show the classes primitiveDefinition in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4831
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4832
3019
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  4833
    self classShowFrom:#primitiveDefinitionsStringOrDefault 
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  4834
                   set:#primitiveDefinitions: 
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  4835
                aspect:#primitiveDefinitions 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4836
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4837
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4838
classPrimitiveFunctions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4839
    "show the classes primitiveFunctions in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4840
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4841
3019
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  4842
    self classShowFrom:#primitiveFunctionsStringOrDefault 
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  4843
                   set:#primitiveFunctions: 
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  4844
                aspect:#primitiveFunctions 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4845
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4846
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4847
classPrimitiveVariables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4848
    "show the classes primitiveVariables in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4849
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4850
3019
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  4851
    self classShowFrom:#primitiveVariablesStringOrDefault 
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  4852
                   set:#primitiveVariables: 
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  4853
                aspect:#primitiveVariables 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4854
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4855
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4856
classPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4857
    self classPrintOutWith:#printOutOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4858
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4859
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4860
classPrintOutFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4861
    self classPrintOutWith:#printOutFullProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4862
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4863
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4864
classPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4865
    self classPrintOutWith:#printOutProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4866
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4867
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4868
classPrintOutWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4869
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4870
	|printStream|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4871
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4872
	printStream := Printer new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4873
	currentClass perform:aSelector with:printStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  4874
	printStream close
152
d03618e99b3c show warnbox when autoload fails (instead of running into the debugger)
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
  4875
    ]
105
claus
parents: 98
diff changeset
  4876
!
claus
parents: 98
diff changeset
  4877
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4878
classProtocols
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4879
     ^ self
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4880
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4881
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4882
classRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4883
    self doClassMenu:[:currentClass |
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  4884
        self withWaitCursorDo:[
2408
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4885
            |any1 any2 nm msg|
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4886
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4887
            any1 :=true.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4888
            any2 :=false.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4889
            nm := currentClass name asSymbol.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4890
            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
  4891
            SystemBrowser 
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4892
                browseReferendsOf:nm 
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4893
                title:msg
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4894
                ifNone:[any1 := false].
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4895
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4896
            "/ 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
  4897
            (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
  4898
                any2 :=true.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4899
                SystemBrowser 
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4900
                    browseReferendsOf:nm asSymbol
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4901
                    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
  4902
                    ifNone:[any2 := false].
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4903
            ].
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4904
            (any1 or:[any2]) ifFalse:[
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4905
                SystemBrowser showNoneFound:msg.
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4906
            ]
d23105f0d146 fixed search for classRefs if class is in a namespace
Claus Gittinger <cg@exept.de>
parents: 2406
diff changeset
  4907
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4908
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4909
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4910
    "Created: 23.11.1995 / 14:11:43 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  4911
    "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
  4912
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4913
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4914
classRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4915
    "user requested remove of current class and all subclasses -
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4916
     count subclasses and let user confirm removal."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4917
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4918
    |count t box|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4919
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4920
    currentClass notNil ifTrue:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4921
        count := currentClass allSubclasses size.
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  4922
        t := 'Remove class %1'.
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4923
        count ~~ 0 ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4924
           t := t , '\(with %2 subclass'.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4925
           count ~~ 1 ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4926
                t := t , 'es'
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4927
           ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4928
           t := (t , ')') 
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4929
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4930
        t := t , ' ?'.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4931
        t := (resources string:t with:currentClass name allBold with:count) withCRs.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4932
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4933
        box := YesNoBox 
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4934
                   title:t
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  4935
                   yesText:(resources at:'Remove')
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  4936
                   noText:(resources at:'Abort').
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  4937
        box label:(resources string:'Remove class').
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4938
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4939
        box confirm ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4940
            "after querying user - do really remove current class
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4941
             and all subclasses
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4942
            "
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4943
            self doClassMenu:[:currentClass |
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4944
                |didRemove|
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4945
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4946
                didRemove := false.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4947
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4948
                "
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4949
                 query ?
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4950
                "
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4951
                currentClass allSubclassesDo:[:aSubClass |
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4952
                    (CheckForInstancesWhenRemovingClasses not
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4953
                    or:[aSubClass hasInstances not
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4954
                    or:[self confirm:(resources string:'''%1'' has instances - remove anyway ?' with:aSubClass name)]])
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4955
                        ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4956
                            aSubClass removeFromSystem
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4957
                    ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4958
                ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4959
                (CheckForInstancesWhenRemovingClasses not
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4960
                or:[currentClass hasInstances not
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4961
                or:[self confirm:(resources string:'''%1'' has instances - remove anyway ?' with:currentClass name)]])
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4962
                    ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4963
                        didRemove := true.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4964
                        currentClass removeFromSystem.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4965
                ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4966
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4967
                didRemove ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4968
                    self changeCurrentClass:nil.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4969
                    Smalltalk changed.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4970
                    self updateClassList.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4971
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4972
                    "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
  4973
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4974
"/                    classListView numberOfLines == 0 ifTrue:[
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4975
"/                        self updateClassCategoryListWithScroll:false
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4976
"/                    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4977
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4978
                    methodCategoryListView notNil ifTrue:[methodCategoryListView contents:nil].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4979
                    methodListView notNil ifTrue:[methodListView contents:nil].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4980
                    codeView contents:nil.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4981
                    codeView modified:false.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4982
                    codeModified := false.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4983
                ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4984
            ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4985
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4986
        box destroy.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4987
    ]
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  4988
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  4989
    "Modified: / 12.10.2001 / 19:46:34 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4990
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4991
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4992
classRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4993
    "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
  4994
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4995
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4996
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4997
    self checkClassSelected ifFalse:[^ self].
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4998
    box := self 
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  4999
                enterBoxTitle:(resources 
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  5000
                                string:'Rename %1 to:' 
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  5001
                                with:currentClass name allBold) 
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  5002
                okText:'Rename'
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  5003
                label:'Rename class'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  5004
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5005
    box initialText:(currentClass name).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5006
    box action:[:aString | self renameCurrentClassTo:aString].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5007
    box open
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  5008
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  5009
    "Modified: / 12.10.2001 / 19:46:54 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5010
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5011
3019
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5012
classShowFrom:getSelector set:setSelector aspect:aspectSymbol
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5013
    "common helper for comment, primitive-stuff etc.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5014
     show the string returned from the classes getSelector-method,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5015
     Set acceptaction to change it via setSelector."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5016
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5017
    self doClassMenu:[:currentClass |
3019
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5018
        |text|
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5019
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5020
        text := currentClass perform:getSelector.
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5021
        codeView contents:text.
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5022
        codeView modified:false.
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5023
        codeModified := false.
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5024
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5025
        codeView acceptAction:[:theCode |
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  5026
            AbortOperationRequest catch:[
3019
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5027
                lockUpdates := true.
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5028
                currentClass perform:setSelector with:theCode asString.
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5029
                codeView modified:false.
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5030
                codeModified := false.
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5031
            ].
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5032
            lockUpdates := false.
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5033
        ].
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5034
        self clearExplainAction.
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5035
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5036
        methodListView notNil ifTrue:[
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5037
            methodListView setSelection:nil
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5038
        ].
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5039
        aspect := aspectSymbol.
3e6d97c00b51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2919
diff changeset
  5040
        self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5041
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  5042
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  5043
    "Modified: / 16.11.2001 / 17:37:35 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5044
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5045
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5046
classSpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5047
    "create a new SystemBrowser browsing current class,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5048
     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
  5049
     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
  5050
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5051
    self doClassMenuWithSelection:[:cls :sel |
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5052
        |browser|
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5053
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5054
        cls isMeta ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5055
            self listOfNamespaces do:[:aNamespace |
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5056
                aNamespace allClassesDo:[:aClass |
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5057
                    aClass theMetaclass == cls ifTrue:[
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5058
                        browser := SystemBrowser browseClass:aClass.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5059
                        browser instanceProtocol:false.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5060
                        sel notNil ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5061
                            browser switchToMethodNamed:sel
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5062
                        ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5063
                        ^ self
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5064
                    ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5065
                ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5066
            ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5067
            self warn:'oops, no class for this metaclass'.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5068
            ^ self
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5069
        ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5070
        browser := SystemBrowser browseClass:cls. 
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5071
        browser environment:environment.
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5072
        cls hasMethods ifFalse:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5073
            browser instanceProtocol:false.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5074
        ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5075
        sel notNil ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5076
            browser switchToMethodNamed:sel
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5077
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5078
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5079
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5080
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5081
     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
  5082
     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
  5083
    "
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5084
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5085
    "Modified: 20.12.1996 / 15:41:16 / cg"
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5086
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5087
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5088
classSpawnFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5089
    "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
  5090
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5091
    self doClassMenuWithSelection:[:cls :sel |  |brwsr|
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5092
        brwsr := SystemBrowser browseFullClassProtocol:cls.
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5093
        brwsr environment:environment
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5094
    ]
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5095
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5096
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5097
classSpawnHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5098
    "create a new HierarchyBrowser browsing current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5099
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5100
    self doClassMenuWithSelection:[:cls :sel | |brwsr|
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5101
        brwsr := SystemBrowser browseClassHierarchy:cls.
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5102
        brwsr environment:environment
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5103
    ]
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5104
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5105
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5106
classSpawnSubclasses
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5107
    "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
  5108
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5109
    self doClassMenuWithSelection:[:cls :sel |
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5110
        |subs brwsr|
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5111
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5112
        subs := OrderedCollection new.
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5113
        self classHierarchyOf:cls withAutoloaded:false do:[:aClass :lvl |
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5114
            subs add:(String new:lvl*2) , aClass name
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5115
        ].
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5116
"/        subs := cls allSubclasses.
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5117
        (subs notNil and:[subs size ~~ 0]) ifTrue:[
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5118
            brwsr := SystemBrowser browseClasses:subs 
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5119
                                   title:('subclasses of ' , cls name)
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  5120
                                   sort:false.
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5121
            brwsr environment:environment
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5122
        ]
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5123
    ]
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5124
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5125
    "Modified: 4.1.1997 / 13:35:55 / cg"
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  5126
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5127
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5128
classUnload
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5129
    "unload an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5130
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5131
    |nm|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5132
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5133
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5134
    nm := currentClass name.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5135
    currentClass unload.
1540
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  5136
    self switchToClassNamed:nm.
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  5137
    self classSelectionChanged.
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  5138
227095c5d657 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1539
diff changeset
  5139
    "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
  5140
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5141
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5142
classUses
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5143
    "a powerful tool, when trying to learn more about where
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5144
     a class is used. This one searches all uses of a class,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5145
     and shows a list of uses - try it and like it"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5146
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5147
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5148
	self withSearchCursorDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5149
	    SystemBrowser browseUsesOf:currentClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5150
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5151
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5152
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5153
    "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
  5154
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5155
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5156
doClassMenuWithSelection:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5157
    "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
  5158
     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
  5159
     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
  5160
     current class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5161
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5162
    |string words clsName cls sel isMeta|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5163
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5164
    string := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5165
    string notNil ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5166
        self extractClassAndSelectorFromSelectionInto:[:c :s :m |
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5167
            clsName := c.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5168
            sel := s.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5169
            isMeta := m.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5170
        ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5171
        clsName isNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5172
            string := string asString withoutSeparators.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5173
            words := string asCollectionOfWords.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5174
            words notNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5175
                clsName := words first.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5176
                (clsName endsWith:' class') ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5177
                    isMeta := true.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5178
                    clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)"
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5179
                ] ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5180
                    isMeta := false
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5181
                ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5182
                sel := Parser selectorInExpression:string.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5183
            ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5184
        ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5185
        clsName notNil ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5186
            (cls := environment classNamed:clsName) notNil ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5187
                isMeta ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5188
                    cls := cls theMetaclass
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5189
                ].
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  5190
                self withWaitCursorDo:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5191
                    aBlock value:cls value:sel.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5192
                ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5193
                ^ self
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5194
            ] ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5195
                self warn:'no class named: %1 - spawning current' with:clsName
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5196
            ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5197
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5198
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5200
    classMethodListView notNil ifTrue:[
3515
8c0262e23e23 care for no selection in menuLists browseClass function
Claus Gittinger <cg@exept.de>
parents: 3513
diff changeset
  5201
        sel := classMethodListView selectionValue.
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5202
        sel notNil ifTrue:[
3515
8c0262e23e23 care for no selection in menuLists browseClass function
Claus Gittinger <cg@exept.de>
parents: 3513
diff changeset
  5203
            sel := self selectorFromClassMethodString:sel string
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5204
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5205
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5206
    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
  5207
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  5208
    "Modified: 17.6.1996 / 16:51:49 / stefan"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  5209
    "Modified: 18.8.1997 / 15:44:01 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  5210
! !
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5211
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5212
!BrowserView methodsFor:'class list source administration'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5213
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5214
classCheckin
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5215
    "check a class into the source repository"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5216
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5217
    self doClassMenu:[:currentClass |
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5218
        currentClass isLoaded ifFalse:[
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5219
            self warn:'cannot checkin unloaded classes.'.
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5220
            ^ self.
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5221
        ].
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5222
        self classCheckin:currentClass withLog:nil
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  5223
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  5224
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  5225
    "Created: 23.11.1995 / 11:41:38 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  5226
    "Modified: 15.4.1996 / 17:07:07 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  5227
!
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  5228
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  5229
classCheckin:aClass withLog:aLogMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  5230
    "check a class into the source repository"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  5231
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5232
    SourceCodeManagerUtilities
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5233
        checkinClass:aClass withLog:aLogMessage.
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  5234
    self normalLabel.
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5235
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5236
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  5237
classCompareWithRepository
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5238
    "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
  5239
     with the some version found in the repository."
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5240
2885
7f4a298ca5ae better error message if source access is not possible (in compare)
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  5241
    |info mod|
7f4a298ca5ae better error message if source access is not possible (in compare)
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  5242
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  5243
    currentClass isLoaded ifFalse:[
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5244
        self warn:'cannot compare unloaded classes.'.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5245
        ^ 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
  5246
    ].
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  5247
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5248
    self doClassMenu:[:currentClass |
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5249
        |aStream comparedSource currentSource v rev revString thisRevString mgr
2673
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  5250
         nm msg rev2 newestRev 
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5251
         containerModule containerPackage containerFile rslt|
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5252
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5253
        nm := currentClass name.
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5254
        mgr := currentClass sourceCodeManager.
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5255
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5256
        rev := currentClass binaryRevision.
2223
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  5257
        rev2 := currentClass revision.
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5258
        rev isNil ifTrue:[
2223
0e114ab45a6b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2222
diff changeset
  5259
            rev := rev2
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5260
        ].
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5261
        rev isNil ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5262
            "/
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5263
            "/ class not in repository - allow compare against any other containers newest contents
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5264
            "/
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5265
            self normalLabel.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5266
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5267
            containerModule := lastModule ? Project current repositoryModule.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5268
            containerPackage := lastPackage ? Project current package.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5269
            rslt := SourceCodeManagerUtilities
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5270
                askForContainer:(resources string:'The class seems to have no repository information.\\Do you want to compare it against an existing containers contents ?')
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5271
                title:'Container to compare' note:nil 
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5272
                initialModule:containerModule 
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5273
                initialPackage:containerPackage 
2896
44e32505d44d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
  5274
                initialFileName:(currentClass name , '.st')
44e32505d44d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
  5275
                forNewContainer:false.
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5276
            rslt isNil ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5277
                "/ canel
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5278
                ^ self
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5279
            ].
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5280
            containerModule := lastModule := rslt at:#module.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5281
            containerPackage := lastPackage := rslt at:#package.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5282
            containerFile := rslt at:#fileName.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5283
        ] ifFalse:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5284
            "/
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5285
            "/ class in repository - ask for revision
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5286
            "/
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5287
            newestRev := mgr newestRevisionOf:currentClass.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5288
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5289
            msg := resources string:'compare to revision: (empty for newest)'.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5290
            rev notNil ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5291
                msg := msg , '\\' , (resources string:'Current %1 is based upon rev %2.'
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  5292
                                               with:nm allBold with:rev).
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5293
                (rev2 notNil and:[rev2 ~= rev]) ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5294
                    msg := msg , '\' , (resources string:'And has been checked into the repository as %1.'
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5295
                                                   with:rev2)
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5296
                ]
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5297
            ].
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5298
            newestRev notNil ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5299
                msg := msg , '\' , (resources string:'Newest in reporitory is %1.'
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5300
                                               with:newestRev)
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5301
            ].
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5302
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5303
            self normalLabel.
2673
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  5304
            rev := SourceCodeManagerUtilities
2679
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5305
                        askForExistingRevision:msg 
2673
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  5306
                        title:'Compare with repository' 
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  5307
                        class:currentClass
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  5308
603aa9c77741 better compare-to-repository revision user interface
Claus Gittinger <cg@exept.de>
parents: 2668
diff changeset
  5309
            "/ rev := Dialog request:msg withCRs onCancel:nil.
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5310
        ].
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5311
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5312
        (rev notNil or:[containerFile notNil]) ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5313
            rev notNil ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5314
                rev withoutSpaces isEmpty ifTrue:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5315
                    msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5316
                    "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5317
                    aStream := mgr getSourceStreamFor:currentClass revision:newestRev.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5318
                    revString := '(newest: ' , (newestRev ? '???') , ')'.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5319
                ] ifFalse:[
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5320
                    msg := 'extracting previous %1'.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5321
                    aStream := mgr getSourceStreamFor:currentClass revision:rev.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5322
                    revString := rev
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5323
                ].
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5324
            ] ifFalse:[
2574
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5325
                msg := 'extracting newest version from ' , containerModule , '/' , containerPackage, '/' , containerFile.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5326
                aStream := mgr streamForClass:nil fileName:containerFile revision:#newest directory:containerPackage module:containerModule cache:false.
24eae517f560 can now compare a class without repository-container-info
Claus Gittinger <cg@exept.de>
parents: 2568
diff changeset
  5327
                revString := '???'
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5328
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5329
            self busyLabel:msg with:nm.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5330
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5331
            aStream isNil ifTrue:[
2885
7f4a298ca5ae better error message if source access is not possible (in compare)
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  5332
                info := mgr sourceInfoOfClass:currentClass.
7f4a298ca5ae better error message if source access is not possible (in compare)
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  5333
                info notNil ifTrue:[
7f4a298ca5ae better error message if source access is not possible (in compare)
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  5334
                    mod := info at:#module ifAbsent:'??'.
7f4a298ca5ae better error message if source access is not possible (in compare)
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  5335
                ].
7f4a298ca5ae better error message if source access is not possible (in compare)
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  5336
                self warn:(resources string:'Could not extract source from repository (source module: ''%1'')' with:(mod ? '??')).
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5337
                ^ self
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5338
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5339
            aStream class readErrorSignal handle:[:ex |
2885
7f4a298ca5ae better error message if source access is not possible (in compare)
Claus Gittinger <cg@exept.de>
parents: 2881
diff changeset
  5340
                self warn:('Read error while reading extracted source\\' , ex errorString) withCRs.
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5341
                aStream close.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5342
                ^ self
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5343
            ] do:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5344
                comparedSource := aStream contents asString.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5345
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5346
            aStream close.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5347
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5348
            self busyLabel:'generating current source ...' with:nil.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5349
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5350
            aStream := '' writeStream.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5351
            Method flushSourceStreamCache.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5352
            currentClass fileOutOn:aStream withTimeStamp:false.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5353
            currentSource := aStream contents asString.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5354
            aStream close.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5355
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5356
            self busyLabel:'comparing  ...' with:nil.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5357
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5358
            comparedSource = currentSource ifTrue:[
3609
a7bded8fe740 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  5359
                self information:'Versions are identical.'.
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5360
            ] ifFalse:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5361
                thisRevString := currentClass revision.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5362
                thisRevString isNil ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5363
                    thisRevString := 'no revision'
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5364
                ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5365
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5366
                revString = '(newest)' ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5367
                    (rev := mgr newestRevisionOf:currentClass) notNil ifTrue:[
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5368
                        revString := '(newest is' , rev , ')'
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5369
                    ]
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5370
                ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5371
2330
7a095f5456d3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2328
diff changeset
  5372
                self busyLabel:'comparing  ...' with:nil.
7a095f5456d3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2328
diff changeset
  5373
3138
6089b290d243 UserPreference access
Claus Gittinger <cg@exept.de>
parents: 3135
diff changeset
  5374
                UserPreferences versionDiffViewerClass
2716
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  5375
                  openOnClass:currentClass
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  5376
                  labelA:('current: (based on: ' , thisRevString , ')')
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  5377
                  sourceA:currentSource
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  5378
                  labelB:('repository: ' , revString)
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  5379
                  sourceB:comparedSource
8451e7057f00 some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents: 2690
diff changeset
  5380
                  title:('comparing ' , currentClass name).
2222
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5381
            ].
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5382
            self normalLabel.
cd9ee5d35461 show more rev. info when comparing.
Claus Gittinger <cg@exept.de>
parents: 2219
diff changeset
  5383
        ]
1627
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  5384
    ]
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  5385
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  5386
    "Created: / 4.1.1997 / 15:48:20 / cg"
d167240ff08e handle readError in compareChange
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
  5387
    "Modified: / 28.4.1998 / 17:40:02 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5388
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5389
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  5390
classCreateSourceContainerFor:aClass
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  5391
    "let user specify the source-repository values for aClass"
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  5392
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
  5393
    ^ self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5394
	classDefineSourceContainerFor:aClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5395
	title:(resources string:'Repository information for %1' with:aClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5396
	text:(resources string:'CREATE_REPOSITORY' with:aClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5397
	createDirectories:true
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5398
	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
  5399
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  5400
    "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
  5401
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  5402
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  5403
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
  5404
    "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
  5405
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5406
    |rslt|
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5407
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5408
    rslt := SourceCodeManagerUtilities
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5409
                defineSourceContainerForClass:aClass 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5410
                title:title 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5411
                text:boxText 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5412
                createDirectories:createDirs 
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5413
                createContainer:createContainer.
2479
b7943e6621b2 eliminated some popupDialogs when changing sourceContainer
Claus Gittinger <cg@exept.de>
parents: 2478
diff changeset
  5414
    self normalLabel.
2530
365ff68d1c00 use new SCMUtilities class
Claus Gittinger <cg@exept.de>
parents: 2529
diff changeset
  5415
    ^ rslt.
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  5416
!
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  5417
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5418
classLoadNewRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5419
    "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
  5420
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  5421
    |box
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5422
     moduleHolder packageHolder fileNameHolder
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  5423
     module package fileName aStream
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  5424
     y component mgr|
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5425
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5426
    mgr := SourceCodeManager.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5427
    mgr isNil ifTrue:[^ false].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5428
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  5429
    fileNameHolder := ValueHolder newString.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5430
    moduleHolder := (OperatingSystem getLoginName) asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5431
    packageHolder := 'private' asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5432
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5433
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5434
    "/ 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
  5435
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5436
    box := DialogBox new.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5437
    box label:'container fileIn'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5438
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5439
    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
  5440
    component adjust:#left; borderWidth:0.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5441
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5442
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5443
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5444
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5445
    component := box addTextLabel:(resources string:'Module:').
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5446
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5447
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5448
    component := box addInputFieldOn:moduleHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5449
    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
  5450
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5451
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5452
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5453
    component := box addTextLabel:'Package:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5454
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5455
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5456
    component := box addInputFieldOn:packageHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5457
    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
  5458
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5459
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5460
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5461
    component := box addTextLabel:'Filename:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5462
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5463
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5464
    component := box addInputFieldOn:fileNameHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5465
    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
  5466
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5467
    box addVerticalSpace.
2048
f8c010698b75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2047
diff changeset
  5468
    box addAbortAndOkButtons.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5469
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5470
    box open.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5471
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5472
    box destroy.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5473
    box accepted ifFalse:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5474
        ^ false
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5475
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5476
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5477
    module := moduleHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5478
    package := packageHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5479
    fileName := fileNameHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5480
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5481
    (fileName endsWith:',v') ifTrue:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5482
        fileName := fileName copyWithoutLast:2
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5483
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5484
    (fileName endsWith:'.st') ifFalse:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5485
        fileName := fileName , '.st'
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5486
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5487
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5488
    (mgr checkForExistingContainerInModule:module 
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5489
                                   package:package 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5490
                                 container:fileName) ifFalse:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5491
        self warn:'no such container'.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5492
        ^ false
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5493
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5494
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5495
    aStream := mgr 
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5496
            streamForClass:nil 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5497
            fileName:fileName 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5498
            revision:#newest
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5499
            directory:package
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5500
            module:module
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5501
            cache:false.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5502
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5503
    aStream isNil ifTrue:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5504
        self warn:'could not fileIn from repository'.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5505
        ^ false.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5506
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5507
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5508
    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
  5509
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5510
    Class withoutUpdatingChangesDo:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5511
        [
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5512
            aStream fileIn.
3597
2e7fc0ae28c9 #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  5513
        ] ensure:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5514
            aStream close.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5515
            self normalLabel.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5516
            Smalltalk changed.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  5517
        ].
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5518
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5519
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5520
    ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5521
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5522
    "Created: 13.9.1996 / 09:27:09 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  5523
    "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
  5524
!
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  5525
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  5526
classLoadRevision
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  5527
    "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
  5528
     upgrade a class to the newest revision"
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  5529
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  5530
    currentClass isNil ifTrue:[
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  5531
        ^ self classLoadNewRevision.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  5532
    ].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  5533
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  5534
    currentClass isLoaded ifFalse:[
2679
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5535
        self warn:'cannot load specific releases of autoloaded classes.'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5536
        ^ self.
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  5537
    ].
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  5538
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  5539
    self doClassMenu:[:currentClass |
2679
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5540
        |aStream comparedSource currentSource v rev revString what mgr keep className
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5541
         newClass prevCategory ok|
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5542
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5543
        rev := SourceCodeManagerUtilities
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5544
                    askForExistingRevision:'load which revision:'
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5545
                    title:'Load from repository' 
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5546
                    class:currentClass.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5547
        "/ rev := Dialog request:'load which revision: (empty for newest)' onCancel:nil.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5548
        rev notNil ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5549
            className := currentClass name.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5550
            (className includesString:'_rev_') ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5551
                self warn:'select the original class and try again.'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5552
                ^ self
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5553
            ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5554
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5555
            mgr := currentClass sourceCodeManager.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5556
            ok := false.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5557
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5558
            rev withoutSpaces isEmpty ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5559
                what := className , '(newest)'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5560
                self busyLabel:'extracting %1' with:what.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5561
                aStream := mgr getMostRecentSourceStreamForClassNamed:className.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5562
                revString := 'newest'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5563
                keep := false.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5564
            ] ifFalse:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5565
                what := className , '(' , rev , ')'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5566
                self busyLabel:'extracting %1' with:what.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5567
                aStream := mgr getSourceStreamFor:currentClass revision:rev.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5568
                revString := rev.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5569
                keep := true.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5570
            ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5571
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5572
            aStream isNil ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5573
                self warn:'cannot find classes source.'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5574
                ^ self.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5575
            ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5576
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5577
            self busyLabel:'loading %1' with:what .
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5578
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5579
            [
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5580
                Class withoutUpdatingChangesDo:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5581
                    |saveIt prevSkip|
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5582
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5583
                    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
  5584
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  5585
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
  5586
renamed before the fileIn is performed.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  5587
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
  5588
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
  5589
with the class.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  5590
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  5591
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
  5592
without saving the existing class.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  5593
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
  5594
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
  5595
running image.)' default:false.
2679
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5596
                    saveIt isNil ifTrue:[^ self].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5597
                    saveIt ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5598
                        "/ rename the current class - for backup
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5599
                        prevCategory := currentClass category.    
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5600
                        currentClass category:'* obsolete *'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5601
                        Smalltalk renameClass:currentClass to:className , '_saved'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5602
                    ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5603
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5604
                    prevSkip := ClassCategoryReader skipUnchangedMethods.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5605
                    ClassCategoryReader skipUnchangedMethods:false.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5606
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5607
                    Class nameSpaceQuerySignal answer:currentClass nameSpace
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5608
                    do:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5609
                        Class packageQuerySignal answer:currentClass package
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5610
                        do:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5611
                            lockUpdates := true.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5612
                            [
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5613
                                aStream fileIn.
3597
2e7fc0ae28c9 #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  5614
                            ] ensure:[
2679
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5615
                                ClassCategoryReader skipUnchangedMethods:prevSkip.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5616
                                lockUpdates := false.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5617
                            ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5618
                        ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5619
                    ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5620
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5621
                    "/ did that work ?
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5622
                    newClass := Smalltalk at:className ifAbsent:nil.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5623
                    newClass isNil ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5624
                        saveIt ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5625
                            self warn:'fileIn failed - undoing changes ...'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5626
                            Smalltalk renameClass:currentClass to:className.                        
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5627
                            currentClass category:prevCategory.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5628
                        ] ifFalse:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5629
                            self warn:'fileIn failed - cannot recover class'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5630
                        ]
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5631
                    ] ifFalse:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5632
                        "/
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5633
                        "/ if we loaded an old version, rename that one and fix the name of the
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5634
                        "/ current class
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5635
                        "/
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5636
                        keep ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5637
                            saveIt ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5638
                                Smalltalk renameClass:newClass to:(className , '_rev_' , rev).
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5639
                                newClass category:'* old versions *'.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5640
                                Smalltalk renameClass:currentClass to:className.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5641
                                currentClass category:prevCategory.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5642
                            ]
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5643
                        ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5644
                        ok := true.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5645
                    ]
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5646
                ].
3597
2e7fc0ae28c9 #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
  5647
            ] ensure:[
2679
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5648
                aStream close.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5649
                self normalLabel.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5650
                Smalltalk changed.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5651
            ].
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5652
            ok ifTrue:[
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5653
                self switchToClassNamed:newClass name.
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5654
            ]    
42412093a617 present list of existing versions in "load revision" menu-function
Claus Gittinger <cg@exept.de>
parents: 2674
diff changeset
  5655
        ]
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  5656
    ]
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  5657
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5658
    "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
  5659
    "Modified: / 18.6.1998 / 14:29:40 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5660
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5661
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  5662
classModifyContainer
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5663
    "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
  5664
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  5665
    currentClass isLoaded ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5666
	self warn:'dont know anything about unloaded classes.'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5667
	^ self.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  5668
    ].
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  5669
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  5670
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5671
	self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5672
	    classDefineSourceContainerFor:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5673
	    title:(resources string:'Repository information for %1' with:currentClass name)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5674
	    text:'defining/changing the source code container'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5675
	    createDirectories:true createContainer:true. 
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  5676
    ]
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  5677
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  5678
    "Created: 23.11.1995 / 11:41:38 / cg"
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  5679
    "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
  5680
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  5681
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5682
classModifyPackage
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5683
    "change the classes package assignment (dangerous)"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5684
2423
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  5685
    |newPackage p|
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5686
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  5687
    currentClass owningClass notNil ifTrue:[
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  5688
        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
  5689
        ^ self
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  5690
    ].
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  5691
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5692
    currentClass isLoaded ifFalse:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  5693
        self warn:('The package-ID is ''' , currentClass package allBold , '''.'
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  5694
                   , '\\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
  5695
        ^ self.
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5696
    ].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5697
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5698
    newPackage := Dialog 
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  5699
                    request:(resources string:'Change the package-ID of ''%1'' to:\\(Warning - this may affect autoloading & source code access)' with:currentClass name allBold) withCRs
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  5700
                    initialAnswer:currentClass package.
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5701
    newPackage size == 0 ifTrue:[
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  5702
        ^ self
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5703
    ].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5704
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5705
    self doClassMenu:[:currentClass |
2423
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  5706
        currentClass package:newPackage.
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  5707
        (p := Project projectNamed:newPackage) notNil ifTrue:[
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  5708
            p addClass:currentClass
2f1c052770e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2422
diff changeset
  5709
        ]
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5710
    ]
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5711
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5712
    "Created: 23.11.1995 / 11:41:38 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5713
    "Modified: 6.2.1996 / 16:58:58 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5714
!
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  5715
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5716
classRemoveContainer
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5717
    "remove a container from the source repository"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5718
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5719
    currentClass isLoaded ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5720
	self warn:'please load the class first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5721
	^ self.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5722
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5723
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5724
    self doClassMenu:[:currentClass |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5725
	self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5726
	    classRemoveSourceContainerFor:currentClass
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5727
    ]
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5728
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5729
    "Created: 23.11.1995 / 11:41:38 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5730
    "Modified: 11.9.1996 / 12:55:42 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5731
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5732
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5733
classRemoveSourceContainerFor:aClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5734
    "show container & let user confirm twice."
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5735
2799
562ffeb2dc62 use utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 2781
diff changeset
  5736
    ^ SourceCodeManagerUtilities removeSourceContainerForClass:aClass.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5737
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  5738
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5739
classRevisionInfo
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5740
    "show current classes revision info in codeView"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5741
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5742
    self doClassMenu:[:currentClass |
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5743
        |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
  5744
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5745
        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
  5746
        currentClass notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5747
            Processor activeProcess 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5748
                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
  5749
            do:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5750
                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
  5751
2887
a06e66626fbb common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 2885
diff changeset
  5752
                SourceCodeManagerUtilities repositoryLogOf:currentClass onto:aStream
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5753
            ]
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5754
        ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5755
        codeView contents:(aStream contents).
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5756
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5757
        codeView modified:false.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5758
        codeModified := false.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  5759
        self clearAcceptAction.
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5760
        self clearExplainAction.
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5761
        methodListView notNil ifTrue:[
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5762
            methodListView setSelection:nil
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5763
        ].
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5764
        aspect := #revisionInfo. 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2277
diff changeset
  5765
        self normalLabel
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5766
    ]
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  5767
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  5768
    "Created: / 14.11.1995 / 16:43:15 / cg"
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  5769
    "Modified: / 10.2.2000 / 14:14:09 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5770
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5771
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5772
!BrowserView methodsFor:'class stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5773
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5774
allClasses
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5775
    |classes|
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5776
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5777
    currentNamespace = '* all *' ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5778
        ^ environment allClasses
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5779
    ].
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5780
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5781
    classes := Set new.
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5782
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5783
    (self listOfNamespaces) do:[:aNamespace |
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5784
        aNamespace allClassesDo:[:aClass |
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5785
            |actualNamespace nm|
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5786
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5787
            aClass isMeta ifFalse:[
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5788
                (aClass isNameSpace not
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5789
                or:[aClass == Smalltalk]) ifTrue:[
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5790
                    actualNamespace := aClass nameSpace.
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5791
                    (actualNamespace isNameSpace not "/ a private class
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5792
                    or:[actualNamespace == aNamespace]) ifTrue:[
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5793
                        classes add:aClass
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5794
                    ]
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5795
                ]
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5796
            ]
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5797
        ]
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5798
    ].
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  5799
    ^ classes
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  5800
!
2733
d14737c26fca fixed checkIn * all *
Claus Gittinger <cg@exept.de>
parents: 2716
diff changeset
  5801
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5802
allClassesInCategory:aCategory
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5803
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5804
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5805
    currentNamespace = '* all *' ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5806
        ^ environment allClassesInCategory:currentClassCategory
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5807
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5808
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5809
    classes := Set new.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5810
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5811
    (self listOfNamespaces) do:[:aNamespace |
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5812
        aNamespace allClassesDo:[:aClass |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5813
            |actualNamespace nm|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5814
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5815
            aClass isMeta ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5816
                (aCategory = '* all *'
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5817
                or:[aClass category = aCategory]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5818
                    (aClass isNameSpace not
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5819
                    or:[aClass == Smalltalk]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5820
                        actualNamespace := aClass nameSpace.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5821
                        (actualNamespace isNameSpace not "/ a private class
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5822
                        or:[actualNamespace == aNamespace]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5823
                            classes add:aClass
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5824
                        ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5825
                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5826
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5827
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  5828
        ]
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5829
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5830
    ^ classes
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5831
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5832
    "Created: 23.12.1996 / 10:26:28 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  5833
    "Modified: 23.12.1996 / 11:33:13 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  5834
!
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5835
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5836
allClassesInCategory:aCategory do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5837
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5838
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5839
    classes := self allClassesInCategory:aCategory.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5840
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5841
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5842
    "Modified: 23.12.1996 / 10:30:00 / cg"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5843
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5844
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5845
allClassesInCategory:aCategory inOrderDo:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5846
    "evaluate the argument, aBlock for all classes in aCategory;
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5847
     superclasses come first - then subclasses"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5848
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5849
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5850
1079
513fda872db0 oops - need an OC for sorting
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  5851
    classes := (self allClassesInCategory:aCategory) asOrderedCollection.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5852
    classes topologicalSort:[:a :b | b isSubclassOf:a].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5853
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5854
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5855
    "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
  5856
    "Modified: 19.3.1997 / 12:48:28 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5857
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  5858
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5859
allClassesInSelectedNamespacesDo:aBlock
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5860
    |nameSpacesConsidered|
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5861
1701
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5862
    currentNamespace = '* all *' ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5863
        environment allClassesDo:aBlock.
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5864
        ^ self
1701
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5865
    ].
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5866
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5867
    nameSpacesConsidered := self listOfNamespaces asIdentitySet.
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5868
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5869
    environment allClassesDo:[:aClass |
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5870
        (nameSpacesConsidered includes:aClass nameSpace)
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5871
        ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5872
            aBlock value:aClass
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  5873
        ]
1701
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5874
    ]
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5875
a008f66ec076 keep scrollPosition when removing a category.
Claus Gittinger <cg@exept.de>
parents: 1698
diff changeset
  5876
    "Created: / 16.1.1997 / 20:18:47 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  5877
    "Modified: / 18.6.1998 / 15:06:23 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  5878
!
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  5879
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5880
changeCurrentClass:newClass
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5881
    "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
  5882
     keep instance protocol as it was.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5883
     This does not update any views."
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5884
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5885
    |cls meta|
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5886
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5887
"/    fullProtocol ifTrue:[^ self].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5888
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5889
    self releaseClass.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5890
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5891
    newClass notNil ifTrue:[
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5892
        cls := newClass.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5893
        cls isMeta ifTrue:[
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5894
            meta := cls.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5895
            cls := meta theNonMetaclass
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5896
        ] ifFalse:[
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5897
            meta := cls theMetaclass
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5898
        ].
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5899
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5900
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5901
    currentClass := cls.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5902
    showInstance ifTrue:[
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5903
       actualClass := acceptClass := cls.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5904
    ] ifFalse:[
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5905
       actualClass := acceptClass := meta.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5906
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5907
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5908
    currentClass notNil ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5909
        cls addDependent:self.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  5910
        meta addDependent:self.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5911
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5912
    self normalLabel.
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5913
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5914
    "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
  5915
    "Modified: / 13.12.1995 / 15:32:49 / cg"
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5916
    "Created: / 10.4.1998 / 12:25:16 / cg"
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  5917
!
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5918
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5919
checkClassSelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5920
    "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
  5921
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5922
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5923
	self warn:'select a class first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  5924
	^ false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5925
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5926
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5927
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5928
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5929
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
  5930
    "common helper for newClass and newSubclass
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5931
     - 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
  5932
     Also, set acceptaction to install the class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5933
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5934
    |theSuperClass|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5935
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5936
    currentMethodCategory := nil.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  5937
    self releaseMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5938
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  5939
    classListView setSelection:nil.
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
    fullClass ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5942
        methodCategoryListView contents:nil.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5943
        methodListView contents:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5944
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5945
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5946
    (aClass == Autoload
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  5947
    or:[aClass isNil or:[aClass isLoaded not]]) ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5948
        currentNamespace == JAVA ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5949
            theSuperClass := Java at:'java.lang.Object'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5950
        ] ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5951
            theSuperClass := Object
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5952
        ]
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5953
    ] ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  5954
        theSuperClass := aClass
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5955
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  5956
    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
  5957
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  5958
    codeModified := false.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5959
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  5960
    self changeCurrentClass:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  5961
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  5962
    "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
  5963
    "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
  5964
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5965
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5966
classDoubleClick:lineNr
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5967
    "double click on a class;
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5968
     if its unloaded, load it.
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5969
     if its an application-class, start the app"
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5970
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5971
    currentClass notNil ifTrue:[
3504
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5972
        currentClass isVisualStartable ifTrue:[
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5973
            self withWaitCursorDo:[
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5974
                self busyLabel:'starting application %1' with:currentClass name.
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5975
                currentClass open.
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5976
                self normalLabel.
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5977
            ].
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5978
            ^ self
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5979
        ].
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5980
        currentClass isLoaded ifFalse:[
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5981
            self classLoad.
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5982
"/            self withWaitCursorDo:[
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5983
"/                currentClass autoload.
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5984
"/            ].
3504
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5985
            self normalLabel.
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5986
            ^ self
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5987
        ].
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5988
        (TestRunner notNil and:[currentClass isSubclassOf:TestCase]) ifTrue:[
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5989
            TestRunner openOnTestCase:currentClass.
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5990
            ^ self
1de0c4005d45 double click on a testCase
Claus Gittinger <cg@exept.de>
parents: 3502
diff changeset
  5991
        ].
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5992
    ]
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5993
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5994
    "Created: / 29.10.1997 / 15:50:26 / cg"
1478
852defc72eca Load autoloaded classes with doubleclick.
Stefan Vogel <sv@exept.de>
parents: 1451
diff changeset
  5995
    "Modified: / 16.2.1998 / 11:55:25 / stefan"
1502
1d24cc59be77 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  5996
    "Modified: / 4.3.1998 / 14:58:35 / cg"
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5997
!
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5998
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5999
classListUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6000
    RememberAspect ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6001
	aspect == #hierarchy ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6002
	    ^ self classHierarchy
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6003
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6004
	aspect == #classInstVars ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6005
	    ^ self classClassInstVars
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6006
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6007
	aspect == #comment ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6008
	    ^ self classComment
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6009
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6010
	aspect == #primitiveDefinitions ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6011
	    ^ self classPrimitiveDefinitions
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6012
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6013
	aspect == #primitiveFunctions ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6014
	    ^ self classPrimitiveFunctions
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6015
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6016
	aspect == #primitiveVariables ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6017
	    ^ self classPrimitiveVariables
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6018
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6019
	aspect == #revisionInfo ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6020
	    ^ self classRevisionInfo
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  6021
	].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6022
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6023
    self classDefinition
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6024
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6025
    "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
  6026
    "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
  6027
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6028
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6029
classSelection:lineNr
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6030
    "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
  6031
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  6032
    |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
  6033
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6034
    (currentClassHierarchy notNil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6035
     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
  6036
        oldSelector := currentSelector.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6037
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6038
        self updateMethodCategoryListWithScroll:false.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6039
        self updateMethodListWithScroll:false.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6040
        fullProtocol ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6041
            self updateVariableList.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6042
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6043
        oldSelector notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6044
            self switchToMethod:oldSelector.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6045
            currentMethod isNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6046
                currentSelector := oldSelector.
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  6047
                codeView contents:'*** no other implementor of ' , currentSelector allBold , ' in that hierarchy ***'.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  6048
                self clearAcceptAction.
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6049
            ] ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6050
                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
  6051
                self methodSelectionChanged.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6052
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6053
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6054
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6055
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6056
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6057
    (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
  6058
        self classCategorySelectionChanged. 
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6059
        aspect := nil.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6060
        currentClass := actualClass := nil.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6061
        self updateCodeView.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6062
        ^ self
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6063
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6064
    nm := sel withoutSpaces.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6065
    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
  6066
    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
  6067
        self changeCurrentClass:cls.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6068
        self classSelectionChanged
836
22cdfaaf87fc namespace fixes & another check
Claus Gittinger <cg@exept.de>
parents: 834
diff changeset
  6069
    ] ifFalse:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6070
        (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
  6071
        ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6072
            "/ 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
  6073
            classes := IdentitySet new.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6074
            Class allSubInstancesDo:[:aClass |
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6075
                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
  6076
                    classes add:aClass
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6077
                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6078
            ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6079
            classes notEmpty ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6080
                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
  6081
                    cls := classes first.
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  6082
                    environment
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6083
                        keysAndValuesDo:[:key :aClass |
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  6084
                                (environment at:key) == cls ifTrue:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6085
                                    globlName := key
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6086
                                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6087
                        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6088
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6089
                    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
  6090
                    globlName notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6091
                        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
  6092
                    ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6093
                    (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
  6094
                    ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  6095
                        environment at:cls name asSymbol put:cls
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6096
                    ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6097
                ] ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6098
                    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
  6099
                     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
  6100
                                           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
  6101
                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6102
            ] ifFalse:[
2781
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6103
                Class allSubInstancesDo:[:aClass |
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6104
                    aClass isMeta ifFalse:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  6105
                        (environment at:aClass name) ~~ aClass ifTrue:[
2781
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6106
                            classes add:aClass
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6107
                        ]
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6108
                    ]
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6109
                ].
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6110
                classes size > 0 ifTrue:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6111
                    self warn:'oops - could not a class with that name.\\Please see all classes which are not found in Smalltalk and fix things manually.' withCRs.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6112
                    classes inspect
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6113
                ] ifFalse:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6114
                    self warn:'oops - could not a class with that name.'.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6115
                ]
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6116
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6117
        ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6118
    ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6119
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6120
    actualClass notNil ifTrue:[
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  6121
        "/ self addToClassHistory: actualClass name asString
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  6122
        self class addToClassHistory:actualClass selector:nil
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6123
    ]
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6124
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6125
    "Modified: / 10.2.2000 / 14:14:18 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6126
!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6127
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6128
classSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6129
    |oldMethodCategory oldMethod oldSelector|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6130
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  6131
    self withWaitCursorDo:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6132
        "/ alien classes have no methodCategories; hide that list ...
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6133
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6134
        currentClass notNil ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6135
            currentClass supportsMethodCategories ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6136
                self hideMethodCategoryList
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6137
            ] ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6138
                self showMethodCategoryList
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6139
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6140
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6141
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6142
        "/ temporarily nil the aspect, to avoid
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6143
        "/ double redraw.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6144
        aspect := nil. "/ #definition.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6145
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6146
        oldMethodCategory := currentMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6147
        oldMethod := currentMethod.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6148
        oldSelector := currentSelector.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6149
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6150
        showInstance ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6151
            actualClass := acceptClass := currentClass
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6152
        ] ifFalse:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6153
            actualClass := acceptClass := currentClass theMetaclass
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6154
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6155
        currentMethodCategory := nil.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6156
        self releaseMethod.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6157
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6158
        self updateMethodCategoryList.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6159
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6160
        oldMethodCategory notNil ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6161
            methodCategoryListView setSelectElement:oldMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6162
            methodCategoryListView hasSelection ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6163
                currentMethodCategory := oldMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6164
                self methodCategorySelectionChanged
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6165
            ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6166
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6167
        aspect := #definition.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6168
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6169
        self updateMethodList.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6170
        "/ self updateCodeView.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6171
        self updateVariableList.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6172
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6173
        fullClass ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6174
            self updateCodeView.
2632
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
  6175
            self setAcceptActionForFullClass.
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6176
        ] ifFalse:[
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6177
"/            self classDefinition.
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6178
            self classListUpdate.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6179
            self setAcceptActionForClass.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6180
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6181
        self clearExplainAction.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6182
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6183
        (classCategoryListView notNil and:[currentClass notNil]) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6184
            (currentClassCategory = currentClass category) ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6185
                currentClassCategory := currentClass category.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6186
                (classCategoryListView list includes:currentClassCategory) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6187
                    classCategoryListView setSelectElement:currentClassCategory
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6188
                ] ifFalse:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6189
                    classCategoryListView setSelection:nil
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6190
                ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6191
            ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6192
        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6193
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
  6194
        self setDoitActionForClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6195
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6196
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  6197
    "Created: / 23.11.1995 / 11:32:03 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6198
    "Modified: / 24.2.2000 / 15:50:17 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6199
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6200
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  6201
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
  6202
    "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
  6203
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  6204
    |cat name nameProto namePrefix i existingNames withNameSpaceDirective
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  6205
     className ownerName s|
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6206
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6207
    (aSuperClass notNil and:[aSuperClass isJavaClass not]) ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6208
        (currentNamespace == JAVA 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6209
        or:[aSuperClass notNil and:[aSuperClass isJavaClass]])
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6210
        ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6211
            ^ self javaClassTemplateFor:aSuperClass in:categoryString private:isPrivate
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6212
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6213
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6214
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6215
    self setAcceptActionForNewClass.
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6216
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6217
    s := TextStream on:''.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  6218
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  6219
    isNameSpace ifTrue:[
2652
6cd9b4646289 oops - Namespace -> NameSpace
ca
parents: 2649
diff changeset
  6220
        s nextPutAll:'NameSpace name:''NewNameSpace'''.
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6221
        s cr; cr.
2605
56cf1ae89b39 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  6222
        s emphasis:(UserPreferences current commentEmphasisAndColor).
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6223
        s nextPutAll:'"
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  6224
 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
  6225
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  6226
 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
  6227
 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
  6228
"
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6229
'.
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6230
        ^ s contents.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  6231
    ].
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  6232
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  6233
    withNameSpaceDirective :=
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6234
        currentNamespace notNil 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6235
        and:[currentNamespace ~= '* all *'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6236
        and:[currentNamespace ~= Smalltalk]].
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  6237
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  6238
    withNameSpaceDirective ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6239
        className := aSuperClass nameWithoutNameSpacePrefix.
2652
6cd9b4646289 oops - Namespace -> NameSpace
ca
parents: 2649
diff changeset
  6240
        s nextPutAll:('"{ NameSpace: ''' , currentNamespace name , ''' }"').
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6241
        s cr; cr.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  6242
    ] ifFalse:[    
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6243
        className := aSuperClass name.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  6244
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  6245
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  6246
    cat := categoryString.
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  6247
    (cat isNil or:[cat startsWith:$*]) ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6248
        cat := '* no category *'
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  6249
    ].
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  6250
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  6251
    nameProto := 'NewClass'.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6252
    i := 1.
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  6253
    isPrivate ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6254
        namePrefix := currentClass name , '::'.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6255
        existingNames := currentClass privateClasses.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6256
        existingNames size > 0 ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6257
            existingNames := existingNames collect:[:cls | cls name].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6258
        ]
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  6259
    ] ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6260
        namePrefix := ''.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6261
        existingNames := Smalltalk keys
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  6262
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  6263
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  6264
    name := 'NewClass' , i printString.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  6265
    existingNames notNil ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6266
        nameProto := namePrefix , name.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6267
        [nameProto knownAsSymbol and:[existingNames includes:nameProto asSymbol]] whileTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6268
            i := i + 1.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6269
            name := 'NewClass' , i printString.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6270
            nameProto := namePrefix , name
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6271
        ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6272
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6273
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6274
    s nextPutAll:className.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6275
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  6276
    isPrivate ifTrue:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6277
        withNameSpaceDirective ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6278
            ownerName := currentClass nameWithoutNameSpacePrefix
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6279
        ] ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6280
            ownerName := currentClass name
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6281
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6282
        s nextPutAll:(' subclass:#' , name  , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  6283
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  6284
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  6285
' , '    poolDictionaries: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6286
' , '    privateIn:' , ownerName)
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  6287
    ] ifFalse:[
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6288
        s nextPutAll:(' subclass:#' , name , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  6289
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  6290
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  6291
' , '    poolDictionaries: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6292
' , '    category: ''').
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6293
        cat notNil ifTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6294
            cat printWithQuotesDoubledOn:s
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6295
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6296
        s nextPutAll: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6297
    ].
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6298
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6299
    s cr; cr.
2605
56cf1ae89b39 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  6300
    s emphasis:(UserPreferences current commentEmphasisAndColor).
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6301
    s nextPutAll:'
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6302
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6303
 Replace ''' , className , ''', ''', name , ''' and
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6304
 the empty string arguments by true values.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6305
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6306
 Install (or change) the class by ''accepting'',
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6307
 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
  6308
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6309
 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
  6310
 add some documentation; preferably under the classes documentation
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  6311
 protocol.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  6312
 (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
  6313
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6314
'.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  6315
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  6316
    ^ s contents
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6317
1506
c41c71b6bf2b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1503
diff changeset
  6318
    "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
  6319
    "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
  6320
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6321
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6322
doClassMenu:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6323
    "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
  6324
     while showing waitCursor"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6325
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6326
    self checkClassSelected ifTrue:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  6327
        self withWaitCursorDo:[aBlock value:currentClass]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6328
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  6329
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  6330
    "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
  6331
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6332
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6333
javaClassTemplateFor:aSuperClass in:categoryString private:isPrivate
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6334
    "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
  6335
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  6336
    |name i className s superPackage|
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6337
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6338
    self setAcceptActionForNewJavaClass.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6339
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6340
    s := TextStream on:''.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6341
    s nextPutAll:('package ' , categoryString , ';').
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6342
    s cr; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6343
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6344
    s nextPutAll:('public '); cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6345
    s nextPutAll:('class ').
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6346
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6347
    i := 1.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6348
    name := 'NewClass' , i printString.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6349
    [ (Java classNamed:(categoryString , '.' , name)) notNil ] whileTrue:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6350
        i := i + 1.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6351
        name := 'NewClass' , i printString.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6352
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6353
    s nextPutAll:name; space.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6354
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6355
    className := aSuperClass lastName.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6356
    superPackage := aSuperClass package copy replaceAll:$/ with:$..
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6357
    superPackage = categoryString ifFalse:[
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6358
        superPackage = 'java.lang' ifFalse:[
2351
aea6ec072a3d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2350
diff changeset
  6359
            className := aSuperClass name asString copy replaceAll:$/ with:$..
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6360
        ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6361
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6362
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6363
    s nextPutAll:'extends '; nextPutAll:className.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6364
    s nextPutAll:' {'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6365
    s nextPutAll:'    // { private } { static } { final } type varName;'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6366
    s nextPutAll:'    // int var1;'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6367
    s nextPutAll:'    // int var2;'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6368
    s nextPutAll:'}'; cr.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6369
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6370
    s cr; cr.
2605
56cf1ae89b39 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  6371
    s emphasis:(UserPreferences current commentEmphasisAndColor).
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6372
    s nextPutAll:'
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6373
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6374
// Replace ''' , className , ''', ''', name , ''' and
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6375
// change the local variable declarations as required.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6376
//
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6377
// Install (or change) the class by ''accepting'',
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6378
// either via the menu or the keyboard (usually CMD-A).
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6379
'.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6380
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6381
    ^ s contents
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6382
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6383
    "Created: / 23.12.1996 / 12:46:31 / cg"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6384
    "Modified: / 15.6.1998 / 17:23:05 / cg"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6385
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
  6386
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6387
listOfAllClassNamesInCategory:aCategory
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6388
    "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
  6389
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6390
    ^ self listOfAllClassesInCategory:aCategory names:true
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6391
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6392
    "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
  6393
!
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6394
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6395
listOfAllClassesInCategory:aCategory names:namesFlag
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6396
    "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
  6397
     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
  6398
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6399
    |nameSpaces listOfClassNames listOfClasses classesPresent namesPresent searchCategory 
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  6400
     match anyCategory nm allNameSpaces|
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6401
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6402
    allNameSpaces := (currentNamespace = '* all *').
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  6403
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  6404
    "/ keep track of added names (care for obsolete classes)
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  6405
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6406
    namesPresent := Set new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6407
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
  6408
    (aCategory = '* hierarchy *') ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6409
        listOfClassNames := OrderedCollection new.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6410
        listOfClasses := OrderedCollection new.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6411
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6412
        self classHierarchyOf:(environment at:#Object) withAutoloaded:true do:[:aClass :lvl|
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6413
            |indent|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6414
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6415
            (aClass isNameSpace not
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6416
            or:[aClass == Smalltalk]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6417
                aClass isObsolete ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6418
                    nm := self displayedClassNameOf:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6419
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6420
                    (namesPresent includes:nm) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6421
                        indent := String new:lvl*2.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6422
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6423
                        "/ show classes from other nameSpaces in italic
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6424
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6425
                        (allNameSpaces not
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6426
                         and:[(self findClassNamedInNameSpace:nm) isNil]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6427
                            nm := nm asText emphasizeAllWith:#italic.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6428
                        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6429
                        nm := indent , nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6430
                        namesPresent add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6431
                        listOfClassNames add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6432
                        listOfClasses add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6433
                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6434
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6435
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6436
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6437
        namesFlag ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6438
            ^ listOfClasses
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6439
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6440
        ^ listOfClassNames
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6441
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6442
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6443
    (aCategory = '* all *') ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6444
        anyCategory := true
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  6445
    ] ifFalse:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6446
        anyCategory := false.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6447
        (aCategory = '* no category *') ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6448
            searchCategory := nil
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6449
        ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6450
            searchCategory := aCategory
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6451
        ].
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  6452
    ].
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  6453
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6454
    allNameSpaces ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  6455
        nameSpaces := Array with:environment.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6456
    ] ifFalse:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6457
        nameSpaces := self listOfNamespaces.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6458
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6459
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6460
    listOfClasses := OrderedCollection new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6461
    listOfClassNames := OrderedCollection new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6462
    classesPresent := IdentitySet new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6463
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  6464
    nameSpaces do:[:aNamespace |
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6465
        aNamespace allClassesDo:[:aClass |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6466
            |thisCategory actualNamespace nm owner|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6467
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6468
            aClass isMeta ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6469
                (aClass isNameSpace not
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6470
                or:[aClass == Smalltalk]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6471
                    (classesPresent includes:aClass) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6472
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6473
                        match := anyCategory.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6474
                        match ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6475
                            thisCategory := aClass category.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6476
                            match := ((thisCategory = searchCategory) 
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6477
                                     or:[thisCategory = aCategory]).
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6478
                        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6479
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6480
                        match ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6481
                            fullClass ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6482
                                aClass owningClass notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6483
                                    match := false
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6484
                                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6485
                            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6486
                        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6487
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6488
                        match ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6489
                            nm := self displayedClassNameOf:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6490
                            (namesPresent includes:nm) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6491
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6492
                                allNameSpaces ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6493
                                    (owner := aClass topOwningClass) notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6494
                                        actualNamespace := owner nameSpace
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6495
                                    ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6496
                                        actualNamespace := aClass nameSpace.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6497
                                    ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6498
                                    match := actualNamespace isNameSpace not "/ a private class
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6499
                                             or:[actualNamespace == aNamespace].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6500
                                ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6501
                                match ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6502
                                    namesPresent add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6503
                                    classesPresent add:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6504
                                    listOfClasses add:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6505
                                    listOfClassNames add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6506
                                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6507
                            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6508
                        ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6509
                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6510
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6511
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6512
        ]
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  6513
    ].
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  6514
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  6515
    fullClass ifFalse:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6516
        "/
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6517
        "/ mhm - must search through private classes of those
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6518
        "/ in smalltalk (they are not visible in the nameSpace,
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6519
        "/ but should also be displayed)
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6520
        "/
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  6521
        environment allClassesDo:[:aClass |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6522
            |actualNamespace owner|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6523
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6524
            aClass isMeta ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6525
                (classesPresent includes:aClass) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6526
                    (owner := aClass topOwningClass) notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6527
                        (classesPresent includes:owner) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6528
                            nm := self displayedClassNameOf:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6529
                            (namesPresent includes:nm) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6530
                                namesPresent add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6531
                                listOfClasses add:aClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6532
                                listOfClassNames add:nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6533
                            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6534
                        ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6535
                    ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6536
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6537
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6538
        ].
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  6539
    ].
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  6540
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6541
    (listOfClasses size == 0) ifTrue:[^ nil].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6542
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6543
    "/ sort by name
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6544
    listOfClassNames sortWith:listOfClasses.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6545
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6546
    namesFlag ifFalse:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6547
        ^ listOfClasses
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6548
    ].
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6549
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6550
    "/ indent after sorting
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6551
    1 to:listOfClassNames size do:[:index |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6552
        |nm cls owner s|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6553
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6554
        cls := listOfClasses at:index.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6555
        owner := cls.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6556
        (owner := owner owningClass) notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6557
            nm := listOfClassNames at:index.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6558
            s := nm.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6559
            [owner notNil] whileTrue:[    
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6560
                s := '  ' , s.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6561
                owner := owner owningClass
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6562
            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6563
            listOfClassNames at:index put:s.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
  6564
        ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6565
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6566
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6567
    ^ listOfClassNames
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  6568
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6569
    "Created: 10.1.1997 / 13:57:34 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6570
    "Modified: 22.3.1997 / 14:03:36 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6571
!
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6572
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6573
listOfClassNameHierarchyOf:aClass
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6574
    "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
  6575
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6576
    |startClass classes thisOne|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6577
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6578
    showInstance ifTrue:[
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  6579
        startClass := aClass
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6580
    ] ifFalse:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  6581
        startClass := aClass theMetaclass.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6582
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6583
    classes := startClass allSuperclasses.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6584
    thisOne := Array with:startClass.
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  6585
    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
  6586
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6587
    fullProtocol ifFalse:[
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  6588
        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
  6589
    ].
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  6590
    ^ classes collect:[:c | self displayedClassNameOf:c "c name"]
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  6591
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6592
    "Created: 10.1.1997 / 14:01:06 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6593
    "Modified: 30.7.1997 / 17:47:24 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6594
!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6595
2781
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6596
renameCurrentClassTo:newNameString
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6597
    "helper - do the class-rename"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6598
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6599
    self doClassMenu:[:currentClass |
2781
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6600
        |oldSym oldBaseSym cls newOwnerOrNameSpacePath nsOrOwner s nextWord t hardRename|
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6601
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6602
        newNameString = currentClass name ifTrue:[^ self].
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6603
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6604
        newOwnerOrNameSpacePath := OrderedCollection new.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6605
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6606
        nsOrOwner := Smalltalk.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6607
        s := newNameString readStream.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6608
        [s atEnd] whileFalse:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6609
            nextWord := s nextAlphaNumericWord.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6610
            s skipSeparators.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6611
            s atEnd ifFalse:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6612
                nsOrOwner isNameSpace ifTrue:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6613
                    t := nsOrOwner at:nextWord asSymbol
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6614
                ] ifFalse:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6615
                    t := nsOrOwner privateClassesAt:nextWord asSymbol
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6616
                ].
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6617
                t isNil ifTrue:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6618
                    self warn:('Name: ''' , newNameString , ''' specifies a non-existing NameSpace or Ownerclass.\\(no ''' , nextWord , ''' in ''' , nsOrOwner name , ')') withCRs.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6619
                    ^ self
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6620
                ].
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6621
                nsOrOwner := t.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6622
                s peek == $. ifTrue:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6623
                    s next.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6624
                ] ifFalse:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6625
                    s peek == $: ifTrue:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6626
                        s next.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6627
                        s next ~= $: ifTrue:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6628
                            self warn:'Bad name: ''' , newNameString , ''' (either use ''.'' or ''::'' as nameSpace separator)'.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6629
                            ^ self
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6630
                        ]
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6631
                    ]
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6632
                ]
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6633
            ]
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6634
        ].
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6635
        nsOrOwner isNil ifTrue:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6636
            self warn:'Name ''' , newNameString , ''' specifies a non-existing NameSpace or Ownerclass'.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6637
            ^ self
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6638
        ].
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6639
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6640
        hardRename := false.
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6641
        currentClass isPrivate ifTrue:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6642
            "/ check if the new name implies an owner-change
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6643
            hardRename := (nsOrOwner ~~ currentClass owningClass)
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6644
        ] ifFalse:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6645
            hardRename := (nsOrOwner ~~ Smalltalk)
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6646
        ].
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6647
        hardRename ifTrue:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6648
            (self confirm:'New name implies a NameSpace or OwningClass change - is this what you want ?') ifFalse:[
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6649
                ^ self
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6650
            ]
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6651
        ].
2644
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6652
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6653
        "/ check if the target already exists - confirm if so.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6654
2781
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6655
        (cls := Smalltalk classNamed:newNameString) notNil ifTrue:[
2644
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6656
            (self confirm:(resources string:'WARN_RENAME' 
2781
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6657
                                     with:newNameString 
2644
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6658
                                     with:cls category) withCRs)
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6659
                ifFalse:[^ self]
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6660
        ].
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6661
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6662
        oldSym := currentClass name asSymbol.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6663
        oldBaseSym := currentClass nameWithoutPrefix asSymbol.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6664
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6665
        "/
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6666
        "/ renaming is actually more complicated as one might
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6667
        "/ think (care for classVariables, privateClasses etc.)
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6668
        "/ Smalltalk knows all about that ...
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6669
2781
01e49ccd049e renaming with nameSpace or ownership change;
Claus Gittinger <cg@exept.de>
parents: 2753
diff changeset
  6670
        Smalltalk renameClass:currentClass to:newNameString.
2644
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6671
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6672
        self updateClassList.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6673
        self updateMethodCategoryListWithScroll:false.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6674
        self updateMethodListWithScroll:false.
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  6675
        self withWaitCursorDo:[
2644
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6676
            Transcript showCR:('searching for users of ' , oldSym); endEntry.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6677
            SystemBrowser browseReferendsOf:oldSym warnIfNone:false.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6678
            oldBaseSym ~= oldSym ifTrue:[
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6679
                Transcript showCR:('searching for users of ' , oldBaseSym); endEntry.
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6680
                SystemBrowser browseReferendsOf:oldBaseSym warnIfNone:false
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6681
            ]
8dc04189f7b1 rename: users search fixed
Claus Gittinger <cg@exept.de>
parents: 2643
diff changeset
  6682
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6683
    ]
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
  6684
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6685
    "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
  6686
    "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
  6687
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6688
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6689
switchToClassNameMatching:aMatchString
1889
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  6690
    |classNames caselessMatchingNames 
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  6691
     substringMatchingNames caselessSubstringMatchingNames
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  6692
     lcMatchString subMatch lcSubMatch thisName box className
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  6693
     needSearch cls|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6694
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  6695
    classNames := Set new.
1688
186e02887c30 also do caseless match in find-class
Claus Gittinger <cg@exept.de>
parents: 1687
diff changeset
  6696
    caselessMatchingNames := Set new.
1889
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  6697
    substringMatchingNames := Set new.
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  6698
    caselessSubstringMatchingNames := Set new.
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  6699
    lcMatchString := aMatchString asLowercase.
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  6700
    needSearch := true.
1889
d73a5d8b3e14 better class search - try substring matches if nothing was found.
Claus Gittinger <cg@exept.de>
parents: 1878
diff changeset
  6701
    aMatchString includesMatchCharacters ifFalse:[
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6702
        subMatch := '*' , aMatchString , '*'.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6703
        lcSubMatch := subMatch asLowercase.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6704
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6705
        "/ if the name is already a good one, avoid the expensive search
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6706
        className := aMatchString asSymbolIfInterned.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6707
        className notNil ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  6708
            cls := environment at:className ifAbsent:nil.
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6709
            (cls notNil and:[cls isBehavior]) ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6710
                needSearch := false.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6711
            ]
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6712
        ]
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  6713
    ].
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  6714
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
  6715
    needSearch ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  6716
        environment allClassesDo:[:aClass |
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6717
            "/ to make it look better,
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6718
            "/ show dotted names for java
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6719
            "/ thisName := aClass name.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6720
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6721
            aClass isJavaClass ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6722
                thisName := aClass displayString. "/ fullName copyReplaceAll:$/ with:$.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6723
            ] ifFalse:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6724
                thisName := aClass name
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6725
            ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6726
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6727
            (aMatchString match:thisName) ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6728
                classNames add:thisName
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6729
            ] ifFalse:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6730
                (lcMatchString match:thisName asLowercase) ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6731
                    caselessMatchingNames add:thisName
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6732
                ] ifFalse:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6733
                    subMatch notNil ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6734
                        (subMatch match:thisName) ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6735
                            substringMatchingNames add:thisName
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6736
                        ] ifFalse:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6737
                            (lcSubMatch match:thisName asLowercase) ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6738
                                caselessSubstringMatchingNames add:thisName
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6739
                            ]
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6740
                        ]
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6741
                    ]
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6742
                ]
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6743
            ]
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6744
        ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6745
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6746
        "/ if nothing matched - try caseless matches
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6747
        classNames size == 0 ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6748
            classNames := caselessMatchingNames.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6749
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6750
            "/ if nothing matched - try substring matches
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6751
            classNames size == 0 ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6752
                classNames := substringMatchingNames.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6753
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6754
                "/ if nothing matched - try caseless substring matches
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6755
                classNames size == 0 ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6756
                    classNames := caselessSubstringMatchingNames.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6757
                ]
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6758
            ]
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6759
        ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6760
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6761
        (classNames size == 0) ifTrue:[^ nil].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6762
        (classNames size == 1) ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6763
            className := classNames first
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6764
        ] ifFalse:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6765
            classNames := classNames asArray sort.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6766
3559
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  6767
            box := self listBoxTitle:'Select class to switch to:'
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  6768
                              okText:'OK'
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6769
                                list:classNames.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6770
            box action:[:aString | className := aString].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6771
            box open.
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6772
        ].
1567
20820f265460 handle cancel in match-class-select
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
  6773
    ].
20820f265460 handle cancel in match-class-select
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
  6774
3748
e59c5e2892a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3739
diff changeset
  6775
    className size == 0 ifTrue:[^ self].
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  6776
1727
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  6777
    "/ use slashed javaName for search.
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  6778
    (className includes:$.) ifTrue:[
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  6779
        className := className copyReplaceAll:$. with:$/
1727
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
  6780
    ].
1563
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  6781
    self switchToClassNamed:className.
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  6782
    self classSelectionChanged.
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  6783
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6784
    "Modified: / 22.2.1999 / 18:55:25 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6785
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6786
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6787
switchToClassNamed:aString
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
  6788
    |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
  6789
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6790
    meta := false.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  6791
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6792
    str := aString.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  6793
    (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
  6794
        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
  6795
        meta := true
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  6796
    ].
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  6797
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  6798
    theClass := self findClassNamed:str.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  6799
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  6800
    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
  6801
        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
  6802
            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
  6803
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6804
    ].
3559
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  6805
    (theClass isNameSpace 
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  6806
    and:[theClass ~~ Smalltalk]) ifTrue:[               
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  6807
        namespaceList select:(namespaceList list indexOf:theClass name).
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  6808
        self changeNameSpaceTo:(theClass name).
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  6809
        classListView deselect.
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  6810
        ^ self
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  6811
    ].
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  6812
3559
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  6813
    theClass nameSpace ~~ currentNamespace ifTrue:[
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  6814
        namespaceList notNil ifTrue:[
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  6815
            namespaceList select:(namespaceList list indexOf:'* all *').
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  6816
            self changeNameSpaceTo:('* all *').
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  6817
        ]
3559
fc8b06bcdaec auto select namespace
Claus Gittinger <cg@exept.de>
parents: 3558
diff changeset
  6818
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6819
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6820
    theClass == currentClass ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6821
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6822
    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
  6823
        classCategoryListView notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6824
            currentClassHierarchy isNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6825
                ((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
  6826
                    currentClassCategory := newCat.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6827
                    newCat isNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6828
                        element := '* no category *'
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6829
                    ] ifFalse:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6830
                        element := newCat.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6831
                    ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6832
                    classCategoryListView setSelectElement:element.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6833
                    "/ classCategoryListView makeSelectionVisible.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6834
                ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6835
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6836
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6837
        currentClass := actualClass := nil.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6838
        self updateClassList.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6839
        self changeCurrentClass:theClass.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  6840
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6841
"/        (currentNamespace = '* all *'
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6842
"/        or:[currentNamespace ~= theClass nameSpace]) ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6843
"/            str := theClass name
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6844
"/        ] ifFalse:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6845
"/            str := theClass nameWithoutPrefix
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6846
"/        ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6847
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6848
        l := classListView list.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6849
        l notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6850
            idx := l findFirst:[:line | line withoutSpaces = str].
1612
0cc1da8e1dba avoid a redraw of classDefinition.
Claus Gittinger <cg@exept.de>
parents: 1601
diff changeset
  6851
"/            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
  6852
              classListView setSelection:idx.
839
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  6853
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  6854
"/            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
  6855
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6856
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6857
        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
  6858
        idx ~~ 0 ifTrue:[
1522
6a0cf0f9b393 avoid double redraw when selecting a class
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  6859
"/            self classSelectionChanged.
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6860
            classCategoryListView notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6861
                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
  6862
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6863
        ].
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6864
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6865
        actualClass notNil ifTrue:[
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  6866
            "/ self addToClassHistory: actualClass name asString
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  6867
            self class addToClassHistory:actualClass selector:nil
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  6868
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6869
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6870
1522
6a0cf0f9b393 avoid double redraw when selecting a class
Claus Gittinger <cg@exept.de>
parents: 1521
diff changeset
  6871
    "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
  6872
    "Modified: / 17.6.1996 / 16:54:55 / stefan"
1563
8c4c3707a071 changeClassTo: aNameSpace
Claus Gittinger <cg@exept.de>
parents: 1562
diff changeset
  6873
    "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
  6874
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6875
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6876
updateClassList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6877
    self updateClassListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6878
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6879
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6880
updateClassListWithScroll:scroll
3625
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6881
    |classes oldClassName sensor|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6882
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  6883
    gotClassList == true ifTrue:[^ self].
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  6884
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6885
    classListView isNil ifTrue:[^ self].
3606
cf1aabe2b78d flush clas-schange-updates from queue when updating the classList
Claus Gittinger <cg@exept.de>
parents: 3600
diff changeset
  6886
3625
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6887
    (sensor := self sensor) notNil ifTrue:[
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6888
        sensor 
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6889
            flushEventsFor:nil 
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6890
            where:[:event |  
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6891
                        |aspect|
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6892
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6893
                        event type == #delayedUpdate:with:from:
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6894
                        and:[ (aspect := event arguments at:1) == #newClass
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6895
                              or:[aspect == #classDefinition]
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6896
                            ]
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6897
                  ].
1e0d17feec69 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3618
diff changeset
  6898
    ].
3606
cf1aabe2b78d flush clas-schange-updates from queue when updating the classList
Claus Gittinger <cg@exept.de>
parents: 3600
diff changeset
  6899
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6900
    "
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6901
     refetch in case we are not up to date
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6902
    "
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6903
    (currentClass notNil and:[fullProtocol not]) ifTrue:[
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6904
        oldClassName := currentClass name.
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6905
        currentClass := self findClassNamed:oldClassName.
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6906
    ].
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6907
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6908
    currentClassCategory notNil ifTrue:[
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6909
        classes := self listOfAllClassNamesInCategory:currentClassCategory
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6910
    ] ifFalse:[
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6911
        currentClassHierarchy notNil ifTrue:[
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6912
            classes := self listOfClassNameHierarchyOf:currentClassHierarchy
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6913
        ]
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6914
    ].
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6915
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6916
    classListView list = classes ifFalse:[
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6917
        scroll ifTrue:[
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6918
            classListView contents:classes
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6919
        ] ifFalse:[
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6920
            classListView setContents:classes
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6921
        ].
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6922
        oldClassName notNil ifTrue:[
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6923
            classListView setContents:classes.
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6924
            classListView setSelectElement:oldClassName
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6925
        ] ifFalse:[
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6926
            variableListView notNil ifTrue:[variableListView contents:nil]
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6927
        ].
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6928
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6929
        scroll ifTrue:[
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6930
            fullProtocol ifTrue:[
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6931
                classListView scrollToBottom
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6932
            ]
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6933
        ]
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
  6934
    ].
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6935
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  6936
    "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
  6937
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6938
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6939
!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
  6940
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
  6941
classMethodBrowse
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  6942
    |brwsr|
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  6943
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  6944
    brwsr := SystemBrowser openInClass:actualClass selector:currentSelector.
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  6945
    brwsr environment:environment
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
  6946
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
  6947
    "Created: 13.12.1995 / 15:05:12 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6948
    "Modified: 13.12.1995 / 15:06:26 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  6949
!
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
  6950
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6951
classMethodFileOutAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6952
    "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
  6953
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6954
    |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
  6955
     fileBox f|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6956
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6957
    append := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6958
    fileBox := FileSaveBox
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6959
                        title:(resources string:'save methods in:')
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6960
                        okText:(resources string:'save')
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6961
                        abortText:(resources string:'cancel')
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6962
                        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
  6963
    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
  6964
    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
  6965
    Project notNil ifTrue:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6966
        fileBox directory:Project currentProjectDirectory
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6967
    ].
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6968
    fileBox open.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6969
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6970
    fileName isNil ifTrue:[^ self].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6971
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6972
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6973
     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
  6974
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6975
    (f := fileName asFilename) exists ifTrue:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6976
        f copyTo:(f withSuffix: 'sav')
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6977
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6978
    append ifTrue:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6979
        outStream := FileStream appendingOldFileNamed:fileName
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6980
    ] ifFalse:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6981
        outStream := FileStream newFileNamed:fileName.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6982
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6983
    outStream isNil ifTrue:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6984
        ^ self warn:'cannot create: %1' with:fileName
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6985
    ].
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  6986
    self withWaitCursorDo:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6987
        list := classMethodListView list.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6988
        list do:[:l |
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6989
            |line|
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6990
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6991
            line := l asString.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6992
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6993
            self busyLabel:'writing: ' with:line.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6994
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6995
            classString := self classNameFromClassMethodString:line.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6996
            selectorString := self selectorFromClassMethodString:line.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6997
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6998
            cls := self findClassNamed:classString.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  6999
            cls isNil ifTrue:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7000
                self warn:'oops class %1 is gone' with:classString
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7001
            ] ifFalse:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7002
                mth := cls compiledMethodAt:(selectorString asSymbol).
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7003
                Class fileOutErrorSignal handle:[:ex |
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7004
                    |box answer|
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7005
                    box := YesNoBox 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7006
                                title:('fileOut error: ' 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7007
                                       , ex errorString 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7008
                                       , '\\continue anyway ?') withCRs
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7009
                                yesText:'continue' 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7010
                                noText:'abort'.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7011
                    answer := box confirm.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7012
                    box destroy.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7013
                    answer ifTrue:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7014
                        ex proceed
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7015
                    ].
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7016
                    self normalLabel.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7017
                    ^ self
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7018
                ] do:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7019
                    cls fileOutMethod:mth on:outStream.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7020
                ]    
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7021
            ]
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7022
        ].
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7023
        outStream close.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  7024
        self normalLabel.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7025
    ]
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
  7026
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7027
    "Modified: / 17.6.1996 / 16:51:11 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7028
    "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
  7029
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7030
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7031
classMethodMenu
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7032
    <resource: #keyboard ( #Cmds #Cmdi #Cmdg ) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7033
    <resource: #programMenu >
587
74d27450aa79 added resource info
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
  7034
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7035
    |items m specialMenu|
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7036
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7037
    (currentMethod notNil
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7038
    and:[currentMethod isWrapped]) ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7039
        items := #(
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7040
                            ('Inspect Method'      methodInspect            )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7041
                            ('Decompile'           methodDecompile          )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7042
                            ('-'              nil               )
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7043
                  ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7044
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7045
        currentMethod isCounting ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7046
            items := items , #(
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7047
                            ('Stop counting'  methodStopCounting)
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7048
                            ('Reset count'    methodResetCounting)
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7049
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7050
        ] ifFalse:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7051
            currentMethod isCountingMemoryUsage ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7052
                items := items , #(
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7053
                            ('Stop mem usage'  methodStopMemoryUsage)
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7054
                            ('Reset mem count' methodResetMemoryUsage)
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7055
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7056
            ] ifFalse:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7057
                currentMethod isTimed ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7058
                    items := items , #(
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7059
                            ('Stop timing' methodStopTiming)
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7060
                            ('Reset times' methodResetTiming)
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7061
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7062
                ] ifFalse:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7063
                    items := items , #(
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7064
                            ('Remove break/trace'  methodRemoveBreakOrTrace )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7065
                          ).
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7066
                ]
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7067
            ]
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7068
        ]
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7069
    ] ifFalse:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7070
        items := #(
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7071
                            ('Inspect method'      methodInspect            )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7072
                            ('Decompile'           methodDecompile          )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7073
                            ('-'                   nil                      )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7074
                            ('Breakpoint'          methodBreakPoint         )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7075
                            ('Breakpoint in...'   methodBreakPointInProcess)
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7076
                            ('-'                   nil                      )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7077
                            ('Trace'               methodTrace              )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7078
                            ('Trace sender'        methodTraceSender        )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7079
                            ('Trace full walkback' methodTraceFull          )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7080
                            ('-'                   nil                      )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7081
                            ('Start timing'        methodStartTiming        )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7082
                            ('Start counting'      methodStartCounting      )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7083
                            ('Start mem usage'     methodStartMemoryUsage   )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7084
                      ).
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7085
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7086
    specialMenu := PopUpMenu
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7087
                        itemList:items
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7088
                        resources:resources.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7089
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7090
    self environment ~~ Smalltalk ifTrue:[
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7091
        specialMenu disableAll:#(methodStartMemoryUsage methodStartCounting methodStartTiming
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7092
                       methodTraceFull methodTraceSender methodTrace  methodBreakPointInProcess methodBreakPoint
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7093
                      )
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7094
    ].
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7095
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7096
    device ctrlDown ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7097
        currentMethod isNil ifTrue:[
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7098
            classMethodListView flash.
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7099
            ^ nil
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7100
        ].
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7101
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7102
        ^ specialMenu
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7103
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7104
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7105
    items := #(
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7106
                                ('FileOut'             methodFileOut                   )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7107
                                ('FileOut all'         classMethodFileOutAll           )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7108
                                ('PrintOut'            methodPrintOut                  )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7109
                                ('-'                   nil                             )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7110
                                ('Browse full'         classMethodBrowse               )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7111
                                ('Spawn'               methodSpawn                     )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7112
                                ('Spawn class'         classSpawn                      )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7113
                                ('Spawn full protocol' classSpawnFullProtocol          )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7114
                                ('Spawn hierarchy'     classSpawnHierarchy             )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7115
                                ('-'                   nil                             )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7116
                                ('Filter...'           classMethodFilter               )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7117
                                ('Senders...'          methodSenders             Cmds  )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7118
                                ('Implementors...'     methodImplementors        Cmdi  )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7119
                                ('Globals...'          methodGlobalReferends     Cmdg  )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7120
                                ('-'                   nil                             )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7121
                                ('Change category...'  methodChangeCategory            )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7122
                                ('Move...'             methodMove                      )
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7123
                                ('Remove'              methodRemove                    )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7124
                                ('-'                   nil                             )
3113
702191346748 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3111
diff changeset
  7125
                                ('Others'              othersMenu                Ctrl  )
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7126
               ).
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  7127
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7128
    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
  7129
    m subMenuAt:#othersMenu put:specialMenu.
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7130
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7131
    self environment ~~ Smalltalk ifTrue:[
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7132
        m disableAll:#(methodSenders classMethodFilter methodImplementors methodGlobalReferends
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7133
                       methodChangeCategory methodMove methodRemove 
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7134
                      )
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  7135
    ].
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  7136
    ^ m
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  7137
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  7138
    "Modified: / 7.8.1998 / 17:13:47 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  7139
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7140
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7141
!BrowserView methodsFor:'class-method stuff'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7142
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7143
classFromClassMethodString:aString
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7144
    "helper for classMethod-list - extract class name from the string"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7145
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7146
    |classString|
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7147
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7148
    classString := self classNameFromClassMethodString:aString.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7149
    ^ self findClassNamed:classString.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7150
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7151
    "Created: 3.3.1997 / 15:12:59 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7152
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7153
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7154
classMethodFilter
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7155
    "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
  7156
     which pass some filter."
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7157
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7158
    |aspects list allMethods filteredMethods sel str|
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7159
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7160
    aspects := IdentityDictionary new.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7161
    aspects at:#doFilterMessage         put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7162
    aspects at:#notContainingMessage    put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7163
    aspects at:#doFilterString          put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7164
    aspects at:#notContainingString     put:false asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7165
    aspects at:#filteredMessageSelector put:nil asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7166
    aspects at:#filteredString          put:nil asValue.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7167
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7168
    (SystemBrowser  
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7169
      openDialogInterfaceSpec:(self class methodFilterSpec)
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7170
      withBindings:aspects) ifFalse:[
2425
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7171
        ^ self
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7172
    ].
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7173
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  7174
    self withWaitCursorDo:[
2425
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7175
        list := classMethodListView list.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7176
        allMethods := list collect:[:line |
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7177
            |cls sel|
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7178
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7179
            cls := self classFromClassMethodString:line.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7180
            sel := self selectorFromClassMethodString:line.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7181
            sel := sel asSymbol.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7182
            cls isNil ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7183
                nil
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7184
            ] ifFalse:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7185
                cls compiledMethodAt:sel
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7186
            ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7187
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7188
        allMethods := allMethods select:[:m | m notNil].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7189
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7190
        filteredMethods := allMethods.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7191
        (aspects at:#doFilterMessage) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7192
            sel := (aspects at:#filteredMessageSelector) value.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7193
            sel size > 0 ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7194
                sel := sel string asSymbol.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7195
                (aspects at:#notContainingMessage) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7196
                    filteredMethods := filteredMethods select:[:m | (m sends:sel) not].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7197
                ] ifFalse:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7198
                    filteredMethods := filteredMethods select:[:m | m sends:sel].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7199
                ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7200
            ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7201
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7202
        (aspects at:#doFilterString) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7203
            str := (aspects at:#filteredString) value.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7204
            str size > 0 ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7205
                str := str string.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7206
                (aspects at:#notContainingString) value ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7207
                    filteredMethods := filteredMethods select:[:m | (m source includesString:str) not].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7208
                ] ifFalse:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7209
                    filteredMethods := filteredMethods select:[:m | m source includesString:str].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7210
                ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7211
            ]
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7212
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7213
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7214
        filteredMethods = allMethods ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7215
            self information:'Filtered list is the same as shown.'.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7216
            ^ self
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7217
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7218
        filteredMethods isEmpty ifTrue:[
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7219
            self information:'Filtered list is empty.'.
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7220
            ^ self
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7221
        ].
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7222
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7223
        SystemBrowser
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7224
            browseMethods:filteredMethods 
0536e1b9504e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2423
diff changeset
  7225
            title:('filtered ' , self topView label)
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7226
    ]
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7227
!
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7228
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7229
classMethodSelection:lineNr
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7230
    "user clicked on a class/method line - show code"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7231
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  7232
    |cls string classString selectorString meta sensor|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7233
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7234
    string := classMethodListView selectionValue string.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7235
    classString := self classNameFromClassMethodString:string.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7236
    selectorString := self selectorFromClassMethodString:string.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7237
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  7238
    "/ reselected with control ?
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  7239
    ((sensor := self sensor) notNil and:[sensor ctrlDown]) ifTrue:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7240
        selectorString = currentSelector ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7241
            "/ if there is a trace/break, remove it.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7242
            (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7243
                self methodRemoveBreakOrTrace.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7244
                ^ self
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7245
            ]
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7246
        ].
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  7247
    ].
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  7248
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7249
    ((classString ~= 'Metaclass') and:[classString endsWith:' class']) ifTrue:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7250
        classString := classString copyWithoutLast:6 "copyTo:(classString size - 5)".
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7251
        meta := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7252
    ] ifFalse:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7253
        meta := false.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  7254
    ].
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  7255
    self changeCurrentClass:(self findClassNamed:classString).
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  7256
    meta ifTrue:[cls := currentClass theMetaclass] ifFalse:[cls := currentClass].
131
claus
parents: 130
diff changeset
  7257
    actualClass := acceptClass := cls.
129
claus
parents: 126
diff changeset
  7258
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7259
    currentClass isNil ifTrue:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7260
        self warn:'oops method is gone'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7261
    ] ifFalse:[
2506
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7262
        currentClassCategory := currentClass category.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7263
        currentSelector := selectorString asSymbol.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7264
        currentClass isJavaClass ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7265
            currentMethod := currentClass compiledMethodAt:currentSelector.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7266
            currentMethod isNil ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7267
                currentClass methodDictionary keysAndValuesDo:[:sel :mthd |
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7268
                    mthd name = currentSelector ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7269
                        currentMethod := mthd
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7270
                    ]       
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7271
                ].
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7272
            ]
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7273
        ] ifFalse:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7274
            currentMethod := actualClass compiledMethodAt:currentSelector.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7275
        ].
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7276
        currentMethod isNil ifTrue:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7277
            self warn:'oops method is gone'
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7278
        ] ifFalse:[
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7279
            currentMethodCategory := currentMethod category.
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7280
        ].
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7281
ed2a31e2ecd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2485
diff changeset
  7282
        self methodSelectionChanged
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7283
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7284
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7285
    self setDoitActionForClass
131
claus
parents: 130
diff changeset
  7286
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  7287
    "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
  7288
    "Modified: / 17.6.1996 / 16:51:28 / stefan"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  7289
    "Modified: / 24.12.1999 / 02:10:45 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  7290
!
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7291
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7292
classNameFromClassMethodString:aString
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7293
    "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
  7294
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  7295
    |s words clsName|
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7296
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7297
    s := aString string withoutSpaces.
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7298
    (s includes:${ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7299
        s := s copyTo:(s indexOf:${ ) - 1.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7300
        s := s withoutSpaces.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7301
    ].
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7302
    (s includes:$[ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7303
        s := s copyTo:(s indexOf:$[ ) - 1.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7304
        s := s withoutSpaces.
2072
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  7305
    ].
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  7306
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7307
"/ new code:
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7308
    words := s asCollectionOfWords.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7309
    clsName := words at:1.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7310
    words size > 2 ifTrue:[
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7311
        (words at:2) = 'class' ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7312
            ^ clsName , ' class'
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7313
        ]
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7314
    ].
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7315
    ^ clsName.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7316
"/ OLD code
3101
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7317
"/
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7318
"/    (s endsWith:' !!') ifTrue:[
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7319
"/        s := s copyWithoutLast:2
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7320
"/    ].
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7321
"/    (s endsWith:')') ifTrue:[
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7322
"/        s := aString copyTo:(aString lastIndexOf:$()-1.
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7323
"/        s := s withoutSpaces.
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7324
"/    ].
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7325
"/    (s endsWith:' !!') ifTrue:[
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7326
"/        s := s copyWithoutLast:2
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7327
"/    ].
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7328
"/    pos := s lastIndexOf:(Character space).
7fc37dfc078f avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 3071
diff changeset
  7329
"/    ^ s copyTo:(pos - 1)
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7330
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7331
    "Modified: / 17.6.1996 / 17:06:59 / stefan"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7332
    "Created: / 3.3.1997 / 15:11:30 / cg"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7333
    "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
  7334
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7335
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7336
selectorFromClassMethodString:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7337
    "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
  7338
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7339
    |pos s|
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7340
2073
9f823631776b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2072
diff changeset
  7341
    s := aString string withoutSpaces.
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7342
    (s endsWith:'???') ifTrue:[
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7343
        s := s copyWithoutLast:3.    "/ kludge
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7344
        s := s withoutSpaces.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  7345
    ].
2327
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7346
    (s includes:${ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7347
        s := s copyTo:(s indexOf:${ ) - 1.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7348
        s := s withoutSpaces.
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7349
    ].
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7350
    (s includes:$[ ) ifTrue:[
4299e0013ca0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2324
diff changeset
  7351
        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
  7352
        s := s withoutSpaces.
2072
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  7353
    ].
7fc20b34b798 show methods category in class-method list
Claus Gittinger <cg@exept.de>
parents: 2062
diff changeset
  7354
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  7355
    (s endsWith:' !!') ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7356
        s := s copyWithoutLast:2
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  7357
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  7358
    (s endsWith:')') ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7359
        s := aString copyTo:(aString lastIndexOf:$()-1.
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7360
        s := s withoutSpaces.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7361
    ].
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  7362
    (s endsWith:' !!') ifTrue:[
2153
9df72c566acb added resetCount/resetMemUse etc. to class-method menu
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
  7363
        s := s copyWithoutLast:2
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  7364
    ].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7365
    pos := s lastIndexOf:(Character space).
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7366
    s := s copyFrom:(pos + 1).
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7367
    s := s string.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
  7368
    ^ s
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7369
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7370
    "Modified: 17.6.1996 / 17:04:38 / stefan"
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  7371
    "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
  7372
!
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7373
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7374
updateClassMethodListWithScroll:scroll keepSelection:keep
3067
96387c6aa216 allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents: 3019
diff changeset
  7375
    |newList selection|
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7376
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7377
    newList := OrderedCollection new.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7378
    selection := classMethodListView selection.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7379
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7380
    "/ update the list, caring for traps.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7381
    classMethodListView list do:[:entry |
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7382
        |cls sel mthd s icn|
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7383
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7384
        cls := self classFromClassMethodString:entry string.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7385
        sel := self selectorFromClassMethodString:entry string.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7386
        (cls isNil or:[sel isNil]) ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7387
            "/ method is gone ?
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7388
            s := entry string.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7389
            (s endsWith:'???') ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7390
                s := s , ' ???'.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7391
            ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7392
        ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7393
            cls isJavaClass ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7394
                s := entry.
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7395
"/                cls methodDictionary keysAndValuesDo:[:sel :mthd |
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7396
"/                    mthd name = sel ifTrue:[
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7397
"/                        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
  7398
"/                    ]
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7399
"/                ]
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7400
            ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7401
                mthd := cls compiledMethodAt:(sel asSymbol).
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7402
                s := cls name , ' ' , sel allBold.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7403
                mthd isNil ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7404
                    s := s , ' ???'
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7405
                ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7406
                    ShowMethodCategoryInClassMethodList == true ifTrue:[
3067
96387c6aa216 allItalic now understood by CharacterArray
Claus Gittinger <cg@exept.de>
parents: 3019
diff changeset
  7407
                        s := s , '  {' , mthd category allItalic, '}'
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7408
                    ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7409
                    s := (self 
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7410
                            listEntryForMethod:mthd 
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7411
                            selector:s)
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7412
                ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7413
            ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7414
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  7415
        newList add:s.
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7416
    ].
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7417
    classMethodListView setList:newList.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7418
    classMethodListView setSelection:selection.
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7419
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7420
    "Modified: / 18.12.1995 / 22:54:04 / stefan"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7421
    "Created: / 3.3.1997 / 15:10:15 / cg"
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
  7422
    "Modified: / 17.10.1998 / 11:30:35 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7423
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7424
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7425
!BrowserView methodsFor:'event handling'!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7426
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7427
handlesKeyPress:key inView:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7428
    "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
  7429
     a keyPress in some other view ?"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7430
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  7431
    <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
  7432
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7433
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7434
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7435
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7436
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7437
    view == classCategoryListView ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7438
        (key == #Find) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7439
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7440
        (untranslatedKey == #Cmdc) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7441
        (untranslatedKey == #Cmdo) ifTrue:[^ true].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7442
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7443
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7444
    view == classListView ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7445
        (key == #Find) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7446
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7447
        (untranslatedKey == #Cmdl) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7448
        (untranslatedKey == #Cmdd) ifTrue:[^ true].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7449
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7450
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7451
    view == methodCategoryListView ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7452
        (key == #Find) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7453
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7454
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7455
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  7456
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  7457
    or:[view == classMethodListView]) ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7458
        (key == #Delete) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7459
        (untranslatedKey == #Cmdi) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7460
        (untranslatedKey == #Cmds) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7461
        (untranslatedKey == #Cmdg) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7462
        (untranslatedKey == #Cmdt) ifTrue:[^ true].
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7463
        (untranslatedKey == #Cmda) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7464
    ].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7465
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7466
    ^ false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7467
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  7468
    "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
  7469
    "Modified: / 16.1.1998 / 17:20:36 / stefan"
1557
5ecd643fc71c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1550
diff changeset
  7470
    "Modified: / 18.4.1998 / 15:54:15 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7471
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7472
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7473
keyPress:key x:x y:y view:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7474
    "this method is reached via delegation from the classCategoryListView"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7475
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  7476
    <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
  7477
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7478
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7479
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7480
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7481
    "/ have to untranslate (since we get #Inspect / #Search
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7482
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7483
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7484
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7485
    view == classCategoryListView ifTrue:[
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7486
        (key == #Find) ifTrue:[^ self classCategoryFindClass].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7487
        (untranslatedKey == #Cmdn) ifTrue:[^ self classCategoryNewCategory].
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7488
        (untranslatedKey == #Cmdc) ifTrue:[^ self browserClone].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7489
        (untranslatedKey == #Cmdo) ifTrue:[^ self browserOpenInClass].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7490
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7491
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7492
    view == classListView ifTrue:[
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7493
        (key == #Find) ifTrue:[^ self classCategoryFindClass].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7494
        (untranslatedKey == #Cmdn) ifTrue:[^ self classNewClass].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7495
        (untranslatedKey == #Cmdl) ifTrue:[^ self classLoad].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7496
        (untranslatedKey == #Cmdd) ifTrue:[^ self classDocumentation].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7497
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7498
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7499
    view == methodCategoryListView ifTrue:[
3143
ac0301bfd040 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3142
diff changeset
  7500
        (key == #Find) ifTrue:[
ac0301bfd040 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3142
diff changeset
  7501
            currentClass isNil ifTrue:[ ^ self classCategoryFindMethod ].
ac0301bfd040 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3142
diff changeset
  7502
            ^ self methodFindAnyMethod
ac0301bfd040 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3142
diff changeset
  7503
        ].
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7504
        (untranslatedKey == #Cmdn) ifTrue:[^ self methodCategoryNewCategory].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7505
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7506
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  7507
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  7508
    or:[view == classMethodListView]) ifTrue:[
3143
ac0301bfd040 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3142
diff changeset
  7509
        (key == #Find) ifTrue:[
ac0301bfd040 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3142
diff changeset
  7510
            currentClass isNil ifTrue:[ ^ self classCategoryFindMethod ].
ac0301bfd040 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3142
diff changeset
  7511
            ^ self methodFindAnyMethod
ac0301bfd040 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3142
diff changeset
  7512
        ].
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
  7513
        (key == #Delete) ifTrue:[^ self methodRemoveConfirmed].
2179
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7514
        (untranslatedKey == #Cmdi) ifTrue:[^ self methodImplementors].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7515
        (untranslatedKey == #Cmds) ifTrue:[^ self methodSenders].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7516
        (untranslatedKey == #Cmdg) ifTrue:[^ self methodGlobalReferends].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7517
        (untranslatedKey == #Cmdt) ifTrue:[^ self methodStringSearch].
934c84ce1b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2178
diff changeset
  7518
        (untranslatedKey == #Cmda) ifTrue:[^ self methodAproposSearch].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7519
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7520
    view keyPress:key x:x y:y
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7521
1419
89b47621cf99 Keep class selection (if possible) on class category change.
Stefan Vogel <sv@exept.de>
parents: 1416
diff changeset
  7522
    "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
  7523
    "Modified: / 16.1.1998 / 17:20:24 / stefan"
1557
5ecd643fc71c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1550
diff changeset
  7524
    "Modified: / 18.4.1998 / 15:56:36 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7525
! !
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7526
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7527
!BrowserView methodsFor:'help'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7528
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7529
helpTextFor:aComponent
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7530
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7531
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7532
    (aComponent == instanceToggle 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7533
    or:[aComponent == classToggle]) ifTrue:[
3490
92df2b6cd6b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3457
diff changeset
  7534
        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
  7535
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7536
    aComponent == classMethodListView ifTrue:[
3490
92df2b6cd6b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3457
diff changeset
  7537
        s := 'HELP_CLSMTHOD_LIST'
1210
2b37259f0068 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1208
diff changeset
  7538
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7539
    s notNil ifTrue:[
3490
92df2b6cd6b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3457
diff changeset
  7540
        ^ resources string:s
105
claus
parents: 98
diff changeset
  7541
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7542
    ^ nil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7543
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7544
    "Modified: 31.8.1995 / 19:11:39 / claus"
1211
588a4d148234 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1210
diff changeset
  7545
    "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
  7546
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7547
2588
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
  7548
!BrowserView methodsFor:'initialization & release'!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7549
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7550
autoSearch:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7551
    "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
  7552
     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
  7553
     search for the searchstring in the codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7554
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7555
    self setSearchPattern:aString.
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7556
    autoSearchIgnoreCase := false.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7557
    autoSearch := aString
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7558
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7559
    "Modified: / 18.6.1998 / 16:49:50 / cg"
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7560
!
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7561
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7562
autoSearch:aString ignoreCase:ign
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7563
    "used with class-method list browsing. If true,
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7564
     selecting an entry from the list will automatically
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7565
     search for the searchstring in the codeView"
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7566
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7567
    self setSearchPattern:aString.
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7568
    autoSearchIgnoreCase := ign.
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7569
    autoSearch := aString
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7570
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
  7571
    "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
  7572
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7573
1789
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  7574
closeRequest
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  7575
    "let user confirm, if codeView was modified and not saved"
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  7576
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  7577
    (self checkSelectionChangeAllowed) ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7578
	super closeRequest
1789
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  7579
    ]
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  7580
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  7581
    "Created: / 3.8.1998 / 19:52:39 / cg"
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  7582
    "Modified: / 3.8.1998 / 20:02:29 / cg"
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  7583
!
16a48132abdb #termiante -> #closeRequest.
Claus Gittinger <cg@exept.de>
parents: 1778
diff changeset
  7584
1902
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  7585
closeRequestFor:aDialog
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  7586
    "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
  7587
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  7588
    aDialog closeRequest
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  7589
!
8c62240f370d care for closeRequest from dialog.
Claus Gittinger <cg@exept.de>
parents: 1891
diff changeset
  7590
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7591
destroy
1715
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  7592
    "release dependant - destroy popups"
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  7593
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
  7594
    self stopSyntaxHighlightProcess.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7595
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  7596
    self releaseMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7597
    Smalltalk removeDependent:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7598
    currentClass notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7599
	self releaseClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7600
	"/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7601
	"/ just in case someone keeps a ref to myself around ...
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7602
	"/ ... release refs to my class (not really needed)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7603
	"/
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7604
	currentClass := actualClass := acceptClass := nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7605
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7606
    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
  7607
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  7608
    "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
  7609
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7610
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7611
initialize
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7612
    super initialize.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7613
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7614
    showInstance := true.
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  7615
    showAllNamespaces := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7616
    fullClass := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7617
    fullProtocol := false.
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  7618
    gotClassList := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7619
    aspect := nil.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7620
    currentNamespace := '* all *'.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7621
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7622
    "inform me, when Smalltalk changes"
1529
af92934e130b initialize class history
tz
parents: 1528
diff changeset
  7623
    Smalltalk addDependent:self.
af92934e130b initialize class history
tz
parents: 1528
diff changeset
  7624
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  7625
    environment := Smalltalk.
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  7626
!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7627
1248
72832110f144 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
  7628
postRealize
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7629
    |v checkBlock|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7630
1248
72832110f144 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
  7631
    super postRealize.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7632
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7633
    checkBlock := [:lineNr | self checkSelectionChangeAllowed].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7634
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7635
    v := classCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7636
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7637
	v action:[:lineNr | self classCategorySelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7638
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7639
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7640
	v list size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7641
	    v list:(self listOfAllClassCategories).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7642
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7643
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7644
	 tell classCategoryListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7645
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7646
	v menuHolder:self; menuPerformer:self; menuMessage:#classCategoryMenu.
107
claus
parents: 106
diff changeset
  7647
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7648
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7649
    v := classListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7650
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7651
	v action:[:lineNr | self classSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7652
	v doubleClickAction:[:lineNr | self classDoubleClick:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7653
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7654
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7655
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7656
	 tell classListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7657
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7658
	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
  7659
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7660
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7661
    v := methodCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7662
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7663
	v action:[:lineNr | self methodCategorySelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7664
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7665
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7666
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7667
	 tell methodCategoryListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7668
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7669
	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
  7670
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7671
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7672
    v := methodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7673
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7674
	v action:[:lineNr | self methodSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7675
	v doubleClickAction:[:lineNr | self methodDoubleClick:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7676
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7677
	v ignoreReselect:false.
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
	 tell methodListView to ask for the menu
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7680
	"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7681
	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
  7682
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7683
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7684
    v := classMethodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7685
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7686
	v action:[:lineNr | self classMethodSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7687
	v selectConditionBlock:checkBlock.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7688
	v ignoreReselect:false.
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
	 tell classMethodListView to ask for the menu
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
	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
  7693
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7694
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7695
    v := variableListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7696
    v notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7697
	v action:[:lineNr | self variableSelection:lineNr].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7698
	v ignoreReselect:false.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7699
	v toggleSelect:true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7700
	v menuHolder:self; menuPerformer:self; menuMessage:#variableListMenu.
117
claus
parents: 114
diff changeset
  7701
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7702
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7703
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  7704
     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
  7705
     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
  7706
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  7707
    fullProtocol ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7708
	classListView scrollToBottom.
123
claus
parents: 120
diff changeset
  7709
    ]
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  7710
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7711
    "Created: / 24.7.1997 / 18:14:59 / cg"
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7712
    "Modified: / 29.10.1997 / 15:50:26 / cg"
124
claus
parents: 123
diff changeset
  7713
!
claus
parents: 123
diff changeset
  7714
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7715
title:someString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7716
    myLabel := someString.
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  7717
    self topView label:someString.
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  7718
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  7719
    "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
  7720
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7721
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7722
!BrowserView methodsFor:'initialize subviews'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7723
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7724
createClassListViewIn:frame
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7725
    "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
  7726
1080
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  7727
    |v panel spc wScr wScrHalf|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7728
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7729
    self createTogglesIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7730
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7731
    panel := VariableVerticalPanel
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7732
                    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
  7733
                    in:frame.
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  7734
    styleSheet is3D ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7735
        spc := ViewSpacing.
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  7736
    ] ifFalse:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7737
        spc := 0
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  7738
    ].
811
fde69dbb949a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 810
diff changeset
  7739
    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
  7740
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  7741
    v := HVScrollableView 
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7742
                for:SelectionInListView 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7743
                miniScrollerH:true miniScrollerV:false
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7744
                in:panel.
2277
1c664709240a classList with autoHide
Claus Gittinger <cg@exept.de>
parents: 2276
diff changeset
  7745
    v autoHideHorizontalScrollBar:true.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7746
    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
  7747
    classListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7748
    classListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7749
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7750
    v := HVScrollableView 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7751
                for:SelectionInListView 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7752
                miniScrollerH:true miniScrollerV:false
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7753
                in:panel.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
  7754
    v autoHideHorizontalScrollBar:true.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7755
    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
  7756
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7757
    variableListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7758
    variableListView delegate:self.
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7759
    variableListView toggleSelect:true.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7760
1080
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  7761
    wScr := v scrollBar preferredExtent x.
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  7762
    wScrHalf := wScr // 2.
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  7763
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  7764
"/    (styleSheet at:'scrollBarPosition' default:#right) == #right ifTrue:[
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  7765
"/        classToggle rightInset:(classToggle rightInset + wScr).
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  7766
"/        classToggle leftInset:(classToggle leftInset - wScrHalf).
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  7767
"/        instanceToggle rightInset:(instanceToggle rightInset + wScrHalf)
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  7768
"/    ].
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  7769
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  7770
    "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
  7771
!
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
createCodeViewIn:aView
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7774
    "setup the code view"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7775
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7776
    ^ self createCodeViewIn:aView atY:0.25
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7777
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7778
    "Modified: 2.3.1996 / 16:08:46 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7779
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7780
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7781
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
  7782
    "setup the code view"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7783
    |v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7784
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7785
    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
  7786
    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
  7787
    codeView := v scrolledView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7788
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7789
    "Created: 2.3.1996 / 16:09:03 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7790
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7791
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7792
createMethodListViewIn:aView atX:relX
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7793
    "setup the method list view"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7794
    |v|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7795
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7796
    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
  7797
    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
  7798
    methodListView := v scrolledView.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7799
    methodListView delegate:self.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7800
    ^ v
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7801
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7802
    "Created: 2.3.1996 / 16:07:10 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7803
    "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
  7804
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7805
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7806
createTogglesIn:aFrame
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7807
    "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
  7808
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7809
    |h halfSpace classAction instanceAction|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7810
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7811
    classAction := [self instanceProtocol:false].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7812
    instanceAction := [self instanceProtocol:true].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7813
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7814
    halfSpace := ViewSpacing // 2.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7815
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  7816
    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
  7817
    h := instanceToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7818
    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
  7819
    instanceToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7820
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7821
    instanceToggle turnOn.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  7822
    instanceToggle controller beToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7823
    instanceToggle pressAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7824
    instanceToggle releaseAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7825
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  7826
    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
  7827
    h := classToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7828
    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
  7829
    classToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7830
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7831
    classToggle turnOff.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  7832
    classToggle controller beToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7833
    classToggle pressAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7834
    classToggle releaseAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7835
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7836
    styleSheet is3D ifTrue:[
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7837
"/        instanceToggle bottomInset:halfSpace.
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7838
"/        classToggle bottomInset:halfSpace.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  7839
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7840
	instanceToggle leftInset:halfSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7841
	classToggle leftInset:halfSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7842
	instanceToggle rightInset:ViewSpacing - halfSpace.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7843
	classToggle rightInset:ViewSpacing - halfSpace.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  7844
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7845
"/ 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
  7846
"/        styleSheet name == #motif ifTrue:[
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7847
"/            instanceToggle showLamp:true.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7848
"/            classToggle showLamp:true.
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7849
"/        ]
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7850
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  7851
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7852
    "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
  7853
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7854
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7855
focusSequence
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7856
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7857
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7858
    s := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7859
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7860
    classCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7861
	s add:classCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7862
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7863
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7864
    classListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7865
	s add:classListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7866
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7867
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7868
"/    variableListView notNil ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7869
"/        s add:variableListView
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7870
"/    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7871
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7872
    instanceToggle notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7873
	s add:instanceToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7874
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7875
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7876
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7877
	s add:methodCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7878
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7879
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7880
    methodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7881
	s add:methodListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7882
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7883
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7884
    classMethodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  7885
	s add:classMethodListView
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7886
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7887
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7888
    s add:codeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7889
    ^ s
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7890
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7891
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7892
pullDownMenu
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7893
    "return the top (pullDown) menu"
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7894
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7895
    <resource: #programMenu>
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7896
3330
b6085cb81010 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  7897
    ^ self menuFromSpec:self class menuSpec.
b6085cb81010 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  7898
"/
b6085cb81010 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  7899
"/    |m|
b6085cb81010 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  7900
"/
b6085cb81010 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  7901
"/    m := self class menuSpec.
b6085cb81010 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  7902
"/    m := m decodeAsLiteralArray.
b6085cb81010 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  7903
"/    m receiver:self.
b6085cb81010 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  7904
"/    m findGuiResourcesIn:self.
b6085cb81010 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3301
diff changeset
  7905
"/    ^ m.
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7906
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7907
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7908
setupForAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7909
    "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
  7910
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  7911
    |vpanel hpanel frame v spc nsHolder hMax menuPanel mH
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  7912
     topFraction|
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  7913
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  7914
    topFraction := 0.3.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7915
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7916
    styleSheet is3D ifTrue:[
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7917
        spc := ViewSpacing.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7918
    ] ifFalse:[
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7919
        spc := 0
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7920
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7921
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7922
    menuPanel := MenuPanel in:self.
3242
0fc239690314 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3239
diff changeset
  7923
    "/ menuPanel level:1.
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7924
    menuPanel verticalLayout:false.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7925
    menuPanel receiver:self.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7926
    menuPanel menu:(self pullDownMenu).
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7927
    mH := menuPanel preferredExtent y.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7928
    menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)).
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  7929
3297
12b826adb7aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3293
diff changeset
  7930
    vpanel := VariableVerticalPanel 
12b826adb7aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3293
diff changeset
  7931
                origin:(0.0 @ (mH + 1)) corner:(1.0 @ 1.0) in:self.
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  7932
    vpanel snapMode:#both.
3297
12b826adb7aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3293
diff changeset
  7933
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  7934
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ topFraction) in:vpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7935
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7936
    v := HVScrollableView for:SelectionInListView
2583
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7937
                          miniScrollerH:true miniScrollerV:false
11528e3ccf36 use #onChangeEvaluate:
Claus Gittinger <cg@exept.de>
parents: 2574
diff changeset
  7938
                          in:hpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7939
    v origin:(0.0 @ 0.0) corner:(0.25 @ 1.0).
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  7940
    styleSheet isWindowsStyle 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
  7941
    classCategoryListView := v scrolledView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7942
    classCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7943
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7944
    frame := View origin:(0.25 @ 0.0) corner:(0.5 @ 1.0) in:hpanel.
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  7945
    styleSheet isWindowsStyle 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
  7946
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7947
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7948
    (environment isNil or:[environment hasNamespaces]) ifTrue:[
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7949
        namespaceList := ComboListView origin:(0.0@1.0) corner:(0.25@1.0) in:hpanel.
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7950
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7951
        hMax := (instanceToggle height + instanceToggle borderWidth)
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7952
                max:(namespaceList preferredExtent y).
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7953
        "/ hMax := hMax "+ (spc // 2)".
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7954
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7955
        v bottomInset:hMax + (spc - (spc // 2)).
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7956
        nsHolder := currentNamespace asValue.
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7957
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7958
        namespaceList topInset:(hMax negated) "- (spc//2)" "+ (spc // 2)".
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7959
        styleSheet name ~= 'win95' ifTrue:[
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7960
            namespaceList leftInset:(ViewSpacing // 2).
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7961
        ].
1878
b54ef0886c6f geometry beautified
Claus Gittinger <cg@exept.de>
parents: 1860
diff changeset
  7962
"/    namespaceList bottomInset:(spc // 2).
931
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7963
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7964
"/    styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7965
"/        namespaceList leftInset:(classCategoryListView originRelativeTo:v) x.
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7966
"/    ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7967
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7968
"/    (v scrollBar originRelativeTo:v) > (classCategoryListView originRelativeTo:v)
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7969
"/    ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7970
"/        namespaceList rightInset:((v scrollBar originRelativeTo:v)
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7971
"/                                  -
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7972
"/                                  (classCategoryListView originRelativeTo:v))
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7973
"/    ] ifFalse:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7974
"/        styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7975
"/            namespaceList rightInset:(ViewSpacing // 2).
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7976
"/        ]
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7977
"/    ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7978
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7979
"/        styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7980
"/            namespaceList rightInset:(ViewSpacing // 2).
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7981
"/        ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  7982
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7983
        self setListOfNamespaces.
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7984
        namespaceList model:nsHolder.
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7985
        namespaceList label menuHolder:self; menuMessage:#nameSpaceMenu.
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7986
        nsHolder onChangeEvaluate:[
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7987
                                    self changeNameSpaceTo:nsHolder value
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7988
                                  ].
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  7989
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7990
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7991
    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
  7992
    v origin:(0.5 @ 0.0) corner:(0.75 @ 1.0).
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  7993
    styleSheet isWindowsStyle 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
  7994
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  7995
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7996
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7997
    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
  7998
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  7999
    self createCodeViewIn:vpanel atY:topFraction
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8000
3297
12b826adb7aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3293
diff changeset
  8001
    "Modified: / 11.10.2001 / 21:20:21 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8002
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8003
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8004
setupForClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8005
    "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
  8006
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8007
    |vpanel hpanel frame v topFraction|
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8008
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8009
    topFraction := 0.3.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8010
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8011
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8012
    vpanel snapMode:#both.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8013
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8014
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ topFraction) in:vpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8015
    frame := View origin:(0.0 @ 0.0) corner:(0.5 @ 1.0)in:hpanel.
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  8016
    styleSheet isWindowsStyle 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
  8017
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8018
    self createTogglesIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8019
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8020
    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
  8021
    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
  8022
      extent:[frame width
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8023
              @
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8024
              (frame height 
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8025
               - ViewSpacing
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8026
               - instanceToggle height
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8027
               - instanceToggle borderWidth
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8028
               + v borderWidth)].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8029
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8030
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8031
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8032
    self createMethodListViewIn:hpanel atX:0.5.
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8033
    self createCodeViewIn:vpanel atY:topFraction.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8034
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  8035
    self changeCurrentClass:aClass.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8036
    actualClass := acceptClass := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8037
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8038
    self updateMethodList.
151
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  8039
    self updateCodeView.
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  8040
    self classDefinition.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8041
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  8042
    "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
  8043
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8044
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8045
setupForClass:aClass methodCategory:aMethodCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8046
    "setup subviews to browse a method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8047
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8048
    |vpanel v topFraction|
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8049
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8050
    topFraction := 0.3.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8051
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8052
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8053
    vpanel snapMode:#both.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8054
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8055
    v := self createMethodListViewIn:vpanel atX:0.0.
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8056
    v corner:(1.0 @ topFraction).
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8057
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8058
    self createCodeViewIn:vpanel atY:topFraction.
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
    currentClassCategory := aClass category.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  8061
    self changeCurrentClass:aClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8062
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8063
    currentMethodCategory := aMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8064
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8065
    self updateCodeView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8066
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  8067
    "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
  8068
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8069
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8070
setupForClass:aClass selector:selector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8071
    "setup subviews to browse a single method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8072
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8073
    |v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8074
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8075
    v := ScrollableView for:CodeView in:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8076
    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
  8077
    codeView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8078
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8079
    currentClassCategory := aClass category.
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  8080
    self changeCurrentClass:aClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8081
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8082
    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
  8083
    currentMethod := actualClass compiledMethodAt:selector.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8084
    currentMethodCategory := currentMethod category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8085
    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
  8086
1543
8d3f734ec81d update of codeView in open-new-on-class
Claus Gittinger <cg@exept.de>
parents: 1541
diff changeset
  8087
    "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
  8088
!
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
setupForClassCategory:aClassCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8091
    "setup subviews to browse a class category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8092
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8093
    |vpanel hpanel frame v topFraction|
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8094
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8095
    topFraction := 0.4.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8096
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8097
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8098
    vpanel snapMode:#both.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8099
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8100
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ topFraction) in:vpanel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8101
    frame  := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  8102
    styleSheet isWindowsStyle ifTrue:[frame rightInset:1].
199
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 createClassListViewIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8105
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8106
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8107
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  8108
    styleSheet isWindowsStyle ifTrue:[v rightInset:1].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8109
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8110
    methodCategoryListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8111
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8112
    self createMethodListViewIn:hpanel atX:0.66.
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8113
    self createCodeViewIn:vpanel atY:topFraction.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8114
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8115
    currentClassCategory := aClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8116
    self updateClassList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8117
    self updateMethodCategoryList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8118
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8119
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8120
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  8121
    "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
  8122
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8123
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8124
setupForClassHierarchy:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8125
    "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
  8126
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8127
    |vpanel hpanel frame v cls topFraction|
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8128
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8129
    topFraction := 0.4.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8130
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8131
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8132
    vpanel snapMode:#both.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8133
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8134
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8135
     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
  8136
    "
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8137
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ topFraction) in:vpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8138
    frame := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  8139
    styleSheet isWindowsStyle 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
  8140
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8141
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8142
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8143
    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
  8144
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  8145
    styleSheet isWindowsStyle 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
  8146
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8147
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8148
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8149
    self createMethodListViewIn:hpanel atX:0.66.
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8150
    self createCodeViewIn:vpanel atY:topFraction.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8151
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  8152
    cls := aClass theNonMetaclass.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8153
    currentClassHierarchy := currentClass := actualClass := cls.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8154
    self updateClassList.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  8155
    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
  8156
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8157
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8158
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8159
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8160
    aClass isMeta ifTrue:[
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8161
        self instanceProtocol:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8162
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8163
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  8164
    "Modified: / 5.11.2001 / 16:33:43 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8165
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8166
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8167
setupForClassList:aList
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8168
    "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
  8169
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8170
    self setupForClassList:aList sort:true
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8171
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8172
    "Modified: 28.5.1996 / 13:53:03 / cg"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8173
!
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8174
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8175
setupForClassList:aList sort:doSort
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8176
    "setup subviews to browse classes from a list"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8177
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8178
    |vpanel hpanel frame l v topFraction|
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8179
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8180
    topFraction := 0.3.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8181
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8182
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8183
    vpanel snapMode:#both.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8184
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8185
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ topFraction) in:vpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8186
    frame := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  8187
    styleSheet isWindowsStyle 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
  8188
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8189
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8190
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8191
    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
  8192
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  8193
    styleSheet isWindowsStyle 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
  8194
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8195
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8196
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8197
    self createMethodListViewIn:hpanel atX:0.66.
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8198
    self createCodeViewIn:vpanel atY:topFraction.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8199
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8200
    l := (aList collect:[:entry | 
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8201
                entry isBehavior ifTrue:[
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8202
                    entry name
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8203
                ] ifFalse:[
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8204
                    entry
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8205
                ]]) asOrderedCollection.
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8206
    doSort ifTrue:[
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8207
        l sort.
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8208
    ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  8209
    classListView list:l.
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  8210
    gotClassList := true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8211
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8212
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8213
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8214
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8215
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8216
    "Created: / 28.5.1996 / 13:52:47 / cg"
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  8217
    "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
  8218
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8219
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8220
setupForFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8221
    "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
  8222
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8223
    |vpanel hpanel v topFraction|
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8224
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8225
    topFraction := 0.3.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8226
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8227
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8228
    vpanel snapMode:#both.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8229
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8230
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ topFraction) in:vpanel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8231
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8232
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8233
    v origin:(0.0 @ 0.0) corner:(0.5 @ 1.0).
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  8234
    styleSheet isWindowsStyle ifTrue:[v rightInset:1].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8235
    classCategoryListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8236
    classCategoryListView contents:(self listOfAllClassCategories).
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
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8239
    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
  8240
    classListView := v scrolledView.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8241
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8242
    self createCodeViewIn:vpanel atY:topFraction.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8243
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8244
    fullClass := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8245
    self updateCodeView
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8246
1891
027595da57a1 nicer layout with w95 style;
Claus Gittinger <cg@exept.de>
parents: 1889
diff changeset
  8247
    "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
  8248
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8249
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8250
setupForFullClassProtocol:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8251
    "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
  8252
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8253
    |vpanel hpanel frame v cls topFraction|
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8254
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8255
    topFraction := 0.4.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8256
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8257
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8258
    vpanel snapMode:#both.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8259
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8260
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8261
     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
  8262
    "
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8263
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ topFraction) in:vpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8264
    frame := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  8265
    styleSheet isWindowsStyle 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
  8266
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8267
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8268
    classListView multipleSelectOk:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8269
    classListView toggleSelect:true.
3582
27b7e3482d29 strikeOut -> strikeout
Claus Gittinger <cg@exept.de>
parents: 3579
diff changeset
  8270
    classListView strikeout:true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8271
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8272
    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
  8273
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
3760
7cd12e0cd10c Use #isWindowsStyle instead of comparing to style name.
Stefan Vogel <sv@exept.de>
parents: 3748
diff changeset
  8274
    styleSheet isWindowsStyle 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
  8275
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8276
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8277
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  8278
    self createMethodListViewIn:hpanel atX:0.66.
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8279
    self createCodeViewIn:vpanel atY:topFraction.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8280
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  8281
    cls := aClass theNonMetaclass.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8282
    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
  8283
    fullProtocol := true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8284
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8285
    self updateClassList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8286
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8287
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8288
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8289
    self updateVariableList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8290
    aClass isMeta ifTrue:[
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8291
        self instanceProtocol:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8292
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8293
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  8294
    "Modified: / 5.11.2001 / 16:33:55 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8295
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8296
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8297
setupForList:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8298
    "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
  8299
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8300
    |vpanel v topFraction|
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8301
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8302
    topFraction := 0.3.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8303
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8304
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8305
    vpanel snapMode:#both.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8306
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8307
    v := ScrollableView for:SelectionInListView in:vpanel.
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8308
    v origin:(0.0 @ 0.0) corner:(1.0 @ topFraction).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8309
    classMethodListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8310
    classMethodListView contents:aList.
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  8311
    classMethodListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8312
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  8313
    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
  8314
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8315
    self createCodeViewIn:vpanel atY:topFraction.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8316
    aList size == 1 ifTrue:[
2739
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8317
        classMethodListView setSelection:1.
1b0b1520670b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2733
diff changeset
  8318
        self classMethodSelection:1. 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8319
    ].
1060
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  8320
    self updateCodeView.
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  8321
    "/ kludge - get trap icons
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  8322
    self updateClassMethodListWithScroll:false keepSelection:true
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  8323
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8324
    "Modified: / 25.10.1997 / 19:27:40 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8325
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8326
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8327
!BrowserView methodsFor:'method category list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8328
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8329
createAccessMethodsFor:aCollectionOfInstVarNames withChange:withChange
990
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  8330
    "workhorse for creating access methods for instvars."
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  8331
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8332
    CodeGeneratorTool
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8333
        createAccessMethodsFor:aCollectionOfInstVarNames 
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8334
        in:currentClass theNonMetaclass 
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8335
        withChange:withChange 
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8336
        asValueHolder:false
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8337
        readersOnly:false 
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8338
        writersOnly:false.
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8339
3721
9fabfb25dcc8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3713
diff changeset
  8340
    "Modified: / 12.7.2002 / 11:59:07 / cg"
990
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  8341
!
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  8342
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8343
methodCategoryCopyCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8344
    "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
  8345
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8346
    |title box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8347
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8348
    showInstance ifTrue:[
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8349
        title := 'Class to copy instance method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8350
    ] ifFalse:[
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8351
        title := 'Class to copy class method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8352
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8353
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8354
    box := self listBoxTitle:title 
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8355
                      okText:'Ok' 
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  8356
                        list:(environment 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
  8357
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8358
    box label:(resources string:'Copy methods').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8359
    box action:[:aString | self copyMethodsFromClass:aString].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  8360
    box open
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8361
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8362
    "Modified: / 12.10.2001 / 19:48:49 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  8363
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8364
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8365
methodCategoryCreateAccessMethods
559
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  8366
    "create access methods for instvars.
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  8367
     If no variable is selected, for all instvars;
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  8368
     otherwise for that selected instvar."
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8369
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8370
    self methodCategoryCreateAccessMethodsWithChange:false
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8371
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8372
    "Modified: / 7.8.1998 / 18:17:34 / cg"
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8373
!
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8374
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8375
methodCategoryCreateAccessMethodsWithChange
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8376
    "create access methods for instvars.
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8377
     If no variable is selected, for all instvars;
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8378
     otherwise for that selected instvar."
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8379
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8380
    self methodCategoryCreateAccessMethodsWithChange:true
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8381
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8382
    "Modified: / 7.8.1998 / 18:17:39 / cg"
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8383
!
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8384
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8385
methodCategoryCreateAccessMethodsWithChange:aBoolean
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8386
    "create access methods for instvars.
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8387
     If no variable is selected, for all instvars;
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8388
     otherwise for that selected instvar."
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8389
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8390
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8391
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8392
    showInstance ifFalse:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8393
        self warn:'select instance - and try again'.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8394
        ^ self.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8395
    ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8396
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8397
    self withWaitCursorDo:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8398
        |nm names|
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8399
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8400
        (variableListView notNil
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8401
        and:[(nm := variableListView selectionValue) notNil]) ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8402
            names := Array with:nm
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8403
        ] ifFalse:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8404
            names := currentClass instVarNames 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8405
        ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8406
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8407
        lockUpdates := true.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8408
        [
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8409
            self createAccessMethodsFor:names withChange:aBoolean.
3700
f75db15c785c Use #ifCurtailed: instead of #valueOnUnwindDo:
Stefan Vogel <sv@exept.de>
parents: 3662
diff changeset
  8410
        ] ifCurtailed:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8411
            lockUpdates := false
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8412
        ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8413
        self updateMethodCategoryListWithScroll:false.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8414
        self updateMethodListWithScroll:false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8415
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  8416
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8417
    "Modified: / 18.8.1997 / 15:44:10 / cg"
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8418
    "Created: / 7.8.1998 / 18:17:18 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8419
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8420
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  8421
methodCategoryCreateApplicationMethods
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  8422
    "create an empty application framework"
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  8423
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  8424
    self checkClassSelected ifFalse:[^ self].
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8425
    CodeGeneratorTool createApplicationCodeFor:currentClass.
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  8426
!
1860
8f62da28af52 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1851
diff changeset
  8427
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8428
methodCategoryCreateDocumentationMethods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8429
    "create empty documentation methods"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8430
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8431
    |metaClass|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8432
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8433
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8434
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8435
    metaClass := currentClass theMetaclass.
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8436
    self withWaitCursorDo:[
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8437
        CodeGeneratorTool createDocumentationMethodsFor:metaClass.
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8438
        CodeGeneratorTool createExamplesMethodFor:metaClass.
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8439
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8440
        self instanceProtocol:false.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8441
        self switchToMethodNamed:#documentation 
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8442
    ]
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  8443
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8444
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8445
methodCategoryCreateUpdateMethod
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8446
    "create an update:with:from: method
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8447
     (I'm tired of typing)"
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8448
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8449
    self checkClassSelected ifFalse:[^ self].
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8450
    (actualClass includesSelector:#'update:with:from:') ifTrue:[
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8451
        self warn:'class already implements #update:with:from:\\No code generated.' withCRs.    
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8452
        ^ self
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8453
    ].
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8454
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8455
    self withWaitCursorDo:[
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8456
        CodeGeneratorTool createUpdateMethodIn:actualClass.
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8457
        self instanceProtocol:true.
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8458
        self switchToMethodNamed:#'update:with:from:' 
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8459
    ]
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8460
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8461
    "Modified: / 10.2.2000 / 13:47:17 / cg"
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8462
!
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8463
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8464
methodCategoryFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8465
    "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
  8466
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8467
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8468
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8469
    self whenMethodCategorySelected:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8470
        self busyLabel:'saving: %1' with:currentClass name , '-' , currentMethodCategory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8471
        Class fileOutErrorSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8472
            self warn:'cannot create: %1' with:ex parameter.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8473
            self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8474
            ex return.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8475
        ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8476
            actualClass fileOutCategory:currentMethodCategory.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8477
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  8478
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8479
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8480
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8481
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8482
methodCategoryFileOutAll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8483
    "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
  8484
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8485
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8486
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8487
    self whenMethodCategorySelected:[
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8488
        |fileName outStream|
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8489
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8490
        fileName := (currentMethodCategory , '.st') asFilename.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8491
        fileName makeLegalFilename.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8492
        "
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8493
         this test allows a smalltalk to be built without Projects/ChangeSets
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8494
        "
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8495
        Project notNil ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8496
            fileName := Project currentProjectDirectory asFilename construct: fileName name.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8497
        ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8498
        "
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8499
         if file exists, save original in a .sav file
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8500
        "
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8501
        fileName exists ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8502
            fileName copyTo:(fileName withSuffix: 'sav')
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8503
        ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8504
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8505
        fileName := fileName pathName.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8506
        outStream := FileStream newFileNamed:fileName.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8507
        outStream isNil ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8508
            ^ self warn:'cannot create: %1' with:fileName
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8509
        ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8510
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8511
        self busyLabel:'saving: ' with:currentMethodCategory.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8512
        Class fileOutErrorSignal handle:[:ex |
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8513
            self warn:'cannot create: %1' with:ex parameter.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8514
            ex return
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8515
        ] do:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  8516
            environment allClassesDo:[:class |
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8517
                |hasMethodsInThisCategory|
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8518
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8519
                hasMethodsInThisCategory := false.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8520
                class methodDictionary do:[:method |
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8521
                    method category = currentMethodCategory ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8522
                        hasMethodsInThisCategory := true
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8523
                    ]
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8524
                ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8525
                hasMethodsInThisCategory ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8526
                    class fileOutCategory:currentMethodCategory on:outStream.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8527
                    outStream cr
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8528
                ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8529
                hasMethodsInThisCategory := false.
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8530
                class theMetaclass methodDictionary do:[:method |
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8531
                    method category = currentMethodCategory ifTrue:[
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8532
                        hasMethodsInThisCategory := true
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8533
                    ]
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8534
                ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8535
                hasMethodsInThisCategory ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8536
                    class theMetaclass fileOutCategory:currentMethodCategory on:outStream.
2752
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8537
                    outStream cr
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8538
                ]
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8539
            ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8540
        ].
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8541
        outStream close.
d54a1f3d099f allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 2747
diff changeset
  8542
        self normalLabel.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8543
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8544
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8545
    "Modified: / 7.6.1996 / 09:03:56 / stefan"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  8546
    "Modified: / 28.10.1997 / 14:37:32 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  8547
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8548
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8549
methodCategoryMenu
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  8550
    <resource: #keyboard (#Cmdn)>
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8551
    <resource: #programMenu >
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  8552
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  8553
    |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
  8554
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8555
    currentClass isNil ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8556
        methodCategoryListView flash.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8557
        ^ nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8558
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8559
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8560
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8561
    currentClass isLoaded ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8562
        disableFlag := false.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8563
        showInstance ifFalse:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8564
            items := #( 
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8565
                        ( 'Documentation Stubs' methodCategoryCreateDocumentationMethods)
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8566
                     ).
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8567
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8568
            (currentClass isSubclassOf:ApplicationModel) ifTrue:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8569
                (currentClass isSubclassOf:SimpleDialog) ifTrue:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8570
                        items := items , #( 
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8571
                                ( 'Initial Dialog Code' methodCategoryCreateApplicationMethods)
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8572
                             ).
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8573
                ] ifFalse:[
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  8574
"/                ((currentClass class implements:#windowSpec)
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  8575
"/                and:[currentClass class implements:#mainMenu]) ifFalse:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8576
                        items := items , #( 
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8577
                                ( 'Initial Application Code' methodCategoryCreateApplicationMethods)
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8578
                             ).
2057
7a948179f949 more code generation (dialogs);
Claus Gittinger <cg@exept.de>
parents: 2056
diff changeset
  8579
"/                    ]
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8580
                ]
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8581
            ] 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8582
        ] ifTrue:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8583
            (variableListView notNil
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8584
            and:[(varSel := variableListView selectionValue) notNil]) ifTrue:[
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8585
                s1 := 'Access Methods (for ''%1'')'. 
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8586
                s2 := 'Access Methods with Change Notification (for ''%1'')'. 
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8587
            ] ifFalse:[
3739
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  8588
                s1 := 'Access Methods (for All)'. 
fc34ae1005ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3727
diff changeset
  8589
                s2 := 'Access Methods with Change Notification (for All)'. 
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8590
                disableFlag := currentClass instVarNames size == 0
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8591
            ].
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8592
            s1 := resources string:s1 with:varSel.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8593
            s2 := resources string:s2 with:varSel.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8594
            items := Array with:(Array 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8595
                                    with:s1 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8596
                                    with:#methodCategoryCreateAccessMethods)
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8597
                           with:(Array 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8598
                                    with:s2 
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8599
                                    with:#methodCategoryCreateAccessMethodsWithChange).
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8600
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8601
            items := items , #( 
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
  8602
                        ( 'Standard Update Method Template' methodCategoryCreateUpdateMethod)
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8603
                     ).
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8604
        ].
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8605
        codeMenu := PopUpMenu itemList:items resources:resources.
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8606
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8607
        disableFlag ifTrue:[
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8608
            codeMenu disableAll:#(methodCategoryCreateAccessMethods methodCategoryCreateAccessMethodsWithChange).
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8609
        ].
3591
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
  8610
        (actualClass includesSelector:#'update:with:from:') ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8611
            codeMenu disable:#methodCategoryCreateUpdateMethod
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8612
        ]
1237
eb435327405d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1236
diff changeset
  8613
    ].
1230
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  8614
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  8615
    currentMethodCategory notNil ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8616
        items := #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8617
                    ('FileOut'               methodCategoryFileOut        )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8618
                    ('FileOut all'           methodCategoryFileOutAll     )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8619
                    ('PrintOut'              methodCategoryPrintOut       )
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8620
                    ('-'                                                  )
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8621
                    ('SPAWN_METHODCATEGORY'  methodCategorySpawn          )
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  8622
                    ('Spawn Category...'     methodCategorySpawnCategory  )
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8623
                 ).
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8624
    ] ifFalse:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8625
        items := #().
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8626
    ].
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8627
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8628
    items size > 0 ifTrue:[
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8629
    items := items , #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8630
                    ('-'                               )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8631
               ).                                                       
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8632
    ].
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8633
    items := items , #(
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8634
                ('New Category...'        methodCategoryNewCategory     Cmdn )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8635
                ('Copy Category...'       methodCategoryCopyCategory    )
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8636
               ).                                                       
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8637
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8638
    currentMethodCategory notNil ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8639
        items := items , #(
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8640
                    ('-'                               )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8641
                    ('Rename...'  methodCategoryRename )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8642
                    ('Remove...'  methodCategoryRemove )
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8643
                   ).
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8644
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8645
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8646
    codeMenu notNil ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8647
        items := items , #(
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8648
                        ('-'                      )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  8649
                        ('Generate' codeMenu)
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8650
                  ).
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8651
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  8652
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8653
    m := PopUpMenu 
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8654
        itemList:items
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8655
        resources:resources.
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8656
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8657
    currentClass isLoaded ifFalse:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8658
        m disableAll:#(
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8659
                        methodCategoryNewCategory
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8660
                        methodCategoryCopyCategory
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8661
                        methodCategoryCreateAccessMethods
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8662
                        methodCategoryFindMethod
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8663
                      )
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8664
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8665
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8666
    codeMenu notNil ifTrue:[
2597
6acd2c15d213 generator for update method
Claus Gittinger <cg@exept.de>
parents: 2595
diff changeset
  8667
        m subMenuAt:#codeMenu put:codeMenu.
1816
aa257f48aa9e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1815
diff changeset
  8668
    ].
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  8669
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  8670
    self isReadOnlyEnvironment ifTrue:[
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  8671
        m disableAll:#(methodCategoryNewCategory methodCategoryCreateAccessMethods methodCategoryRemove
3115
422c381b86b0 more image browsing fixes
Claus Gittinger <cg@exept.de>
parents: 3114
diff changeset
  8672
                       methodCategoryRename codeMenu methodCategoryCopyCategory
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  8673
                      )
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  8674
    ].
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  8675
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8676
    ^ m
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8677
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  8678
    "Modified: / 10.2.2000 / 13:38:58 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  8679
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8680
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8681
methodCategoryNewCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8682
    "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
  8683
     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
  8684
     useless typing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8685
2643
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8686
    |someCategories existingCategories box superclass|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8687
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8688
    actualClass notNil ifTrue:[
2643
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8689
        someCategories := actualClass allCategories asSet.
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8690
        (superclass := actualClass superclass) notNil ifTrue:[
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8691
            superclass allSubclasses do:[:cls |
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8692
                someCategories addAll:cls categories
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8693
            ]
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8694
        ].
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8695
        someCategories := someCategories asOrderedCollection
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8696
    ] ifFalse:[
2643
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8697
        "
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8698
         mhmh - offer some typical categories ...
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8699
        "
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8700
        showInstance ifTrue:[
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8701
            someCategories := #('accessing' 
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8702
                                'initialization'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8703
                                'private' 
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8704
                                'printing & storing'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8705
                                'queries'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8706
                                'testing'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8707
                               )
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8708
        ] ifFalse:[
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8709
            someCategories := #(
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8710
                                'documentation'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8711
                                'initialization'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8712
                                'instance creation'
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8713
                               ).
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8714
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8715
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8716
    someCategories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8717
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8718
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8719
     remove existing categories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8720
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8721
    existingCategories := methodCategoryListView list.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8722
    existingCategories notNil ifTrue:[
2643
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8723
        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
  8724
    ].
838
9e981e2b8158 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 836
diff changeset
  8725
    someCategories := someCategories asSet asOrderedCollection sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8726
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8727
    box := self listBoxTitle:'Name of new method category:'
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8728
                      okText:'Create'
2643
a9f3eefb0510 care for meta-selected when creating a new category
Claus Gittinger <cg@exept.de>
parents: 2634
diff changeset
  8729
                        list:someCategories.
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8730
    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
  8731
    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
  8732
    box action:[:aString | self newMethodCategory:aString. lastCategory := aString].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  8733
    box open
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8734
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8735
    "Modified: / 12.10.2001 / 19:49:21 / cg"
199
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
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8738
methodCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8739
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8740
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8741
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8742
    self whenMethodCategorySelected:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8743
	printStream := Printer new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8744
	actualClass printOutCategory:currentMethodCategory on:printStream.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8745
	printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8746
    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8747
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8748
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8749
methodCategoryRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8750
    "show number of methods to remove and query user"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8751
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  8752
    |t box sels count answer|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8753
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8754
    currentMethodCategory notNil ifTrue:[
2478
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8755
        sels := OrderedCollection new.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8756
        actualClass methodDictionary keysAndValuesDo:[:selector :aMethod |
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8757
            (aMethod category = currentMethodCategory) ifTrue:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8758
                sels add:selector
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8759
            ]
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8760
        ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8761
        count := sels size.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8762
        (count ~~ 0) ifTrue:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8763
            (count == 1) ifTrue:[
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8764
                t := 'Remove the method in category ''%1'' ?'
2478
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8765
            ] ifFalse:[
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8766
                t := 'Remove all %2 methods in category ''%1'' ?'
2478
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8767
            ].
3444
8985ae6812c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3436
diff changeset
  8768
            t := resources string:t 
8985ae6812c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3436
diff changeset
  8769
                        with:currentMethodCategory allBold
8985ae6812c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3436
diff changeset
  8770
                        with:count printString.
2478
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8771
            t := t withCRs.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8772
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8773
            box := YesNoBox 
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8774
                       title:t
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8775
                       yesText:(resources at:'Remove')
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8776
                       noText:(resources at:'Abort').
2478
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8777
            answer := box confirm.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8778
            box destroy.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8779
            answer ifFalse:[
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8780
                ^ self.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8781
            ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8782
            sels do:[:selector|
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8783
                actualClass removeSelector:selector.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8784
            ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8785
        ].
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8786
        currentMethodCategory := nil.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8787
        self releaseMethod.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8788
        self updateMethodCategoryListWithScroll:false.
b223d2373f80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2471
diff changeset
  8789
        self updateMethodList
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8790
    ]
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8791
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  8792
    "Modified: / 7.6.1996 / 09:13:15 / stefan"
3444
8985ae6812c5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3436
diff changeset
  8793
    "Modified: / 17.11.2001 / 23:12:40 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8794
!
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
methodCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8797
    "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
  8798
2586
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8799
    |box suggestion last|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8800
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8801
    self checkMethodCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8802
2586
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8803
    LastRenames isNil ifTrue:[
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8804
        LastRenames := OrderedCollection new.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8805
    ].
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8806
    last := LastRenames detect:[:ren | ren key = currentMethodCategory] ifNone:nil.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8807
    last notNil ifTrue:[
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8808
        suggestion := last value
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8809
    ] ifFalse:[
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8810
        suggestion := currentMethodCategory
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8811
    ].
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8812
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8813
    box := self 
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8814
                enterBoxTitle:(resources string:'Rename method category ''%1'' to:' 
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  8815
                                           with:currentMethodCategory allBold)
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8816
                okText:'Rename'
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8817
                label:'Rename category'.
2586
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8818
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8819
    box initialText:suggestion.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8820
    box action:[:aString | 
2586
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8821
        aString ~= currentMethodCategory ifTrue:[
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8822
            LastRenames := LastRenames select:[:ren | ren key ~= currentMethodCategory].
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8823
            LastRenames addLast:(currentMethodCategory -> aString).
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8824
            LastRenames size > 20 ifTrue:[LastRenames removeFirst].
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8825
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8826
            actualClass renameCategory:currentMethodCategory to:aString.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8827
            currentMethodCategory := aString.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8828
            self releaseMethod.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8829
            self updateMethodCategoryList.
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8830
            self updateMethodListWithScroll:false
486646cca84c remember last protocol renames;
Claus Gittinger <cg@exept.de>
parents: 2583
diff changeset
  8831
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8832
    ].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  8833
    box open
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8834
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  8835
    "Modified: / 12.10.2001 / 19:47:59 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8836
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8837
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8838
methodCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8839
    "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
  8840
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8841
    currentMethodCategory notNil ifTrue:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8842
        self withWaitCursorDo:[
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  8843
            |brwsr|
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  8844
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  8845
            brwsr := SystemBrowser browseClass:actualClass
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  8846
                                   methodCategory:currentMethodCategory.
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  8847
            brwsr environment:environment
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  8848
        ]
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  8849
    ]
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  8850
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  8851
    "Modified: 18.8.1997 / 15:44:18 / cg"
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  8852
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8853
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8854
methodCategorySpawnCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8855
    "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
  8856
     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
  8857
2568
24854141205c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2565
diff changeset
  8858
    self askAndBrowseMethodCategory:'category to browse methods (matchPattern allowed):'
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  8859
                             action:[:aString | |brwsr|
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  8860
                                        brwsr := SystemBrowser browseMethodCategory:aString.
2568
24854141205c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2565
diff changeset
  8861
                                    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8862
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8863
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8864
!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
  8865
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8866
checkMethodCategorySelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8867
    currentMethodCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8868
	self warn:'select a method category first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8869
	^ false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8870
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8871
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8872
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8873
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8874
copyMethodsFromClass:aClassName
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8875
    |class box list|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8876
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8877
    currentClass notNil ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  8878
        class := environment classNamed:aClassName.
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8879
        class isBehavior ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8880
            self warn:'no class named %1' with:aClassName.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8881
            ^ self
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8882
        ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8883
        class isLoaded ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8884
            (self confirm:(class name , ' is an autoloaded class.\I can only copy categories if it is loaded first.\\Load the class now?') withCRs)
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8885
            ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8886
                class autoload
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8887
            ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8888
        ].        
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8889
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8890
        showInstance ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8891
            class := class theMetaclass             
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8892
        ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8893
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8894
        "show enterbox for category to copy from"
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8895
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8896
        list := class categories asOrderedCollection sort.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8897
        list addFirst:'*'.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8898
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8899
        box := self 
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8900
                enterBoxTitle:'name of category to copy from (matchpattern allowed, * for all):'
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8901
                okText:'copy'
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8902
                label:(resources string:'copy methods from %1' with:aClassName)
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8903
                list:list.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8904
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8905
        box open.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8906
        box accepted ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8907
            self 
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8908
                copyMethodsFromClass:class 
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8909
                category:(box aspectFor:#fieldValue) value
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  8910
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8911
    ]
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  8912
1384
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  8913
    "Modified: / 16.1.1997 / 20:15:51 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  8914
    "Modified: / 19.12.1997 / 12:27:42 / stefan"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  8915
!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8916
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8917
copyMethodsFromClass:class category:category
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8918
    currentClass notNil ifTrue:[
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8919
        AbortOperationRequest catch:[
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8920
            class methodDictionary do:[:aMethod |
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8921
                |source|
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8922
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8923
                (category match:aMethod category) ifTrue:[
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8924
                    source := aMethod source.
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8925
                    codeView contents:source.
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8926
                    codeView modified:false.
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8927
                    codeModified := false.
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8928
                    actualClass compilerClass
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8929
                         compile:source 
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8930
                         forClass:actualClass 
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8931
                         inCategory:aMethod category
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8932
                         notifying:codeView.
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8933
                    self updateMethodCategoryListWithScroll:false.
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8934
                    self updateMethodListWithScroll:false.
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8935
                ]
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8936
            ]
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8937
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8938
    ]
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8939
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  8940
    "Modified: / 7.6.1996 / 09:02:35 / stefan"
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  8941
    "Modified: / 16.11.2001 / 17:37:40 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8942
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8943
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8944
listOfAllMethodCategoriesInClass:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8945
    "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
  8946
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8947
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8948
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8949
    newList := aClass categories.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8950
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8951
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8952
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8953
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8954
    "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
  8955
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8956
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8957
listOfAllMethodCategoriesInFullProtocolHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8958
    "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
  8959
     and all of its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8960
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8961
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8962
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8963
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8964
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8965
    self classesInFullProtocolHierarchy:aClass do:[:c |
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  8966
        newList addAll:(c categories).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8967
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8968
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8969
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8970
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8971
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8972
    "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
  8973
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8974
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8975
methodCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8976
    "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
  8977
1451
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8978
    |cat|
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8979
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8980
    (cat := methodCategoryListView selectionValue) isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8981
	cat := currentMethodCategory
1451
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8982
    ].
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8983
    cat notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  8984
	self switchToMethodCategory:cat string.
1451
ae30a5ae2838 care for methodCategory-update, if selection is nil.
ca
parents: 1448
diff changeset
  8985
    ].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8986
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8987
    "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
  8988
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8989
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8990
methodCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8991
    "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
  8992
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8993
    self withWaitCursorDo:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8994
        self releaseMethod.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8995
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8996
        self updateMethodList.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8997
        aspect ~~ #definition ifTrue:[self updateCodeView].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8998
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  8999
        currentMethodCategory notNil ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  9000
            methodCategoryListView setSelectElement:currentMethodCategory
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  9001
        ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  9002
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  9003
        aspect isNil ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  9004
            self setAcceptAndExplainActionsForMethod.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  9005
        ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9006
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9007
"/ this is now done in
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9008
"/ #updateMethodList
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9009
"/
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9010
"/        (variableListView notNil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9011
"/        and:[variableListView hasSelection]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9012
"/            self hilightMethodsInMethodCategoryList:false inMethodList:true.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9013
"/        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9014
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9015
1562
3785529d7e7d avoid double-redraw;
Claus Gittinger <cg@exept.de>
parents: 1557
diff changeset
  9016
    "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
  9017
    "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
  9018
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9019
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9020
newMethodCategory:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9021
    |categories|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9022
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9023
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9024
	^ 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
  9025
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9026
    categories := methodCategoryListView list.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9027
    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
  9028
    (categories includes:aString) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9029
	categories add:aString.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9030
	categories sort.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9031
	methodCategoryListView contents:categories
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9032
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9033
    currentMethodCategory := aString.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  9034
    aspect := nil.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9035
    self methodCategorySelectionChanged
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  9036
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  9037
    "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
  9038
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9039
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9040
switchToMethodCategory:aCategory
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9041
    |oldSelector|
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9042
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9043
    oldSelector := currentSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9044
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9045
    aspect := nil.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9046
    (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
  9047
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9048
    currentMethodCategory := aCategory.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9049
    self methodCategorySelectionChanged.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9050
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9051
    "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
  9052
    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
  9053
        methodListView setSelection:1.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  9054
        self methodSelection:1
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9055
    ] ifFalse:[
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  9056
        oldSelector notNil ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  9057
            methodListView setSelectElement:oldSelector.
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  9058
            methodListView hasSelection ifTrue:[
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  9059
                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
  9060
            ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  9061
        ]
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  9062
    ].
2593
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  9063
"/    actualClass notNil ifTrue:[
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  9064
"/        self addToClassHistory: actualClass name asString
03c5f9aee4cc fixed history handling
Claus Gittinger <cg@exept.de>
parents: 2592
diff changeset
  9065
"/    ]
2534
cd41c99e3b03 class history: also add an entry, when a class is selected
Claus Gittinger <cg@exept.de>
parents: 2530
diff changeset
  9066
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9067
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9068
    "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
  9069
    "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
  9070
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9071
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9072
updateMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9073
    self updateMethodCategoryListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9074
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9075
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9076
updateMethodCategoryListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9077
    |categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9078
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9079
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9080
	fullProtocol ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9081
	    currentClassHierarchy notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9082
		categories := self listOfAllMethodCategoriesInFullProtocolHierarchy:actualClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9083
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9084
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9085
	    currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9086
		categories := self listOfAllMethodCategoriesInClass:actualClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9087
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9088
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9089
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9090
	methodCategoryListView list = categories ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9091
	    scroll ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9092
		methodCategoryListView contents:categories
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9093
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9094
		methodCategoryListView setContents:categories
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9095
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9096
	    currentMethodCategory notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9097
		methodCategoryListView setSelectElement:currentMethodCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9098
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9099
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9100
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  9101
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9102
    "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
  9103
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9104
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9105
whenMethodCategorySelected:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9106
    self checkMethodCategorySelected ifTrue:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
  9107
        self withWaitCursorDo:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9108
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9109
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9110
    "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
  9111
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9112
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9113
!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
  9114
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9115
commonTraceHelperWith:aSelector
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9116
    "install a break/trace or countPoint for the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  9117
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  9118
    "/ 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
  9119
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  9120
    currentMethod isNil ifTrue:[^ self].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  9121
    currentMethod who isNil ifTrue:[
2859
52d100fdd8e6 methods now send change-notifications when the category changes
Claus Gittinger <cg@exept.de>
parents: 2840
diff changeset
  9122
        self warn:'method is no longer valid'.
52d100fdd8e6 methods now send change-notifications when the category changes
Claus Gittinger <cg@exept.de>
parents: 2840
diff changeset
  9123
        ^ self
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9124
    ].
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9125
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9126
    currentMethod perform:aSelector.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9127
    self refetchMethod.
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9128
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  9129
    Class withoutUpdatingChangesDo:[
2859
52d100fdd8e6 methods now send change-notifications when the category changes
Claus Gittinger <cg@exept.de>
parents: 2840
diff changeset
  9130
        currentClass changed:#methodTrap with:currentSelector.
52d100fdd8e6 methods now send change-notifications when the category changes
Claus Gittinger <cg@exept.de>
parents: 2840
diff changeset
  9131
        Smalltalk changed:#methodTrap with:(Array with:currentClass with:currentSelector).
52d100fdd8e6 methods now send change-notifications when the category changes
Claus Gittinger <cg@exept.de>
parents: 2840
diff changeset
  9132
    ].
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  9133
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9134
    "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
  9135
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9136
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9137
commonTraceHelperWith:aSelector with:argument
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9138
    "install a break/trace or countPoint for the current method"
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9139
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9140
    "/ not for unbound methods (i.e. obsolete)
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9141
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9142
    currentMethod isNil ifTrue:[^ self].
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9143
    currentMethod who isNil ifTrue:[
2859
52d100fdd8e6 methods now send change-notifications when the category changes
Claus Gittinger <cg@exept.de>
parents: 2840
diff changeset
  9144
        self warn:'method is no longer valid'.
52d100fdd8e6 methods now send change-notifications when the category changes
Claus Gittinger <cg@exept.de>
parents: 2840
diff changeset
  9145
        ^ self
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9146
    ].
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9147
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9148
    currentMethod perform:aSelector with:argument.
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9149
    self refetchMethod.
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9150
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  9151
    Class withoutUpdatingChangesDo:[
2859
52d100fdd8e6 methods now send change-notifications when the category changes
Claus Gittinger <cg@exept.de>
parents: 2840
diff changeset
  9152
        currentClass changed:#methodTrap with:currentSelector.
52d100fdd8e6 methods now send change-notifications when the category changes
Claus Gittinger <cg@exept.de>
parents: 2840
diff changeset
  9153
        Smalltalk changed:#methodTrap with:(Array with:currentClass with:currentSelector).
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  9154
    ]
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  9155
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
  9156
    "Modified: / 27.7.1998 / 11:10:57 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9157
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9158
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9159
methodAproposSearch
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9160
    "launch an enterBox for a keyword search"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9161
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9162
    self askForSearchTitle:'Keyword to search for (in selector):' 
2655
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2654
diff changeset
  9163
                  openWith:#aproposSearch:in:
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2654
diff changeset
  9164
                isSelector:true
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2654
diff changeset
  9165
                searchArea:#class
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9166
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9167
    "Modified: / 12.10.2001 / 19:43:18 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9168
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9169
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9170
methodBreakPoint
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9171
    "set a breakpoint on the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9172
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9173
    self commonTraceHelperWith:#setBreakPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9174
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  9175
    "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
  9176
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9177
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9178
methodBreakPointInProcess
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9179
    "set a breakpoint on the current method, which only triggers if
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9180
     executed by some particular process."
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9181
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9182
    |processes processNames box windowGroups|
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9183
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  9184
    windowGroups := WindowGroup allInstances.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9185
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9186
    processes := ProcessorScheduler knownProcesses asOrderedCollection.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9187
    processes := processes select:[:aProcess |
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9188
                        aProcess notNil 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9189
                        and:[aProcess id notNil]
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9190
                 ].
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9191
    processes := processes sort:[:a :b | a id < b id].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9192
    processNames := processes collect:[:aProcess |
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9193
                        |pName theGroup top topLabel winLabel|
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9194
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9195
                        pName := aProcess nameOrId.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9196
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9197
                        "/ if its a windowGroup process,
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9198
                        "/ fetch its first topViews name and add.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9199
                        "/ (allows selecting among multiple browsers ...)
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9200
                        winLabel := ''.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9201
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9202
                        theGroup := windowGroups select:[:g | g process == aProcess].
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9203
                        theGroup size == 1 ifTrue:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9204
                            theGroup := theGroup first.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9205
                            top := theGroup topViews.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9206
                            top size > 0 ifTrue:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9207
                                top := top first.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9208
                                topLabel := top label.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9209
                                (topLabel notNil and:[topLabel ~= pName]) ifTrue:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9210
                                     winLabel := '  "' , topLabel , '")'.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9211
                                ]
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9212
                            ].                        
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9213
                        ].
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9214
                        aProcess id printString , ' [' , pName , ']' , winLabel
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9215
                    ].
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9216
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9217
    "/ let user specify which one ...
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9218
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9219
    box := ListSelectionBox new.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9220
    box noEnterField.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9221
    box list:processNames.
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9222
    box label:(resources string:'Process selection').
1233
c5aac7105c4e more messages improved
Claus Gittinger <cg@exept.de>
parents: 1232
diff changeset
  9223
    box title:(resources 
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9224
                string:'Stop if method is executed by process:\\(current process is %1)'
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9225
                with:(Processor activeProcess id)
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9226
                with:(Processor activeProcess nameOrId)) withCRs.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9227
    box action:[:selection |
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9228
        self commonTraceHelperWith:#breakPointInProcess: 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9229
                              with:(processes at:box selectionIndex)
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9230
    ].
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9231
    box open.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9232
    box destroy
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9233
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  9234
    "Created: / 14.10.1996 / 15:40:53 / cg"
1448
09fa6dee211b Allow nil labels in TopView (when setting Breakpoint for aProcess)
Stefan Vogel <sv@exept.de>
parents: 1446
diff changeset
  9235
    "Modified: / 2.2.1998 / 12:39:38 / stefan"
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9236
    "Modified: / 16.11.2001 / 11:49:23 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9237
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  9238
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9239
methodChangeCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9240
    "move the current method into another category -
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9241
     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
  9242
     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
  9243
3660
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9244
    |box txt newCategory method|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9245
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9246
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9247
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9248
    actualClass isNil ifTrue:[
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  9249
        box := self 
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  9250
                enterBoxTitle:'' 
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9251
                okText:'Change'
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9252
                label:'Change category'.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9253
    ] ifFalse:[
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  9254
        |someCategories|
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  9255
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  9256
        someCategories := actualClass categories asOrderedCollection sort.
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  9257
        box := self 
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  9258
                listBoxTitle:'' 
3424
ba8899bfd3fe lower case first <-> upper case first
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
  9259
                okText:'Change' 
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  9260
                list:someCategories.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9261
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9262
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9263
    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
  9264
    lastMethodCategory isNil ifTrue:[
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  9265
        txt := currentMethod category.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9266
    ] ifFalse:[
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
  9267
        txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9268
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9269
    box initialText:txt.
3660
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9270
    box action:[:aString | newCategory := aString].
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9271
    box label:(resources string:'Change category').
3660
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9272
    box open.
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9273
    box destroy.
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9274
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9275
    newCategory notNil ifTrue:[
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9276
        lastMethodCategory := newCategory.
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9277
        method := currentMethod.
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9278
        newCategory ~= method category ifTrue:[
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9279
            method category:newCategory asSymbol.
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9280
            actualClass addChangeRecordForMethodCategory:method category:newCategory.
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9281
            self updateMethodCategoryListWithScroll:false.
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9282
            self updateMethodListWithScroll:false
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9283
        ]
e7c944b64655 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3659
diff changeset
  9284
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9285
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9286
    "Created: / 29.10.1995 / 19:59:22 / cg"
3424
ba8899bfd3fe lower case first <-> upper case first
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
  9287
    "Modified: / 16.11.2001 / 12:07:47 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9288
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9289
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9290
methodCompareSource
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9291
    "compare with some other methods source"
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9292
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  9293
    |v classAndMethod words className methodName 
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9294
     meta class method|
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9295
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9296
    self checkMethodSelected ifFalse:[^ self].
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9297
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9298
    classAndMethod := Dialog 
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9299
                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
  9300
                initialAnswer:(actualClass name , ' ' , currentSelector).
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9301
    classAndMethod size == 0 ifTrue:[^ self].
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9302
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9303
    words := classAndMethod asCollectionOfWords.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9304
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9305
    className := words at:1 ifAbsent:nil.
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9306
    className isNil ifTrue:[
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9307
        ^ self warn:'No class entered.'.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9308
    ].
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9309
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9310
    meta := false.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9311
    words size > 2 ifTrue:[
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9312
        (words at:2) ~= 'class' ifTrue:[
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9313
            ^ self warn:'Bad input.'.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9314
        ].
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9315
        methodName := words at:3.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9316
        meta := true.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9317
    ] ifFalse:[
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9318
        methodName := words at:2 ifAbsent:nil.
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9319
    ].
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9320
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9321
    methodName isNil ifTrue:[
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9322
        ^ self warn:'No method entered.'.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9323
    ].
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9324
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9325
    className := className asSymbolIfInterned.
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  9326
    (className isNil or:[(class := environment at:className) isBehavior not]) ifTrue:[
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
  9327
        ^ self warn:('No such class: ' , className , '.').
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9328
    ].
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9329
    meta ifTrue:[class := class theMetaclass ].
2432
37d9ba96e309 care for metaclass in 'compare-method-source'
Claus Gittinger <cg@exept.de>
parents: 2431
diff changeset
  9330
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9331
    methodName := methodName asSymbolIfInterned.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9332
    (methodName isNil or:[(method := class compiledMethodAt:methodName) isNil]) ifTrue:[
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9333
        ^ self warn:'No such method.'.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9334
    ].
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9335
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9336
    v := DiffTextView 
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9337
        openOn:codeView contents asString string
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9338
        label:(resources string:'code here')
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9339
        and:method source asString string
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9340
        label:'method compare'.      
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9341
    v label:'comparing with ' , className , ' ' , methodName.
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9342
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  9343
    "Modified: 7.11.1996 / 18:53:55 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  9344
!
2357
d268fe60b02c added method source compare function
Claus Gittinger <cg@exept.de>
parents: 2354
diff changeset
  9345
3579
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9346
methodCompareSourceAgainstCurrent
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9347
    "compare with some other methods source"
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9348
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  9349
    |v class codeHere codeRemote selector|
3579
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9350
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9351
    self checkMethodSelected ifFalse:[^ self].
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9352
    class := currentMethod mclass.
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9353
    selector := currentMethod selector.
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9354
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9355
    codeHere := ((Smalltalk at:(class name asSymbol)) compiledMethodAt:selector) source.
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9356
    codeRemote := currentMethod source.
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9357
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9358
    v := DiffTextView 
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9359
        openOn:codeHere asString string
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9360
        label:(resources string:'method here')
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9361
        and:codeRemote asString string
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9362
        label:'method remote'.      
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9363
    v label:'comparing with local version'.
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9364
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9365
    "Modified: 7.11.1996 / 18:53:55 / cg"
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9366
!
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9367
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9368
methodCompareWithPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9369
    "compare with previous version"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9370
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9371
    |prev this v|
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9372
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9373
    self checkMethodSelected ifFalse:[^ self].
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
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9376
    prev isNil ifTrue:[
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9377
        self warn:'oops - previous version is gone'.
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9378
        ^ self
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9379
    ].
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9380
    prev := prev string.
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9381
    this := codeView contents string.
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9382
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9383
    v := DiffTextView 
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9384
        openOn:this
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9385
        label:(resources string:'code here')
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9386
        and:prev
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9387
        label:(resources string:'previous version').
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9388
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9389
    v topView label:(resources string:'Comparing %1 >> %2' with:currentMethod mclass className with:currentMethod selector).
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9390
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9391
    "Modified: 7.11.1996 / 18:53:55 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9392
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  9393
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9394
methodCopy
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9395
    "copy the current method into another class; typically a brother-sister class"
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9396
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9397
    |newClass newClassName sup initial copiedMethod 
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
  9398
     supers subs list|
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9399
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9400
    self checkMethodSelected ifFalse:[^ self].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9401
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9402
    lastMethodMoveClass ~= currentClass name ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9403
        initial := lastMethodMoveClass.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9404
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9405
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9406
    initial isNil ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9407
        (sup := currentClass superclass) notNil ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9408
            initial := sup name
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9409
        ] ifFalse:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9410
            initial := nil.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9411
        ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9412
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9413
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9414
    supers := (currentClass allSuperclasses reverse collect:[:cls | cls name]).
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9415
    subs := (currentClass allSubclasses collect:[:cls | cls name]).
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9416
    list := supers.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9417
    (supers notEmpty and:[subs notEmpty]) ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9418
        list := list , (Array with:'---- ' , currentClass name , ' ----')
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9419
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9420
    list := list , subs.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9421
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9422
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9423
"/ preps to use windowSpecs ...
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9424
"/
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9425
"/    holders := IdentityDictionary new.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9426
"/    holders at:#className put:initial asValue.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9427
"/    holders at:#classList put:list.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9428
"/
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9429
"/    (SystemBrowser 
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9430
"/      openDialogInterface:#methodMoveDialogSpec
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9431
"/      withBindings:holders) ifFalse:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9432
"/        ^ self
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9433
"/    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9434
"/    newClassName := (holders at:#className) value.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9435
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9436
    newClassName := Dialog 
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9437
                    request:(resources string:'Copy this method to which class:')
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9438
                    initialAnswer:initial
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9439
                    okLabel:(resources string:'Copy')
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9440
                    title:(resources string:'Copy method')
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9441
                    onCancel:nil
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9442
                    list:list.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9443
    newClassName isNil ifTrue:[^ self].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9444
    (newClassName startsWith:'---- ') ifTrue:[^ self].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9445
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
  9446
    newClass := environment classNamed:newClassName.
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9447
    newClass isNil ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9448
        self warn:'no such class'.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9449
        ^ self
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9450
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9451
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9452
    showInstance ifFalse:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9453
        newClass isMeta ifFalse:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
  9454
            newClass := newClass theMetaclass
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9455
        ]
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9456
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9457
3591
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
  9458
    (newClass includesSelector:currentSelector) ifTrue:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9459
        (self confirm:(newClass name allBold , ' already implements ' , currentSelector
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9460
                      , '\\Redefine anyway ?' withCRs)) ifFalse:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9461
            ^ self
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9462
        ]
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9463
    ].
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9464
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9465
    lastMethodMoveClass := newClassName.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9466
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9467
    copiedMethod := newClass 
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9468
                        compile:(currentMethod source) 
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9469
                        classified:currentMethodCategory.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9470
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9471
    (copiedMethod isNil or:[copiedMethod == #Error]) ifTrue:[
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9472
        self warn:'not copied - compilation failed due to an error'.
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9473
        ^ self
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  9474
    ].
3422
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9475
c282b5a3768c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3416
diff changeset
  9476
    "Modified: / 16.11.2001 / 10:10:27 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  9477
!
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9478
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9479
methodDecompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9480
    "decompile the current methods bytecodes.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9481
     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
  9482
     avaliable with the system."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9483
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9484
    |s|
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9485
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9486
    self checkMethodSelected ifFalse:[^ self].
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9487
    self checkSelectionChangeAllowed ifFalse:[^ self].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9488
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9489
    s := '' writeStream.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9490
    (currentMethod decompileTo:s) ifFalse:[
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  9491
        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
  9492
    ].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9493
    codeView contents:s contents.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9494
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
  9495
    codeModified := false.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  9496
    self clearAcceptAction.
2026
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
  9497
    self clearExplainAction.
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  9498
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
  9499
    "Modified: / 10.2.2000 / 14:14:40 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9500
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9501
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9502
methodFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9503
    "file out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9504
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9505
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9506
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9507
    self busyLabel:'saving:' with:currentSelector.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9508
    Class fileOutErrorSignal handle:[:ex |
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  9509
        self warn:'cannot create: %1' with:ex parameter.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  9510
        self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  9511
        ex return
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9512
    ] do:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  9513
        actualClass fileOutMethod:currentMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9514
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9515
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9516
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9517
1990
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9518
methodFindAnyMethod
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9519
    |box|
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9520
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9521
    box := self enterBoxForSearchSelectorTitle:'Method selector to search for:'.
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9522
    box label:(resources string:'Find method').
1990
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9523
    box action:[:aString | self switchToAnyMethodNamed:aString].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9524
    box open
1990
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9525
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9526
    "Created: / 2.2.1999 / 14:40:04 / cg"
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9527
    "Modified: / 12.10.2001 / 19:44:35 / cg"
1990
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9528
!
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9529
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9530
methodFindMethod
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9531
    |box|
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9532
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9533
    box := self enterBoxForSearchSelectorTitle:'Method selector to search for:'.
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9534
    box label:(resources string:'Find method').
1990
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9535
    box action:[:aString | self switchToMethodNamed:aString].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
  9536
    box open
1990
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9537
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9538
    "Created: / 2.2.1999 / 14:40:00 / cg"
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9539
    "Modified: / 12.10.2001 / 19:43:38 / cg"
1990
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9540
!
4abedd241ed8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1986
diff changeset
  9541
1957
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9542
methodFlushCode
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9543
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9544
    self checkMethodSelected ifFalse:[^ self].
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9545
    self checkSelectionChangeAllowed ifFalse:[^ self].
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9546
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9547
    currentMethod checked:false.
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9548
    currentMethod code:nil.
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9549
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9550
    "Created: / 10.11.1998 / 18:30:14 / cg"
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9551
!
a57c8c39ce2c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1949
diff changeset
  9552
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9553
methodFormatMethod:oldText
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9554
    "prettyPrint the method (but do not accept it);
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9555
     uses the RefactoryBrowsers formatter"
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9556
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9557
    |tree newText|
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9558
2833
5bceae325a3e BRxxx -> RBxxx rename
Claus Gittinger <cg@exept.de>
parents: 2829
diff changeset
  9559
    tree := RBParser 
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9560
                    parseMethod:oldText
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9561
                    onError: [:aString :position | ^ self "ignore any error"].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9562
    tree isNil ifTrue:[^ self].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9563
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9564
    newText := tree printString.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9565
    codeView contents:newText.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9566
    codeView modified:true.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9567
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  9568
    "Modified: / 22.11.1999 / 11:53:55 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
  9569
!
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
  9570
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9571
methodGlobalReferends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9572
    "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
  9573
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9574
    self askForSearchTitle:'Global variable to search users of:' 
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9575
                  openWith:#browseReferendsOf:in:
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9576
                isSelector:false
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9577
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9578
"/    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
  9579
"/                         action:[:aString | 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9580
"/                                    SystemBrowser browseReferendsOf:aString asSymbol
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9581
"/                                ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9582
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9583
    "Modified: / 12.10.2001 / 19:42:49 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9584
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9585
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9586
methodImplementors
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9587
    "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
  9588
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9589
    self 
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9590
        askForSearchTitle:'Selector to browse implementors of:' 
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9591
        openWith:#browseImplementorsOf:in:ignoreCase:
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9592
        isSelector:true
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9593
        searchArea:#everywhere
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9594
        withCaseIgnore:true
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
  9595
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
  9596
    "Modified: / 12.10.2001 / 19:41:41 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9597
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9598
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9599
methodInheritance
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9600
    "launch a browser showing inherited (and overwritten) methods"
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9601
2103
ab4e04bde5ec more info in inheritance-menu item.
Claus Gittinger <cg@exept.de>
parents: 2086
diff changeset
  9602
    |methodList nRedef msg whereRedef|
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9603
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9604
    currentClass isNil ifTrue:[^ self].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9605
    currentSelector isNil ifTrue:[^ self].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9606
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9607
    methodList := OrderedCollection new.
2103
ab4e04bde5ec more info in inheritance-menu item.
Claus Gittinger <cg@exept.de>
parents: 2086
diff changeset
  9608
    actualClass allSuperclasses do:[:aSuperClass |
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9609
        |m|
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9610
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9611
        m := aSuperClass compiledMethodAt:currentSelector.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9612
        m notNil ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9613
            methodList addFirst:m
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9614
        ]
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9615
    ].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9616
    methodList size == 0 ifTrue:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9617
        nRedef := 0.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9618
        actualClass allSubclassesDo:[:aSubClass |
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9619
            (aSubClass compiledMethodAt:currentSelector) notNil ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9620
                nRedef := nRedef + 1.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9621
                whereRedef := aSubClass name.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9622
            ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9623
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9624
        msg := '''%1'' does not redefine any inherited method.'.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9625
        nRedef ~~ 0 ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9626
            nRedef == 1 ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9627
                msg := msg , '\But is redefined in %3.'
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9628
            ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9629
                msg := msg , '\But is redefined in %2 subclasses.'
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9630
            ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9631
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9632
        ^ self information:(resources
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9633
                                string:msg
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9634
                                with:currentSelector allBold
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9635
                                with:nRedef
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9636
                                with:whereRedef) withCRs.
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9637
    ].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9638
    methodList addLast:(actualClass compiledMethodAt:currentSelector).
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9639
    SystemBrowser 
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9640
        browseMethods:methodList 
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9641
        title:(resources string:'''%1'' inheritance & redefinition' with:currentSelector)
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
  9642
        sort:false
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9643
!
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
  9644
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9645
methodInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9646
    "inspect  the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9647
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9648
    self checkMethodSelected ifFalse:[^ self].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9649
    currentMethod inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9650
"/    (actualClass compiledMethodAt:currentSelector) inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9651
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9652
    "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
  9653
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9654
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9655
methodInvoke
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9656
    "invoke the current method"
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9657
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9658
    |w cls sel rec|
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9659
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9660
    self checkMethodSelected ifFalse:[^ self].
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9661
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9662
    w := currentMethod who.
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9663
    w notNil ifTrue:[
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9664
        cls := w methodClass.
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9665
        cls notNil ifTrue:[
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9666
            cls ~~ actualClass ifTrue:[
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9667
                ^ self warn:'oops - obsolete class; please reselect the class.'
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9668
            ].
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9669
            cls isMeta ifFalse:[
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9670
                (self confirm:'Instance method - Invoke on a new instance ?')
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9671
                ifFalse:[
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9672
                    ^ self
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9673
                ].
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9674
                rec := cls basicNew.
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9675
            ] ifTrue:[
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9676
                rec := cls
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9677
            ].
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9678
            sel := w methodSelector.
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9679
            sel notNil ifTrue:[
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9680
                rec perform:sel.
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9681
                ^ self
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9682
            ]
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9683
        ].
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9684
    ]. 
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9685
    self warn:'Cannot invoke method (no class)'
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9686
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9687
    "Modified: / 29.4.1997 / 11:24:30 / dq"
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
  9688
    "Modified: / 5.11.2001 / 16:33:11 / cg"
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9689
!
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  9690
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9691
methodLocalSuperSends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9692
    "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
  9693
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9694
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9695
    self withSearchCursorDo:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
  9696
	SystemBrowser browseSuperCallsUnder:currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9697
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9698
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9699
    "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
  9700
    "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
  9701
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9702
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
  9703
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
  9704
    "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
  9705
     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
  9706
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
  9707
    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
  9708
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
  9709
    "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
  9710
!
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
  9711
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9712
methodMakePrivate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9713
    "make the current method private.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9714
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9715
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9716
    self methodPrivacy:#private 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9717
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9718
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9719
methodMakeProtected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9720
    "make the current method protected.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9721
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9722
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9723
    self methodPrivacy:#protected 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9724
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9725
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9726
methodMakePublic
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9727
    "make the current method public.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9728
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9729
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9730
    self methodPrivacy:#public 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9731
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9732
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9733
methodMenu
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9734
    "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
  9735
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
  9736
    <resource: #programMenu >
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9737
    <resource: #keyboard ( #Cmds #Cmdi #Cmdg #Cmdt #Cmda #Ctrl) >
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  9738
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9739
    |specialMenu m items
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9740
     newItems brkItems fileItems mthdItems
3579
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9741
     searchItems sepLocalItems sepMthdItems|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9742
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9743
    currentMethod notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9744
        currentMethod isCountingMemoryUsage ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9745
            brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9746
                                ('-'               nil)
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9747
                                ('Stop Mem Usage'  methodStopMemoryUsage)
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9748
                                ('Reset Mem Count' methodResetMemoryUsage)
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9749
                          ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9750
        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9751
            currentMethod isCounting ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9752
                brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9753
                                    ('-'              nil               )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9754
                                    ('Stop Counting'  methodStopCounting)
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9755
                                    ('Reset Count'    methodResetCounting)
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9756
                              ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9757
            ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9758
                currentMethod isTimed ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9759
                    brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9760
                                        ('-'           nil             )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9761
                                        ('Stop Timing' methodStopTiming)
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9762
                                        ('Reset Times' methodResetTiming)
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9763
                                  ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9764
                ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9765
                    currentMethod isTraced ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9766
                        brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9767
                                            ('-'            nil                     )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9768
                                            ('Remove Trace' methodRemoveBreakOrTrace)
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9769
                                      ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9770
                    ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9771
                        currentMethod isBreakpointed ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9772
                            brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9773
                                                ('-'                 nil                     )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9774
                                                ('Remove Breakpoint' methodRemoveBreakOrTrace)
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9775
                                          ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9776
                        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9777
                            brkItems := #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9778
                                                ('-'                   nil                       )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9779
                                                ('Breakpoint'          methodBreakPoint          )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9780
                                                ('Breakpoint In...'    methodBreakPointInProcess )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9781
                                                ('-'                   nil                       )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9782
                                                ('Trace'               methodTrace               )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9783
                                                ('Trace Sender'        methodTraceSender         )
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9784
                                                ('Trace Full Walkback' methodTraceFull           )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9785
                                                ('-'                   nil                       )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9786
                                                ('Start Timing'        methodStartTiming         )
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9787
                                                ('Start Counting'      methodStartCounting       )
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9788
                                                ('Start Mem Usage'     methodStartMemoryUsage    )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9789
                                          ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9790
                        ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9791
                    ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9792
                ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9793
            ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9794
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9795
3579
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9796
        self isSimulatedEnvironment ifTrue:[
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9797
            brkItems := #().
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9798
            items := #(
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9799
                            ('Compare against...'        methodCompareSource  )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9800
                            ('Compare against Current'   methodCompareSourceAgainstCurrent  )
3579
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9801
                            ('Inspect Method'            methodInspect        )
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9802
                      ).
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9803
        ] ifFalse:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9804
            items := #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9805
                            ('Compare against...'        methodCompareSource  )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9806
                            ('Inspect Method'            methodInspect        )
3579
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9807
                      ).
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9808
        ].
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9809
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9810
        currentMethod isJavaMethod ifTrue:[
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9811
            items := items , #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9812
                            ('Decompile'                 methodDecompile      )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9813
                            ('-'                         nil                  )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9814
                            ('Flush Code'                methodFlushCode      )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9815
                       ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9816
        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9817
3579
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9818
            items := items , #(
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9819
                            ('stc-Compile'               methodSTCCompile     )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9820
                            ('Decompile'                 methodDecompile      )
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9821
                            ('-'                         nil                  )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9822
                            ('Package...'                methodModifyPackage  )
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9823
                       ).
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9824
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9825
            Method methodPrivacySupported ifTrue:[
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
  9826
                items := items , #(
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9827
                                ('-'                         nil                  )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9828
                                ('Make Public'               methodMakePublic     )
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9829
                                ('Make Private'              methodMakePrivate    )
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9830
                                ('Make Protected'            methodMakeProtected  )
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9831
                                ('Make Ignored'              methodMakeIgnored    )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9832
                           ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9833
            ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9834
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9835
            actualClass isMeta ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9836
                items := #(
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9837
                              ('Invoke Method' methodInvoke )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9838
                              ('-'             nil          )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9839
                          )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9840
                          , items.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9841
            ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9842
3579
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9843
        ].
363b8d49d0cf remote stuff
Claus Gittinger <cg@exept.de>
parents: 3578
diff changeset
  9844
        items := items , brkItems.
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9845
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9846
        specialMenu := PopUpMenu itemList:items resources:resources.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9847
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9848
        currentClass owningClass notNil ifTrue:[
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9849
            specialMenu disable:#methodModifyPackage
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9850
        ].
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
  9851
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9852
        currentMethod isPublic ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9853
            specialMenu disable:#methodMakePublic
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9854
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9855
        currentMethod isPrivate ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9856
            specialMenu disable:#methodMakePrivate
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9857
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9858
        currentMethod isProtected ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9859
            specialMenu disable:#methodMakeProtected
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9860
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9861
        currentMethod isIgnored ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9862
            specialMenu disable:#methodMakeIgnored
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9863
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9864
        ((currentMethod hasCode and:[currentMethod isDynamic not])
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9865
        or:[currentMethod isJavaMethod
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9866
        or:[Compiler canCreateMachineCode not]]) ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9867
            specialMenu disable:#methodSTCCompile
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9868
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9869
        currentMethod byteCode isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9870
            currentMethod isLazyMethod ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9871
                specialMenu disable:#methodDecompile
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9872
            ]
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9873
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9874
        currentMethod numArgs ~~ 0 ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9875
            specialMenu disable:#methodInvoke
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9876
        ].
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  9877
        self environment ~~ Smalltalk ifTrue:[
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  9878
            specialMenu disableAll:#(methodSTCCompile methodModifyPackage 
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  9879
                                     methodMakePublic methodMakePrivate methodMakeProtected methodMakeIgnored 
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  9880
                                     methodBreakPoint methodBreakPointInProcess methodTrace methodTraceSender   
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  9881
                                     methodTraceFull methodStartTiming methodStartCounting methodStartMemoryUsage
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  9882
                                    )
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  9883
        ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9884
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9885
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9886
    device ctrlDown ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9887
        currentMethod isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9888
            methodListView flash.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9889
            ^ nil
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9890
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9891
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9892
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9893
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9894
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9895
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9896
    sepLocalItems  := #().
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9897
    sepMthdItems  := #().
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9898
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9899
    searchItems := #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9900
                ('Senders...'           methodSenders                 Cmds)
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9901
                ('Implementors...'      methodImplementors            Cmdi)
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9902
                ('Globals...'           methodGlobalReferends         Cmdg)
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9903
                ('String Search...'     methodStringSearch            Cmdt)
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9904
                ('Apropos...'           methodAproposSearch           )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9905
                ('-'                                                  )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9906
                ('Find Method here...'  methodFindMethod              )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9907
                ('Find Method...'       methodFindAnyMethod           )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9908
               ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9909
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9910
    currentMethodCategory notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9911
        sepLocalItems := #(('-')).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9912
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9913
        (currentClass notNil 
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9914
        and:[showInstance not
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9915
        and:[currentClass isSubclassOf:ApplicationModel]]) ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9916
            newItems :=           #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9917
                                    ('New Method'       methodNewMethod     )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9918
                                    ('New Window Spec'  methodNewWindowSpec )
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9919
                                    ('New Menu Spec'    methodNewMenuSpec   )
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9920
                                    ('New Image Spec'   methodNewImageSpec   )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9921
                                    ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9922
        ] ifFalse:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9923
            newItems :=           #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9924
                                    ('New Method'       methodNewMethod)
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9925
                                    ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9926
        ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9927
        sepMthdItems := #(('-')).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9928
    ] ifFalse:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9929
        newItems := #()
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9930
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9931
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9932
    currentMethod notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9933
        fileItems :=           #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9934
                                ('FileOut'       methodFileOut  )
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9935
                                ('PrintOut'      methodPrintOut )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9936
                                ('-'             nil            )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9937
                                ('SPAWN_METHOD'  methodSpawn    )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9938
                                ('Inheritance'   methodInheritance )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9939
                                ('-'             nil            )
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9940
                                ).
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9941
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9942
        sepLocalItems := #(('-')). 
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9943
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9944
        mthdItems :=           #(
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9945
                                ('Change Category...'      methodChangeCategory )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9946
                                ('Copy To...'              methodCopy           )
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9947
                                ('Move To...'              methodMove           )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9948
                                ('Remove'                  methodRemove         )
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  9949
                                ('-'                       nil                              )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9950
                                ('Compare with Previous'   methodCompareWithPreviousVersion )
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9951
                                ('Back to Previous'        methodPreviousVersion            )
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9952
                                ).
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9953
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9954
    ] ifFalse:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9955
        fileItems := #().
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9956
        mthdItems := #().
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9957
        sepMthdItems := #().
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9958
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9959
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9960
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9961
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9962
    items :=
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9963
                fileItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9964
                searchItems ,
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9965
"/                localSearchItems ,
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9966
                sepLocalItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9967
                newItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9968
                sepMthdItems ,
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9969
                mthdItems.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9970
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9971
    specialMenu notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9972
        items := items , #(
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9973
                        ('='                      )
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
  9974
                        ('Others'  otherMenu  Ctrl)
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9975
                  ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9976
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9977
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
  9978
    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
  9979
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9980
    specialMenu notNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9981
        m subMenuAt:#otherMenu put:specialMenu.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9982
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  9983
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9984
    currentMethod notNil ifTrue:[
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
  9985
        self currentMethodsPreviousVersionCode isNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9986
            m disable:#methodPreviousVersion.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9987
            m disable:#methodCompareWithPreviousVersion
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  9988
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9989
    ].
3653
1c3806e357a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  9990
    self isReadOnlyEnvironment ifTrue:[
1c3806e357a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  9991
        m disableAll:#(
1c3806e357a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  9992
                       methodNewMethod methodChangeCategory 
1c3806e357a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  9993
                       methodMove methodCopy methodRemove 
1c3806e357a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  9994
                      )
1c3806e357a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  9995
    ].
1c3806e357a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  9996
    self isSimulatedEnvironment ifTrue:[
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  9997
        m disableAll:#(methodSenders methodImplementors methodGlobalReferends methodStringSearch
3653
1c3806e357a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3650
diff changeset
  9998
                       methodAproposSearch
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
  9999
                      )
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
 10000
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10001
    ^ m
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10002
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10003
    "Created: / 23.11.1995 / 12:02:29 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10004
    "Modified: / 18.12.1995 / 16:20:07 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10005
    "Modified: / 29.4.1997 / 11:20:59 / dq"
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 10006
    "Modified: / 30.4.1999 / 09:15:32 / cg"
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 10007
!
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10008
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10009
methodModifyPackage
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10010
    "change the methods package assignment"
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10011
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10012
    |newPackage|
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10013
2406
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
 10014
    currentClass owningClass notNil ifTrue:[
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
 10015
        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
 10016
        ^ self
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
 10017
    ].
6024a857c66a cannot change a private class/methods package
Claus Gittinger <cg@exept.de>
parents: 2403
diff changeset
 10018
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10019
    newPackage := Dialog 
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10020
                    request:(resources 
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10021
                                string:'Change the package-ID of ''%1'' to:' 
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 10022
                                with:currentSelector allBold) withCRs
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10023
                    initialAnswer:currentClass package.
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10024
    newPackage size == 0 ifTrue:[
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10025
        ^ self
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10026
    ].
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10027
2337
145b708186bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2336
diff changeset
 10028
    currentMethod package:newPackage.
2336
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10029
!
da844d0c3a73 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
 10030
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10031
methodMove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10032
    "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
 10033
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10034
    |newClass newClassName sup initial movedMethod 
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 10035
     supers subs list|
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10036
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10037
    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
 10038
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10039
    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
 10040
        initial := lastMethodMoveClass.
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10041
    ].
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10042
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10043
    initial isNil ifTrue:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10044
        (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
 10045
            initial := sup name
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10046
        ] ifFalse:[
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10047
            initial := nil.
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10048
        ].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
 10049
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
 10050
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10051
    supers := (currentClass allSuperclasses reverse collect:[:cls | cls name]).
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10052
    subs := (currentClass allSubclasses collect:[:cls | cls name]).
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10053
    list := supers.
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10054
    (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
 10055
        list := list , (Array with:'---- ' , currentClass name , ' ----')
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10056
    ].
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10057
    list := list , subs.
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10058
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10059
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10060
"/ preps to use windowSpecs ...
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10061
"/
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10062
"/    holders := IdentityDictionary new.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10063
"/    holders at:#className put:initial asValue.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10064
"/    holders at:#classList put:list.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10065
"/
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10066
"/    (SystemBrowser 
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10067
"/      openDialogInterface:#methodMoveDialogSpec
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10068
"/      withBindings:holders) ifFalse:[
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10069
"/        ^ self
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10070
"/    ].
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10071
"/    newClassName := (holders at:#className) value.
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
 10072
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10073
    newClassName := Dialog 
3424
ba8899bfd3fe lower case first <-> upper case first
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
 10074
                    request:(resources string:'Move this method to which class:')
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10075
                    initialAnswer:initial
3424
ba8899bfd3fe lower case first <-> upper case first
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
 10076
                    okLabel:(resources string:'Move')
ba8899bfd3fe lower case first <-> upper case first
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
 10077
                    title:(resources string:'Move method')
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10078
                    onCancel:nil
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10079
                    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
 10080
    newClassName isNil ifTrue:[^ self].
1918
9beb5abaa3a5 better methodMove
Claus Gittinger <cg@exept.de>
parents: 1913
diff changeset
 10081
    (newClassName startsWith:'---- ') ifTrue:[^ self].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
 10082
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 10083
    newClass := environment classNamed:newClassName.
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10084
    newClass isNil ifTrue:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10085
        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
 10086
        ^ self
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10087
    ].
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10088
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10089
    showInstance ifFalse:[
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10090
        newClass isMeta ifFalse:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10091
            newClass := newClass theMetaclass
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10092
        ]
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10093
    ].
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10094
3591
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
 10095
    (newClass includesSelector:currentSelector) ifTrue:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 10096
        (self confirm:(newClass name allBold , ' already implements ' , currentSelector
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10097
                      , '\\Move anyway ?' withCRs)) ifFalse:[
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10098
            ^ self
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10099
        ]
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10100
    ].
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10101
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10102
    lastMethodMoveClass := newClassName.
978
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
 10103
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
 10104
    movedMethod := newClass 
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10105
                        compile:(currentMethod source) 
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10106
                        classified:currentMethodCategory.
978
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
 10107
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
 10108
    (movedMethod isNil or:[movedMethod == #Error]) ifTrue:[
2674
9dbc51022bd7 add method-copy
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
 10109
        self warn:'not moved - compilation failed due to an error'.
2242
85e90c00306b when moving methods, check if the target class already implements
Claus Gittinger <cg@exept.de>
parents: 2241
diff changeset
 10110
        ^ self
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10111
    ].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10112
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10113
    self methodRemove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
 10114
3424
ba8899bfd3fe lower case first <-> upper case first
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
 10115
    "Created: / 13.12.1995 / 10:56:42 / cg"
ba8899bfd3fe lower case first <-> upper case first
Claus Gittinger <cg@exept.de>
parents: 3422
diff changeset
 10116
    "Modified: / 16.11.2001 / 12:10:00 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 10117
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10118
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10119
methodNewImageSpec
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10120
    "open a BitmapEditor"
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10121
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10122
    |specSel|
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10123
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10124
    currentClass isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10125
        ^ self warn:'select/create a class first'.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10126
    ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10127
    currentMethodCategory isNil ifTrue:[
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10128
        ^ self warn:'select/create a method category first'.
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10129
    ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10130
3591
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
 10131
    (actualClass includesSelector:#someImageSpec) ifFalse:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10132
        specSel := #someImageSpec
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10133
    ].
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10134
    ImageEditor openOnClass:currentClass andSelector:specSel
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10135
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10136
    "Created: / 28.10.1997 / 12:42:00 / cg"
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10137
!
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10138
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10139
methodNewMenuSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10140
    "open a MenuEditor"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10141
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10142
    |specSel|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10143
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10144
    currentClass isNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10145
        ^ self warn:'select/create a class first'.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10146
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10147
    currentMethodCategory isNil ifTrue:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10148
        ^ 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
 10149
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10150
3591
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
 10151
    (actualClass includesSelector:#menuSpec) ifFalse:[
2261
aad58c8f7c5a added 'new-image' menu item
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
 10152
        specSel := #menuSpec
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10153
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10154
    MenuEditor openOnClass:currentClass andSelector:specSel
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10155
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10156
    "Created: / 28.10.1997 / 12:42:00 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10157
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10158
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10159
methodNewMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10160
    "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
 10161
     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
 10162
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10163
    currentClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10164
	^ 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
 10165
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10166
    currentMethodCategory isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10167
	^ 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
 10168
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10169
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10170
    self releaseMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10171
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
 10172
    methodListView setSelection:nil.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10173
    codeView contents:(self methodTemplate).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10174
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 10175
    codeModified := false.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10176
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10177
    self setAcceptAndExplainActionsForMethod.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10178
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10179
    "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
 10180
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10181
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10182
methodNewWindowSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10183
    "open GUI Painter"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10184
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10185
    |specSel|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10186
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10187
    currentClass isNil ifTrue:[
3591
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
 10188
        ^ self warn:'select/create a class first'.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10189
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10190
    currentMethodCategory isNil ifTrue:[
3591
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
 10191
        ^ self warn:'select/create a method category first'.
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
 10192
    ].
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
 10193
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
 10194
    (actualClass includesSelector:#windowSpec) ifFalse:[
754970803c0f #implements: -> #includesSelector:
Claus Gittinger <cg@exept.de>
parents: 3582
diff changeset
 10195
        specSel := #windowSpec
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10196
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10197
    UIPainter openOnClass:currentClass andSelector:specSel
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10198
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10199
    "Modified: / 28.10.1997 / 12:40:35 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10200
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10201
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10202
methodPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10203
    "switch back to the previous version
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10204
     (undo last change)"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10205
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10206
    |cls sel prev|
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10207
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10208
    self checkMethodSelected ifFalse:[^ self].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10209
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10210
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10211
    prev isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10212
	self warn:'oops - previous version is gone'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10213
	^ self
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10214
    ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10215
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10216
    cls := currentMethod containingClass.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10217
    cls notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10218
	sel := actualClass selectorAtMethod:currentMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10219
	sel isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10220
	    self warn:'oops - cannot find methods selector (gone)'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10221
	] ifFalse:[        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10222
	    cls basicAddSelector:sel withMethod:prev.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10223
	    currentMethod := prev.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10224
	    self updateCodeView
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10225
	].
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10226
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10227
	self warn:'oops - cannot find containing class'
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10228
    ]
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10229
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10230
    "Modified: 7.11.1996 / 18:51:09 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10231
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
 10232
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10233
methodPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10234
    "print out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10235
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10236
    |printStream|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10237
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10238
    self checkMethodSelected ifFalse:[^ self].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10239
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10240
    printStream := Printer new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10241
    actualClass printOutSource:(currentMethod source) on:printStream.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10242
    printStream close
1426
aa8bda9a1964 oops - handle the case that no source is available when checking
Claus Gittinger <cg@exept.de>
parents: 1419
diff changeset
 10243
aa8bda9a1964 oops - handle the case that no source is available when checking
Claus Gittinger <cg@exept.de>
parents: 1419
diff changeset
 10244
    "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
 10245
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10246
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10247
methodPrivacy:how
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10248
    "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
 10249
     EXPERIMENTAL"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10250
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
 10251
    |cls|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
 10252
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10253
    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
 10254
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
 10255
    (how == currentMethod privacy) ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10256
	currentMethod privacy:how.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10257
	cls := currentMethod containingClass.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10258
	cls notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10259
	    cls addChangeRecordForMethodPrivacy:currentMethod.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10260
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10261
	    self warn:'cannot write change record (no class)'
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10262
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10263
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10264
	Class withoutUpdatingChangesDo:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10265
	    currentClass changed:#methodPrivacy with:currentSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10266
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10267
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10268
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
 10269
    "Created: / 29.10.1995 / 20:00:00 / cg"
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
 10270
    "Modified: / 8.1.1997 / 22:37:02 / cg"
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
 10271
    "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
 10272
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10273
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10274
methodRemove
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10275
    "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
 10276
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10277
    |cls sel|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
 10278
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10279
    self checkMethodSelected ifFalse:[^ self].
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
 10280
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10281
    sel := currentMethod selector.
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10282
    sel notNil ifTrue:[
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10283
        cls := currentMethod mclass.
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10284
        cls notNil ifTrue:[
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10285
            cls ~~ actualClass ifTrue:[
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10286
                ^ self warn:'oops - obsolete class; please reselect class ...'
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10287
            ].
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10288
            sel notNil ifTrue:[
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10289
                actualClass removeSelector:sel.
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10290
                self releaseMethod.
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10291
                self updateMethodListWithScroll:false.
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10292
                ^ self
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10293
            ]
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10294
        ].
1054
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
 10295
    ]. 
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10296
    self warn:'cannot remove unbound method (no class)'
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10297
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10298
    "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
 10299
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10300
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10301
methodRemoveBreakOrTrace
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10302
    "turn off tracing of the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10303
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10304
    self commonTraceHelperWith:#clearBreakPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10305
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10306
    "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
 10307
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10308
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10309
methodRemoveConfirmed
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10310
    "confirm and remove the current method"
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10311
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10312
    |sel|
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10313
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10314
    self checkMethodSelected ifFalse:[^ self].
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10315
    sel := currentMethod selector.
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10316
    sel notNil ifTrue:[
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10317
        (self confirm:'Remove ' , sel allBold , ' ?') ifTrue:[
2378
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10318
            self methodRemove
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10319
        ]
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10320
    ]. 
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10321
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10322
    "Modified: / 27.7.1998 / 11:00:35 / cg"
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10323
!
e210e628bbc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2373
diff changeset
 10324
1768
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10325
methodResetCounting
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10326
    "reset the counting statstics for the current method"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10327
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10328
    self commonTraceHelperWith:#resetCountingStatistics
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10329
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10330
    "Modified: / 30.7.1998 / 17:16:26 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10331
    "Created: / 30.7.1998 / 17:39:08 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10332
!
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10333
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10334
methodResetMemoryUsage
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10335
    "reset the memory statstics for the current method"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10336
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10337
    self commonTraceHelperWith:#resetMemoryUsageStatistics
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10338
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10339
    "Modified: / 30.7.1998 / 17:16:26 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10340
    "Created: / 30.7.1998 / 17:39:20 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10341
!
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10342
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10343
methodResetTiming
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10344
    "reset the timing statstics for the current method"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10345
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10346
    self commonTraceHelperWith:#resetTimingStatistics
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10347
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10348
    "Created: / 30.7.1998 / 17:14:41 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10349
    "Modified: / 30.7.1998 / 17:16:26 / cg"
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10350
!
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10351
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10352
methodSTCCompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10353
    "compile the current method to machine code.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10354
     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
 10355
     the demo version."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10356
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10357
    |prev|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10358
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10359
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10360
    prev := Compiler stcCompilation:#always.
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10361
    self withWaitCursorDo:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10362
        [
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10363
            codeView accept.
3597
2e7fc0ae28c9 #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
 10364
        ] ensure:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10365
            Compiler stcCompilation:prev
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10366
        ]
1183
5c5ddf5dcac1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1171
diff changeset
 10367
    ].
5c5ddf5dcac1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1171
diff changeset
 10368
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10369
    "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
 10370
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10371
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10372
methodSenders
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10373
    "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
 10374
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
 10375
    self 
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10376
        askForSearchTitle:'Selector to browse senders of:' 
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
 10377
        openWith:#browseAllCallsOn:in:ignoreCase:
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
 10378
        isSelector:true
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
 10379
        searchArea:#everywhere
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
 10380
        withCaseIgnore:true
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
 10381
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10382
    "Modified: / 12.10.2001 / 19:41:26 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10383
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10384
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10385
methodSpawn
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10386
    "create a new SystemBrowser browsing current method,
3125
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 10387
     or if the current selection is of the form 'class>>selector', 
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 10388
     spawn a browser on that method."
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10389
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10390
    |s sel selSymbol clsName clsSymbol cls isMeta brwsr msg|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10391
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10392
    classMethodListView notNil ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10393
        s := classMethodListView selectionValue string.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10394
        clsName := self classNameFromClassMethodString:s.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10395
        sel := self selectorFromClassMethodString:s.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10396
        isMeta := false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10397
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10398
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10399
    self extractClassAndSelectorFromSelectionInto:[:c :s :m |
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10400
        clsName := c.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10401
        sel := s.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10402
        isMeta := m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10403
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10404
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10405
    (sel notNil and:[clsName notNil]) ifTrue:[
3125
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 10406
        ((clsSymbol := clsName asSymbolIfInterned) notNil
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 10407
         and:[(selSymbol := sel asSymbolIfInterned) notNil]) ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 10408
            (environment includesKey:clsSymbol) ifTrue:[
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 10409
                cls := environment at:clsSymbol.
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10410
                isMeta ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10411
                    cls := cls theMetaclass
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10412
                ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10413
                cls isBehavior ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10414
                    cls := cls theMetaclass
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10415
                ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10416
                cls isBehavior ifTrue:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10417
                    self withWaitCursorDo:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10418
                        (cls includesSelector:selSymbol) ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10419
                            cls := cls theMetaclass.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10420
                        ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10421
                        (cls includesSelector:selSymbol) ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10422
                            SystemBrowser browseClass:cls selector:selSymbol.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10423
                            ^ self
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10424
                        ].
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10425
                        msg := ' does not implement #' , sel
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10426
                    ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10427
                ] ifFalse:[
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10428
                    msg := ' is not a class'
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10429
                ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10430
            ] ifFalse:[
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10431
                msg := ' is unknown'
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10432
            ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10433
        ] ifFalse:[
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10434
            msg := ' and/or ' , sel , ' are unknown'
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10435
        ].
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10436
        self warn:(clsName , msg).
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10437
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10438
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10439
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10440
    self checkMethodSelected ifFalse:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10441
        self warn:'select a method first'.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 10442
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10443
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10444
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10445
    self withWaitCursorDo:[
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 10446
        brwsr := SystemBrowser browseClass:(currentMethod mclass) selector:(currentMethod selector).
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 10447
        brwsr environment:environment
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 10448
    ]
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 10449
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 10450
    "Modified: 18.8.1997 / 15:46:10 / cg"
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 10451
!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10452
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
 10453
methodStartCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
 10454
    "set a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
 10455
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10456
    self commonTraceHelperWith:#startCounting
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10457
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10458
    "Created: / 15.12.1995 / 11:00:44 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10459
    "Modified: / 12.1.1998 / 19:15:40 / cg"
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
 10460
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
 10461
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10462
methodStartMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10463
    "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
 10464
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10465
    self commonTraceHelperWith:#startCountingMemoryUsage
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10466
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10467
    "Created: / 18.12.1995 / 16:00:22 / stefan"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10468
    "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
 10469
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10470
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10471
methodStartTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10472
    "set a timing on the current method"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10473
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10474
    self commonTraceHelperWith:#startTiming
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10475
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10476
    "Created: / 17.6.1996 / 17:12:06 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10477
    "Modified: / 12.1.1998 / 19:15:50 / cg"
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10478
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10479
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
 10480
methodStopCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
 10481
    "show the number of invocations & remove a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
 10482
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10483
    self commonTraceHelperWith:#stopCounting
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10484
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10485
    "Created: / 15.12.1995 / 11:03:22 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10486
    "Modified: / 12.1.1998 / 19:15:55 / cg"
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
 10487
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
 10488
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10489
methodStopMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10490
    "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
 10491
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10492
    self commonTraceHelperWith:#stopCountingMemoryUsage.
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10493
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10494
    "Created: / 18.12.1995 / 16:02:02 / stefan"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10495
    "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
 10496
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 10497
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10498
methodStopTiming
1768
486def0f628a added reset-statistic entries to menu.
Claus Gittinger <cg@exept.de>
parents: 1766
diff changeset
 10499
    "stop timing the current method"
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10500
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10501
    self commonTraceHelperWith:#stopTiming
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10502
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10503
    "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
 10504
    "Modified: / 30.7.1998 / 17:15:10 / cg"
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10505
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
 10506
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10507
methodStringSearch
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10508
    "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
 10509
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10510
    |whereDefault|
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10511
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10512
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10513
    currentClass notNil ifTrue:[
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10514
        whereDefault := #class.
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10515
    ] ifFalse:[
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10516
        currentClassCategory notNil ifTrue:[
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10517
            whereDefault := #classCategory.
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10518
        ] ifFalse:[
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10519
            currentNamespace notNil ifTrue:[
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10520
                whereDefault := #currentNameSpace.                
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10521
            ] ifFalse:[
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10522
                whereDefault := nil
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10523
            ]
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10524
        ]
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 10525
    ].
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 10526
    self 
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10527
        askForSearchTitle:'String to search for in sources:' 
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10528
        openWith:#browseForString:in:ignoreCase:
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10529
        isSelector:true
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10530
        searchArea:whereDefault
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10531
        withCaseIgnore:true
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10532
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 10533
    "Modified: / 12.10.2001 / 19:43:02 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10534
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10535
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10536
methodTrace
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10537
    "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
 10538
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10539
    self commonTraceHelperWith:#setTracePoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10540
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10541
    "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
 10542
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10543
306
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
 10544
methodTraceFull
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
 10545
    "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
 10546
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10547
    self commonTraceHelperWith:#setTraceFullPoint.
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10548
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
 10549
    "Created: / 15.12.1995 / 18:20:33 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10550
    "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
 10551
!
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
 10552
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10553
methodTraceSender
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10554
    "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
 10555
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10556
    self commonTraceHelperWith:#setTraceSenderPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10557
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10558
    "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
 10559
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10560
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10561
!BrowserView methodsFor:'method stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10562
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10563
checkMethodSelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10564
    currentMethod isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10565
	self warn:'select a method first'.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10566
	^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10567
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10568
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10569
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10570
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10571
listEntryForMethod:aMethod selector:selector
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10572
    "answer a method list entry 
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10573
     (gimmic: adding a little image to breakPointed methods)"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10574
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 10575
    |s icn|
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10576
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10577
    s := aMethod printStringForBrowserWithSelector:selector.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10578
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10579
    "/
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10580
    "/ wrap icons (i.e. break- or trace points)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10581
    "/ have higher prio ...
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10582
    "/
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10583
    aMethod isWrapped ifTrue:[
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10584
        (s endsWith:' !!') ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10585
            s := s copyWithoutLast:2
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10586
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10587
        aMethod isBreakpointed ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10588
            icn := self stopIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10589
        ] ifFalse:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10590
            aMethod isTimed ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10591
                icn := self timeIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10592
            ] ifFalse:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10593
                icn := self traceIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10594
            ]
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10595
        ].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10596
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10597
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10598
    icn isNil ifTrue:[
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10599
        ShowResourceIcons ~~ false ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10600
            icn := self resourceIconForMethod:aMethod.
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10601
        ].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10602
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10603
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10604
    icn notNil ifTrue:[
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10605
        ^ LabelAndIcon icon:icn string:s
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10606
    ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10607
    ^ s
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10608
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10609
    "Created: / 22.10.1996 / 19:51:00 / cg"
1851
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 10610
    "Modified: / 24.8.1998 / 21:37:04 / cg"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10611
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10612
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10613
listOfAllMethodsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10614
    "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
 10615
     of the argument, aClass and its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10616
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10617
1346
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
 10618
    |newList selectors otherSelectors allCategories|
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
 10619
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
 10620
    newList := OrderedCollection new.
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
 10621
    selectors := IdentitySet new.
611
f3e973ecc846 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
 10622
    otherSelectors := IdentitySet new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10623
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10624
    allCategories := (aCategory = '* all *').
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10625
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10626
    self classesInFullProtocolHierarchy:aClass do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10627
	|searchCategory|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10628
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10629
	(aCategory = '* no category *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10630
	    searchCategory := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10631
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10632
	    searchCategory := aCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10633
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10634
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10635
	c methodDictionary keysAndValuesDo:[:selector :aMethod |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10636
	    (allCategories
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10637
	     or:[aMethod category = searchCategory]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10638
		(otherSelectors includes:selector) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10639
		    (selectors includes:selector) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10640
			selectors add:selector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10641
			newList add:(selector -> aMethod)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10642
		    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10643
		].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10644
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10645
		otherSelectors add:selector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10646
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10647
	].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10648
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10649
    (newList size == 0) ifTrue:[^ nil].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10650
    ^ newList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10651
1346
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
 10652
    "Modified: 14.10.1997 / 00:19:20 / cg"
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10653
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10654
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10655
listOfAllMethodsInCategory:aCategory ofClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10656
    "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
 10657
     of the argument, aClass"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10658
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10659
    |newList searchCategory all|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10660
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10661
    all := (aCategory = '* all *').
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10662
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10663
    (aCategory = '* no category *') ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10664
	searchCategory := nil
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10665
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10666
	searchCategory := aCategory
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10667
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10668
    newList := OrderedCollection new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
 10669
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 10670
    aClass methodDictionary keysAndValuesDo:[:selector :aMethod |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10671
	(all or:[aMethod category = searchCategory]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10672
	    newList add:(selector -> aMethod)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10673
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10674
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10675
    (newList size == 0) ifTrue:[^ nil].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10676
    ^ newList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10677
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10678
    "Created: 30.7.1997 / 15:10:16 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10679
    "Modified: 30.7.1997 / 15:12:38 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10680
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10681
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10682
listOfAllSelectorsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10683
    "answer a list of all selectors in a given method category 
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10684
     of the argument, aClass and its superclasses.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10685
     Used with fullProtocol browsing."
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10686
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
 10687
    |methodList newList|
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10688
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10689
    methodList := self listOfAllMethodsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10690
    (methodList size == 0) ifTrue:[^ nil].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10691
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10692
    aClass isJavaClass ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10693
	methodList := methodList asOrderedCollection.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10694
	methodList sort:[:a :b |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10695
			    |mA mB|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10696
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10697
			    mA := a value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10698
			    mB := b value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10699
			    mA name < mB name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10700
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10701
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10702
	selectorList := methodList collect:[:assoc | assoc key].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10703
	^ methodList collect:[:assoc |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10704
				self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10705
				    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10706
				    selector:(assoc key)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10707
			     ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10708
    ].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10709
1262
8e1263b12ec6 checkin from browser
ca
parents: 1260
diff changeset
 10710
    methodList := methodList asOrderedCollection.
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10711
    selectorList := methodList collect:[:assoc | assoc key].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10712
    newList := methodList 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10713
		    collect:[:assoc |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10714
			self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10715
			    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10716
			    selector:assoc key
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10717
		    ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10718
    ^ newList asOrderedCollection sort:[:a :b | a string < b string] with:selectorList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10719
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10720
    "Modified: 30.7.1997 / 15:28:59 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10721
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10722
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10723
listOfAllSelectorsInCategory:aCategory ofClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10724
    "answer a list of all selectors in a given method category 
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10725
     of the argument, aClass"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10726
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10727
    |methodList newList|
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10728
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10729
    methodList := self listOfAllMethodsInCategory:aCategory ofClass:aClass.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10730
    (methodList size == 0) ifTrue:[^ nil].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10731
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10732
    aClass isJavaClass ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10733
	methodList := methodList asOrderedCollection.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10734
	methodList sort:[:a :b |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10735
			    |mA mB|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10736
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10737
			    mA := a value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10738
			    mB := b value.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10739
			    mA name < mB name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10740
			].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10741
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10742
	selectorList := methodList collect:[:assoc | assoc key].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10743
	^ methodList collect:[:assoc |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10744
				self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10745
				    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10746
				    selector:(assoc key)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10747
			     ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10748
    ].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10749
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10750
    selectorList := methodList collect:[:assoc | assoc key].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10751
    newList := methodList 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10752
		    collect:[:assoc | 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10753
				self 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10754
				    listEntryForMethod:(assoc value)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10755
				    selector:(assoc key)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10756
			    ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10757
    ^ newList sort:[:a :b | a string < b string] with:selectorList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10758
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10759
    "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
 10760
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10761
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10762
methodDoubleClick:lineNr
1802
a654f429bc28 some obsolete code in #methodDoubleClick:
tz
parents: 1789
diff changeset
 10763
    |resources editorClass|
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10764
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10765
    currentMethod notNil ifTrue:[
2174
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10766
        resources := currentMethod resources.
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10767
        resources notNil ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10768
            (resources includesKey:#canvas) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10769
                editorClass := UIPainter
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10770
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10771
            (resources includesKey:#menu) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10772
                editorClass := MenuEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10773
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10774
            ((resources includesKey:#image) or: [resources includesKey:#fileImage]) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10775
                editorClass := ImageEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10776
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10777
            (resources includesKey:#help) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10778
                editorClass := UIHelpTool
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10779
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10780
            (resources includesKey:#tableColumns) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10781
                editorClass := DataSetBuilder
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10782
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10783
            (resources includesKey:#tabList) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10784
                editorClass := TabListEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10785
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10786
            (resources includesKey:#hierarchicalList) ifTrue:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10787
                editorClass := HierarchicalListEditor
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10788
            ].
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10789
            editorClass notNil ifTrue: [
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10790
                self withWaitCursorDo:[
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10791
                    editorClass 
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10792
                        openOnClass:currentClass 
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10793
                        andSelector:currentSelector
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10794
                ]
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10795
            ]
5e599b7bd5ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2173
diff changeset
 10796
        ]
1802
a654f429bc28 some obsolete code in #methodDoubleClick:
tz
parents: 1789
diff changeset
 10797
    ]
a654f429bc28 some obsolete code in #methodDoubleClick:
tz
parents: 1789
diff changeset
 10798
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10799
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10800
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10801
methodSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10802
    "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
 10803
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
 10804
    |selection sensor|
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10805
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10806
"/    selection := methodListView selectionValue string.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10807
selection := selectorList at:lineNr.
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10808
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10809
    "/ reselected with control ?
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
 10810
    ((sensor := self sensor) notNil and:[sensor ctrlDown]) ifTrue:[
2592
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10811
        selection = currentSelector ifTrue:[
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10812
            "/ if there is a trace/break, remove it.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10813
            (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10814
                self methodRemoveBreakOrTrace.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10815
                ^ self
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10816
            ]
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10817
        ].
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 10818
    ].
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10819
    self switchToMethod:selection.
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
 10820
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10821
    "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
 10822
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10823
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10824
methodSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10825
    "method selection has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10826
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10827
    self withWaitCursorDo:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10828
        |index cls|
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10829
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10830
        aspect := nil.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10831
        self updateCodeView.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10832
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10833
        self refetchMethod.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10834
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10835
        (currentMethod notNil 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10836
        and:[currentMethod isCounting]) ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10837
            self updateMethodListWithScroll:false keepSelection:true.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10838
        ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10839
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10840
        self setAcceptAndExplainActionsForMethod.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10841
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10842
        "
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10843
         if there is any autoSearch string, do the search
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10844
        "
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10845
        autoSearch notNil ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10846
            codeView 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10847
                searchFwd:autoSearch
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10848
                ignoreCase:autoSearchIgnoreCase 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10849
                startingAtLine:1 col:0 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10850
                ifAbsent:[]
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10851
        ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10852
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10853
        fullProtocol ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10854
            "
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10855
             remove any bold attribute from classList
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10856
            "
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10857
            1 to:classListView list size do:[:i |
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10858
                classListView attributeAt:i remove:#bold.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10859
            ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10860
            "
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10861
             boldify the class where this method is implemented
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10862
            "
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10863
            currentMethod notNil ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10864
                cls := currentMethod containingClass.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10865
                index := classListView list indexOf:(cls name).
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10866
                (index == 0 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10867
                 and:[cls isMeta
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10868
                 and:[cls name endsWith:' class']]) ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10869
                    index := classListView list indexOf:(cls name copyWithoutLast:6).
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10870
                ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10871
                index ~~ 0 ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10872
                    classListView attributeAt:index add:#bold.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10873
                    classListView makeLineVisible:index.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10874
                ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10875
                currentClass := acceptClass := cls.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10876
            ]
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 10877
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10878
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10879
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10880
    "Created: / 23.11.1995 / 14:17:44 / cg"
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
 10881
    "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
 10882
    "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
 10883
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10884
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10885
methodTemplate
3549
056bd76b5b0a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3515
diff changeset
 10886
    "return a method definition template string"
056bd76b5b0a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3515
diff changeset
 10887
056bd76b5b0a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3515
diff changeset
 10888
    ^ SystemBrowser methodTemplate
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10889
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 10890
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10891
resourceIconForMethod:aMethod
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10892
    |resources|
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10893
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10894
    (resources := aMethod resources) notNil ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10895
        (resources includesKey:#canvas) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10896
            ^ self canvasIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10897
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10898
        (resources includesKey:#menu) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10899
            ^ self menuIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10900
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10901
        (resources includesKey:#image) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10902
            ^ self imageIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10903
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10904
        (resources includesKey:#fileImage) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10905
            ^ self fileImageIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10906
        ].
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 10907
        (resources includesKey:#programImage) ifTrue:[
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 10908
            ^ self programImageIcon
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 10909
        ].
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10910
        (resources includesKey:#help) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10911
            ^ self helpIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10912
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10913
        (resources includesKey:#programMenu) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10914
            ^ self programMenuIcon
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10915
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10916
        (resources includesKey:#tableColumns) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10917
            ^ self tableColumnsIcon 
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10918
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10919
        (resources includesKey:#tabList) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10920
            ^ self tabListIcon 
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10921
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10922
        (resources includesKey:#hierarchicalList) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10923
            ^ self hierarchicalListIcon 
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10924
        ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10925
        (resources includesKey:#programImage) ifTrue:[
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10926
            ^ self programImageIcon 
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10927
        ]
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10928
    ].
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10929
    ^ nil
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10930
!
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 10931
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10932
switchToAnyMethodNamed:matchString
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 10933
    "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
 10934
     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
 10935
1565
e0fb0e6d81ac removed unused vars
Claus Gittinger <cg@exept.de>
parents: 1563
diff changeset
 10936
    |aSelector classToStartSearch classToSearch aClass nm|
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10937
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10938
    actualClass isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10939
	currentClassHierarchy notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10940
	    classToStartSearch := currentClassHierarchy
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10941
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10942
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10943
	classToStartSearch := actualClass 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10944
    ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 10945
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10946
    classToStartSearch notNil ifTrue:[
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10947
"/        showInstance ifFalse:[
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10948
"/            classToStartSearch := classToStartSearch class
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10949
"/        ].
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10950
	((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10951
	    classToSearch := classToStartSearch.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10952
	    aClass := nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10953
	    [classToSearch notNil and:[aClass isNil]] whileTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10954
		aSelector := classToSearch methodDictionary findFirstKey:[:element | matchString match:element].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10955
		aSelector notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10956
		    aClass := classToSearch
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10957
		] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10958
		    classToSearch := classToSearch superclass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10959
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10960
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10961
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10962
	    aSelector := matchString asSymbolIfInterned.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10963
	    aSelector notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10964
		aClass := classToStartSearch whichClassIncludesSelector:aSelector.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10965
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10966
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10967
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10968
	aClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10969
	    nm := aClass name.
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10970
"/            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
 10971
"/                ((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
 10972
"/                    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
 10973
"/                ]
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 10974
"/            ].
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10975
	    aClass ~~ actualClass ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10976
		self switchToClassNamed:nm.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10977
	    ].    
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10978
	    self switchToMethodNamed:aSelector "matchString".
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10979
	    ^ self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 10980
	]
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10981
    ].
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10982
    self beep
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 10983
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
 10984
    "Modified: 17.6.1996 / 16:52:36 / stefan"
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
 10985
    "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
 10986
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10987
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10988
switchToMethod:aString
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10989
    "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
 10990
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 10991
    |selectorString selectorSymbol cat|
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10992
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10993
    (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
 10994
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10995
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10996
     kludge: extract real selector
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10997
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 10998
    selectorString := aString withoutSpaces upTo:(Character space).
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 10999
    selectorSymbol := selectorString asSymbolIfInterned.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 11000
    selectorSymbol isNil ifTrue:[
2592
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11001
        self beep.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11002
        ^ self
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
 11003
    ].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 11004
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 11005
    fullProtocol ifTrue:[
2592
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11006
        self releaseMethod.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11007
        "
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11008
         search which class implements the selector
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11009
        "
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11010
        self classesInFullProtocolHierarchy:actualClass do:[:c |
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11011
            (currentMethod isNil 
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11012
             and:[c includesSelector:selectorSymbol]) ifTrue:[
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11013
                currentSelector := selectorSymbol.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11014
                currentMethod := c compiledMethodAt:selectorSymbol.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11015
                acceptClass := c
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11016
            ]
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11017
        ]
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 11018
    ] ifFalse:[
2592
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11019
        currentSelector := selectorSymbol.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11020
        currentMethod := actualClass compiledMethodAt:selectorSymbol.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 11021
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 11022
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 11023
    methodCategoryListView notNil ifTrue:[
2592
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11024
        currentMethod notNil ifTrue:[
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11025
            cat := currentMethod category.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11026
            (currentMethodCategory ~= cat) ifTrue:[
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11027
                currentMethodCategory := cat.
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11028
                methodCategoryListView setSelectElement:currentMethodCategory
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11029
            ]
bd0bf3e634f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2590
diff changeset
 11030
        ]
1524
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
 11031
    ].
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
 11032
ed8ff581872b a class history for the System Browser
tz
parents: 1522
diff changeset
 11033
    self methodSelectionChanged.
1539
971e20d7b6bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
 11034
    currentSelector notNil ifTrue:[
3134
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
 11035
        "/ self addToClassHistory: actualClass name asString, ' ', currentSelector
c74acae564f3 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
 11036
        self class addToClassHistory:actualClass selector:currentSelector
1539
971e20d7b6bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
 11037
    ]
971e20d7b6bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1536
diff changeset
 11038
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11039
    "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
 11040
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 11041
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11042
switchToMethodNamed:matchString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11043
    "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
 11044
     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
 11045
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
 11046
    |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
 11047
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11048
    currentClass notNil ifTrue:[
3125
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11049
        classToSearch := actualClass.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11050
        dict := classToSearch methodDictionary.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11051
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11052
        ((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11053
            aSelector := dict findFirstKey:[:element | matchString match:element].       
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11054
            aSelector notNil ifTrue:[
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11055
                method := dict at:aSelector.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11056
            ]
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11057
        ] ifFalse:[
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11058
            (aSelector := matchString asSymbolIfInterned) notNil ifTrue:[
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11059
                method := dict at:aSelector ifAbsent:nil
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11060
            ].
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11061
        ].
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11062
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11063
        method notNil ifTrue:[
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11064
            cat := method category.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11065
            cat isNil ifTrue:[cat := '* all *'].
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11066
            methodCategoryListView setSelectElement:cat.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11067
            currentMethodCategory := cat.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11068
            self updateMethodCategoryListWithScroll:false.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11069
            self methodCategorySelectionChanged.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11070
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11071
            self releaseMethod.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11072
            currentMethod := method.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11073
            currentSelector := aSelector.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11074
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11075
            m := aSelector , '*(*)'.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11076
            selectorList notNil ifTrue:[
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11077
                idx := selectorList findFirst:[:line |
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11078
                                                    line = aSelector
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11079
                                                    or:[m match:line]].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 11080
"/            idx := methodListView list findFirst:[:line |
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 11081
"/                                                line = aSelector
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 11082
"/                                                or:[m match:line]].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
 11083
3125
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11084
                methodListView setSelection:idx. "/ setSelectElement:aSelector.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11085
            ].
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11086
            self methodSelectionChanged.
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11087
            ^ self
ed9aa14fe97b avoid double symbol lookup
Claus Gittinger <cg@exept.de>
parents: 3118
diff changeset
 11088
        ]
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
 11089
    ].
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 11090
    self beep.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
 11091
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11092
    "Modified: / 28.6.1996 / 20:28:56 / stefan"
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 11093
    "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
 11094
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11095
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11096
updateMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11097
    self updateMethodListWithScroll:true keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11098
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11099
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11100
updateMethodListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11101
    self updateMethodListWithScroll:scroll keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11102
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11103
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11104
updateMethodListWithScroll:scroll keepSelection:keep
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 11105
    |selectors scr first last selection searchCategory|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11106
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11107
    methodListView notNil ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11108
        selection := methodListView selection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11109
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11110
        searchCategory := currentMethodCategory.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11111
        (currentClass notNil
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11112
        and:[currentClass supportsMethodCategories not]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11113
            searchCategory := '* all *'
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11114
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11115
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11116
        (searchCategory notNil 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11117
        and:[actualClass notNil]) ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11118
            fullProtocol ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11119
                selectors := self listOfAllSelectorsInCategory:searchCategory 
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11120
                                inFullProtocolHierarchyOfClass:actualClass
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11121
            ] ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11122
                selectors := self listOfAllSelectorsInCategory:searchCategory
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11123
                                                       ofClass:actualClass
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11124
            ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11125
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11126
        scr := scroll.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11127
        first := methodListView firstLineShown.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11128
        first ~~ 1 ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11129
            last := methodListView lastLineShown.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11130
            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
 11131
                scr := true
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11132
            ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11133
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11134
2243
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11135
        scr ifTrue:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11136
            methodListView list:selectors
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11137
        ] ifFalse:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11138
            methodListView setList:selectors
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11139
        ].
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11140
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11141
        (variableListView notNil 
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11142
        and:[variableListView hasSelection]) ifTrue:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11143
            self hilightMethodsInMethodList.
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11144
        ].
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11145
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11146
        keep ifTrue:[
39350b720138 oops - must update methodList (in case of breakPoint icons etc.)
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
 11147
            methodListView setSelection:selection.
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11148
        ].
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11149
        ^ self
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 11150
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 11151
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 11152
    classMethodListView notNil ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11153
        self updateClassMethodListWithScroll:scroll keepSelection:keep
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
 11154
    ].
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 11155
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
 11156
    "Modified: 18.12.1995 / 22:54:04 / stefan"
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 11157
    "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
 11158
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11159
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11160
!BrowserView methodsFor:'misc'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11161
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11162
codeChanged
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11163
    codeView modified ifTrue:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11164
        self stopSyntaxHighlightProcess.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11165
        codeModified := true.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 11166
        self startSyntaxHighlightProcess.
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11167
    ]
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11168
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11169
    "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
 11170
    "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
 11171
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 11172
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 11173
compressedCodeLinesFor:someCode
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 11174
    |s|
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 11175
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 11176
    s := someCode asString string asCollectionOfLines copy.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 11177
    [s last isEmpty] whileTrue:[s removeLast].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 11178
    s := s collect:[:s | |t|
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11179
			   s notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11180
			      t := s withoutTrailingSeparators.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11181
			      t size == 0 ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11182
				  nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11183
			      ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11184
				  t
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11185
			      ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11186
			   ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11187
			      s
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11188
			   ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11189
		     ].
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 11190
    ^ s
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 11191
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 11192
    "Created: / 17.6.1998 / 16:48:03 / cg"
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11193
!
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11194
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11195
instanceProtocol:aBoolean
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11196
    "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
 11197
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11198
    |onToggle offToggle|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11199
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11200
    showInstance ~~ aBoolean ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11201
        self checkSelectionChangeAllowed ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11202
            instanceToggle notNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11203
                aBoolean ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11204
                    offToggle := classToggle.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11205
                    onToggle := instanceToggle.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11206
                ] ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11207
                    onToggle := classToggle.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11208
                    offToggle := instanceToggle.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11209
                ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11210
                onToggle turnOn.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11211
                offToggle turnOff.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11212
            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11213
            showInstance := aBoolean.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11214
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11215
            (variableListView notNil
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11216
            and:[variableListView hasSelection]) ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11217
                self unhilightMethodCategories.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11218
                self unhilightMethods.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11219
                variableListView setSelection:nil
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11220
            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11221
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11222
            fullProtocol ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11223
                showInstance ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11224
                    actualClass := currentClassHierarchy.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11225
                ] ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11226
                    actualClass := currentClassHierarchy theMetaclass.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11227
                ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11228
                acceptClass := actualClass.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11229
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11230
                self updateClassList.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11231
                self updateMethodCategoryListWithScroll:false.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11232
                self updateMethodListWithScroll:false.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11233
                self updateVariableList.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11234
                ^ self
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11235
            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11236
            currentClass notNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11237
                self classSelectionChanged
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11238
            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11239
            codeView modified:false.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11240
            codeModified := false.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11241
        ] ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11242
            aBoolean ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11243
                onToggle := classToggle.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11244
                offToggle := instanceToggle
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11245
            ] ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11246
                offToggle := classToggle.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11247
                onToggle := instanceToggle.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11248
            ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11249
            onToggle turnOn.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11250
            offToggle turnOff.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11251
        ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11252
    ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 11253
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11254
    "Modified: / 31.3.1998 / 23:40:04 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11255
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11256
3502
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
 11257
openAboutThisApplication
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
 11258
    "opens an about box for this application."
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
 11259
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
 11260
    DialogBox aboutClass:self class.
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
 11261
!
f79d22a471ef added about dialog
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
 11262
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 11263
openBrowserDocumentation
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 11264
    HTMLDocumentView openFullOnDocumentationFile:'tools/sbrowser/TOP.html'
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 11265
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 11266
3176
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
 11267
openKeywordIndexDocumentation
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
 11268
    HTMLDocumentView openFullOnDocumentationFile:'index.html'
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
 11269
!
Claus Gittinger <cg@exept.de>
parents: 3143
diff changeset
 11270
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11271
processName
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11272
    "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
 11273
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11274
    ^ 'System Browser'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11275
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11276
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 11277
showActivity:someMessage
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 11278
    "some activityNotification to be forwarded to the user;
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 11279
     show it in the windows title area here."
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 11280
1500
c7cac8cb021f show busyCursor while autloading or starting an app
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
 11281
    someMessage size == 0 ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11282
	self normalLabel
1500
c7cac8cb021f show busyCursor while autloading or starting an app
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
 11283
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11284
	self busyLabel:someMessage with:nil
1500
c7cac8cb021f show busyCursor while autloading or starting an app
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
 11285
    ]
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 11286
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 11287
    "Created: 16.12.1995 / 18:41:37 / cg"
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
 11288
    "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
 11289
!
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
 11290
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11291
updateCodeView
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 11292
    |code sourceLineNumber doStartSyntax highlighter|
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11293
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11294
    codeView modifiedChannel retractInterestsFor:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11295
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11296
    aspect == #hierarchy ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11297
        ^ self classHierarchy
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11298
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11299
    aspect == #classInstVars ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11300
        ^ self classClassInstVars
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11301
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11302
    aspect == #comment ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11303
        ^ self classComment
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11304
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11305
    aspect == #primitiveDefinitions ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11306
        ^ self classPrimitiveDefinitions
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11307
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11308
    aspect == #primitiveFunctions ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11309
        ^ self classPrimitiveFunctions
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11310
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11311
    aspect == #primitiveVariables ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11312
        ^ self classPrimitiveVariables
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11313
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11314
    aspect == #revisionInfo ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11315
        ^ self classRevisionInfo
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11316
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
 11317
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11318
    fullClass ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11319
        currentClass notNil ifTrue:[
3513
cf83edda71ca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3508
diff changeset
 11320
            currentClass isLoaded ifTrue:[
cf83edda71ca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3508
diff changeset
 11321
                code := currentClass source.
cf83edda71ca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3508
diff changeset
 11322
            ] ifFalse:[
cf83edda71ca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3508
diff changeset
 11323
                code := currentClass definition.
cf83edda71ca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3508
diff changeset
 11324
            ].
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11325
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11326
    ] ifFalse:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11327
        aspect == #definition ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11328
            ^ self classDefinition
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11329
        ].
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11330
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11331
        currentMethod notNil ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11332
            (codeView acceptAction isNil
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11333
            and:[actualClass notNil 
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11334
            and:[currentMethodCategory notNil]]) ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11335
                self setAcceptAndExplainActionsForMethod.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11336
            ].
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11337
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11338
            code := currentMethod source.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11339
            sourceLineNumber := currentMethod sourceLineNumber.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11340
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11341
            code isNil ifTrue:[
2422
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11342
                (sourceLineNumber isNil
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11343
                or:[currentMethod sourcePosition isNil
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11344
                or:[currentMethod getSource isNil]]) ifTrue:[
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11345
                    code := '"
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11346
Sorry, but the methods sourceCode is not available.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11347
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11348
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
 11349
"'.
2422
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11350
                ] ifFalse:[
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11351
                    code := '"
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11352
Sorry, but the methods sourceCode is not available.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11353
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 11354
If this ST/X is a ' , 'regular distribution' allBold ,', please check the setting of
2422
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11355
your systemPath which contains a collection of pathNames.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11356
The system searches those directories for a subdirectory named ''source'', 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11357
which itself should contain the classes source file.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11358
Also, check if that directory and/or sourceFile grants read access.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11359
The sourcePath can be accessed via 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11360
    Smalltalk systemPath 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11361
and
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11362
    Smalltalk systemPath:aCollectionOfPathStrings
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11363
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11364
To fix this (in the running system), evaluate:
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11365
    Smalltalk systemPath addFirst:''<<pathOfDirContainingSourceDir>>.''
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11366
    Smalltalk flushPathCaches.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11367
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11368
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
 11369
file - so you will not get this error again and again. 
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11370
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11371
Also, check if you have the sourceCodeManagement (CVS) enabled,
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11372
and (if so) configured correctly.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11373
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11374
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
 11375
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
 11376
in the ''source'' directory.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11377
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11378
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 11379
If this is ST/X a ' , 'demo-distribution' allBold ,', the source for some classes is not
2422
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11380
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
 11381
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
 11382
"'.
a1a94c1eed0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
 11383
                ].
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 11384
                self clearAcceptAction.
2525
2573dc6b6028 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2513
diff changeset
 11385
            ] ifFalse:[       
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 11386
                (UserPreferences current autoFormatting
2833
5bceae325a3e BRxxx -> RBxxx rename
Claus Gittinger <cg@exept.de>
parents: 2829
diff changeset
 11387
                and:[RBParser notNil
5bceae325a3e BRxxx -> RBxxx rename
Claus Gittinger <cg@exept.de>
parents: 2829
diff changeset
 11388
                and:[RBFormatter notNil]]) ifTrue:[
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 11389
                    Object errorSignal handle:[:ex |
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 11390
                    ] do:[
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 11391
                        |tree|
2833
5bceae325a3e BRxxx -> RBxxx rename
Claus Gittinger <cg@exept.de>
parents: 2829
diff changeset
 11392
                        tree := RBParser 
2595
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 11393
                                    parseMethod:code
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 11394
                                    onError: [:aString :position | nil].
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 11395
                        tree notNil ifTrue:[
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 11396
                            code := tree printString
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 11397
                        ].
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 11398
                    ].
3a447c9f9307 move method now also available in class-method list browsers.
Claus Gittinger <cg@exept.de>
parents: 2594
diff changeset
 11399
                ].
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11400
                UserPreferences current syntaxColoring ifTrue:[
3662
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 11401
                    currentMethod notNil ifTrue:[
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 11402
                        highlighter := currentMethod syntaxHighlighterClass.
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 11403
                        highlighter == #askClass ifTrue:[
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 11404
                            highlighter := (actualClass ? Smalltalk) syntaxHighlighterClass.
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 11405
                        ]
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 11406
                    ] ifFalse:[
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 11407
                        highlighter := (actualClass ? Smalltalk) syntaxHighlighterClass.
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 11408
                    ].
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11409
                    highlighter notNil ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11410
                        code size < 5000 ifTrue:[       
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11411
                            code := highlighter formatMethod:code in:actualClass.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11412
                            codeView modifiedChannel onChangeSend:#codeChanged to:self.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11413
                        ] ifFalse:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11414
                            doStartSyntax := true.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11415
                        ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11416
                    ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11417
                ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11418
            ]
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11419
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11420
    ].
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 11421
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 11422
    "/ 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
 11423
    "/ done soon ...
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 11424
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 11425
    code size > 0 ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11426
        codeView setList:(code asStringCollection) expandTabs:true redraw:false.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11427
        codeView cursorHome.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11428
        codeView unselectWithoutRedraw.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11429
        codeView invalidate.
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 11430
    ] ifFalse:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11431
        codeView contents:code.
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 11432
    ].
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 11433
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11434
    codeView modified:false.
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 11435
    codeModified := false.
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 11436
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11437
    doStartSyntax == true ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11438
        self startSyntaxHighlightProcess.
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11439
    ].
1574
f8a81b46f511 asynchronous redraw of codeView (invalidate instead of redraw).
Claus Gittinger <cg@exept.de>
parents: 1572
diff changeset
 11440
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 11441
    sourceLineNumber notNil ifTrue:[
2373
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11442
        sourceLineNumber ~~ 1 ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11443
            codeView gotoLine:sourceLineNumber.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11444
            sourceLineNumber > 10 ifTrue:[
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11445
                sourceLineNumber := sourceLineNumber - 10
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11446
            ].
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11447
            codeView scrollToLine:sourceLineNumber.
5da912336426 error message when source is unaccessable
Claus Gittinger <cg@exept.de>
parents: 2361
diff changeset
 11448
        ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 11449
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11450
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11451
1516
91b6f64b56e6 syntax highlighting
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
 11452
    "Created: / 23.11.1995 / 14:16:43 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11453
    "Modified: / 10.2.2000 / 14:15:03 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11454
! !
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11455
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11456
!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
 11457
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11458
nameSpaceCheckInEach
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11459
    |classes|
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11460
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11461
    (self checkSelectionChangeAllowedWithCompare:false) ifFalse:[^ self].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11462
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11463
    classes := currentNamespace allClasses.
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11464
    classes isEmpty ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11465
        self warn:(resources 
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11466
                        string:'No classes in nameSpace ''%''.'
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11467
                        with:currentNamespace name).
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11468
        ^ self
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11469
    ].
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11470
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 11471
    self withWaitCursorDo:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11472
        |logMessage|
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11473
2529
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 11474
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 11475
        logMessage := SourceCodeManagerUtilities 
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 11476
                        getLogMessageFor:(resources 
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 11477
                                            string:'(any in nameSpace %1)'
81bd52afdb13 moved getLogMessage to the SCMUtilities
Claus Gittinger <cg@exept.de>
parents: 2525
diff changeset
 11478
                                            with:currentNamespace name).
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11479
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11480
        logMessage notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11481
            "/ ignore private classes
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11482
            classes := classes select:[:aClass | aClass owningClass isNil].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11483
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11484
            classes do:[:aClass |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11485
                self busyLabel:'checking in %1' with:aClass name.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11486
                "/ ca does not want boxes to pop up all over ...
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11487
                InformationSignal handle:[:ex |
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11488
                    Transcript showCR:ex errorString
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11489
                ] do:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11490
                    self classCheckin:aClass withLog:logMessage
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11491
                ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11492
                self normalLabel.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11493
            ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11494
        ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 11495
        self normalLabel.
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11496
    ]
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11497
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11498
    "Created: 23.11.1995 / 11:41:38 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11499
    "Modified: 15.6.1996 / 00:25:58 / stefan"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11500
    "Modified: 18.8.1997 / 15:42:21 / cg"
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11501
!
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11502
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11503
nameSpaceMenu
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 11504
    <resource: #programMenu >
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 11505
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11506
    |items m|
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 11507
2056
4f78683e96ac added namespace-checkin-each;
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
 11508
    items := #( 
3497
219bfead2f44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3490
diff changeset
 11509
                ('New NameSpace' nameSpaceNewNameSpace)
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11510
              ).
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11511
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11512
"/    showAllNamespaces ifTrue:[
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 11513
"/        items := items , #( ('-') ('show topLevel namespaces only' showTopLevelNamespaces)).
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11514
"/    ] ifFalse:[
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 11515
"/        items := items , #( ('-') ('show all namespaces' showAllNamespaces)).
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11516
"/    ].
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11517
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11518
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11519
    (currentNamespace notNil
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11520
    and:[currentNamespace ~~ Smalltalk
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11521
    and:[currentNamespace ~= '* all *']]) ifTrue:[
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11522
        "/ is it all empty ?
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11523
        currentNamespace allClasses isEmpty ifTrue:[
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11524
            items := items , #(
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11525
                                ('-') 
3497
219bfead2f44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3490
diff changeset
 11526
                                ('Remove' nameSpaceRemove)).
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11527
        ] ifFalse:[
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11528
            items := items , #(
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11529
                                ('-') 
3497
219bfead2f44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3490
diff changeset
 11530
                                ('Remove all Classes...' nameSpaceRemoveAllClasses)
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11531
                                ('-') 
3497
219bfead2f44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3490
diff changeset
 11532
                                ('Checkin each...'       nameSpaceCheckInEach)
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11533
                              ).
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11534
        ]
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11535
    ].
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11536
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11537
    m := PopUpMenu itemList:items resources:resources performer:self.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11538
    self environment ~~ Smalltalk ifTrue:[
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11539
        m disableAll:#(nameSpaceRemove nameSpaceRemoveAllClasses nameSpaceCheckInEach nameSpaceNewNameSpace)
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11540
    ].
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 11541
    ^ m.
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 11542
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 11543
    "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
 11544
    "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
 11545
!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11546
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11547
nameSpaceNewNameSpace
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11548
    "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
 11549
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11550
    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
 11551
    aspect := nil.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11552
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11553
    "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
 11554
    "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
 11555
!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11556
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11557
nameSpaceRemove
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11558
    "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
 11559
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11560
    (currentNamespace ~~ Smalltalk
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11561
    and:[currentNamespace allClasses isEmpty]) ifTrue:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 11562
        self withWaitCursorDo:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11563
            environment removeClass:currentNamespace.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11564
            allNamespaces := nil.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11565
            self setListOfNamespaces.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11566
            self changeNameSpaceTo:'* all *'.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11567
            namespaceList contents:'* all *'
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11568
        ]
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11569
    ].
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11570
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11571
    "Modified: 18.8.1997 / 15:44:31 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11572
!
1993
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11573
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11574
nameSpaceRemoveAllClasses
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11575
    "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
 11576
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11577
    |classes|
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11578
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11579
    classes := currentNamespace allClasses.
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11580
    classes isEmpty ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11581
        self warn:(resources 
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11582
                        string:'No classes in nameSpace ''%''.'
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11583
                        with:currentNamespace name).
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11584
        ^ self
1993
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11585
    ].
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11586
    (self confirm:(resources 
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11587
                    string:'Really remove all %1 classes in nameSpace ''%2'' ?' 
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11588
                    with:classes size printString
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11589
                    with:currentNamespace name)) ifFalse:[
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11590
        ^ self
1993
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11591
    ].
f5dd3e1f0845 added 'remove all classes in nameSpace'
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
 11592
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 11593
    self withWaitCursorDo:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11594
        classes copy do:[:cls |
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11595
            environment removeClass:cls.
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11596
        ]
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11597
    ]
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11598
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11599
    "Modified: / 3.2.1999 / 20:18:13 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11600
! !
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
 11601
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11602
!BrowserView methodsFor:'namespace stuff'!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11603
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11604
changeNameSpaceTo:nsName
2022
ccb6e99e1569 code density
Claus Gittinger <cg@exept.de>
parents: 2012
diff changeset
 11605
    |n selectedClass str selectedCategory l newCat|
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11606
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11607
    nsName = '* all *' ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11608
        currentNamespace := nsName.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11609
    ] ifFalse:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11610
        n := environment at:nsName asSymbol.
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11611
        n isNameSpace ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11612
            currentNamespace := n.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11613
        ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11614
            ^ self
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11615
        ]
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11616
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11617
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11618
    selectedClass := actualClass.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11619
    currentClass := actualClass := nil.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11620
    selectedCategory := currentClassCategory.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11621
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11622
    self updateClassCategoryListWithScroll:true.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11623
    selectedCategory notNil ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11624
        self classCategorySelectionChanged.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11625
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11626
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11627
    selectedClass notNil ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11628
        str := self displayedClassNameOf:selectedClass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11629
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11630
        self switchToClassNamed:str.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11631
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11632
        ((l := classListView list) isNil
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11633
        or:[(l includes:str) not]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11634
             currentClassCategory := nil.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11635
             currentClass := nil.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11636
             aspect := nil.   
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11637
             self updateMethodCategoryList.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11638
             self updateMethodList.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11639
             self updateCodeView.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11640
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11641
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11642
        (classCategoryListView notNil and:[currentClass notNil]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11643
            newCat := currentClass category.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11644
            (currentClassCategory = newCat) ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11645
                currentClassCategory := newCat.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11646
                classCategoryListView setSelectElement:newCat
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11647
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 11648
        ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11649
    ]
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11650
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11651
    "Created: 3.1.1997 / 11:11:13 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11652
    "Modified: 29.1.1997 / 18:33:42 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11653
!
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11654
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11655
displayedClassNameOf:aClass
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11656
    "depending on the current nameSpace, either show a classes
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11657
     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
 11658
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11659
    |owner nm ns|
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11660
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
 11661
    aClass isJavaClass ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11662
	^ aClass fullName "/ asString replaceAll:$/ with:$.
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
 11663
    ].
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
 11664
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
 11665
    "/ in which nameSpace is that class (or its owner) ?
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
 11666
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11667
    owner := aClass topOwningClass.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11668
    owner notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11669
	ns := owner nameSpace.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11670
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11671
	ns := aClass nameSpace.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11672
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11673
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11674
    "/ this 'cannot' happen (should always be Smalltalk)
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11675
    ns isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11676
	^ aClass name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11677
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11678
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11679
    currentNamespace = '* all *' ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11680
	(ns == Smalltalk) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11681
	    nm := aClass nameWithoutNameSpacePrefix.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11682
	    ^ nm
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11683
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11684
	nm := aClass nameWithoutNameSpacePrefix.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11685
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11686
"/        ^ aClass name        "/ full name
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11687
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11688
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11689
    nm := aClass nameWithoutNameSpacePrefix.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11690
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11691
    "/ is it in one of the selected namespaces ?
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11692
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11693
    (self findClassNamedInNameSpace:nm) isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11694
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11695
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11696
    currentNamespace = ns ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11697
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11698
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11699
    ^ nm.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11700
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11701
    "Created: 20.12.1996 / 17:46:41 / cg"
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
 11702
    "Modified: 31.7.1997 / 22:57:16 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11703
!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11704
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11705
listOfAllNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11706
    "return a list of all namespaces"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11707
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11708
    allNamespaces isNil ifTrue:[
3578
d92a384c03d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3571
diff changeset
 11709
        allNamespaces := NameSpace allNamespacesIn:environment.
d92a384c03d9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3571
diff changeset
 11710
        allNamespaces remove:environment.
2303
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11711
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11712
        showAllNamespaces ifFalse:[
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11713
            "/ only topLevel namespaces are shown
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11714
            "/ i.e. ignore subspaces 
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11715
            allNamespaces := allNamespaces select:[:ns | ns isTopLevelNamespace].
8e837f878897 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2300
diff changeset
 11716
        ]
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11717
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11718
    ^ allNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11719
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11720
    "Modified: 31.7.1997 / 22:32:30 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11721
!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11722
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11723
listOfNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11724
    "return a list of considered namespaces"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11725
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11726
    currentNamespace isNil ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11727
        ^ Array with:environment
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11728
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11729
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11730
    currentNamespace = '* all *' ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 11731
        ^ self listOfAllNamespaces
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11732
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11733
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11734
    ^ Array with:currentNamespace
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11735
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11736
    "Created: 26.10.1996 / 11:25:39 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11737
    "Modified: 20.12.1996 / 19:18:18 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 11738
!
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11739
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11740
setListOfNamespaces
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11741
    |l hasSmalltalk|
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11742
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11743
    namespaceList isNil ifTrue:[ ^ self ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11744
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11745
    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
 11746
    l := l asOrderedCollection.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11747
    hasSmalltalk := true.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11748
    l remove:'Smalltalk' ifAbsent:[hasSmalltalk := false].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11749
    l sort.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11750
    l addFirst:'-'.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11751
    hasSmalltalk ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11752
	l addFirst:'Smalltalk'
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11753
    ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11754
    l addFirst:'* all *'.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11755
    namespaceList list:l
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11756
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11757
    "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
 11758
!
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11759
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11760
showAllNamespaces
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11761
    "toggle to show all namespaces"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11762
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11763
    showAllNamespaces := true.
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11764
    self updateNamespaceList
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11765
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11766
    "Modified: 31.7.1997 / 22:33:16 / cg"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11767
!
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11768
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11769
showTopLevelNamespaces
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11770
    "toggle to show topLevel namespaces only"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11771
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11772
    showAllNamespaces := false.
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11773
    self updateNamespaceList
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11774
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11775
    "Created: 31.7.1997 / 22:33:29 / cg"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11776
!
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
 11777
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11778
updateNamespaceList
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11779
    allNamespaces := nil.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11780
    namespaceList notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11781
	self setListOfNamespaces
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11782
    ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11783
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
 11784
    "Created: 8.1.1997 / 10:54:03 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11785
! !
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 11786
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11787
!BrowserView methodsFor:'private'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11788
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11789
askAndBrowseMethodCategory:title action:aBlock
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11790
    "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
 11791
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11792
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11793
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11794
    box := self 
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 11795
                enterBoxTitle:title 
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
 11796
                okText:'Browse'
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 11797
                label:'browse category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11798
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11799
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11800
    sel isNil ifTrue:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 11801
        currentMethodCategory notNil ifTrue:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 11802
            sel := currentMethodCategory
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 11803
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11804
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11805
    sel notNil ifTrue:[
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 11806
        box initialText:(sel asString withoutSpaces)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11807
    ].
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 11808
    box action:[:aString | self withWaitCursorDo:[aBlock value:aString]].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 11809
    box open
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11810
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11811
    "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
 11812
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11813
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11814
askForMethodCategory
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11815
    "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
 11816
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 11817
    |someCategories box txt retVal|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11818
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
 11819
    someCategories := actualClass categories asOrderedCollection sort.
4126
ac786156a2e0 as yet uncategorized string from Compiler
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
 11820
    box := self listBoxTitle:'Accept in which method category ?' okText:'Accept' list:someCategories.
199
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
    lastMethodCategory isNil ifTrue:[
4126
ac786156a2e0 as yet uncategorized string from Compiler
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
 11823
        txt := Compiler defaultMethodCategory "/ 'new methods' - '** As yet uncategorized **'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11824
    ] ifFalse:[
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
 11825
        txt := lastMethodCategory
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 initialText:txt.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 11828
    box action:[:aString | aString notEmpty ifTrue:[retVal := aString] ].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 11829
    box open.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 11830
    ^ retVal
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
 11831
1727
5082609d043f show dottet java class names in class-search box.
Claus Gittinger <cg@exept.de>
parents: 1724
diff changeset
 11832
    "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
 11833
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11834
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11835
askForSearchSelectorTitle:title openWith:aSelector
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11836
    "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
 11837
     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
 11838
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11839
    ^ self 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11840
	askForSearchTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11841
	openWith:aSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11842
	isSelector:true
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11843
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11844
    "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
 11845
!
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11846
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11847
askForSearchTitle:title openWith:aSelector isSelector:isSelector
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11848
    "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
 11849
     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
 11850
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11851
    ^ self
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11852
	askForSearchTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11853
	openWith:aSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11854
	isSelector:isSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11855
	searchArea:#everywhere
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11856
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11857
    "Modified: / 18.6.1998 / 16:40:35 / cg"
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11858
!
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11859
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
 11860
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
 11861
    "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
 11862
     method for browsing based on a selector. Set action and launch box.
1155
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11863
     SearchArea may be one of #everywhere, #classCategory, #class, #classWithPrivateClasses,
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11864
     #classHierarchy or #classHierarchyWithPrivateClasses"
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11865
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11866
    ^ self
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11867
	askForSearchTitle:title 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11868
	openWith:aSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11869
	isSelector:isSelector 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11870
	searchArea:whereDefault 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 11871
	withCaseIgnore:false
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11872
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11873
    "Modified: / 18.6.1998 / 16:40:26 / cg"
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11874
!
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11875
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11876
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
 11877
    "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
 11878
     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
 11879
     SearchArea may be one of 
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11880
        #everywhere, 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11881
        #currentNameSpace
2399
8da9ee60bef2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
 11882
        #currentClassesNameSpace
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11883
        #classCategory, 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11884
        #class, 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11885
        #classWithPrivateClasses,
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11886
        #classHierarchy or 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11887
        #classHierarchyWithPrivateClasses"
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 11888
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 11889
    |box panel selectorHolder where whereChannel caseHolder
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 11890
     b sel classes areas toSearch cls inputField ns|
1155
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
 11891
2076
ba9747d3f4ac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2075
diff changeset
 11892
    areas := OrderedCollection new.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11893
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11894
    isSelector ifTrue:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11895
        sel := self selectorToSearchFor.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11896
    ] ifFalse:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11897
        sel := self stringToSearchFor.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11898
    ].
2590
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11899
    sel size == 0 ifTrue:[
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11900
        "/ use last searchString
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11901
        LastSearchPatterns size > 0 ifTrue:[
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11902
            sel := LastSearchPatterns first.
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11903
        ].
bc4befd23834 default last search string, if there is no
Claus Gittinger <cg@exept.de>
parents: 2588
diff changeset
 11904
    ].
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 11905
    selectorHolder := sel asValue.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11906
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11907
    box := Dialog new.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
 11908
    (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
 11909
1805
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
 11910
    inputField := box addComboBoxOn:selectorHolder tabable:true.
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
 11911
    inputField list:LastSearchPatterns.
2baf4faf8a50 remember last searchstring(s);
Claus Gittinger <cg@exept.de>
parents: 1803
diff changeset
 11912
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11913
    inputField selectAll.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11914
    inputField entryCompletionBlock:[:contents |
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11915
        |s what m|
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11916
2687
1c3f48a220b4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2685
diff changeset
 11917
        s := contents string withoutSpaces.
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11918
        box topView withWaitCursorDo:[
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 11919
            what := Smalltalk selectorCompletion:s inEnvironment:(environment ? Smalltalk).
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11920
            inputField contents:what first.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11921
            (what at:2) size ~~ 1 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11922
                self beep
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11923
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11924
        ]
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11925
    ].
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11926
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11927
    withCaseIgnore ifTrue:[
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 11928
        box addCheckBox:(resources string:'Ignore case') on:(caseHolder := false asValue).
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11929
    ].
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 11930
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11931
    (currentClassCategory notNil 
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11932
    or:[currentClass notNil]) ifTrue:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11933
        box addHorizontalLine.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11934
        box addVerticalSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11935
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 11936
        (box addTextLabel:(resources string:'Search in:')) adjust:#left.
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11937
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11938
        panel := VerticalPanelView new.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11939
        panel horizontalLayout:#fitSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11940
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11941
        whereChannel := RadioButtonGroup new.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11942
        b := CheckBox label:(resources string:'everywhere').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11943
        panel add:b. whereChannel add:b value:#everywhere.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11944
        areas add:#everywhere.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11945
        box makeTabable:b.
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 11946
2086
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11947
"/        classMethodListView notNil ifTrue:[
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11948
"/            b := CheckBox label:(resources string:'shown methods').
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11949
"/            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
 11950
"/            areas add:#currentMethodList.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11951
"/            box makeTabable:b.
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11952
"/        ].
b35c898f9396 added method filter (for class-method browser)
Claus Gittinger <cg@exept.de>
parents: 2082
diff changeset
 11953
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11954
        currentNamespace ~= '* all *' ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11955
            b := CheckBox label:(resources string:'current nameSpace').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11956
            panel add:b. whereChannel add:b value:#currentNameSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11957
            areas add:#currentNameSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11958
            box makeTabable:b.
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11959
        ] ifFalse:[
2402
1b1143acfaca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
 11960
            (currentClass notNil 
1b1143acfaca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
 11961
            and:[(ns := currentClass nameSpace) notNil 
1b1143acfaca checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
 11962
            and:[ns ~~ Smalltalk]]) ifTrue:[
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11963
                b := CheckBox label:(resources string:'classes nameSpace (''%1'')' with:ns name).
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11964
                panel add:b. whereChannel add:b value:#currentClassesNameSpace.
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11965
                areas add:#currentClassesNameSpace.
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11966
                box makeTabable:b.
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 11967
            ]
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11968
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11969
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11970
        currentClassCategory notNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11971
            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
 11972
            panel add:b. whereChannel add:b value:#classCategory.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11973
            areas add:#classCategory.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11974
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11975
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11976
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11977
        currentClass notNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11978
            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
 11979
            panel add:b. whereChannel add:b value:#class.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11980
            areas add:#class.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11981
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11982
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11983
            b := CheckBox label:(resources string:'class & superclasses').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11984
            panel add:b. whereChannel add:b value:#classAndSuperclasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11985
            areas add:#classAndSuperclasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11986
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11987
            currentClass superclass isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11988
                b disable
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11989
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11990
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11991
            b := CheckBox label:(resources string:'class & subclasses').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11992
            panel add:b. whereChannel add:b value:#classHierarchy.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11993
            areas add:#classHierarchy.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11994
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11995
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11996
            currentClass subclasses size == 0 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11997
                b disable.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11998
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 11999
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12000
            b := CheckBox label:(resources string:'class & private classes').
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12001
            panel add:b. whereChannel add:b value:#classWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12002
            areas add:#classWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12003
            box makeTabable:b.
1811
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 12004
        
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12005
            fullProtocol ifTrue:[
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
 12006
                cls := actualClass theNonMetaclass.
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12007
            ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12008
                cls := currentClass
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12009
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12010
            cls privateClasses size == 0 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12011
                b disable
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12012
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12013
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12014
            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
 12015
            panel add:b. whereChannel add:b value:#classHierarchyWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12016
            areas add:#classHierarchyWithPrivateClasses.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12017
            box makeTabable:b.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12018
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12019
            currentClass subclasses size == 0 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12020
                b disable.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12021
            ] ifFalse:[
1236
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 12022
"/ this takes too long ...
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 12023
"/                toSearch := IdentitySet new.
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 12024
"/                currentClass withAllSubclasses do:[:cls | toSearch add:cls privateClasses].
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 12025
"/                toSearch size == 0 ifTrue:[
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 12026
"/                    b disable
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
 12027
"/                ]
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12028
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12029
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12030
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12031
        whereDefault notNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12032
            (areas includes:whereDefault) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12033
                where := whereDefault asSymbol
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12034
            ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12035
                where := areas first.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12036
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12037
        ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12038
            where := #everywhere.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12039
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12040
        whereChannel value:where.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12041
        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
 12042
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12043
        box addVerticalSpace.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12044
        box addHorizontalLine.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 12045
    ] ifFalse:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12046
        whereChannel := #everywhere asValue.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 12047
    ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 12048
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 12049
    box addAbortButton.
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 12050
    box addOkButtonLabelled:(resources string:'Browse').
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 12051
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 12052
    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
 12053
    box open.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 12054
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
 12055
    box accepted ifTrue:[
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12056
        sel := selectorHolder value.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12057
        where := whereChannel value.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12058
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12059
        sel isEmpty ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12060
            self warn:'nothing entered for search'.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12061
            ^ self.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12062
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12063
        where isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12064
            self warn:'no class(es) for search'.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12065
            ^ self.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12066
        ].
2687
1c3f48a220b4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2685
diff changeset
 12067
        sel := sel string.
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12068
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12069
        LastSearchPatterns isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12070
            LastSearchPatterns := OrderedCollection new.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12071
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12072
        (LastSearchPatterns includes:sel) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12073
            LastSearchPatterns remove:sel.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12074
        ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12075
            LastSearchPatterns size > 15 ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12076
                LastSearchPatterns removeFirst
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12077
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12078
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12079
        LastSearchPatterns addFirst:sel.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12080
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12081
        where == #everywhere ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12082
            classes :=  environment allClasses.
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12083
        ] ifFalse:[ where == #currentNameSpace ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12084
            classes := currentNamespace allClassesWithAllPrivateClasses
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 12085
        ] ifFalse:[ where == #currentClassesNameSpace ifTrue:[
2919
771d7fe08c85 checkin from browser
ca
parents: 2896
diff changeset
 12086
            currentClass isPrivate ifTrue:[
771d7fe08c85 checkin from browser
ca
parents: 2896
diff changeset
 12087
                classes := currentClass topOwningClass nameSpace allClassesWithAllPrivateClasses
771d7fe08c85 checkin from browser
ca
parents: 2896
diff changeset
 12088
            ] ifFalse:[
771d7fe08c85 checkin from browser
ca
parents: 2896
diff changeset
 12089
                classes := currentClass nameSpace allClassesWithAllPrivateClasses
771d7fe08c85 checkin from browser
ca
parents: 2896
diff changeset
 12090
            ]
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12091
        ] ifFalse:[ where == #classCategory ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12092
            classes := environment allClassesInCategory:currentClassCategory
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12093
        ] ifFalse:[(where == #class or:[where == #classWithPrivateClasses]) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12094
            currentClass isNil ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12095
                classes := #()
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12096
            ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12097
                classes := Array with:currentClass
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12098
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12099
        ] ifFalse:[ (where == #classHierarchy or:[where == #classHierarchyWithPrivateClasses]) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12100
            classes := currentClass withAllSubclasses
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12101
        ] ifFalse:[ (where == #classAndSuperclasses) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12102
            classes := currentClass withAllSuperclasses
2398
8cefc3c21f40 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2393
diff changeset
 12103
        ]]]]]]].
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12104
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12105
        (where == #classWithPrivateClasses 
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12106
        or:[where == #classHierarchyWithPrivateClasses]) ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12107
            toSearch := IdentitySet withAll:classes.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12108
            classes := IdentitySet withAll:toSearch.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12109
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12110
            [toSearch notEmpty] whileTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12111
                cls := toSearch removeFirst.
2273
a28341a7fbfc quicker search for allPrivateClasses
Claus Gittinger <cg@exept.de>
parents: 2272
diff changeset
 12112
                classes addAll:cls allPrivateClasses.
2251
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12113
            ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12114
            classes := classes asOrderedCollection.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12115
        ].
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12116
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12117
        classes isEmpty ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12118
            self warn:'no class(es) given for search'.
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12119
        ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12120
            self withSearchCursorDo:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12121
                withCaseIgnore ifTrue:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12122
                    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
 12123
                ] ifFalse:[
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12124
                    SystemBrowser perform:aSelector with:sel with:classes
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12125
                ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12126
            ]
93ca87a4e576 searching in nameSpace ignored private classes
Claus Gittinger <cg@exept.de>
parents: 2249
diff changeset
 12127
        ]
1704
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 12128
    ]
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 12129
83cb6f5b8a1d added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1701
diff changeset
 12130
    "Created: / 18.6.1998 / 16:39:44 / cg"
3358
62f807b57557 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3330
diff changeset
 12131
    "Modified: / 5.11.2001 / 16:29:14 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12132
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12133
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12134
busyLabel:what with:someArgument
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12135
    "set the title for some warning"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12136
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12137
    self topView
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12138
	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
 12139
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12140
    "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
 12141
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12142
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12143
checkAcceptedMethod:mthdHere inClass:actualClass
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12144
    "method was accepted - do some standard checks"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12145
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12146
    |sel cls superCls implClass mthdThere treeHere treeThere dictionary|
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12147
2833
5bceae325a3e BRxxx -> RBxxx rename
Claus Gittinger <cg@exept.de>
parents: 2829
diff changeset
 12148
    (RBParser notNil and:[RBParser isLoaded]) ifTrue:[
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12149
        "/ does new method redefine an inherited method,
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12150
        "/ which does the same ?
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12151
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12152
        sel := mthdHere selector.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12153
        cls := mthdHere mclass.
2600
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12154
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12155
        ( #( 
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12156
            documentation
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12157
            version
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12158
            examples
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12159
            copyright
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12160
            history
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12161
           ) includes:sel) ifTrue:[
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12162
            cls isMeta ifTrue:[
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12163
                ^ self
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12164
            ]
92df98451039 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
 12165
        ].
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12166
        superCls := cls superclass.
2624
faabcb137c0a oops - care for nil superclass
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
 12167
        superCls notNil ifTrue:[
faabcb137c0a oops - care for nil superclass
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
 12168
            implClass := superCls whichClassImplements:sel.
faabcb137c0a oops - care for nil superclass
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
 12169
        ].
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12170
        implClass notNil ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12171
            "/ ok, it is redefined
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12172
            mthdThere := implClass compiledMethodAt:sel.
2833
5bceae325a3e BRxxx -> RBxxx rename
Claus Gittinger <cg@exept.de>
parents: 2829
diff changeset
 12173
            treeHere := RBParser 
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12174
                            parseMethod:mthdHere source
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12175
                            onError: [:aString :position | ^ self "ignore any error"].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12176
            treeHere isNil ifTrue:[^ self].
2833
5bceae325a3e BRxxx -> RBxxx rename
Claus Gittinger <cg@exept.de>
parents: 2829
diff changeset
 12177
            treeThere := RBParser 
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12178
                            parseMethod:mthdThere source
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12179
                            onError: [:aString :position | ^ self "ignore any error"].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12180
            treeThere isNil ifTrue:[^ self].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12181
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12182
            dictionary := Dictionary new.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12183
            (treeHere body equalTo: treeThere body withMapping: dictionary) ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12184
                self information:'This methods functionality is already inherited from ', implClass name.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12185
            ] 
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12186
        ]        
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12187
    ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12188
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12189
    "Modified: / 18.2.2000 / 11:34:12 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12190
!
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12191
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12192
checkSelectionChangeAllowed
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12193
    "return true, if selection change is ok;
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12194
     its not ok, if code has been changed.
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12195
     in this case, return the result of a user query"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12196
1811
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 12197
    |what m cls src1 src2 list1 list2 v|
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12198
447
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
 12199
    codeView modified ifFalse:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12200
        codeModified == true ifFalse:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12201
            ^ true
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12202
        ]
447
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
 12203
    ].
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
 12204
1811
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 12205
    cls := acceptClass ? actualClass.
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 12206
a1fc338316c9 care for correct class in #definition, #hierarchy amd
Claus Gittinger <cg@exept.de>
parents: 1805
diff changeset
 12207
    (currentMethod notNil and:[cls notNil]) ifTrue:[
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12208
        self withWaitCursorDo:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12209
            m := cls compiledMethodAt:currentSelector.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12210
            m notNil ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12211
                src1 := m source.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12212
                src1 notNil ifTrue:[src1 := src1 string].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12213
                src2 := codeView contents.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12214
                src2 notNil ifTrue:[src2 := src2 string].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12215
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12216
                (src1 ~= src2) ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12217
                    src1 size == 0 ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12218
                        list1 := #()
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12219
                    ] ifFalse:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12220
                        list1 := src1 asCollectionOfLines 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12221
                                        collect:[:line | 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12222
                                                    line isNil ifTrue:['']
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12223
                                                    ifFalse:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12224
                                                        line 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12225
                                                            withoutTrailingSeparators
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12226
                                                                withTabsExpanded
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12227
                                                    ]
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12228
                                                ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12229
                    ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12230
                    list2 := src2 asCollectionOfLines collect:[:line | line isNil ifTrue:['']
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12231
                                                               ifFalse:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12232
                                                                    line 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12233
                                                                        withoutTrailingSeparators
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12234
                                                                            withTabsExpanded
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12235
                                                               ]
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12236
                                                      ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12237
                    HistoryManager notNil ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12238
                        list1 := HistoryManager withoutHistoryLines:list1 asStringCollection asString.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12239
                        list2 := HistoryManager withoutHistoryLines:list2 asStringCollection asString.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12240
                    ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12241
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12242
                    list1 = list2 ifFalse:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12243
                        what := self checkSelectionChangeAllowedWithCompare:true.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12244
                        what == #compare ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12245
                            v := DiffTextView 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12246
                                    openOn:src2 
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12247
                                    label:(resources string:'code here (to be accepted ?)')
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12248
                                    and:src1
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12249
                                    label:(resources string:'methods actual code').
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12250
                            v label:(resources string:'comparing method versions').
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12251
                            ^ false
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12252
                        ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12253
                        ^ what
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12254
                    ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12255
                ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12256
                ^ true
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12257
            ]
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 12258
        ]
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12259
    ].
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12260
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12261
    ^ self checkSelectionChangeAllowedWithCompare:false
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12262
1426
aa8bda9a1964 oops - handle the case that no source is available when checking
Claus Gittinger <cg@exept.de>
parents: 1419
diff changeset
 12263
    "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
 12264
    "Modified: / 7.4.1998 / 09:49:52 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12265
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
 12266
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 12267
checkSelectionChangeAllowedWithCompare:compareOffered
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12268
    "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
 12269
     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
 12270
     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
 12271
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 12272
    |action labels values|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12273
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12274
    codeView modified ifFalse:[
3071
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12275
        codeModified ifFalse:[
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12276
            ^ true
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12277
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12278
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 12279
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 12280
    compareOffered ifTrue:[
3430
028c550c1798 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
 12281
        labels := #('Cancel' 'Compare' 'Accept' 'Continue').
3071
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12282
        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
 12283
    ] ifFalse:[
3430
028c550c1798 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
 12284
        labels := #('Cancel' 'Accept' 'Continue').
3071
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12285
        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
 12286
    ].
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 12287
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12288
    action := OptionBox 
3430
028c550c1798 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
 12289
                  request:(resources at:'Text has not been accepted.\\Your modifications will be lost when continuing.') withCRs
3071
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12290
                  label:(resources string:'Attention')
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12291
                  form:(WarningBox iconBitmap)
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12292
                  buttonLabels:(resources array:labels)
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12293
                  values:values
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12294
                  default:true
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12295
                  onCancel:false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12296
    action ~~ #accept ifTrue:[
3071
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12297
        ^ action
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12298
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 12299
    codeView accept. 
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 12300
    ^ true
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 12301
1519
9658c05af3ed keep track of codeModified if syntaxCOloring is enabled
Claus Gittinger <cg@exept.de>
parents: 1516
diff changeset
 12302
    "Created: / 24.11.1995 / 10:54:46 / cg"
3430
028c550c1798 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3424
diff changeset
 12303
    "Modified: / 16.11.2001 / 15:33:16 / cg"
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 12304
!
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
 12305
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12306
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
 12307
    "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
 12308
     passing class and nesting level to the block."
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12309
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12310
    |names subclasses|
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12311
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12312
    remainSet remove:aClass ifAbsent:[].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12313
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12314
    aBlock value:aClass value:level.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12315
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12316
    subclasses := subclassDictionary at:aClass ifAbsent:[nil].
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12317
    (subclasses size == 0) ifFalse:[
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
 12318
        names := subclasses collect:[:class | class name].
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
 12319
        names sortWith:subclasses.
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
 12320
        subclasses do:[:aSubClass |
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
 12321
            self classHierarchyOf:aSubClass 
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
 12322
                            level:(level + 1) 
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
 12323
                               do:aBlock 
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
 12324
                            using:subclassDictionary
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
 12325
                       removeFrom:remainSet
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
 12326
        ]
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12327
    ]
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12328
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12329
    "Created: 20.12.1996 / 17:05:06 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12330
    "Modified: 5.1.1997 / 18:45:41 / cg"
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12331
!
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12332
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12333
classHierarchyOf:topClass withAutoloaded:withAutoloaded do:aBlock
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12334
    "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
 12335
     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
 12336
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12337
    |classes s subclassDict l remaining allNameSpaces nameSpaceList|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12338
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12339
    classes := IdentitySet new.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12340
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12341
    "/ first, collect the list of classes to consider
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12342
    "/ thats all classes which are in the selected NameSpaces,
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12343
    "/ or private ones, owned by a class which is
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12344
    "/ also all of its superclasses are added.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12345
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12346
    allNameSpaces := (currentNamespace = '* all *').
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12347
    nameSpaceList := self listOfNamespaces.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12348
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12349
    environment allClassesDo:[:aClass |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12350
        |actualNamespace match owner|
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12351
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12352
        aClass isMeta ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12353
            (aClass isNameSpace not
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12354
            or:[aClass == Smalltalk]) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12355
                match := allNameSpaces.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12356
                match ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12357
                    (owner := aClass topOwningClass) notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12358
                        actualNamespace := owner nameSpace
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12359
                    ] ifFalse:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12360
                        actualNamespace := aClass nameSpace.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12361
                    ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12362
                    match := nameSpaceList includesIdentical:actualNamespace.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12363
                ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12364
                match ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12365
                    classes addAll:(aClass withAllSuperclasses).
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12366
                ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12367
            ]
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12368
        ]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12369
    ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12370
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12371
    "/ now, generate a dictionary, which associates a set of subclasses
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12372
    "/ to each ...
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12373
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12374
    subclassDict := IdentityDictionary new:classes size.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12375
    classes do:[:aClass |
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12376
        s := aClass superclass.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12377
        s notNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12378
            l := subclassDict at:s ifAbsent:[nil].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12379
            l isNil ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12380
                l := OrderedCollection new:5.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12381
                subclassDict at:s put:l
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12382
            ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12383
            l add:aClass
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12384
        ]
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
 12385
    ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12386
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12387
    "/
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12388
    "/ walk this ..
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12389
    "/
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12390
    remaining := classes.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12391
    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
 12392
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12393
    "/
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12394
    "/ if autoloaded classes are wanted ...
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
 12395
    "/
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12396
    withAutoloaded ifTrue:[
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12397
        (remaining includes:Autoload) ifTrue:[
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12398
            self classHierarchyOf:Autoload level:0 do:aBlock using:subclassDict removeFrom:remaining.
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12399
        ].
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12400
        (remaining asSortedCollection:[:a :b | a name < b name]) do:[:aNilSubclass |
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12401
            aBlock value:aNilSubclass value:0
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 12402
        ]
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
 12403
    ].
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
 12404
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
 12405
    "Created: 28.5.1996 / 13:46:23 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12406
    "Modified: 5.1.1997 / 18:44:50 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12407
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12408
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12409
classesInFullProtocolHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12410
    "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
 12411
     the hierarchy"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12412
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12413
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12414
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12415
    index := (classListView list size).
2753
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12416
    aClass withAllSuperclassesDo:[:c |
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12417
        (classListView isInSelection:index) ifFalse:[
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12418
            aBlock value:c
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12419
        ].
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12420
        index := index - 1
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12421
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12422
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12423
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12424
classesInHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12425
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12426
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12427
    index := (classListView list size).
2753
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12428
    aClass withAllSuperclassesDo:[:c |
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12429
        (classListView isInSelection:index) ifFalse:[
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12430
            aBlock value:c
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12431
        ].
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12432
        index := index - 1
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 12433
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12434
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12435
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12436
clearAcceptAction
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12437
    "tell the codeView that there is nothing to accept"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12438
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12439
    codeView acceptAction:nil.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12440
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12441
    "Created: / 10.2.2000 / 14:13:25 / cg"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12442
!
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12443
2026
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12444
clearExplainAction
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12445
    "tell the codeView that there is nothing to explain"
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12446
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12447
    codeView explainAction:nil.
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12448
    codeView pointerOverWordAction:nil
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12449
!
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 12450
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12451
compileCode:someCode
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12452
    (ReadStream on:someCode) fileIn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12453
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12454
3727
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
 12455
currentMethodsPreviousVersionCode
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
 12456
    currentMethod isNil ifTrue:[^ nil].
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
 12457
    ^ currentMethod previousVersion
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
 12458
!
8af370389caa previousVersions stuff moved to method (shared with NewSystemBrowser)
Claus Gittinger <cg@exept.de>
parents: 3721
diff changeset
 12459
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12460
enterBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12461
    "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
 12462
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12463
    ^ self enterBoxForCodeSelectionTitle:title withList:nil okText:okText
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12464
!
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12465
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12466
enterBoxForCodeSelectionTitle:title withList:listOrNil okText:okText
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12467
    "convenient method: setup enterBox with text from codeview"
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12468
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
 12469
    |sel box initialText superclass|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12470
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12471
    box := self 
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12472
                enterBoxTitle:(resources string:title) 
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12473
                withList:listOrNil
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12474
                okText:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12475
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12476
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12477
    sel notNil ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12478
        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
 12479
    ] ifFalse:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12480
        (currentClass notNil 
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12481
        and:[(superclass := currentClass superclass) notNil]) ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12482
            initialText := superclass name
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12483
        ]
2012
b4c2dc90f899 present superclass in find-class dialog, if nothing is selected.
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
 12484
    ].
b4c2dc90f899 present superclass in find-class dialog, if nothing is selected.
Claus Gittinger <cg@exept.de>
parents: 1995
diff changeset
 12485
    initialText notNil ifTrue:[
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12486
        box initialText:initialText
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12487
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12488
    ^ box
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12489
2030
e5ed572d0f53 avoid slow search for matching classes,
Claus Gittinger <cg@exept.de>
parents: 2029
diff changeset
 12490
    "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
 12491
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12492
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12493
enterBoxForSearchSelectorTitle:title
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12494
    "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
 12495
     method for browsing based on a selector"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12496
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12497
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12498
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12499
    box := self 
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 12500
                enterBoxTitle:title 
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 12501
                okText:'Search'
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 12502
                label:'Search selector'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12503
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12504
    box initialText:(self selectorToSearchFor).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12505
    ^ box
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12506
3300
bba900076797 upper case labels
Claus Gittinger <cg@exept.de>
parents: 3297
diff changeset
 12507
    "Modified: / 12.10.2001 / 19:44:15 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12508
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12509
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12510
enterBoxTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12511
    "convenient method: setup enterBox"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12512
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12513
    ^ 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
 12514
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12515
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12516
enterBoxTitle:title okText:okText label:label
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12517
    "convenient method: setup enterBox"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12518
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12519
    |box|
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12520
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12521
    box := EnterBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12522
    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12523
    box title:(resources string:title) 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12524
	okText:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12525
    ^ box
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12526
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12527
    "Created: 15.1.1997 / 23:01:04 / cg"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12528
    "Modified: 16.1.1997 / 00:26:31 / cg"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12529
!
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12530
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12531
enterBoxTitle:title okText:okText label:label list:aList
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12532
    "convenient method: setup enterBox"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12533
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12534
    |box fieldHolder|
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12535
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12536
    fieldHolder := ValueHolder new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12537
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12538
    box := DialogBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12539
    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12540
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12541
    (box addTextLabel:(resources string:title)) adjust:#left.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12542
    box addVerticalSpace.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12543
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12544
    aList isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12545
	box addInputFieldOn:fieldHolder.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12546
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12547
	(box addComboBoxOn:fieldHolder) list:aList
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12548
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12549
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12550
    box addVerticalSpace:15.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12551
    box addAbortButton;
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12552
	addOkButtonLabelled:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12553
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
 12554
    box aspectAt:#fieldValue put:fieldHolder.
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
 12555
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12556
"/    box showAtPointer.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12557
"/
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12558
"/    box := EnterBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12559
"/    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12560
"/    box title:(resources string:title) 
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12561
"/        okText:(resources string:okText).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12562
    ^ box
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12563
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12564
    "Created: 15.1.1997 / 23:01:04 / cg"
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
 12565
    "Modified: 16.1.1997 / 20:13:28 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12566
!
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
 12567
2535
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12568
enterBoxTitle:title withList:aListOrNil okText:okText
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12569
    "convenient method: setup enterBox"
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12570
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12571
    |box|
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12572
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12573
    aListOrNil notNil ifTrue:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12574
        box := EnterBoxWithList new.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12575
        box list:aListOrNil.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12576
    ] ifFalse:[
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12577
        box := EnterBox new.
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12578
    ].
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12579
    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
 12580
    ^ box
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12581
!
ad598fa2bf42 history in findClass/openForClass enter field.
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
 12582
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12583
environment
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12584
    "allows me to browse something different from Smalltalk (a SnapShotImage for example)"
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12585
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12586
    ^ environment ? Smalltalk
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12587
!
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12588
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12589
environment:anEnvironment
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12590
    "allows me to browse something different from Smalltalk (a SnapShotImage for example)"
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12591
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12592
    environment := anEnvironment
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12593
!
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12594
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12595
extractClassAndSelectorFromSelectionInto:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12596
    "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
 12597
     '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
 12598
    the result."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12599
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12600
    |sel clsName isMeta sep s|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12601
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12602
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12603
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12604
	sel := sel asString withoutSeparators.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12605
	('*>>*' match:sel) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12606
	    sep := $>
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12607
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12608
	    ('* *' match:sel) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12609
		sep := Character space
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12610
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12611
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12612
	sep notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12613
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12614
	     extract class/sel from selection
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12615
	    "
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12616
	    s := ReadStream on:sel.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12617
	    clsName := s upTo:sep.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12618
	    [s peek == sep] whileTrue:[s next].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12619
	    sel := s upToEnd.
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
	    (clsName endsWith:' class') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12622
		isMeta := true.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12623
		clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12624
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12625
		isMeta := false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12626
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12627
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12628
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12629
    aBlock value:clsName value:sel value:isMeta
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12630
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
 12631
    "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
 12632
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12633
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12634
findClassNamed:aClassName
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12635
    "search through namespaces for aClassName."
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12636
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12637
    |nm nameSym cls meta|
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12638
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12639
    meta := false.
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12640
    nm := aClassName.
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12641
    (nm endsWith:' class') ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12642
        meta := true.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12643
        nm := nm copyWithoutLast:6.
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12644
    ].
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12645
    nameSym := nm asSymbol.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12646
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
 12647
    currentNamespace = '* all *' ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12648
        (cls := environment at:nameSym) notNil ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12649
            meta ifTrue:[^ cls theMetaclass].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12650
            ^ cls
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12651
        ]
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
 12652
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12653
    self listOfNamespaces do:[:aNamespace |
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12654
        (cls := aNamespace at:nameSym) notNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12655
            meta ifTrue:[^ cls theMetaclass].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12656
            ^ cls
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12657
        ]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12658
    ].
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
 12659
    currentNamespace ~= '* all *' ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12660
        (cls := environment at:nameSym) notNil ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12661
            meta ifTrue:[^ cls theMetaclass].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12662
            ^ cls
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12663
        ]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12664
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12665
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
 12666
    (nm startsWith:'Smalltalk::') ifTrue:[
2820
fa69b7d4bd0e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2819
diff changeset
 12667
        cls := environment classNamed:(nm copyFrom:'Smalltalk::' size + 1).
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12668
        cls notNil ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12669
            meta ifTrue:[^ cls theMetaclass].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12670
            ^ cls
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12671
        ]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12672
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12673
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12674
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12675
    "Created: 20.12.1996 / 15:39:38 / cg"
2821
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
 12676
    "Modified: 23.1.1997 / 14:21:00 / cg"
3fbf5210c17a changes to allow other environment to
Claus Gittinger <cg@exept.de>
parents: 2820
diff changeset
 12677
!
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12678
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12679
findClassNamedInNameSpace:aClassName
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
 12680
    "search through current namespaces for aClassName.
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
 12681
     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
 12682
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
 12683
    |cls owner|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12684
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12685
    self listOfNamespaces do:[:aNamespace |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12686
	(cls := aNamespace at:aClassName asSymbol) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12687
	    (owner := cls topOwningClass) notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12688
		owner nameSpace == aNamespace ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12689
		    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12690
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12691
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12692
		cls nameSpace == aNamespace ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12693
		    ^ cls
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12694
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12695
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12696
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12697
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12698
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12699
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12700
    "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
 12701
    "Modified: 3.1.1997 / 19:30:53 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12702
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
 12703
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12704
findClassOfVariable:aVariableName accessWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12705
    "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
 12706
     is defined; 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12707
     needs either #instVarNames or #classVarNames as aSelector."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12708
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12709
    |cls homeClass list|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12710
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12711
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12712
     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
 12713
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12714
    cls := currentClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12715
    [cls notNil] whileTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12716
        aSelector == #classInstVarNames ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12717
            list := cls theMetaclass instVarNames
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12718
        ] ifFalse:[                             
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12719
            list := cls perform:aSelector
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12720
        ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12721
        (list includes:aVariableName) ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12722
            homeClass := cls.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12723
            cls := nil.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12724
        ] ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12725
            cls := cls superclass
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12726
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12727
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12728
    homeClass isNil ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12729
        "nope, must be one below ... (could optimize a bit, by searching down
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12730
         for the declaring class ...
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12731
        "
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12732
        homeClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12733
    ] ifFalse:[
552
c61c0758c10b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 547
diff changeset
 12734
"/        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
 12735
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12736
    ^ homeClass
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 12737
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12738
    "Modified: / 25.10.1997 / 20:26:25 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12739
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12740
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12741
hideMethodCategoryList
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12742
    classCategoryListView isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12743
	classListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12744
	    methodCategoryListView superView extent:0.0 @ 1.0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12745
	    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
 12746
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12747
	^ self.
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12748
    ].
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12749
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12750
    methodCategoryListView superView extent:0.0 @ 1.0.
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12751
    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
 12752
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12753
    "Created: 30.7.1997 / 17:50:27 / cg"
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12754
    "Modified: 30.7.1997 / 18:00:02 / cg"
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12755
!
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 12756
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12757
listBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12758
    "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
 12759
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12760
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12761
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12762
    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
 12763
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12764
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12765
	box initialText:(sel asString withoutSeparators)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12766
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12767
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12768
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12769
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12770
listBoxTitle:title okText:okText list:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12771
    "convenient method: setup a listBox & return it"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12772
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12773
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12774
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12775
    box := ListSelectionBox 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12776
		title:(resources string:title)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12777
		okText:(resources string:okText)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12778
		action:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12779
    box list:aList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12780
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12781
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12782
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12783
normalLabel
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12784
    "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
 12785
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12786
    |l il|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12787
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12788
    myLabel notNil ifTrue:[
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12789
        "if I have been given an explicit label,
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12790
         and its not the default, take that one"
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12791
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12792
        myLabel ~= 'System Browser' ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12793
            l := il := myLabel
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12794
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12795
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12796
    l isNil ifTrue:[    
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12797
        l := resources string:'System Browser'.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12798
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12799
        currentClass notNil ifTrue:[
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
 12800
"/            l := l, ': ', currentClass name.
2459
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12801
            l := self displayedClassNameOf:currentClass.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12802
            classListView isNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12803
                currentSelector notNil ifTrue:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12804
                    l := l , ' ' ,  currentSelector
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12805
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12806
            ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12807
                currentClass isLoaded ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12808
                    l := l , ' (unloaded)'
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12809
                ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12810
            ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12811
            il := currentClass nameWithoutPrefix
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12812
        ] ifFalse:[
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12813
            il := l.
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12814
        ]
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12815
    ].
c46ac71bd1ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
 12816
    self topView label:l; iconLabel:il.
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12817
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 12818
    "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
 12819
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12820
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12821
refetchMethod
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 12822
    |sel|
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12823
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12824
    sel := currentSelector.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12825
    self releaseMethod.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12826
    currentSelector := sel.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12827
    sel notNil ifTrue:[
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 12828
        currentMethod := (acceptClass ? actualClass) compiledMethodAt:sel.
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 12829
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 12830
        (currentMethod notNil
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 12831
        and:[currentMethod isWrapped]) ifTrue:[
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 12832
            currentMethod originalMethod  addDependent:self.
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 12833
            currentMethod addDependent:self.
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 12834
        ]
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12835
    ]
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12836
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12837
    "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
 12838
    "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
 12839
!
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12840
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
 12841
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
 12842
    |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
 12843
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
 12844
    currentClass notNil ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12845
        cls := currentClass.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12846
        cls isMeta ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12847
            meta := cls.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12848
            cls := meta theNonMetaclass
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12849
        ] ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12850
            meta := cls theMetaclass
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12851
        ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12852
        cls removeDependent:self.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12853
        meta removeDependent:self.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12854
    ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 12855
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12856
    "Created: 13.12.1995 / 15:32:21 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 12857
!
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
 12858
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12859
releaseMethod
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12860
    currentMethod notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12861
	currentMethod removeDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12862
	currentMethod isWrapped ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12863
	    currentMethod originalMethod removeDependent:self.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 12864
	]
1748
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12865
    ].
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12866
    currentMethod := currentSelector := nil.
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12867
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12868
    "Created: / 27.7.1998 / 10:56:00 / cg"
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12869
    "Modified: / 27.7.1998 / 11:26:52 / cg"
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12870
!
09dcf4b6b702 make myself dependent on counted method;
Claus Gittinger <cg@exept.de>
parents: 1747
diff changeset
 12871
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12872
selectorToSearchFor
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12873
    "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
 12874
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12875
    |sel t|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12876
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12877
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12878
    sel notNil ifTrue:[
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
 12879
        t := SystemBrowser extractSelectorFrom:sel.
2588
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12880
        t notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12881
            sel := t.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12882
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 12883
    ] ifFalse:[
2588
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12884
        methodListView notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12885
            methodListView selection notNil ifTrue:[
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 12886
sel := selectorList at:(methodListView selection).
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 12887
"/                sel := methodListView selectionValue string
2588
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12888
            ]
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12889
        ] ifFalse:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12890
            classMethodListView notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12891
                classMethodListView selection notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12892
                    sel := classMethodListView selectionValue string.
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12893
                ].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12894
                sel notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12895
                    sel := self selectorFromClassMethodString:sel
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12896
                ]
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12897
            ]
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12898
        ].
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12899
        sel notNil ifTrue:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12900
            sel := sel withoutSpaces upTo:(Character space)
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12901
        ] ifFalse:[
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12902
            sel := ''
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12903
        ]
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 12904
    ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 12905
    ^ sel string
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 12906
2588
4d59125b5f59 made selector extraction from the selection a utility
Claus Gittinger <cg@exept.de>
parents: 2586
diff changeset
 12907
    "Modified: / 6.2.2000 / 00:59:20 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12908
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 12909
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12910
setAcceptActionForClass
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12911
    "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
 12912
3592
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 12913
    ((self isReadOnlyEnvironment) 
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12914
    or:[ (currentClass isNameSpace and:[currentClass ~~ Smalltalk])
3402
dc4dd63a7061 care for nil class after selectionChange
Claus Gittinger <cg@exept.de>
parents: 3382
diff changeset
 12915
    or:[ currentClass isNil
dc4dd63a7061 care for nil class after selectionChange
Claus Gittinger <cg@exept.de>
parents: 3382
diff changeset
 12916
    or:[ currentClass isLoaded not ]]])
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12917
    ifTrue:[
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12918
        self clearAcceptAction.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12919
        ^ self
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12920
    ].
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12921
    currentClass isJavaClass ifTrue:[
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12922
        ^ self setAcceptActionForJavaClass.
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12923
    ].
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 12924
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12925
    codeView acceptAction:[:theCode |
3592
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 12926
        |ns compiler|
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12927
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12928
        currentClass notNil ifTrue:[
3592
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 12929
            ns := currentClass nameSpace.
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 12930
            compiler := currentClass subclassDefinerClass.
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12931
        ] ifFalse:[
3592
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 12932
            ns := nil.
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 12933
            compiler := Compiler.
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12934
        ].
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12935
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12936
        codeView withWaitCursorDo:[
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12937
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12938
            Class nameSpaceQuerySignal handle:[:ex |
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12939
                ns isNil ifTrue:[
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12940
                    ex reject
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12941
                ].
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12942
                ex proceedWith:ns
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12943
            ] do:[
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 12944
                AbortOperationRequest catch:[
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12945
                    UndefinedObject createMinimumProtocolInNewSubclassQuery
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12946
                    answer:true
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12947
                    do:[
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12948
                        (Class classRedefinitionSignal)handle:[:ex |
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12949
                            |answer oldVsNew oldPkg newPkg|
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12950
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12951
                            oldVsNew := ex parameter.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12952
                            oldPkg := oldVsNew key package.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12953
                            newPkg := oldVsNew value package.
2485
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12954
"/ cg: now always keep the old packageID
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12955
                            answer := OptionBox 
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12956
                                          request: 
2485
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12957
('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
 12958
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
 12959
2bff81d1febb always preserve the packageID, when chaning a classes definition
Claus Gittinger <cg@exept.de>
parents: 2480
diff changeset
 12960
PS: you can disable this check in the launchers settings-compilation dialog.' 
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 12961
                                              bindWith:(oldPkg allBold))
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12962
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12963
                                          label:'Class redefinition'
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12964
                                          form:(WarningBox iconBitmap)
3558
02f293d8d859 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3557
diff changeset
 12965
                                          buttonLabels:#('Cancel' 'Continue')
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12966
                                          values:#(#cancel #keep)
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12967
                                          default:#keep.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12968
3071
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 12969
                            (answer == #keep) ifTrue:[
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12970
                                ex proceedWith:answer
2217
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12971
                            ]
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12972
                        ] do:[
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12973
                            |rslt|
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12974
3592
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 12975
                            rslt := compiler 
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12976
                                        evaluate:theCode asString 
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12977
                                        notifying:codeView 
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12978
                                        compile:false.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12979
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12980
                            rslt isBehavior ifTrue:[
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12981
                                self classCategoryUpdate.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12982
                                self updateClassListWithScroll:false.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12983
                                codeView modified:false.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12984
                                codeModified := false.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12985
                            ].
2217
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12986
                        ]
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12987
                    ]
2217
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12988
                ].
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12989
            ].
61dd94cb55d2 default is now #keep-package when redefining a class
Claus Gittinger <cg@exept.de>
parents: 2179
diff changeset
 12990
        ].
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 12991
    ].
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 12992
3558
02f293d8d859 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3557
diff changeset
 12993
    "Modified: / 1.2.2002 / 13:14:19 / cg"
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12994
!
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12995
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12996
setAcceptActionForClassInstVars
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12997
    "tell the codeView what to do on accept"
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 12998
3592
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 12999
    ((self isReadOnlyEnvironment) 
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13000
    or:[ currentClass isLoaded not ])
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13001
    ifTrue:[
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13002
        self clearAcceptAction.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13003
        ^ self
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13004
    ].
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13005
    codeView acceptAction:[:theCode |
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13006
        codeView withWaitCursorDo:[
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 13007
            AbortOperationRequest catch:[
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13008
                Class nameSpaceQuerySignal answer:Smalltalk
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13009
                do:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13010
                    Compiler evaluate:theCode asString notifying:codeView compile:false.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13011
                ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13012
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13013
                codeView modified:false.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13014
                codeModified := false.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13015
                self normalLabel.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13016
                self updateClassList.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13017
            ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13018
        ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13019
    ].
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13020
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13021
    "Created: / 10.2.2000 / 14:11:59 / cg"
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 13022
    "Modified: / 16.11.2001 / 17:37:48 / cg"
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 13023
!
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 13024
2632
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13025
setAcceptActionForFullClass
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13026
    "tell the codeView what to do on accept"
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13027
3592
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 13028
    (self isReadOnlyEnvironment) ifTrue:[
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13029
        self clearAcceptAction.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13030
        ^ self
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13031
    ].
2632
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13032
    codeView acceptAction:[:theCode |
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13033
        codeView withWaitCursorDo:[
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 13034
            AbortOperationRequest catch:[
2632
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13035
                self compileCode:theCode asString.
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13036
                codeView modified:false.
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13037
                codeModified := false.
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13038
            ].
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13039
        ].
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13040
    ].
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13041
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13042
    "Created: / 24.2.2000 / 15:50:03 / cg"
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 13043
    "Modified: / 16.11.2001 / 17:37:51 / cg"
2632
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13044
!
d70a8e89ecb7 extracted setAcceptActionForFullClass
Claus Gittinger <cg@exept.de>
parents: 2629
diff changeset
 13045
2349
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 13046
setAcceptActionForJavaClass
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 13047
    "tell the codeView what to do on accept and explain"
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 13048
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 13049
    self setAcceptActionForNewJavaClass 
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 13050
!
7a106d001d6c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2348
diff changeset
 13051
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13052
setAcceptActionForNewClass
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13053
    "tell the codeView what to do on accept and explain"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13054
3592
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 13055
    (self isReadOnlyEnvironment) ifTrue:[
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13056
        self clearAcceptAction.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13057
        ^ self
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13058
    ].
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13059
    codeView acceptAction:[:theCode |
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13060
        codeView withWaitCursorDo:[
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 13061
            AbortOperationRequest catch:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13062
                |cls|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13063
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13064
                Object errorSignal handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13065
                    codeView error:ex errorString
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13066
                             position:1 to:nil from:nil.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13067
                ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13068
                    Class nameSpaceQuerySignal answer:Smalltalk
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13069
                    do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13070
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13071
                        cls := (Compiler evaluate:theCode asString notifying:codeView compile:false).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13072
                        cls isBehavior ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13073
                            codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13074
                            self classCategoryUpdate.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13075
                            self updateClassListWithScroll:false.
2645
d01d467c5199 #isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents: 2644
diff changeset
 13076
                            cls isNameSpace ifFalse:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13077
                                self switchToClassNamed:(cls name).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13078
                            ]
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13079
                        ]
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13080
                    ]
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13081
                ]
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13082
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13083
        ].
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13084
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13085
    self clearExplainAction.
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 13086
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 13087
    "Modified: / 16.11.2001 / 17:37:54 / cg"
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13088
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13089
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13090
setAcceptActionForNewJavaClass
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13091
    "tell the codeView what to do on accept and explain"
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13092
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13093
    codeView acceptAction:[:theCode |
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13094
        codeView withWaitCursorDo:[
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 13095
            AbortOperationRequest catch:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13096
                |cls|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13097
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13098
                Object errorSignal handle:[:ex |
3433
f433d89e07a4 class based exceptions - no longer need to send #haltSígnal
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
 13099
                    ex signal == HaltInterrupt ifTrue:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13100
                        ex reject
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13101
                    ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13102
                    codeView error:ex errorString position:1 to:nil from:nil.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13103
                ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13104
                    cls := JavaCompiler 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13105
                                evaluateClassDefinition:theCode asString 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13106
                                notifying:codeView.
3433
f433d89e07a4 class based exceptions - no longer need to send #haltSígnal
Claus Gittinger <cg@exept.de>
parents: 3430
diff changeset
 13107
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13108
                    cls isBehavior ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13109
                        codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13110
                        self classCategoryUpdate.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13111
                        self updateClassListWithScroll:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13112
                        self switchToClassNamed:(cls name).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13113
                        self classDefinition.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13114
                    ]
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13115
                ]
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13116
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13117
        ].
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13118
    ].
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13119
    self clearExplainAction.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13120
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 13121
    "Modified: / 16.11.2001 / 17:37:58 / cg"
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13122
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13123
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13124
setAcceptAndExplainActionsForMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13125
    "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
 13126
3592
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 13127
    (self isReadOnlyEnvironment) ifTrue:[
2823
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13128
        self clearAcceptAction.
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13129
        ^ self
cfb7f5478ca7 more for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2821
diff changeset
 13130
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13131
    codeView acceptAction:[:theCode |
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13132
        |cat cls rslt|
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13133
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13134
        fullProtocol ifTrue:[
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13135
            cls := acceptClass 
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13136
        ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13137
        cls isNil ifTrue:[
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13138
            cls := actualClass.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13139
            cls isNil ifTrue:[
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13140
                self warn:'oops class is gone; reselect and try again'.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13141
                ^ self
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13142
            ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13143
        ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13144
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13145
        codeView withWaitCursorDo:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13146
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13147
            (cat := currentMethodCategory) = '* all *' ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13148
                "must check from which category this code came from ...
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13149
                 ... thanks to Arno for pointing this out"
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13150
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13151
                cat := self askForMethodCategory.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13152
            ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13153
            (cat notNil and:[cat notEmpty]) ifTrue:[
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 13154
                AbortOperationRequest catch:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13155
                    lockUpdates := true.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13156
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13157
                    (Class methodRedefinitionSignal) handle:[:ex |
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13158
                        |answer oldVsNew oldPkg newPkg|
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13159
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13160
                        oldVsNew := ex parameter.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13161
                        oldPkg := oldVsNew key package.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13162
                        newPkg := oldVsNew value package.
2880
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2867
diff changeset
 13163
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2867
diff changeset
 13164
                        answer := SystemBrowser askForPackageChangeFrom:oldPkg to:newPkg.
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13165
                        (answer ~~ #cancel) ifTrue:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13166
                            ex proceedWith:answer
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13167
                        ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13168
                    ] do:[
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13169
2881
ab95a59dc419 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2880
diff changeset
 13170
                        rslt := actualClass compilerClass 
2817
4829added41b Remove leading and trailing whtepsace on method accept.
Stefan Vogel <sv@exept.de>
parents: 2813
diff changeset
 13171
                            compile:theCode asString withoutSeparators
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13172
                            forClass:cls
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13173
                            inCategory:cat 
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13174
                            notifying:codeView.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13175
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13176
                        codeView modified:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13177
                        codeModified := false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13178
                        currentMethod := actualClass compiledMethodAt:currentSelector.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13179
                        methodCategoryListView notNil ifTrue:[    
2513
e8f2d01f7ff3 care for no methodCategoryList
Claus Gittinger <cg@exept.de>
parents: 2506
diff changeset
 13180
                            ((methodCategoryListView list ? #()) includes:cat) ifFalse:[
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13181
                                self updateMethodCategoryListWithScroll:false.
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13182
                            ]
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13183
                        ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13184
                        self updateMethodListWithScroll:false keepSelection:(rslt == currentMethod).
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13185
                        self normalLabel.
2599
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13186
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13187
                        rslt isMethod ifTrue:[
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13188
                            self checkAcceptedMethod:rslt inClass:actualClass.
9f6773f63f26 added check for equally redefined method;
Claus Gittinger <cg@exept.de>
parents: 2597
diff changeset
 13189
                        ]
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13190
                    ]
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13191
                ].
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13192
                lockUpdates := false.
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13193
            ].
2471
4476877ee790 cosmetic: avoid flickering cursor
ca
parents: 2459
diff changeset
 13194
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13195
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13196
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13197
    codeView explainAction:[:theCode :theSelection |
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13198
        self showExplanation:(Explainer 
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13199
                                explain:theSelection 
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13200
                                in:theCode
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13201
                                forClass:actualClass)
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13202
    ].
2833
5bceae325a3e BRxxx -> RBxxx rename
Claus Gittinger <cg@exept.de>
parents: 2829
diff changeset
 13203
    RBFormatter notNil ifTrue:[
2443
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13204
        "/ use the refactoryBrowser for formatting, if present
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13205
        codeView formatAction:[:theCode |
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13206
            self methodFormatMethod:theCode.
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13207
        ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13208
    ].
458f47b6b5c5 support for prettyPrinting
Claus Gittinger <cg@exept.de>
parents: 2432
diff changeset
 13209
2026
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 13210
"/ future feature ...
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 13211
"/    codeView pointerOverWordAction:[:word :line :col |
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 13212
"/        word isAlphaNumeric ifTrue:[
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 13213
"/            Transcript showCR:(Explainer 
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 13214
"/                                explain:word 
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 13215
"/                                in:codeView contents
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 13216
"/                                forClass:actualClass)
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 13217
"/        ]
570188334c93 preparations for quick explanations
Claus Gittinger <cg@exept.de>
parents: 2022
diff changeset
 13218
"/    ].
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 13219
3436
c4fe19deba58 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
 13220
    "Modified: / 16.11.2001 / 17:38:01 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 13221
!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13222
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13223
setDoitActionForClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13224
    "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
 13225
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13226
    "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
 13227
     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
 13228
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13229
    codeView doItAction:[:theCode |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13230
	|compiler ns|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13231
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13232
	currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13233
	    ns := currentClass nameSpace
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13234
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13235
	    ns := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13236
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13237
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13238
	Class nameSpaceQuerySignal handle:[:ex |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13239
	    ns isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13240
		ex reject
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13241
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13242
	    ex proceedWith:ns
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13243
	] do:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13244
	    currentClass isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13245
		compiler := Compiler
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13246
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13247
		compiler := currentClass evaluatorClass
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13248
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13249
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13250
	    compiler 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13251
		evaluate:theCode 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13252
		in:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13253
		receiver:currentClass 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13254
		notifying:codeView 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13255
		logged:false
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13256
		ifFail:nil 
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13257
	]
1690
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 13258
    ].
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 13259
63fda173416f handle (& warn about) class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 1688
diff changeset
 13260
    "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
 13261
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13262
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13263
setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13264
    codeView setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13265
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13266
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13267
showExplanation:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13268
    "show explanation from Parser"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13269
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13270
    self information:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13271
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13272
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 13273
showMethodCategoryList
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 13274
    classCategoryListView isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13275
	classListView notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13276
	    methodCategoryListView superView extent:0.33 @ 1.0.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13277
	    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
 13278
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13279
	^ self.
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 13280
    ].
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 13281
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13282
	methodCategoryListView superView extent:0.25 @ 1.0.
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 13283
    ].
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 13284
    methodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13285
	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
 13286
    ].
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 13287
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 13288
    "Created: 30.7.1997 / 17:50:20 / cg"
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 13289
    "Modified: 16.8.1997 / 03:28:23 / cg"
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 13290
!
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 13291
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13292
stringToSearchFor
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13293
    "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
 13294
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13295
    |sel|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13296
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13297
    sel := codeView selection.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13298
    sel notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13299
	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
 13300
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13301
	sel isNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13302
	    currentClass notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13303
		sel := currentClass name
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13304
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13305
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13306
	sel notNil ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13307
	    sel := sel withoutSpaces
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13308
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13309
	    sel := ''
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13310
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13311
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13312
    ^ sel
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13313
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13314
    "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
 13315
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13316
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13317
warnLabel:what
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13318
    "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
 13319
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 13320
    self topView label:('System Browser WARNING: ' , what)
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 13321
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 13322
    "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
 13323
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13324
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13325
warnObsoleteCode:whatHappened
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13326
    "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
 13327
     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
 13328
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13329
    self warnLabel:whatHappened.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13330
    codeView contents:(codeView contents asText 
3239
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 13331
                        emphasizeAllWith:(SystemBrowser emphasisForObsoleteCode))
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13332
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13333
    "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
 13334
    "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
 13335
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13336
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13337
withSearchCursorDo:aBlock
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 13338
    ^ 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
 13339
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13340
    "Created: 23.11.1995 / 14:11:14 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 13341
    "Modified: 18.8.1997 / 15:40:19 / cg"
3382
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13342
!
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13343
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13344
withWaitCursorDo:aBlock
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13345
    |topView|
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13346
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13347
    topView := self topView.
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13348
    topView == self ifTrue:[
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13349
        ^ super withWaitCursorDo:aBlock
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13350
    ].
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13351
    ^ topView withWaitCursorDo:aBlock
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13352
2b4820133399 withBusyCursorDo: -> withWaitCursorDo:
Claus Gittinger <cg@exept.de>
parents: 3358
diff changeset
 13353
    "Created: 18.8.1997 / 15:41:52 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13354
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13355
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13356
!BrowserView methodsFor:'private - defaults'!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13357
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13358
canvasIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13359
    "answer an icon to mark canvas (windowSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13360
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13361
    ^ self fetchIcon:#canvas selector:#canvasIcon
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13362
!
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13363
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13364
fetchIcon:name selector:fetchSelector
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13365
    "answer an icon"
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13366
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13367
    icons isNil ifTrue:[icons := IdentityDictionary new].
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13368
    Icons isNil ifTrue:[Icons := IdentityDictionary new].
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13369
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13370
    ^ icons at:name ifAbsentPut:[
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13371
        |fh icn h|
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13372
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13373
        (icn := Icons at:name ifAbsent:nil) isNil ifTrue: [
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13374
            Icons at:name put:(icn := (SystemBrowser perform:fetchSelector) onDevice:Display).
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13375
            icn clearMaskedPixels.
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13376
        ].
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13377
        h := icn height.
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13378
        h > (fh := SelectionInListView defaultFont heightOn:device) ifTrue:[
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13379
            icn := icn magnifiedBy:(fh / h)
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13380
        ].
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13381
        icn onDevice:device
1747
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13382
      ]
c5bb7a2b0037 magnify method-icons to match the font size.
Claus Gittinger <cg@exept.de>
parents: 1734
diff changeset
 13383
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13384
    "
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13385
     Icons := nil
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13386
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13387
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13388
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 13389
fileImageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 13390
    "answer an icon to mark fileImage methods"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 13391
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13392
    ^ self fetchIcon:#fileImage selector:#fileImageIcon
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 13393
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 13394
    "Modified: / 7.4.1997 / 17:31:40 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 13395
    "Created: / 29.10.1997 / 03:32:05 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 13396
!
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 13397
2348
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13398
globalClassIdentifierEmphasisAndColor
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13399
    |prefs|
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13400
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13401
    prefs := UserPreferences current.
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13402
    ^ Text 
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13403
        addEmphasis:(prefs globalClassIdentifierEmphasis) to:(#color->prefs globalClassIdentifierColor).
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13404
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13405
!
b4fd9d8bb6dc more java stuff
Claus Gittinger <cg@exept.de>
parents: 2347
diff changeset
 13406
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 13407
helpIcon
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 13408
    "answer an icon to mark help spec methods"
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 13409
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13410
    ^ self fetchIcon:#help selector:#helpIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 13411
!
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 13412
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13413
hierarchicalListIcon
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13414
    "answer an icon to mark hierarchicalList spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13415
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13416
    ^ self fetchIcon:#hierarchicalList selector:#hierarchicalListIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13417
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13418
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13419
imageIcon
1512
ed3ac00a74c0 #help as resource type for help specs added
tz
parents: 1511
diff changeset
 13420
    "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
 13421
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13422
    ^ self fetchIcon:#image selector:#imageIcon
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13423
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13424
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13425
menuIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13426
    "answer an icon to mark menu spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13427
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13428
    ^ self fetchIcon:#menu selector:#menuIcon
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13429
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13430
1851
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 13431
programImageIcon
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 13432
    "answer an icon to mark program-image spec methods"
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 13433
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13434
    ^ self fetchIcon:#programImage selector:#programImageIcon
1851
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 13435
!
99ddbf8f6ee0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1849
diff changeset
 13436
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13437
programMenuIcon
2629
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 13438
    "answer an icon to mark menu spec methods"
201de0618d5d use different icons for menu / programMenu
Claus Gittinger <cg@exept.de>
parents: 2624
diff changeset
 13439
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13440
    ^ self fetchIcon:#programMenu selector:#programMenuIcon
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13441
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13442
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13443
stopIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13444
    "answer an icon to mark breakPointed methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13445
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13446
    ^ self fetchIcon:#stop selector:#stopIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13447
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13448
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13449
tabListIcon
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13450
    "answer an icon to mark tabList spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13451
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13452
    ^ self fetchIcon:#tabList selector:#tabListIcon
1511
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13453
!
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13454
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13455
tableColumnsIcon
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13456
    "answer an icon to mark tableColumns spec methods"
45832de7f112 method icons revised and completed
tz
parents: 1510
diff changeset
 13457
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13458
    ^ self fetchIcon:#tableColumns selector:#tableColumnsIcon
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13459
!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13460
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13461
timeIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13462
    "answer an icon to mark timed methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13463
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13464
    ^ self fetchIcon:#time selector:#timeIcon
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13465
!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13466
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13467
traceIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13468
    "answer an icon to mark traced methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13469
2742
0e2c624f20c5 code cleanup: moved iconMethods to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2739
diff changeset
 13470
    ^ self fetchIcon:#trace selector:#traceIcon
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13471
! !
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 13472
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13473
!BrowserView methodsFor:'private queries'!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13474
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13475
hasClassCategorySelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13476
        ^ currentClassCategory notNil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13477
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13478
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13479
hasClassCategorySelectedAndIsNotSimulatedEnvironment
3571
b892c1154d9d fixes for remote/image browsing
Claus Gittinger <cg@exept.de>
parents: 3559
diff changeset
 13480
        ^ currentClassCategory notNil and:[self isNotSimulatedEnvironment]
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13481
!
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13482
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13483
hasClassCategorySelectedHolder
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13484
        ^ [ self hasClassCategorySelected ]
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13485
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13486
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13487
hasClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13488
        ^ currentClass notNil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13489
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13490
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13491
hasClassSelectedAndIsNotSimulatedEnvironment
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13492
        ^ self hasClassSelected and:[self isNotSimulatedEnvironment]
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13493
!
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13494
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13495
hasClassSelectedHolder
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13496
        ^ [ self hasClassSelected ]
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13497
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13498
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13499
hasLoadedClassSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13500
        ^ currentClass notNil and:[currentClass isLoaded]
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13501
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13502
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13503
hasLoadedClassSelectedAndIsNotSimulatedEnvironment
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13504
        ^ self hasLoadedClassSelected and:[self isNotSimulatedEnvironment]
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13505
!
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13506
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13507
hasMethodCategorySelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13508
        ^ currentMethodCategory notNil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13509
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13510
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13511
hasMethodCategorySelectedAndIsNotSimulatedEnvironment
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13512
        ^ self hasMethodCategorySelected and:[self isNotSimulatedEnvironment]
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13513
!
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13514
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13515
hasMethodSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13516
        ^ currentMethod notNil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13517
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13518
3659
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
 13519
hasMethodSelectedAndIsNotReadOnlyEnvironment
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
 13520
        ^ self hasMethodSelected and:[self isReadOnlyEnvironment]
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
 13521
!
6de2081a1e0d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3653
diff changeset
 13522
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13523
hasMethodSelectedAndIsNotSimulatedEnvironment
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13524
        ^ self hasMethodSelected and:[self isNotSimulatedEnvironment]
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13525
!
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13526
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13527
hasSourceCodeManager
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13528
        ^ Smalltalk sourceCodeManager notNil
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13529
!
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13530
3649
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
 13531
hasUnwrappedMethodSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
 13532
        ^ currentMethod notNil and:[currentMethod isWrapped not]
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
 13533
!
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
 13534
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
 13535
hasWrappedMethodSelected
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
 13536
        ^ currentMethod notNil and:[currentMethod isWrapped]
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
 13537
!
3d9a810c628a debug menu
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
 13538
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13539
isNotSimulatedEnvironment
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13540
        ^ self isSimulatedEnvironment not
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13541
!
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13542
3592
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 13543
isReadOnlyEnvironment
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 13544
    (self environment respondsTo:#isReadOnlyEnvironment) ifTrue:[
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 13545
        ^ self environment isReadOnlyEnvironment
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 13546
    ].
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 13547
    ^ self environment ~~ Smalltalk
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 13548
!
65031a1e3bcf isReadOnlyEnvironment;
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
 13549
3114
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13550
isSimulatedEnvironment
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13551
        ^ self environment ~~ Smalltalk
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13552
!
c7cd483e0bb3 menu item disabling for image browsing
Claus Gittinger <cg@exept.de>
parents: 3113
diff changeset
 13553
3135
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13554
selectedMethodIsBreakpointed
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13555
    ^ currentMethod notNil and:[currentMethod isBreakpointed]
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13556
!
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13557
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13558
selectedMethodIsNotWrapped
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13559
    ^ currentMethod notNil and:[currentMethod isWrapped not]
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13560
!
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13561
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13562
selectedMethodIsTraced
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13563
    ^ currentMethod notNil and:[currentMethod isTraced]
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13564
!
98fa832ea88e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
 13565
3111
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13566
showingClass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13567
        ^ showInstance not
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13568
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13569
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13570
showingClassAndHasMethodCategorySelectedAndIsApplicationSubclass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13571
        ^ self showingClass and:[self hasMethodCategorySelected]
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13572
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13573
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13574
showingClassAndIsApplicationSubclass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13575
        ^ showInstance not 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13576
        and:[ currentClass notNil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13577
        and:[ currentClass isSubclassOf:ApplicationModel ]]
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13578
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13579
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13580
showingClassAndIsDialogSubclass
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13581
        ^ showInstance not 
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13582
        and:[ currentClass notNil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13583
        and:[ currentClass isSubclassOf:Dialog ]]
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13584
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13585
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13586
showingInstance
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13587
        ^ showInstance
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13588
!
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13589
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13590
showingInstanceAndHasVariableSelected
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13591
        ^ showInstance  
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13592
        and:[ variableListView notNil
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13593
        and:[ variableListView selectionValue notNil ]]
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13594
! !
826e78b4a63b browser now has a menuBar.
Claus Gittinger <cg@exept.de>
parents: 3101
diff changeset
 13595
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13596
!BrowserView methodsFor:'syntax coloring'!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13597
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13598
startSyntaxHighlightProcess
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13599
    "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
 13600
     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
 13601
     text. 
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13602
     (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
 13603
      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
 13604
      any modifications in the meanwhile)"
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13605
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 13606
    |oldCodeList highlighter prio|
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13607
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13608
    coloringProcess notNil ifTrue:[
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13609
        coloringProcess terminate.
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13610
        coloringProcess := nil.
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13611
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13612
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13613
    currentMethod isNil ifTrue:[^ self].
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13614
    UserPreferences current syntaxColoring == true ifFalse:[^ self].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13615
3662
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 13616
    highlighter := currentMethod syntaxHighlighterClass.
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 13617
    highlighter == #askClass ifTrue:[
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 13618
        highlighter := actualClass syntaxHighlighterClass.
925e26a21892 allow for method to define individual syntaxHighlighterClass
Claus Gittinger <cg@exept.de>
parents: 3660
diff changeset
 13619
    ].
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13620
    highlighter isNil ifTrue:[^ self].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13621
2272
6eda2d09f226 even lower syntaxHighlighting prio
Claus Gittinger <cg@exept.de>
parents: 2264
diff changeset
 13622
    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
 13623
    self topView shown ifFalse:[
2272
6eda2d09f226 even lower syntaxHighlighting prio
Claus Gittinger <cg@exept.de>
parents: 2264
diff changeset
 13624
        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
 13625
    ].
036fa673217d lower prio of syntaxProcess even more, if topView is not visible
Claus Gittinger <cg@exept.de>
parents: 2261
diff changeset
 13626
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13627
    coloringProcess := [
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13628
        |oldCode newCode cls sensor|
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13629
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13630
        [
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13631
            codeView modified ifFalse:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13632
                oldCodeList := codeView list copy.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13633
                codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13634
                    oldCodeList isNil ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13635
                        oldCode := oldCodeList asStringWithoutEmphasis.
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13636
                        codeView modified ifFalse:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13637
                            "/ oldCode := oldCodeList asStringWithoutEmphasis.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13638
                            cls := actualClass.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13639
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13640
                            codeView modified ifFalse:[
2431
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 13641
                                Screen currentScreenQuerySignal answer:device
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 13642
                                do:[
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 13643
                                    newCode := highlighter formatMethod:oldCode in:cls.
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 13644
                                ].
3bc75f69d325 Answer currentScreen for SyntaxHighlighter
Stefan Vogel <sv@exept.de>
parents: 2429
diff changeset
 13645
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13646
                                "/ 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
 13647
                                "/ by any arriving key-event.
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13648
                                codeView modified ifFalse:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13649
                                    newCode := newCode asStringCollection.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13650
                                    codeView modified ifFalse:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13651
                                        coloringProcess := nil.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13652
                                        (sensor := self sensor) notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13653
                                            sensor
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13654
                                                pushUserEvent:#syntaxHighlightedCode: for:self
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13655
                                                withArguments:(Array with:newCode).
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13656
                                        ]
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13657
                                    ]
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13658
                                ]
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13659
                            ].
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13660
                        ].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13661
                    ].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13662
                ].
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13663
            ].
3597
2e7fc0ae28c9 #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 3592
diff changeset
 13664
        ] ensure:[
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13665
            coloringProcess := nil.
2219
82563237e8a8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
 13666
        ].
2264
036fa673217d lower prio of syntaxProcess even more, if topView is not visible
Claus Gittinger <cg@exept.de>
parents: 2261
diff changeset
 13667
    ] forkAt:prio.
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13668
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13669
    codeView modified:false.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13670
    codeView modifiedChannel onChangeSend:#codeChanged to:self.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13671
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13672
    "Created: / 31.3.1998 / 14:25:29 / cg"
1715
fc4c59f0eff8 stop syntaxHilighting process on destroy;
Claus Gittinger <cg@exept.de>
parents: 1709
diff changeset
 13673
    "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
 13674
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13675
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13676
stopSyntaxHighlightProcess
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13677
    "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
 13678
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13679
    |p|
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13680
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13681
    (p := coloringProcess) notNil ifTrue:[
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13682
        coloringProcess := nil.
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13683
        p terminate.
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13684
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13685
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13686
    "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
 13687
!
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13688
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13689
syntaxHighlightedCode:newCode
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13690
    "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
 13691
     with highlighted syntax.
2241
135c9d26a697 also start a syntaxHighlight, if some other method or
Claus Gittinger <cg@exept.de>
parents: 2238
diff changeset
 13692
     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
 13693
2428
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13694
    |firstShown lastShown sensor cursorWasOn anyChange newLines l
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13695
     replaceAction|
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13697
    codeView modified ifTrue:[
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13698
        "/ new input arrived in the meantime
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13699
        ^ self
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13700
    ].
2254
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 13701
"/    codeView hasSelection ifTrue:[
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 13702
"/        "/ something selected - dont overwrite (is this agood idea ?)
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 13703
"/        ^ self
c1f354cb4a1d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2253
diff changeset
 13704
"/    ].
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13705
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13706
    coloringProcess notNil ifTrue:[
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13707
        "/ 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
 13708
        "/ ignore this (leftover) code.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13709
        ^ self
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13710
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13711
    currentMethod isNil ifTrue:[
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13712
        "/ 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
 13713
        "/ or closed.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13714
        ^ self
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13715
    ].
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13716
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13717
    firstShown := codeView firstLineShown.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13718
    lastShown := codeView lastLineShown.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13719
    sensor := self sensor.
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13720
2428
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13721
    replaceAction := [:lNr :line |
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13722
        |oldLine|
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13723
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13724
        oldLine := codeView listAt:lNr.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13725
        oldLine notNil ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13726
            line notNil ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13727
                "/ 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
 13728
                "/ 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
 13729
                "/ resulting error.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13730
                "/ Certainly a kludge. 
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13731
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13732
                oldLine string = line string ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13733
                    oldLine emphasis ~= line emphasis ifTrue:[
2668
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13734
                        codeView list at:lNr put:line.
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13735
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13736
                        codeView withoutRedrawAt:lNr put:line.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13737
                        (lNr between:firstShown and:lastShown) ifTrue:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13738
                            anyChange ifFalse:[
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13739
                                anyChange := true.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13740
                                cursorWasOn := codeView hideCursor
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13741
                            ].
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13742
                            codeView redrawLine:lNr.
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13743
                        ]
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13744
                    ]
1720
d76ee513d34e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
 13745
"/                ] ifFalse:[
d76ee513d34e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
 13746
"/                    oldLine string printCR.
d76ee513d34e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
 13747
"/                    line string printCR.
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13748
                ]
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13749
            ]
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13750
        ].
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13751
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13752
        "/ stop when keyboard input arrives ...
2429
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13753
"/ cg: commented - thats done when text is modified ...
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13754
"/        (sensor hasUserEvents) ifTrue:[
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13755
"/            (sensor hasKeyPressEventFor:nil) ifTrue:[
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13756
"/                (anyChange and:[cursorWasOn]) ifTrue:[codeView showCursor].
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13757
"/                ^ self.
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13758
"/            ]
fe077224ade0 show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2428
diff changeset
 13759
"/        ]
2171
95b90c01b183 avoid cursor flicker when inserting syntax-highlighted code.
Claus Gittinger <cg@exept.de>
parents: 2163
diff changeset
 13760
    ].
2428
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13761
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13762
    anyChange := false.
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13763
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13764
    newLines := newCode asStringCollection.
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13765
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13766
    "/ 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
 13767
    (l := codeView cursorLine) notNil ifTrue:[
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13768
        l <= newLines size ifTrue:[
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13769
            replaceAction value:l value:(newLines at:l)
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13770
        ]
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13771
    ].
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13772
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13773
    newLines keysAndValuesDo:replaceAction.
46edc54e3e0e show syntaxHighlighted code in cursorLine first;
Claus Gittinger <cg@exept.de>
parents: 2425
diff changeset
 13774
2668
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13775
    anyChange ifTrue:[
3457
a0590e01e555 do not set the modified flag when the syntaxHighlighted text arrives
Claus Gittinger <cg@exept.de>
parents: 3444
diff changeset
 13776
        "/ codeView textChanged.
2668
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13777
        cursorWasOn ifTrue:[
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13778
            codeView showCursor
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13779
        ]
342f4eb3c402 avoid multiple change notifications (for each line)
Claus Gittinger <cg@exept.de>
parents: 2658
diff changeset
 13780
    ].
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13781
3457
a0590e01e555 do not set the modified flag when the syntaxHighlighted text arrives
Claus Gittinger <cg@exept.de>
parents: 3444
diff changeset
 13782
    "Modified: / 20.11.2001 / 00:38:09 / cg"
1696
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13783
! !
12523922fccb fixed syntaxHighlighting to avoid loosing keyboard input.
Claus Gittinger <cg@exept.de>
parents: 1690
diff changeset
 13784
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13785
!BrowserView methodsFor:'unused'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13786
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13787
listOfAllMethodCategoriesInHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13788
    "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
 13789
     and all of its superclasses"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13790
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3625
diff changeset
 13791
    |newList|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13792
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13793
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13794
    self classesInHierarchy:aClass do:[:c |
2658
e7b534f65df5 categories
Claus Gittinger <cg@exept.de>
parents: 2656
diff changeset
 13795
        newList addAll:(c categories).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13796
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13797
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13798
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13799
    ^ newList asOrderedCollection sort
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13800
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 13801
    "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
 13802
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13803
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13804
listOfAllSelectorsInCategory:aCategory inHierarchyOfClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13805
    "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
 13806
     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
 13807
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13808
    |newList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13809
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13810
    newList := Set new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13811
    self classesInHierarchy:aClass do:[:c |
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13812
	|searchCategory|
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13813
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13814
	(aCategory = '* all *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13815
	    newList addAll:(c methodDictionary keys)
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13816
	] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13817
	    (aCategory = '* no category *') ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13818
		searchCategory := nil
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13819
	    ] ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13820
		searchCategory := aCategory
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13821
	    ].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13822
	    c methodDictionary keysAndValuesDo:[:selector :aMethod |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13823
		(aMethod category = searchCategory) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13824
		    newList add:selector
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13825
		]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13826
	    ]
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13827
	].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13828
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13829
    (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
 13830
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 13831
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 13832
    "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
 13833
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 13834
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13835
!BrowserView methodsFor:'variable list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13836
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13837
allClassInstVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13838
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13839
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13840
    self allVarRefsTitle:'class instance variable to browse all modifications of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13841
		  access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13842
		    mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13843
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13844
    "Modified: / 25.10.1997 / 20:19:49 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13845
    "Created: / 25.10.1997 / 20:21:48 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13846
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13847
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13848
allClassInstVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13849
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13850
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13851
    self allVarRefsTitle:'class instance variable to browse all references to:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13852
		  access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13853
		    mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13854
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13855
    "Modified: / 25.10.1997 / 20:20:09 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13856
    "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
 13857
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13858
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13859
allClassVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13860
    "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
 13861
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13862
    self allVarRefsTitle:'class variable to browse all modifications of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13863
		  access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13864
		    mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13865
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13866
    "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
 13867
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13868
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13869
allClassVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13870
    "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
 13871
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13872
    self allVarRefsTitle:'class variable to browse all references to:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13873
		  access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13874
		    mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13875
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13876
    "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
 13877
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13878
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13879
allInstVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13880
    "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
 13881
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13882
    self allVarRefsTitle:'instance variable to browse all modifications of:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13883
		  access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13884
		    mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13885
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13886
    "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
 13887
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13888
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13889
allInstVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13890
    "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
 13891
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13892
    self allVarRefsTitle:'instance variable to browse all references to:' 
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13893
		  access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13894
		    mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13895
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13896
    "Modified: / 25.10.1997 / 20:22:40 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13897
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13898
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13899
allVarRefsTitle:title access:access mods:modifications
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13900
    "show an enterbox for instVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13901
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13902
    self doClassMenu:[:currentClass |
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13903
        |box|
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13904
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13905
        box := self enterBoxForVariableSearch:title.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13906
        box action:[:aVariableName |
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13907
            |homeClass|
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13908
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13909
            aVariableName isEmpty ifFalse:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13910
                self withSearchCursorDo:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13911
                    homeClass := self findClassOfVariable:aVariableName accessWith:access.
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13912
                    access == #classVarNames ifTrue:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13913
                        SystemBrowser 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13914
                            browseClassRefsTo:aVariableName 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13915
                            under:homeClass 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13916
                            modificationsOnly:modifications
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13917
                    ] ifFalse:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13918
                        access == #classInstVarNames ifTrue:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13919
                            SystemBrowser 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13920
                                browseInstRefsTo:aVariableName 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13921
                                under:homeClass class
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13922
                                modificationsOnly:modifications
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13923
                        ] ifFalse:[
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13924
                            SystemBrowser 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13925
                                browseInstRefsTo:aVariableName 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13926
                                under:homeClass 
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13927
                                modificationsOnly:modifications
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13928
                        ]
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13929
                     ]
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13930
                ]
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13931
            ]
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13932
        ].
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 13933
        box open
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13934
    ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13935
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13936
    "Created: / 25.10.1997 / 20:19:26 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13937
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13938
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13939
classInstVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13940
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13941
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13942
    self varRefsOrModsTitle:'class instance variable to browse modifications of:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13943
		     access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13944
		       mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13945
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13946
    "Modified: / 25.10.1997 / 20:17:41 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13947
    "Created: / 25.10.1997 / 20:21:04 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13948
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13949
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13950
classInstVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13951
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13952
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13953
    self varRefsOrModsTitle:'class instance variable to browse references to:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13954
		     access:#classInstVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13955
		       mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13956
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13957
    "Modified: / 25.10.1997 / 20:17:23 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13958
    "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
 13959
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13960
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13961
classVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13962
    "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
 13963
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13964
    self varRefsOrModsTitle:'class variable to browse modifications of:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13965
		     access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13966
		       mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13967
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13968
    "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
 13969
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13970
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13971
classVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 13972
    "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
 13973
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13974
    self varRefsOrModsTitle:'class variable to browse references to:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13975
		     access:#classVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 13976
		       mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13977
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 13978
    "Modified: / 25.10.1997 / 20:17:23 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13979
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13980
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13981
enterBoxForVariableSearch:title
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13982
    |box sel|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13983
3618
186aaeb2fdee changes to support pst
Claus Gittinger <cg@exept.de>
parents: 3609
diff changeset
 13984
    box := self enterBoxForCodeSelectionTitle:title okText:'Browse'.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13985
    variableListView notNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13986
        codeView hasSelection ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13987
            (sel := variableListView selectionValue) notNil ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13988
                (sel startsWith:'-') ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13989
                    box initialText:sel
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13990
                ]
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13991
            ]
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 13992
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13993
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13994
    ^ box
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13995
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13996
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13997
instVarMods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13998
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 13999
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14000
    self varRefsOrModsTitle:'instance variable to browse modifications of:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14001
		     access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14002
		       mods:true
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14003
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14004
    "Modified: / 25.10.1997 / 20:14:52 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14005
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14006
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14007
instVarRefs
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14008
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14009
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14010
    self varRefsOrModsTitle:'instance variable to browse references to:'
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14011
		     access:#instVarNames
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14012
		       mods:false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14013
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14014
    "Modified: / 25.10.1997 / 20:14:27 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14015
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14016
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14017
showClassInstVars
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14018
    classInstVarsInVarList := true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14019
    self updateVariableList.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14020
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14021
    "Created: / 25.10.1997 / 19:43:04 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14022
    "Modified: / 25.10.1997 / 19:43:41 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14023
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14024
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14025
showClassVars
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14026
    classInstVarsInVarList := false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14027
    self updateVariableList.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14028
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14029
    "Created: / 25.10.1997 / 19:42:55 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14030
    "Modified: / 25.10.1997 / 19:43:35 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14031
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14032
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 14033
varInspect
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 14034
    "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
 14035
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 14036
    |name searchClass dict|
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 14037
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 14038
    name := variableListView selectionValue.
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 14039
    name isNil ifTrue:[^ self].
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 14040
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 14041
    showInstance ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14042
	"/ inspect an instVar
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14043
	"/ create a dictionary of all instances with their current value there
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14044
	dict := IdentityDictionary new.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14045
	currentClass allInstancesDo:[:i |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14046
	    dict at:i put:(i instVarNamed:name).
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14047
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14048
	(dict size == 0) ifTrue:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14049
	    self warn:'there are currently no instances of ' , currentClass name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14050
	    ^ self
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14051
	].
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14052
	dict inspect
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 14053
    ] ifFalse:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14054
	(classInstVarsInVarList) ifFalse:[
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14055
	    "/ inspect a classVar
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14056
	    searchClass := currentClass whichClassDefinesClassVar:name.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14057
	    (searchClass classVarAt:(name asSymbol)) inspect
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14058
	] ifTrue:[        
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14059
	    "/ inspect a classInstVar
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14060
	    (currentClass instVarNamed:name) inspect.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14061
	].
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 14062
    ].
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 14063
1936
1698a6c2a38f more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1934
diff changeset
 14064
    "Modified: / 16.10.1998 / 00:37:58 / cg"
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 14065
!
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 14066
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14067
varRefsOrModsTitle:title access:accessor mods:mods
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14068
    "show an enterbox for instvar to search for"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14069
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14070
    self doClassMenu:[:currentClass |
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14071
        |box|
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14072
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14073
        box := self enterBoxForVariableSearch:title.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14074
        box action:[:aString |
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14075
            aString notEmpty ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14076
                self withSearchCursorDo:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14077
                    |sel classes|
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14078
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14079
                    sel := #'browseInstRefsTo:in:modificationsOnly:'.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14080
                    accessor == #classInstVarNames ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14081
                        classes := Array with:currentClass theMetaclass.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14082
                    ] ifFalse:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14083
                        classes := Array with:currentClass.
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14084
                        accessor == #classVarNames ifTrue:[
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14085
                            sel := #'browseClassRefsTo:in:modificationsOnly:'
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14086
                        ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14087
                    ].
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14088
                    SystemBrowser perform:sel with:aString with:classes with:mods 
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14089
                ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14090
            ]
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14091
        ].
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 14092
        box open
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14093
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14094
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14095
    "Created: / 25.10.1997 / 20:12:52 / cg"
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 14096
    "Modified: / 25.10.1997 / 21:10:34 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 14097
!
93
claus
parents: 92
diff changeset
 14098
claus
parents: 92
diff changeset
 14099
varTypeInfo
claus
parents: 92
diff changeset
 14100
    "show typical usage of a variable"
claus
parents: 92
diff changeset
 14101
claus
parents: 92
diff changeset
 14102
    |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
 14103
     searchClass s canInspect|
93
claus
parents: 92
diff changeset
 14104
claus
parents: 92
diff changeset
 14105
    name := variableListView selectionValue.
claus
parents: 92
diff changeset
 14106
    name isNil ifTrue:[^ self].
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14107
    name := name allBold.
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 14108
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 14109
    canInspect := false.
93
claus
parents: 92
diff changeset
 14110
1390
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 14111
    (classInstVarsInVarList or:[showInstance]) ifFalse:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14112
        searchClass := currentClass whichClassDefinesClassVar:name.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14113
        value := searchClass classVarAt:(name asSymbol).
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14114
        s := value displayString.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14115
        s size > 60 ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14116
            s := (s copyTo:60) , ' ...'
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14117
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14118
        msg := name , ' is (currently):\\' , s.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14119
        s ~= value classNameWithArticle ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14120
            msg := msg , '\\(' , value class name , ')'
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14121
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14122
        canInspect := true.
1390
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 14123
    ] ifTrue:[        
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14124
        searchClass := actualClass whichClassDefinesInstVar:name.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14125
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14126
        idx := searchClass instVarOffsetOf:name.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14127
        idx isNil ifTrue:[^ self].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14128
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14129
        classes := IdentitySet new.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14130
        values := IdentitySet new.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14131
        instCount := 0.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14132
        subInstCount := 0.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14133
        searchClass allSubInstancesDo:[:i |
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14134
            |val|
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14135
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14136
            val := i instVarAt:idx.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14137
            val notNil ifTrue:[values add:val].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14138
            classes add:val class.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14139
            (i isMemberOf:searchClass) ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14140
                instCount := instCount + 1.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14141
            ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14142
                subInstCount := subInstCount + 1
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14143
            ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14144
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14145
        (instCount == 0 and:[subInstCount == 0]) ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14146
            self warn:'there are currently no instances of ' , currentClass name.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14147
            ^ self
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14148
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14149
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14150
        instCount ~~ 0 ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14151
            msg := 'in (currently: ' , instCount printString,') instances '.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14152
            subInstCount ~~ 0 ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14153
                msg := msg , 'and '
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14154
            ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14155
        ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14156
            msg := 'in '.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14157
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14158
        subInstCount ~~ 0 ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14159
            msg := msg , '(currently: ' , subInstCount printString, ') derived instances '
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14160
        ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14161
        msg := msg, 'of ' , searchClass name , ',\'.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14162
        msg := msg , name , ' '.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14163
        ((values size == 1) 
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14164
        or:[classes size == 1 and:[classes first == UndefinedObject]]) ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14165
            values size == 1 ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14166
                value := values first.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14167
            ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14168
            (value isNumber or:[value isString]) ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14169
                msg := msg , 'is always the same:\\      ' , 
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14170
                             value class name , ' (' , value storeString , ')'.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14171
                canInspect := true.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14172
            ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14173
                (value isNil or:[value == true or:[value == false]]) ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14174
                    msg := msg , 'is always:\\      ' , 
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14175
                                 value printString.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14176
                ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14177
                    msg := msg , 'is always the same:\\'.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14178
                    msg := msg , '      ' , value class name.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14179
                    value isLiteral ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14180
                        msg := msg , ' (' , value storeString , ')'
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14181
                    ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14182
                    canInspect := true.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14183
                ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14184
            ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14185
        ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14186
            classes size == 1 ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14187
                msg := msg , 'is always:\\'.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14188
                msg := msg , '      ' , classes first name , '\'.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14189
            ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14190
                msg := msg , 'is one of:\\'.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14191
                classes := classes asOrderedCollection.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14192
                classes size > 20 ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14193
                    classes := classes copyFrom:1 to:20.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14194
                    cut := true
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14195
                ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14196
                    cut := false.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14197
                ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14198
                names := classes collect:[:cls |
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14199
                    cls == UndefinedObject ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14200
                        'nil'
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14201
                    ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14202
                        cls == True ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14203
                            'true'
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14204
                        ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14205
                            cls == False ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14206
                                'false'
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14207
                            ] ifFalse:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14208
                                cls name
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14209
                            ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14210
                        ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14211
                    ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14212
                ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14213
                names sort.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14214
                names do:[:nm |
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14215
                    msg := msg , '      ' , nm , '\'.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14216
                ].
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14217
            ]
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14218
        ].
93
claus
parents: 92
diff changeset
 14219
    ].
claus
parents: 92
diff changeset
 14220
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 14221
    canInspect ifTrue:[
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 14222
       (OptionBox 
3071
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 14223
              request:msg withCRs
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 14224
              label:'Variable Type Information'
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 14225
              form:(InfoBox iconBitmap)
3771
99f966f392d4 button labels uppercase
Claus Gittinger <cg@exept.de>
parents: 3760
diff changeset
 14226
              buttonLabels:#('OK' 'Inspect')
3071
652c6b4f6981 optionBox: cancel-value corrected
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
 14227
              values:#(true #inspect)) == #inspect
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14228
        ifTrue:[
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14229
            value inspect
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14230
        ]
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 14231
    ] ifFalse:[
2867
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14232
        box := InfoBox title:msg withCRs.
0ce30d3c763f asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 2860
diff changeset
 14233
        box label:'Variable Type Information'.
3293
d7b925f89a7b dont use explicit showAtPointer
Claus Gittinger <cg@exept.de>
parents: 3267
diff changeset
 14234
        box open
2079
e9949d2dcb91 added #inspect-button to var-type info.
Claus Gittinger <cg@exept.de>
parents: 2076
diff changeset
 14235
    ].
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 14236
1390
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 14237
    "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
 14238
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14239
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14240
variableListMenu
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14241
    <resource: #programMenu >
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14242
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 14243
    |items m|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14244
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14245
    currentClass isNil ifTrue:[
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14246
        variableListView flash.
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14247
        ^ nil
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14248
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14249
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14250
    showInstance ifFalse:[
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14251
        items := #(
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14252
                    ('Class Instvar Refs...'      classInstVarRefs    )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14253
                    ('Class Instvar Mods...'      classInstVarMods    )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14254
                    ('Classvar Refs...'           classVarRefs        )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14255
                    ('Classvar Mods...'           classVarMods        )
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14256
                    ('-'                           nil                 )
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14257
                    ('All Class Instvar Refs...'  allClassInstVarRefs )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14258
                    ('All Class Instvar Mods...'  allClassInstVarMods )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14259
                    ('All Classvar Refs...'       allClassVarRefs     )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14260
                    ('All Classvar Mods...'       allClassVarMods     )
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14261
                   ).
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14262
    ] ifTrue:[
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14263
        items := #(
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14264
                    ('Instvar Refs...'            instVarRefs         )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14265
                    ('Instvar Mods...'            instVarMods         )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14266
                    ('Classvar Refs...'           classVarRefs        )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14267
                    ('Classvar Mods...'           classVarMods        )
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14268
                    ('-'                           nil                 )
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14269
                    ('All Instvar Refs...'        allInstVarRefs      )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14270
                    ('All Classvar Refs...'       allClassVarRefs     )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14271
                    ('All Instvar Mods...'        allInstVarMods      )
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14272
                    ('All Classvar Mods...'       allClassVarMods     )
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14273
                   ).
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14274
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14275
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14276
    showInstance ifFalse:[
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14277
        classInstVarsInVarList == true ifTrue:[
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14278
            items := items , #(('-') ('Show ClassVars' showClassVars)).
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14279
        ] ifFalse:[
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14280
            items := items , #(('-') ('Show Class InstVars' showClassInstVars)).
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14281
        ].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14282
    ].
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 14283
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 14284
    ("showInstance and:[" variableListView hasSelection "]" ) ifTrue:[
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14285
        items := items , #(
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14286
                                ('-'                           )
3713
63044d0882ae common code for code generation extracted to CodeGeneratorTool
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
 14287
                                ('Type Information...' varTypeInfo)
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14288
                           ).
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 14289
    ].
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 14290
1934
f10eff0533d0 also allow inspect for instvars.
Claus Gittinger <cg@exept.de>
parents: 1918
diff changeset
 14291
    ("showInstance not and:["variableListView hasSelection"]") ifTrue:[
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14292
        items := items , #(
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14293
                                ('Inspect' varInspect)
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14294
                           ).
1687
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 14295
    ].
748fd8e6cf64 added #inspect to varList menu
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
 14296
1667
37d6665d98fc use new menu-creation messages (easier to read).
Claus Gittinger <cg@exept.de>
parents: 1643
diff changeset
 14297
    m := PopUpMenu itemList:items resources:resources.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14298
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14299
    currentClass instSize == 0 ifTrue:[
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14300
        m disableAll:#(instVarRefs instVarMods).
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14301
        currentClass subclasses size == 0 ifTrue:[
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14302
            m disableAll:#(allInstVarRefs allInstVarMods).
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14303
        ]
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14304
    ].
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 14305
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 14306
    currentClass isLoaded ifFalse:[
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14307
        m disableAll
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 14308
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 14309
    ^ m
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 14310
3557
5009a2a7d0d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
 14311
    "Modified: / 1.2.2002 / 13:02:36 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14312
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14313
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14314
variableSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14315
    "variable selection changed"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14316
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14317
    |name idx|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14318
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14319
    name := variableListView selectionValue.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14320
    name isNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14321
	self unhilightMethodCategories.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14322
	self unhilightMethods.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14323
	self autoSearch:nil.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14324
	^ self
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14325
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14326
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14327
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14328
     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
 14329
     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
 14330
     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
 14331
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14332
    idx := variableListView list findLast:[:entry | entry = name].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14333
    idx ~~ lineNr ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14334
	"select it - user will see whats going on"
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14335
	variableListView setSelection:idx
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14336
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14337
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14338
    "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
 14339
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14340
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14341
    self hilightMethodsInMethodCategoryList:true inMethodList:true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14342
    self autoSearch:name.
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
 14343
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
 14344
    "Modified: 25.5.1996 / 12:26:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14345
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14346
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14347
!BrowserView methodsFor:'variable stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14348
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14349
hilightEntryFor:entry
3239
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14350
    "helper; given a list item, highlight it"
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14351
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14352
    |e|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14353
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14354
    methodCategoryListView font bold ifTrue:[
3239
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14355
        "/ already bold; use different color then
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14356
        methodCategoryListView foregroundColor brightness > 0.5 ifTrue:[
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14357
            methodCategoryListView backgroundColor brightness < 0.25 ifTrue:[
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14358
                e := #color->Color blue
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14359
            ] ifFalse:[
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14360
                e := #color->Color black
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14361
            ]
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14362
        ] ifFalse:[
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14363
            methodCategoryListView backgroundColor brightness > 0.75 ifTrue:[
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14364
                e := #color->Color red darkened
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14365
            ] ifFalse:[
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14366
                e := #color->Color white.
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14367
            ]
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14368
        ]
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14369
    ] ifFalse:[
3239
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14370
        e := #bold.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14371
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14372
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14373
    entry isString ifTrue:[
3239
af1b047b11cb allow for some colors to be changed (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3188
diff changeset
 14374
        ^ entry asText emphasizeAllWith:e.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14375
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14376
    ^ 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
 14377
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14378
    "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
 14379
    "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
 14380
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14381
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14382
hilightMethodsInMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14383
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14384
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14385
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14386
    self hilightMethodsInMethodCategoryList:true inMethodList:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14387
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14388
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14389
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14390
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14391
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14392
hilightMethodsInMethodCategoryList:inCat inMethodList:inMethods 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14393
    "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
 14394
     variable, and highlight them"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14395
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14396
    |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
 14397
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14398
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14399
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14400
    inCat ifTrue:[self unhilightMethodCategories].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14401
    inMethods ifTrue:[self unhilightMethods].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14402
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14403
    actualClass isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14404
    (methodCategoryListView isNil 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14405
    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
 14406
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14407
    name := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14408
    name isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14409
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14410
    self withSearchCursorDo:[
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14411
        |classes filter any supers|
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14412
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14413
        classes := Array with:actualClass.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14414
        (currentClassHierarchy notNil and:[fullProtocol]) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14415
            supers := actualClass allSuperclasses.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14416
            classes := classes , supers.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14417
            redefinedSelectors := IdentitySet new.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14418
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14419
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14420
        filter := SystemBrowser 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14421
                        filterToSearchRefsTo:name 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14422
                        classVars:(showInstance not and:[classInstVarsInVarList ~~ true]) 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14423
                        modificationsOnly:false. 
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14424
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14425
        methodListView notNil ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14426
            methodList := methodListView list.
2361
c1f1e0b88d1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2357
diff changeset
 14427
            methodList notNil ifTrue:[
c1f1e0b88d1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2357
diff changeset
 14428
                methodList := methodList collect:[:s | self selectorFromClassMethodString:s].
c1f1e0b88d1a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2357
diff changeset
 14429
            ]
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14430
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14431
        methodCategoryListView notNil ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14432
            methodCategoryList := methodCategoryListView list.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14433
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14434
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14435
        any := false.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14436
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14437
        "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14438
         highlight the method that ref this variable
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14439
        "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14440
        classes do:[:someClass |
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14441
            (fullProtocol
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14442
            and:[classListView valueIsInSelection:(someClass name)]) ifFalse:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14443
                someClass methodDictionary keysAndValuesDo:[:selector :method |
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14444
                    (inCat
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14445
                    or:[methodList notNil
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14446
                        and:[methodList includes:selector]])
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14447
                    ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14448
                        (redefinedSelectors isNil
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14449
                        or:[(redefinedSelectors includes:selector) not])
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14450
                       ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14451
                           (filter value:someClass value:method value:selector) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14452
                               |idx cat|
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14453
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14454
                               (inCat
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14455
                               and:[methodCategoryList notNil]) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14456
                                   cat := method category.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14457
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14458
                                    highlight the methodCategory
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14459
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14460
                                   idx := methodCategoryListView list indexOf:cat.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14461
                                   idx ~~ 0 ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14462
                                        entry := methodCategoryListView at:idx.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14463
                                        entry := self hilightEntryFor:entry.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14464
                                        methodCategoryListView at:idx put:entry
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14465
"/                                       methodCategoryListView attributeAt:idx put:#bold.
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14466
                                   ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14467
                               ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14468
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14469
                               (inMethods
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14470
                               and:[methodList notNil]) ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14471
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14472
                                    highlight the method
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14473
                                   "
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14474
                                   idx := methodListView list 
2354
d6c68a5408be variable access highlighting fixed
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
 14475
                                                findFirst:[:item | |s|
d6c68a5408be variable access highlighting fixed
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
 14476
                                                                (s := item string) = selector
d6c68a5408be variable access highlighting fixed
Claus Gittinger <cg@exept.de>
parents: 2351
diff changeset
 14477
                                                                or:[s startsWith:(selector , ' ')]
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14478
                                                          ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14479
                                   idx ~~ 0 ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14480
                                        entry := methodListView at:idx.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14481
                                        entry := self hilightEntryFor:entry.
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14482
                                        methodListView at:idx put:entry
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14483
"/                                        methodListView attributeAt:idx put:#bold.
2300
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14484
                                   ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14485
                                   any := true
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14486
                               ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14487
                           ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14488
                           redefinedSelectors notNil ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14489
                               redefinedSelectors add:selector
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14490
                           ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14491
                        ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14492
                    ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14493
                ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14494
            ]
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14495
        ].
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14496
        any ifTrue:[
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14497
            self setSearchPattern:name
e9ddf2b5a284 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
 14498
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14499
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14500
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14501
    "Created: / 23.11.1995 / 14:12:08 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14502
    "Modified: / 5.6.1996 / 11:38:19 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14503
    "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
 14504
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14505
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14506
hilightMethodsInMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14507
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14508
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14509
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14510
    self hilightMethodsInMethodCategoryList:false inMethodList:true 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14511
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14512
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14513
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14514
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14515
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14516
unhilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14517
    "helper; given a list itme, unhighlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14518
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14519
    entry isString ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14520
	^ entry string
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14521
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14522
    ^ entry copy string:(entry string)
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14523
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14524
    "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
 14525
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14526
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14527
unhilightMethodCategories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14528
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14529
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14530
    |list entry sz "{ Class: SmallInteger }"|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14531
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14532
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14533
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14534
    methodCategoryListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14535
	list := methodCategoryListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14536
	sz := list size.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14537
	1 to:sz do:[:idx |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14538
	    entry := list at:idx.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14539
	    entry := self unhilightEntryFor:entry.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14540
	    methodCategoryListView at:idx put:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14541
"/            methodCategoryListView attributeAt:idx put:nil.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14542
	]
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14543
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14544
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14545
    "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
 14546
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14547
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14548
unhilightMethods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14549
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14550
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14551
    |list entry sz "{Class: SmallInteger }" |
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14552
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14553
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14554
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 14555
    methodListView notNil ifTrue:[
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14556
	list := methodListView list.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14557
	sz := list size.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14558
	1 to:sz do:[:idx |
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14559
	    entry := list at:idx.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14560
	    entry := self unhilightEntryFor:entry.
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14561
	    methodListView at:idx put:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14562
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14563
"/            methodListView attributeAt:idx put:nil.
2151
b0275d5020c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2146
diff changeset
 14564
	].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14565
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 14566
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 14567
    "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
 14568
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14569
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14570
updateVariableList
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14571
    "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
 14572
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14573
    |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
 14574
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14575
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14576
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14577
    oldSelection := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14578
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14579
    l := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14580
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14581
     show classVars/classInstVars, 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14582
     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
 14583
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14584
    askMeta := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14585
    showInstance ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14586
        nameAccessSelector := #instVarNames
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14587
    ] ifFalse:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14588
        classInstVarsInVarList == true ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14589
            nameAccessSelector := #instVarNames.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14590
            askMeta := true.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14591
        ] ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14592
            nameAccessSelector := #classVarNames
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14593
        ]
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 14594
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 14595
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 14596
    class := currentClassHierarchy notNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14597
        currentClassHierarchy
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 14598
    ] ifFalse:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14599
        currentClass
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14600
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14601
    class := currentClass.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14602
    fullProtocol ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14603
        class := currentClassHierarchy
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14604
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14605
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14606
    class isNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14607
        variableListView list:nil.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14608
        ^ self
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 14609
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 14610
2753
a22517af548d use #withAllSuperclassesDo:
Claus Gittinger <cg@exept.de>
parents: 2752
diff changeset
 14611
    class withAllSuperclassesDo:[:aClass |
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14612
        |ignore clsName|
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14613
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14614
        ignore := fullProtocol 
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14615
                  and:[classListView valueIsInSelection:(aClass name asString)].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14616
        ignore ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14617
            askMeta ifTrue:[
2819
070d807c55f6 replaced #class-class by #theMetaclass
Claus Gittinger <cg@exept.de>
parents: 2817
diff changeset
 14618
                subList := aClass theMetaclass perform:nameAccessSelector.
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14619
            ] ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14620
                subList := aClass perform:nameAccessSelector.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14621
            ].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14622
            subList size ~~ 0 ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14623
                l := l , (subList asOrderedCollection reverse).
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14624
                aClass nameSpace == currentNamespace ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14625
                    clsName := aClass nameWithoutNameSpacePrefix
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14626
                ] ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14627
                    clsName := aClass name
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14628
                ].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14629
                showInstance ifFalse:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14630
                    clsName := clsName , ' class'
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14631
                ].
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14632
                l := l , (OrderedCollection with:'--- ' , clsName , ' ---').
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14633
            ]
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14634
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14635
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14636
    l reverse.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14637
    variableListView setAttributes:nil.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 14638
    l ~= variableListView list ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14639
        variableListView list:l.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 14640
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 14641
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14642
    l keysAndValuesDo:[:index :entry |
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14643
        (entry startsWith:'-') ifTrue:[
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14644
            variableListView attributeAt:index put:#disabled.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14645
            last := index
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14646
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14647
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14648
    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
 14649
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 14650
    oldSelection notNil ifTrue:[
2276
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14651
        variableListView setSelectElement:oldSelection.
9b8a9102de7e variableList h-scrollable (with autoHide)
Claus Gittinger <cg@exept.de>
parents: 2273
diff changeset
 14652
        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
 14653
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
 14654
2840
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 14655
    "Modified: / 17.9.1998 / 13:45:02 / cg"
9806b72e36f9 in make-class-public: ask for target nameSpace, if owner is in a nameSpace
Claus Gittinger <cg@exept.de>
parents: 2833
diff changeset
 14656
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14657
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
 14658
!BrowserView class methodsFor:'documentation'!
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
 14659
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
 14660
version
4185
fba4e4c51395 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4126
diff changeset
 14661
    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.740 2002-11-05 11:22:03 cg Exp $'
263
7b9622ce4fcc more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
 14662
! !
3993
f7cda711af87 Use #error: insead of #halt.
Stefan Vogel <sv@exept.de>
parents: 3771
diff changeset
 14663
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 14664
BrowserView initialize!