Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #217 from brunobuzzi/master
Browse files Browse the repository at this point in the history
add styler to JadeMethodHistoryBrowser #213
  • Loading branch information
James Foster authored Jul 26, 2019
2 parents cfe0f23 + 459296f commit 69a32b5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
3 changes: 1 addition & 2 deletions sources/Jade Method Browser.pax
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,15 @@ package setPrerequisites: #(
'..\Core\Object Arts\Dolphin\MVP\Presenters\Prompters\Dolphin Choice Prompter'
'..\Core\Object Arts\Dolphin\MVP\Views\Common Controls\Dolphin Common Controls'
'..\Core\Object Arts\Dolphin\MVP\Views\Control Bars\Dolphin Control Bars'
'..\Core\Object Arts\Dolphin\MVP\Presenters\Difference\Dolphin Differences Presenter'
'..\Core\Object Arts\Dolphin\MVP\Models\List\Dolphin List Models'
'..\Core\Object Arts\Dolphin\MVP\Presenters\List\Dolphin List Presenter'
'..\Core\Object Arts\Dolphin\Base\Dolphin Message Box'
'..\Core\Object Arts\Dolphin\MVP\Base\Dolphin MVP Base'
'..\Core\Object Arts\Dolphin\MVP\Presenters\Prompters\Dolphin Prompter'
'..\Core\Object Arts\Dolphin\MVP\Views\Scintilla\Dolphin Scintilla View'
'..\Core\Object Arts\Dolphin\MVP\Presenters\Text\Dolphin Text Presenter'
'..\Core\Object Arts\Dolphin\MVP\Models\Tree\Dolphin Tree Models'
'..\Core\Object Arts\Dolphin\MVP\Presenters\Tree\Dolphin Tree Presenter'
'..\Core\Object Arts\Dolphin\MVP\Type Converters\Dolphin Type Converters'
'..\Core\Object Arts\Dolphin\MVP\Models\Value\Dolphin Value Models'
'GemStone Objects'
'GemStone Session'
Expand Down
31 changes: 28 additions & 3 deletions sources/JadeMethodHistoryBrowser.cls
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,25 @@ JadeMethodHistoryBrowser comment: ''!
!JadeMethodHistoryBrowser categoriesForClass!Unclassified! !
!JadeMethodHistoryBrowser methodsFor!

compareSelectedVersions
| diffPresenter |

(versionListPresenter selections size = 2) ifFalse: [^MessageBox notify: 'Select two versions to compare' ].

diffPresenter := DifferencesPresenter show.
diffPresenter
textStyles: SmalltalkWorkspace textStyles;
styler: SmalltalkMethodStyler new.

diffPresenter topShell caption: (versionListPresenter selections first at: 2), ' -- ', (versionListPresenter selections second at: 2).

diffPresenter compare: (versionListPresenter selections first at: 3) with: (versionListPresenter selections second at: 3)!

createComponents

super createComponents.
versionListPresenter := self add: ListPresenter new name: 'versionList'.
editorPresenter := self add: TextPresenter new name: 'editor'.
editorPresenter := self add: MethodSourcePresenter new name: 'editor'.

!

Expand All @@ -25,10 +39,19 @@ createSchematicWiring
!

fillMethodSource

(versionListPresenter selections size = 1) ifFalse: [^self].

editorPresenter value: (versionListPresenter selection at: 3) asUtf8String.
editorPresenter model: (versionListPresenter selection at: 3) asUtf8String asValue.
!

onViewOpened

super onViewOpened.

editorPresenter view textStyles: SmalltalkWorkspace textStyles.
editorPresenter view styler: SmalltalkMethodStyler new.!

setContents: aReadStream

| versions |
Expand Down Expand Up @@ -59,9 +82,11 @@ shellName

^'Jade Method History Browser'.
! !
!JadeMethodHistoryBrowser categoriesFor: #compareSelectedVersions!private! !
!JadeMethodHistoryBrowser categoriesFor: #createComponents!private! !
!JadeMethodHistoryBrowser categoriesFor: #createSchematicWiring!private! !
!JadeMethodHistoryBrowser categoriesFor: #fillMethodSource!private! !
!JadeMethodHistoryBrowser categoriesFor: #onViewOpened!public! !
!JadeMethodHistoryBrowser categoriesFor: #setContents:!private! !
!JadeMethodHistoryBrowser categoriesFor: #shellName!private! !

