Andreas Raab uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-rss.110.mcz ==================== Summary ==================== Name: Tools-rss.110 Author: rss Time: 23 August 2009, 1:15:54 am UUID: c388f992-77c4-44b1-a541-8c3a66d06830 Ancestors: Tools-rkrk.109 Removing cruft left over from colorPrint browser option and colorWhenPrettyPrinting preference. =============== Diff against Tools-rkrk.109 =============== Item was changed: ----- Method: ChangeSorter>>setContents (in category 'code pane') ----- setContents "return the source code that shows in the bottom pane" | sel class strm changeType | self clearUserEditFlag. currentClassName ifNil: [^ contents := myChangeSet preambleString ifNil: ['']]. class := self selectedClassOrMetaClass. (sel := self selectedMessageName) == nil ifFalse: [changeType := (myChangeSet atSelector: (sel := sel asSymbol) class: class). changeType == #remove ifTrue: [^ contents := 'Method has been removed (see versions)']. changeType == #addedThenRemoved ifTrue: [^ contents := 'Added then removed (see versions)']. class ifNil: [^ contents := 'Method was added, but cannot be found!!']. (class includesSelector: sel) ifFalse: [^ contents := 'Method was added, but cannot be found!!']. contents := class sourceCodeAt: sel. + (#(prettyPrint prettyDiffs) includes: contentsSymbol) ifTrue: - (#(prettyPrint colorPrint prettyDiffs) includes: contentsSymbol) ifTrue: [contents := class prettyPrinterClass + format: contents in: class notifying: nil]. - format: contents in: class notifying: nil contentsSymbol: contentsSymbol]. self showingAnyKindOfDiffs ifTrue: [contents := self diffFromPriorSourceFor: contents]. ^ contents := contents asText makeSelectorBoldIn: class] ifTrue: [strm := WriteStream on: (String new: 100). (myChangeSet classChangeAt: currentClassName) do: [:each | each = #remove ifTrue: [strm nextPutAll: 'Entire class was removed.'; cr]. each = #addedThenRemoved ifTrue: [strm nextPutAll: 'Class was added then removed.']. each = #rename ifTrue: [strm nextPutAll: 'Class name was changed.'; cr]. each = #add ifTrue: [strm nextPutAll: 'Class definition was added.'; cr]. each = #change ifTrue: [strm nextPutAll: 'Class definition was changed.'; cr]. each = #reorganize ifTrue: [strm nextPutAll: 'Class organization was changed.'; cr]. each = #comment ifTrue: [strm nextPutAll: 'New class comment.'; cr. ]]. ^ contents := strm contents].! Item was changed: ----- Method: FileContentsBrowser>>selectedMessage (in category 'edit pane') ----- selectedMessage "Answer a copy of the source code for the selected message selector." | class selector | class := self selectedClassOrMetaClass. selector := self selectedMessageName. contents := class sourceCodeAt: selector. Preferences browseWithPrettyPrint ifTrue: [contents := class prettyPrinterClass format: contents in: class notifying: nil + decorated: false]. - decorated: Preferences colorWhenPrettyPrinting]. self showingAnyKindOfDiffs ifTrue: [contents := self methodDiffFor: contents class: self selectedClass selector: self selectedMessageName meta: self metaClassIndicated]. ^contents asText makeSelectorBoldIn: class! Item was changed: ----- Method: CodeHolder>>sourceStringPrettifiedAndDiffed (in category 'message list') ----- sourceStringPrettifiedAndDiffed "Answer a copy of the source code for the selected message, transformed by diffing and pretty-printing exigencies" | class selector sourceString | class := self selectedClassOrMetaClass. selector := self selectedMessageName. (class isNil or: [selector isNil]) ifTrue: [^'missing']. sourceString := class ultimateSourceCodeAt: selector ifAbsent: [^'error']. self validateMessageSource: sourceString forSelector: selector. + (#(#prettyPrint #prettyDiffs) - (#(#prettyPrint #colorPrint #prettyDiffs) includes: contentsSymbol) ifTrue: [sourceString := class prettyPrinterClass format: sourceString in: class + notifying: nil]. - notifying: nil - contentsSymbol: contentsSymbol]. self showingAnyKindOfDiffs ifTrue: [sourceString := self diffFromPriorSourceFor: sourceString]. ^sourceString! Item was changed: ----- Method: CodeHolder>>contentsSymbol (in category 'contents') ----- contentsSymbol "Answer a symbol indicating what kind of content should be shown for the method; for normal showing of source code, this symbol is #source. A nil value in the contentsSymbol slot will be set to #source by this method" ^ contentsSymbol ifNil: [contentsSymbol := Preferences browseWithPrettyPrint ifTrue: + [#prettyPrint] - [Preferences colorWhenPrettyPrinting - ifTrue: [#colorPrint] - ifFalse: [#prettyPrint]] ifFalse: [#source]]! Item was removed: - ----- Method: CodeHolder>>toggleColorPrint (in category 'diffs') ----- - toggleColorPrint - "Toggle whether color-print is in effect in the code pane" - - self restoreTextualCodingPane. - self okToChange ifTrue: - [self showingColorPrint - ifTrue: - [contentsSymbol := #source] - ifFalse: - [contentsSymbol := #colorPrint]. - self setContentsToForceRefetch. - self contentsChanged] - - ! Item was removed: - ----- Method: CodeHolder>>colorPrintString (in category 'what to show') ----- - colorPrintString - "Answer whether the receiver is showing colorPrint" - - ^ (self showingColorPrint - ifTrue: ['<yes>'] - ifFalse: ['<no>']) - , 'colorPrint'! Item was removed: - ----- Method: CodeHolder>>showingColorPrint (in category 'what to show') ----- - showingColorPrint - "Answer whether the receiver is showing color-pretty-print" - - ^ contentsSymbol == #colorPrint! |
Free forum by Nabble | Edit this page |