[Pkg] DeltaStreams: DeltaStreams-UI-mtf.5.mcz
squeaksource-noreply at iam.unibe.ch
squeaksource-noreply at iam.unibe.ch
Fri May 30 19:06:25 UTC 2008
Matthew Fulmer uploaded a new version of DeltaStreams-UI to project DeltaStreams:
http://www.squeaksource.com/DeltaStreams/DeltaStreams-UI-mtf.5.mcz
==================== Summary ====================
Name: DeltaStreams-UI-mtf.5
Author: mtf
Time: 30 May 2008, 12:06:44 pm
UUID: 99627652-5268-4b1d-bf06-297e485cd80c
Ancestors: DeltaStreams-UI-mtf.4
imported some extension methods got left behind during the package split
Implemented seletion preservation across editor changes
=============== Diff against DeltaStreams-UI-mtf.4 ===============
Item was added:
+ ----- Method: Rectangle>>scaleFractionalFrom:to: (in category '*DeltaStreams-UI') -----
+ scaleFractionalFrom: rect1 to: rect2
+ "Produce a rectangle stretched according to the stretch from rect1 to rect2"
+ ^ (origin scaleFractionalFrom: rect1 to: rect2)
+ corner: (corner scaleFractionalFrom: rect1 to: rect2)!
Item was changed:
----- Method: DSDeltaStreamBrowser>>preserveSelectionAround: (in category 'as yet unclassified') -----
preserveSelectionAround: aBlock
+ "saves the selected category/class/protocol/method, evaluates the block, and restores the selection. This method creates many duplicate change notifications. You probably want to wrap it with #queueChangesDuring:"
- "saves the selected category/class/protocol/method, evaluates the block, and restores the selection"
+ | category class meta protocol selector | [
+ category := self selectedSystemCategoryName.
+ class := self selectedClass.
+ meta := self metaClassIndicated.
+ protocol := self selectedMessageCategoryName.
+ selector := self selectedMessageName.
+ aBlock value.
+ ] ensure: [
+ self selectSystemCategoryNamed: category.
+ self selectClass: class.
+ self metaClassIndicated: meta.
+ protocol ifNotNil: [self selectMessageCategoryNamed: protocol].
+ self selectedMessageName: selector.
+ ]!
- aBlock value
- "
- self selectCategoryForClass: classEditor theNonMetaClass.
- self selectClass: classEditor theNonMetaClass.
- self metaClassIndicated: classEditor isMeta.
- self selectMessageCategoryNamed: methodEditor category.
- self selectedMessageName: methodEditor selector.
- "!
Item was added:
+ ----- Method: Point>>scaleFractionalFrom:to: (in category '*DeltaStreams-UI') -----
+ scaleFractionalFrom: rect1 to: rect2
+ "Produce a point stretched according to the stretch from rect1 to rect2"
+ ^ rect2 topLeft + (((x-rect1 left) * rect2 width / rect1 width)
+ @ ((y-rect1 top) * rect2 height / rect1 height))!
Item was added:
+ ----- Method: OrderedCollection>>ensureIndex:fillWith: (in category '*DeltaStreams-UI') -----
+ ensureIndex: index fillWith: anObject
+ "Become larger if index is out of bounds, filing new elements with anObject"
+ | newArray newSize newLast |
+ index <= self size ifTrue: [^ self]. "if is within the collection size, do nothing"
+ newLast := index + firstIndex - 1.
+ newLast <= array size ifFalse: ["Must grow"
+ newSize := (array size + self growSize) max: (array size // 4 + newLast).
+ newArray := Array new: newSize.
+ newArray replaceFrom: 1 to: array size with: array startingAt: 1.
+ array := newArray].
+ anObject ifNotNil: [array from: lastIndex + 1 to: newLast put: anObject].
+ lastIndex := newLast.
+ !
Item was changed:
----- Method: DSDeltaStreamBrowser>>changeListShowAll (in category 'change list menu') -----
changeListShowAll
shownChangeIndexes := nil.
+ self refreshSystemEditor.!
- self computeSystemEditor.
- self changed: #changeList.
- self changed: #systemCategoryList.!
Item was added:
+ ----- Method: DSDeltaStreamBrowser>>refreshSystemEditor (in category 'as yet unclassified') -----
+ refreshSystemEditor
+ "Recompute the system editor and update the view"
+ self queueChangesDuring: [self preserveSelectionAround: [
+ self computeSystemEditor.
+ self changed: #changeList.
+ self changed: #systemCategoryList
+ ]]!
Item was added:
+ ----- Method: Browser>>selectSystemCategoryNamed: (in category '*DeltaStreams-UI') -----
+ selectSystemCategoryNamed: aSymbol
+
+ self systemCategoryListIndex: (self systemCategoryList indexOf: aSymbol)
+ !
Item was changed:
+ ----- Method: DSDeltaStreamBrowser>>computeSystemEditor (in category 'as yet unclassified') -----
- ----- Method: DSDeltaStreamBrowser>>computeSystemEditor (in category 'change list') -----
computeSystemEditor
+ "rebuild the system editor from the currently visible change list"
delta ifNil: [self editor: nil. ^ self].
self editor: SystemEditorUIModel new.
changeApplier := DSUIApplier on: self editor.
changeApplier validate: self isValidating.
self shownChangesDo: [:change | change applyUsing: changeApplier]!
Item was changed:
----- Method: DSDeltaStreamBrowser>>shownChangesSelectVisible: (in category 'change list') -----
shownChangesSelectVisible: aBlock
"Select which changes to keep visible by evaluating aBlock with each change and its selected status"
| newShownChangeIndexes |
newShownChangeIndexes := OrderedCollection new.
self shownChangesWithIndexAndHighlightDo: [:change :index :selected |
(aBlock value: change value: selected) ifTrue: [newShownChangeIndexes add: index]].
changeListIndex := 0.
changeListSelection := nil.
shownChangeIndexes := newShownChangeIndexes.
+ self refreshSystemEditor.!
- self halt.
- self computeSystemEditor.
- self changed: #changeList.
- self changed: #systemCategoryList!
Item was added:
+ ----- Method: Browser>>addLowerPanesTo:at:with: (in category '*DeltaStreams-UI-override') -----
+ addLowerPanesTo: window at: nominalFractions with: editString
+ | commentPane |
+ super addLowerPanesTo: window at: nominalFractions with: editString.
+ commentPane := self buildMorphicCommentPane.
+ window addMorph: commentPane fullFrame: (LayoutFrame fractions: ((0 at 0.6 corner: 1 at 1) scaleFractionalFrom: (0 at 0 corner: 1 at 1) to: nominalFractions)).
+ self changed: #editSelection.!
More information about the Packages
mailing list