diff -r 417ccb5b70b7 -r c41c71b6bf2b BrowserView.st --- a/BrowserView.st Wed Mar 04 19:16:15 1998 +0100 +++ b/BrowserView.st Thu Mar 05 13:50:05 1998 +0100 @@ -512,7 +512,7 @@ ((someArgument category = currentClassCategory) or:[currentClassCategory notNil - and:[currentClassCategory startsWith:'*']]) ifTrue:[ + and:[currentClassCategory startsWith:$*]]) ifTrue:[ self updateClassListWithScroll:false. ]. @@ -723,7 +723,7 @@ ] "Created: / 4.1.1997 / 13:54:00 / cg" - "Modified: / 4.3.1998 / 14:46:06 / cg" + "Modified: / 5.3.1998 / 02:46:01 / cg" ! refetchClass @@ -833,7 +833,7 @@ |aStream fileName| self checkClassCategorySelected ifFalse:[^ self]. - (currentClassCategory startsWith:'*') ifTrue:[ + (currentClassCategory startsWith:$*) ifTrue:[ self warn:(resources string:'try a real category'). ^ self ]. @@ -911,7 +911,7 @@ self normalLabel. "Created: / 11.10.1997 / 16:38:29 / cg" - "Modified: / 28.10.1997 / 14:35:50 / cg" + "Modified: / 5.3.1998 / 02:45:17 / cg" ! classCategoryFileOutBinaryEach @@ -919,65 +919,65 @@ |mode| - (currentClassCategory startsWith:'*') ifTrue:[ - self warn:(resources string:'try a real category'). - ^ self + (currentClassCategory startsWith:$*) ifTrue:[ + self warn:(resources string:'try a real category'). + ^ self ]. mode := Dialog choose:(resources string:'save including sources ?') - labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source')) - values:#(nil #discard #reference #keep) - default:#keep. + labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source')) + values:#(nil #discard #reference #keep) + default:#keep. mode isNil ifTrue:[^ self]. self withBusyCursorDo:[ - self allClassesInCategory:currentClassCategory do:[:aClass | - aClass isPrivate ifFalse:[ - (self listOfNamespaces includesIdentical:aClass nameSpace) - ifTrue:[ - self busyLabel:'saving binary of: %1' with:aClass name. - Class fileOutErrorSignal handle:[:ex | - self warn:'cannot create: %1' with:ex parameter. - ex return. - ] do:[ - aClass binaryFileOutWithSourceMode:mode. - ] - ] - ] - ]. - self normalLabel. + self allClassesInCategory:currentClassCategory do:[:aClass | + aClass isPrivate ifFalse:[ + (self listOfNamespaces includesIdentical:aClass nameSpace) + ifTrue:[ + self busyLabel:'saving binary of: %1' with:aClass name. + Class fileOutErrorSignal handle:[:ex | + self warn:'cannot create: %1' with:ex parameter. + ex return. + ] do:[ + aClass binaryFileOutWithSourceMode:mode. + ] + ] + ] + ]. + self normalLabel. ] - "Created: 25.1.1996 / 17:27:45 / cg" - "Modified: 18.8.1997 / 15:42:30 / cg" + "Created: / 25.1.1996 / 17:27:45 / cg" + "Modified: / 5.3.1998 / 02:45:30 / cg" ! classCategoryFileOutEach - (currentClassCategory startsWith:'*') ifTrue:[ - self warn:(resources string:'try a real category'). - ^ self + (currentClassCategory startsWith:$*) ifTrue:[ + self warn:(resources string:'try a real category'). + ^ self ]. self withBusyCursorDo:[ - self allClassesInCategory:currentClassCategory do:[:aClass | - aClass isPrivate ifFalse:[ - (self listOfNamespaces includesIdentical:aClass nameSpace) - ifTrue:[ - self busyLabel:'saving: %1' with:aClass name. - Class fileOutErrorSignal handle:[:ex | - self warn:'cannot fileOut: %1\(%2)' with:aClass name with:ex errorString. - ex return. - ] do:[ - aClass fileOut - ] - ] - ] - ]. - self normalLabel. + self allClassesInCategory:currentClassCategory do:[:aClass | + aClass isPrivate ifFalse:[ + (self listOfNamespaces includesIdentical:aClass nameSpace) + ifTrue:[ + self busyLabel:'saving: %1' with:aClass name. + Class fileOutErrorSignal handle:[:ex | + self warn:'cannot fileOut: %1\(%2)' with:aClass name with:ex errorString. + ex return. + ] do:[ + aClass fileOut + ] + ] + ] + ]. + self normalLabel. ] - "Modified: 18.8.1997 / 15:42:35 / cg" + "Modified: / 5.3.1998 / 02:45:38 / cg" ! classCategoryFindClass @@ -3379,7 +3379,7 @@ |box className moduleHolder packageHolder fileNameHolder oldModule oldPackage oldFileName - module package fileName + module package fileName nameSpace nameSpacePrefix y component info project nm mgr creatingNew msg| aClass isLoaded ifFalse:[ @@ -3433,9 +3433,10 @@ ]. ]. fileName := mgr containerFromSourceInfo:info. - aClass nameSpace ~~ Smalltalk ifTrue:[ - (fileName startsWith:(aClass nameSpace name , '::')) ifTrue:[ - fileName := fileName copyFrom:(aClass nameSpace name , '::') size + 1. + (nameSpace := aClass nameSpace) ~~ Smalltalk ifTrue:[ + nameSpacePrefix := nameSpace name , '::'. + (fileName startsWith:nameSpacePrefix) ifTrue:[ + fileName := fileName copyFrom:(nameSpacePrefix size + 1). ] ]. "/ (info includesKey:#fileName) ifTrue:[ @@ -3715,7 +3716,7 @@ box destroy. ^ false - "Modified: / 1.2.1998 / 17:55:45 / cg" + "Modified: / 5.3.1998 / 02:44:45 / cg" ! classLoadNewRevision @@ -4575,83 +4576,83 @@ s := TextStream on:''. isNameSpace ifTrue:[ - s nextPutAll:'Namespace name:''NewNameSpace'''. - s cr; cr. - s emphasis:(self commentEmphasis). - s nextPutAll:'" + s nextPutAll:'Namespace name:''NewNameSpace'''. + s cr; cr. + s emphasis:(self commentEmphasis). + s nextPutAll:'" Replace ''NewNameSpace'' by the desired name. Create the namespace by ''accepting'', either via the menu or the keyboard (usually CMD-A). " '. - ^ s contents. + ^ s contents. ]. withNameSpaceDirective := - currentNamespace notNil - and:[currentNamespace ~= '* all *' - and:[currentNamespace ~= Smalltalk]]. + currentNamespace notNil + and:[currentNamespace ~= '* all *' + and:[currentNamespace ~= Smalltalk]]. withNameSpaceDirective ifTrue:[ - className := aSuperClass nameWithoutNameSpacePrefix. - s nextPutAll:('"{ Namespace: ''' , currentNamespace name , ''' }"'). - s cr; cr. + className := aSuperClass nameWithoutNameSpacePrefix. + s nextPutAll:('"{ Namespace: ''' , currentNamespace name , ''' }"'). + s cr; cr. ] ifFalse:[ - className := aSuperClass name. + className := aSuperClass name. ]. cat := categoryString. - (cat isNil or:[cat startsWith:'*']) ifTrue:[ - cat := '* no category *' + (cat isNil or:[cat startsWith:$*]) ifTrue:[ + cat := '* no category *' ]. nameProto := 'NewClass'. i := 1. isPrivate ifTrue:[ - namePrefix := currentClass name , '::'. - existingNames := currentClass privateClasses. - existingNames size > 0 ifTrue:[ - existingNames := existingNames collect:[:cls | cls name]. - ] + namePrefix := currentClass name , '::'. + existingNames := currentClass privateClasses. + existingNames size > 0 ifTrue:[ + existingNames := existingNames collect:[:cls | cls name]. + ] ] ifFalse:[ - namePrefix := ''. - existingNames := Smalltalk keys + namePrefix := ''. + existingNames := Smalltalk keys ]. name := 'NewClass' , i printString. existingNames notNil ifTrue:[ - nameProto := namePrefix , name. - [nameProto knownAsSymbol and:[existingNames includes:nameProto asSymbol]] whileTrue:[ - i := i + 1. - name := 'NewClass' , i printString. - nameProto := namePrefix , name - ]. + nameProto := namePrefix , name. + [nameProto knownAsSymbol and:[existingNames includes:nameProto asSymbol]] whileTrue:[ + i := i + 1. + name := 'NewClass' , i printString. + nameProto := namePrefix , name + ]. ]. s nextPutAll:className. isPrivate ifTrue:[ - withNameSpaceDirective ifTrue:[ - ownerName := currentClass nameWithoutNameSpacePrefix - ] ifFalse:[ - ownerName := currentClass name - ]. - s nextPutAll:(' subclass:#' , name , ' + withNameSpaceDirective ifTrue:[ + ownerName := currentClass nameWithoutNameSpacePrefix + ] ifFalse:[ + ownerName := currentClass name + ]. + s nextPutAll:(' subclass:#' , name , ' ' , ' instanceVariableNames: '''' ' , ' classVariableNames: '''' ' , ' poolDictionaries: '''' ' , ' privateIn:' , ownerName) ] ifFalse:[ - s nextPutAll:(' subclass:#' , name , ' + s nextPutAll:(' subclass:#' , name , ' ' , ' instanceVariableNames: '''' ' , ' classVariableNames: '''' ' , ' poolDictionaries: '''' ' , ' category: '''). - cat notNil ifTrue:[ - s nextPutAll: cat - ]. - s nextPutAll: '''' + cat notNil ifTrue:[ + s nextPutAll: cat + ]. + s nextPutAll: '''' ]. s cr; cr. @@ -4673,8 +4674,8 @@ ^ s contents - "Created: 23.12.1996 / 12:46:31 / cg" - "Modified: 29.8.1997 / 01:10:54 / cg" + "Created: / 23.12.1996 / 12:46:31 / cg" + "Modified: / 5.3.1998 / 02:45:52 / cg" ! doClassMenu:aBlock @@ -11361,6 +11362,6 @@ !BrowserView class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.371 1998-03-04 16:46:09 cg Exp $' + ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.372 1998-03-05 12:50:05 cg Exp $' ! ! BrowserView initialize!