'From etoys2.3 of 27 November 2007 [latest update: #1793] on 27 November 2007 at 10:44:44 pm'! !MultiByteFileStream methodsFor: 'open/close' stamp: 'md 7/20/2006 11:05'! open: fileName forWrite: writeMode | result | result := super open: fileName forWrite: writeMode. result ifNotNil: [ converter ifNil: [converter := UTF8TextConverter new]. self detectLineEndConvention]. ^result! ! !SystemDictionary methodsFor: 'housekeeping' stamp: 'yo 11/27/2007 22:05'! condenseSources "Move all the changes onto a compacted sources file." "Smalltalk condenseSources" | newVersionString | newVersionString _ FillInTheBlank request: 'Please designate the version for the new source code file...' initialAnswer: SmalltalkImage current sourceFileVersionString. ^ self condenseSourcesForVersion: newVersionString. ! ! !SystemDictionary methodsFor: 'housekeeping' stamp: 'yo 11/27/2007 22:04'! condenseSourcesForVersion: aString "Move all the changes onto a compacted sources file." "Smalltalk condenseSources" | f classCount dir newVersionString | Utilities fixUpProblemsWithAllCategory. "The above removes any concrete, spurious '-- all --' categories, which mess up the process." dir _ FileDirectory default. newVersionString _ aString. newVersionString ifNil: [^ self]. newVersionString = SmalltalkImage current sourceFileVersionString ifTrue: [^ self error: 'The new source file must not be the same as the old.']. SmalltalkImage current sourceFileVersionString: newVersionString. "Write all sources with fileIndex 1" f _ FileStream newFileNamed: SmalltalkImage current sourcesName. f converter: UTF8TextConverter new. "This is needed only when converting from SqueakV3.sources." f header; timeStamp. 'Condensing Sources File...' displayProgressAt: Sensor cursorPoint from: 0 to: Smalltalk classNames size during: [:bar | classCount _ 0. Smalltalk allClassesDo: [:class | bar value: (classCount _ classCount + 1). class fileOutOn: f moveSource: true toFile: 1]]. f trailer; close. "Make a new empty changes file" SmalltalkImage current closeSourceFiles. dir rename: SmalltalkImage current changesName toBe: SmalltalkImage current changesName , '.old'. (FileStream newFileNamed: SmalltalkImage current changesName) header; timeStamp; close. SmalltalkImage current lastQuitLogPosition: 0. self setMacFileInfoOn: SmalltalkImage current changesName. self setMacFileInfoOn: SmalltalkImage current sourcesName. SmalltalkImage current openSourceFiles. self inform: 'Source files have been rewritten!! Check that all is well, and then save/quit.'! !