Expand All @@ -75,6 +100,6 @@ resource_Default_view
ViewComposer openOn: (ResourceIdentifier class: self selector: #resource_Default_view)
"

^#(#'!!STL' 4 788558 10 ##(Smalltalk.STBViewProxy) ##(Smalltalk.ShellView) 34 27 nil nil 8 #(13565952 65536) 416 nil 524550 ##(Smalltalk.ColorRef) 8 4278190080 328198 ##(Smalltalk.Point) 1201 801 551 nil nil nil 416 1180166 ##(Smalltalk.ProportionalLayout) 170 176 8 #() true 170 192 34 4 410 ##(Smalltalk.ScintillaView) 34 50 nil 416 34 2 8 1445007428 1025 640 721990 2 ##(Smalltalk.ValueHolder) nil false 1310726 ##(Smalltalk.EqualitySearchPolicy) nil 466 8 4278190080 nil 7 nil 263174 ##(Smalltalk.Font) nil true 459014 ##(Smalltalk.LOGFONT) 8 #[243 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 3 2 1 34 86 101 114 100 97 110 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] 514 193 193 nil 640 nil 504331129 852486 ##(Smalltalk.NullConverter) nil nil 11 nil 170 192 34 4 #normal 1182790 1 ##(Smalltalk.ScintillaTextStyle) 1 nil nil 1 nil nil nil nil #normal nil nil nil #callTip 962 77 786694 ##(Smalltalk.IndexedColor) 33554457 1010 33554471 1 nil nil nil nil #callTip nil nil nil 34 256 976 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil 992 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil 1377542 ##(Smalltalk.SmalltalkMethodStyler) 1 nil nil false 138 144 592 170 192 34 2 #default 1641542 1 ##(Smalltalk.ScintillaMarkerDefinition) 1 nil nil nil 640 #circle nil nil nil nil nil nil 138 ##(Smalltalk.IdentitySet) 592 nil 170 176 592 9215 nil nil nil nil 1010 33554447 nil nil 65 nil nil 170 192 34 6 #literalBytes 8 '[]' #literalArray 8 '()' #specialCharacter 8 '()[]<>' 8 '' 3 170 192 34 2 #container 170 192 34 4 #normal 976 #callTip 992 nil nil nil nil 1 nil 170 192 34 6 1 1510470 2 ##(Smalltalk.ScintillaIndicatorStyle) 1 640 65025 3 false 1 nil nil nil nil nil nil 3 1426 3 640 33423361 5 false 3 nil nil nil nil nil nil 5 1426 5 640 511 1 false 5 nil nil nil nil nil nil nil nil 170 192 34 6 #Warning 962 1031 196934 1 ##(Smalltalk.RGB) 60239 1538 31326207 1 nil nil nil nil #Warning nil nil nil #Error 962 1029 1538 335 1538 31317503 1 nil nil nil nil #Error nil nil nil #Notification 962 1027 nil 1538 31185883 1 nil nil nil nil #Notification nil nil nil nil 983302 ##(Smalltalk.MessageSequence) 138 144 34 9 721670 ##(Smalltalk.MessageSend) #createAt:extent: 34 2 514 1 367 514 1169 357 640 1730 #textLimit: 8 #(1073741823) 640 1730 #modificationEventMask: 8 #(4607) 640 1730 #caretPeriod: 8 #(530) 640 1730 #sciSetEOLMode: 8 #(2) 640 1730 #margins: 34 1 34 3 985158 2 ##(Smalltalk.ScintillaMargin) 1 640 1 3 nil nil nil nil 1986 3 640 33 nil 3 67108863 nil nil 1986 5 640 1 nil 3 -67108863 nil nil 640 1730 #tabWidth: 8 #(4) 640 1730 #maxCompletionListHeight: 8 #(9) 640 1730 #sciSetCodePage: 8 #(65001) 640 983302 ##(Smalltalk.WINDOWPLACEMENT) 8 #[44 0 0 0 0 0 0 0 1 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 183 0 0 0 72 2 0 0 105 1 0 0] 8 #() 514 193 193 nil 29 8 'editor' 410 ##(Smalltalk.ListView) 34 30 nil 416 34 2 8 1409355853 1025 2240 590662 2 ##(Smalltalk.ListModel) 138 144 592 nil 1310726 ##(Smalltalk.IdentitySearchPolicy) 466 8 4278190080 nil 7 nil nil nil 2240 nil 8 1795483760 459270 ##(Smalltalk.Message) #displayString 8 #() ##(Smalltalk.IconicListAbstract) 1049926 1 ##(Smalltalk.IconImageManager) nil nil nil nil nil nil 138 144 34 2 920646 5 ##(Smalltalk.ListViewColumn) 8 'Category' 501 #left 2434 #displayString 2464 ##(Smalltalk.SortedCollection) 787814 3 ##(Smalltalk.BlockClosure) 0 nil 1180966 ##(Smalltalk.CompiledExpression) 1 83886081 ##(Smalltalk.UndefinedObject) 8 'doIt' 8 '[:each | each at: 1]' 8 #[29 105 17 63 148 106] 2624 7 257 nil nil 2240 nil 1 nil nil 2546 8 'Timestamp' 501 #left 2434 #displayString 8 #() 2434 #<= 2768 2610 0 nil 2642 1 83886081 ##(Smalltalk.UndefinedObject) 8 'doIt' 8 '[:each | each at: 2]' 8 #[29 105 17 64 148 106] 2800 7 257 nil nil 2240 nil 1 nil nil #report 592 nil 131169 nil 8 #(nil) 1666 138 144 34 2 1730 #createAt:extent: 34 2 514 1 1 514 1169 357 2240 1730 #text: 34 1 8 'Category' 2240 2146 8 #[44 0 0 0 0 0 0 0 1 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 72 2 0 0 178 0 0 0] 8 #() 2208 nil 27 8 'versionList' nil nil nil nil nil 1 nil nil nil nil 1 nil nil 1666 138 144 34 2 1730 #createAt:extent: 34 2 514 2879 21 514 1201 801 416 1730 #updateMenuBar 592 416 2146 8 #[44 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 159 5 0 0 10 0 0 0 247 7 0 0 154 1 0 0] 34 3 2240 410 ##(Smalltalk.Splitter) 34 12 nil 416 34 2 8 1140850688 1 3296 nil 466 8 4278190080 nil 519 nil nil nil 3296 1666 138 144 34 1 1730 #createAt:extent: 34 2 514 1 357 514 1169 11 3296 2146 8 #[44 0 0 0 0 0 0 0 1 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 178 0 0 0 72 2 0 0 183 0 0 0] 8 #() 2208 nil 27 640 2208 nil 27 )! !
^#(#'!!STL' 4 788558 10 ##(Smalltalk.STBViewProxy) ##(Smalltalk.ShellView) 34 27 nil nil 8 #(13565952 65536) 416 nil 786694 ##(Smalltalk.ColorDefault) 8 4278190080 328198 ##(Smalltalk.Point) 1201 801 549 nil nil nil 416 1180166 ##(Smalltalk.ProportionalLayout) 170 176 8 #() true 170 192 34 4 410 ##(Smalltalk.ReferenceView) 34 14 nil 416 34 2 8 1140850688 131073 640 nil 480 nil 7 nil nil nil 640 1180230 1 ##(Smalltalk.ResourceIdentifier) ##(Smalltalk.MethodWorkspace) #resource_Default_view nil 983302 ##(Smalltalk.MessageSequence) 138 144 34 1 721670 ##(Smalltalk.MessageSend) #createAt:extent: 34 2 514 1 367 514 1169 357 640 983302 ##(Smalltalk.WINDOWPLACEMENT) 8 #[44 0 0 0 0 0 0 0 1 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 183 0 0 0 72 2 0 0 105 1 0 0] 592 514 193 193 nil 27 8 'editor' 410 ##(Smalltalk.ListView) 34 30 nil 416 34 2 8 1409355849 1025 960 590662 2 ##(Smalltalk.ListModel) 138 144 592 nil 1310726 ##(Smalltalk.IdentitySearchPolicy) 480 nil 7 265030 4 ##(Smalltalk.Menu) nil true 34 1 984134 2 ##(Smalltalk.CommandMenuItem) 1 1180998 4 ##(Smalltalk.CommandDescription) #compareSelectedVersions 8 'Compare Selected Versions' 1 1 nil nil nil 8 '' nil 134217729 nil nil nil nil nil nil nil 960 nil 8 1937040751 459270 ##(Smalltalk.Message) #displayString 8 #() ##(Smalltalk.IconicListAbstract) 1049926 1 ##(Smalltalk.IconImageManager) nil nil nil nil nil nil 138 144 34 2 920646 5 ##(Smalltalk.ListViewColumn) 8 'Category' 501 #left 1266 #displayString 1296 ##(Smalltalk.SortedCollection) 787814 3 ##(Smalltalk.BlockClosure) 0 nil 1180966 ##(Smalltalk.CompiledExpression) 1 83886081 ##(Smalltalk.UndefinedObject) 8 'doIt' 8 '[:each | each at: 1]' 8 #[29 105 17 63 148 106] 1456 7 257 nil nil 960 nil 1 nil nil 1378 8 'Timestamp' 501 #left 1266 #displayString 8 #() 1266 #<= 1600 1442 0 nil 1474 1 83886081 ##(Smalltalk.UndefinedObject) 8 'doIt' 8 '[:each | each at: 2]' 8 #[29 105 17 64 148 106] 1632 7 257 nil nil 960 nil 1 nil nil #report 592 nil 131169 nil 34 4 nil nil 514 1 1 nil 738 138 144 34 3 802 #createAt:extent: 34 2 514 1 1 514 1169 357 960 802 #contextMenu: 34 1 1120 960 802 #text: 34 1 8 'Category' 960 882 8 #[44 0 0 0 0 0 0 0 1 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 72 2 0 0 178 0 0 0] 8 #() 928 nil 27 8 'versionList' nil nil nil nil nil 1 nil nil nil nil 1 nil nil 738 138 144 34 2 802 #createAt:extent: 34 2 514 3059 21 514 1201 801 416 802 #updateMenuBar 592 416 882 8 #[44 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 249 5 0 0 10 0 0 0 81 8 0 0 154 1 0 0] 34 3 960 410 ##(Smalltalk.Splitter) 34 12 nil 416 34 2 8 1140850688 1 2176 nil 480 nil 519 nil nil nil 1510470 1 ##(Smalltalk.DraggableViewInteractor) 2176 nil 1 #left nil nil nil 1728 514 9 9 nil 1728 nil 738 138 144 34 1 802 #createAt:extent: 34 2 514 1 357 514 1169 11 2176 882 8 #[44 0 0 0 0 0 0 0 1 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 178 0 0 0 72 2 0 0 183 0 0 0] 8 #() 928 nil 27 640 928 nil 27 )! !
!JadeMethodHistoryBrowser class categoriesFor: #resource_Default_view!public!resources-views! !

7 changes: 4 additions & 3 deletions sources/OopType64.cls
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@ printOn: aStream
!

smallDoubleAsFloat
| bits sign expn frac bitsStream |

| bits sign expn frac |
bits := (bytes qwordAtOffset: 0) bitAnd: 7 bitInvert.
bits := bits printStringRadix: 2 showRadix: false.
bits := (bytes qwordAtOffset: 0) bitAnd: 7 bitInvert.
bits printOn: (bitsStream := String writeStream: 16) base: 2 showRadix: false.
bits := bitsStream contents.
[bits size < 64] whileTrue: [bits := '0' , bits].
expn := ('2r' , (bits copyFrom: 1 to: 8)) asNumber.
frac := ('2r' , (bits copyFrom: 9 to: 59)) asNumber.
Expand Down

0 comments on commit 69a32b5

Please sign in to comment.