equal
deleted
inserted
replaced
6217 self setAcceptActionForNewClass. |
6217 self setAcceptActionForNewClass. |
6218 |
6218 |
6219 s := TextStream on:''. |
6219 s := TextStream on:''. |
6220 |
6220 |
6221 isNameSpace ifTrue:[ |
6221 isNameSpace ifTrue:[ |
6222 s nextPutAll:'NameSpace name:''NewNameSpace'''. |
6222 s nextPutLine:'NameSpace name:''NewNameSpace'''. |
6223 s cr; cr. |
6223 s cr. |
6224 s emphasis:(UserPreferences current commentEmphasisAndColor). |
6224 s emphasis:(UserPreferences current commentEmphasisAndColor). |
6225 s nextPutAll:'" |
6225 s nextPutAll:'" |
6226 Replace ''NewNameSpace'' by the desired name. |
6226 Replace ''NewNameSpace'' by the desired name. |
6227 |
6227 |
6228 Create the namespace by ''accepting'', |
6228 Create the namespace by ''accepting'', |
6237 and:[currentNamespace ~= '* all *' |
6237 and:[currentNamespace ~= '* all *' |
6238 and:[currentNamespace ~= Smalltalk]]. |
6238 and:[currentNamespace ~= Smalltalk]]. |
6239 |
6239 |
6240 withNameSpaceDirective ifTrue:[ |
6240 withNameSpaceDirective ifTrue:[ |
6241 className := aSuperClass nameWithoutNameSpacePrefix. |
6241 className := aSuperClass nameWithoutNameSpacePrefix. |
6242 s nextPutAll:('"{ NameSpace: ''' , currentNamespace name , ''' }"'). |
6242 s nextPutLine:('"{ NameSpace: ''' , currentNamespace name , ''' }"'). |
6243 s cr; cr. |
6243 s cr. |
6244 ] ifFalse:[ |
6244 ] ifFalse:[ |
6245 className := aSuperClass name. |
6245 className := aSuperClass name. |
6246 ]. |
6246 ]. |
6247 |
6247 |
6248 cat := categoryString. |
6248 cat := categoryString. |
6338 |name i className s superPackage| |
6338 |name i className s superPackage| |
6339 |
6339 |
6340 self setAcceptActionForNewJavaClass. |
6340 self setAcceptActionForNewJavaClass. |
6341 |
6341 |
6342 s := TextStream on:''. |
6342 s := TextStream on:''. |
6343 s nextPutAll:('package ' , categoryString , ';'). |
6343 s nextPutLine:('package ' , categoryString , ';'). |
6344 s cr; cr. |
6344 s cr. |
6345 |
6345 |
6346 s nextPutAll:('public '); cr. |
6346 s nextPutLine:('public '). |
6347 s nextPutAll:('class '). |
6347 s nextPutAll:('class '). |
6348 |
6348 |
6349 i := 1. |
6349 i := 1. |
6350 name := 'NewClass' , i printString. |
6350 name := 'NewClass' , i printString. |
6351 [ (Java classNamed:(categoryString , '.' , name)) notNil ] whileTrue:[ |
6351 [ (Java classNamed:(categoryString , '.' , name)) notNil ] whileTrue:[ |
6361 className := aSuperClass name asString copy replaceAll:$/ with:$.. |
6361 className := aSuperClass name asString copy replaceAll:$/ with:$.. |
6362 ]. |
6362 ]. |
6363 ]. |
6363 ]. |
6364 |
6364 |
6365 s nextPutAll:'extends '; nextPutAll:className. |
6365 s nextPutAll:'extends '; nextPutAll:className. |
6366 s nextPutAll:' {'; cr. |
6366 s nextPutLine:' {'. |
6367 s nextPutAll:' // { private } { static } { final } type varName;'; cr. |
6367 s nextPutLine:' // { private } { static } { final } type varName;'. |
6368 s nextPutAll:' // int var1;'; cr. |
6368 s nextPutLine:' // int var1;'. |
6369 s nextPutAll:' // int var2;'; cr. |
6369 s nextPutLine:' // int var2;'. |
6370 s nextPutAll:'}'; cr. |
6370 s nextPutLine:'}'. |
6371 |
6371 |
6372 s cr; cr. |
6372 s cr; cr. |
6373 s emphasis:(UserPreferences current commentEmphasisAndColor). |
6373 s emphasis:(UserPreferences current commentEmphasisAndColor). |
6374 s nextPutAll:' |
6374 s nextPutAll:' |
6375 |
6375 |
14658 ! ! |
14658 ! ! |
14659 |
14659 |
14660 !BrowserView class methodsFor:'documentation'! |
14660 !BrowserView class methodsFor:'documentation'! |
14661 |
14661 |
14662 version |
14662 version |
14663 ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.746 2003-01-28 11:27:48 cg Exp $' |
14663 ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.747 2003-02-10 16:38:16 penk Exp $' |
14664 ! ! |
14664 ! ! |
14665 |
14665 |
14666 BrowserView initialize! |
14666 BrowserView initialize! |