ChangesBrowser.st
branchjv
changeset 12229 5c129972b1fd
parent 12205 f210b6224ef0
child 12254 b1237f76f501
equal deleted inserted replaced
12228:65c1148c41f6 12229:5c129972b1fd
  2965         self error:'Empty chunk - should not happen' mayProceed:true.
  2965         self error:'Empty chunk - should not happen' mayProceed:true.
  2966         ^ false.
  2966         ^ false.
  2967     ].
  2967     ].
  2968 
  2968 
  2969     fileName := aFileNameOrFileNameString asFilename.
  2969     fileName := aFileNameOrFileNameString asFilename.
  2970     fileName exists ifTrue:[
       
  2971         encoding := CharacterEncoder guessEncodingOfFile:fileName.
       
  2972     ] ifFalse:[
       
  2973         encoding := #utf8.
       
  2974     ].
       
  2975 
  2970 
  2976     [
  2971     [
  2977         outStream := fileName readWriteStream.
  2972         outStream := fileName readWriteStream.
  2978     ] on:FileStream openErrorSignal do:[:ex|
  2973     ] on:FileStream openErrorSignal do:[:ex|
  2979         self warn:'Cannot update file: ''%1''' with:fileName.
  2974         self warn:'Cannot update file: ''%1''' with:fileName.
  2980         ^ false
  2975         ^ false
  2981     ].
  2976     ].
  2982 
  2977 
       
  2978     outStream fileSize = 0 ifTrue:[
       
  2979         encoding := #utf8.
       
  2980         outStream nextPutLine:'"{ Encoding: utf8 }" !!' asUnicodeString.
       
  2981     ] ifFalse:[
       
  2982         encoding := CharacterEncoder guessEncodingOfStream:outStream.
       
  2983     ].
       
  2984 
  2983     encoding notNil ifTrue:[
  2985     encoding notNil ifTrue:[
  2984         outStream := EncodedStream stream:outStream encoder:(CharacterEncoder encoderFor:encoding).
  2986         outStream := EncodedStream stream:outStream encoder:(CharacterEncoder encoderFor:encoding).
  2985         outStream nextPutLine:'"{ Encoding: utf8 }" !!'.
  2987     ].
  2986     ].
       
  2987 
       
  2988     outStream setToEnd.
  2988     outStream setToEnd.
  2989 
  2989 
  2990     sawExcla ifTrue:[
  2990     sawExcla ifTrue:[
  2991         outStream nextPut:separator
  2991         outStream nextPut:separator
  2992     ].
  2992     ].
  3257                 ] ifTrue:[
  3257                 ] ifTrue:[
  3258                     (self checkClassIsLoaded:superClass) ifTrue:[
  3258                     (self checkClassIsLoaded:superClass) ifTrue:[
  3259                         thisClassSym := (parseTree arguments at:1) evaluate.
  3259                         thisClassSym := (parseTree arguments at:1) evaluate.
  3260 
  3260 
  3261                         (selector endsWith:':privateIn:') ifTrue:[
  3261                         (selector endsWith:':privateIn:') ifTrue:[
  3262                             ownerClass := (parseTree arguments at:5) evaluate.
  3262                             Parser undefinedVariableError catch:[
  3263                             ownerClass isBehavior ifTrue:[
  3263                                 ownerClass := (parseTree arguments at:5) evaluate.
  3264                                 thisClass := ownerClass privateClassesAt:thisClassSym.
  3264                                 ownerClass isBehavior ifTrue:[
       
  3265                                     thisClass := ownerClass privateClassesAt:thisClassSym.
       
  3266                                 ].
  3265                             ].
  3267                             ].
  3266                         ] ifFalse:[
  3268                         ] ifFalse:[
  3267                             thisClass := (self nameSpaceForApply) at:thisClassSym ifAbsent:nil.
  3269                             thisClass := (self nameSpaceForApply) at:thisClassSym ifAbsent:nil.
  3268                         ].
  3270                         ].
  3269                         thisClass isNil ifTrue:[
  3271                         thisClass isNil ifTrue:[
  5701     ]
  5703     ]
  5702 
  5704 
  5703     "Modified: / 27-10-2010 / 11:31:06 / cg"
  5705     "Modified: / 27-10-2010 / 11:31:06 / cg"
  5704 !
  5706 !
  5705 
  5707 
  5706 selectionCanged
  5708 selectionChanged
  5707 self halt
  5709 self halt
  5708 
  5710 
  5709     "Created: / 03-01-2012 / 15:26:36 / cg"
  5711     "Created: / 03-01-2012 / 15:26:36 / cg"
  5710 !
  5712 !
  5711 
  5713 
  6446 ! !
  6448 ! !
  6447 
  6449 
  6448 !ChangesBrowser class methodsFor:'documentation'!
  6450 !ChangesBrowser class methodsFor:'documentation'!
  6449 
  6451 
  6450 version
  6452 version
  6451     ^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.425 2012/03/08 11:03:32 cg Exp $'
  6453     ^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.428 2012/04/05 11:12:53 stefan Exp $'
  6452 !
  6454 !
  6453 
  6455 
  6454 version_CVS
  6456 version_CVS
  6455     ^ '§Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.425 2012/03/08 11:03:32 cg Exp §'
  6457     ^ '§Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.428 2012/04/05 11:12:53 stefan Exp §'
  6456 !
  6458 !
  6457 
  6459 
  6458 version_SVN
  6460 version_SVN
  6459     ^ '$Id: ChangesBrowser.st 7952 2012-03-21 17:50:14Z vranyj1 $'
  6461     ^ '$Id: ChangesBrowser.st 7978 2012-04-13 13:15:47Z vranyj1 $'
  6460 ! !
  6462 ! !