--- a/Tools__ChangeSetBrowser2.st Thu Jul 26 20:10:32 2012 +0100
+++ b/Tools__ChangeSetBrowser2.st Fri Jul 27 15:56:44 2012 +0100
@@ -2448,12 +2448,48 @@
Transcript showCR:self class name, ': action for #doDeleteToEnd ...'.
!
-doFindSnapshot:anArgument
-
- self breakPoint: #jv.
- Dialog warn: 'Sorry, not yet implemented'
-
- "Modified: / 30-03-2012 / 12:20:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+doFindSnapshot:previousOrNext
+ self doFindSnapshot: previousOrNext in: self list.
+
+ "Modified: / 27-07-2012 / 15:40:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+doFindSnapshot:previousOrNext in: changeList
+ | snapshot selection searchBlock notFoundMessage |
+
+
+ selection := self theSingleSelectedChange.
+ searchBlock := [:listEntry|
+ listEntry == selection ifTrue:[
+ snapshot notNil ifTrue:[
+ changeList selection: (OrderedCollection with: snapshot).
+ ] ifFalse:[
+ self infoPanel showMessage: notFoundMessage closeAfter: 5"sec".
+ ].
+ ^self.
+ ] ifFalse:[
+ (listEntry change isOtherChange and:[listEntry change type == #snapshot]) ifTrue:[
+ snapshot := listEntry
+ ].
+ ].
+ ].
+ previousOrNext = 'previous' ifTrue:[
+ selection isNil ifTrue:[
+ selection := changeList list last.
+ changeList selection: (Array with: selection).
+ ].
+ notFoundMessage := resources string:'No snapshot prior selected change found.'.
+ changeList list do: searchBlock.
+ ] ifFalse:[
+ selection isNil ifTrue:[
+ selection := changeList list first.
+ changeList selection: (Array with: selection).
+ ].
+ notFoundMessage := resources string:'No snapshot after selected change found.'.
+ changeList list reverseDo: searchBlock.
+ ]
+
+ "Created: / 27-07-2012 / 15:38:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
doOpen
@@ -3108,7 +3144,7 @@
getNavigatorChangeSet
| changeset |
- changeset := changesetHolder value deepCopy.
+ changeset := changesetHolder value. "/deepCopy.
(changeset isKindOf: ChangeSet) ifFalse:
[changeset := ChangeSet withAll: changeset].
@@ -3119,7 +3155,7 @@
]
"Created: / 24-10-2009 / 19:31:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 04-02-2012 / 21:19:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 27-07-2012 / 15:43:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
list
@@ -3547,7 +3583,7 @@
!ChangeSetBrowser2 class methodsFor:'documentation'!
version
- ^ '$Id: Tools__ChangeSetBrowser2.st 8027 2012-07-26 18:46:57Z vranyj1 $'
+ ^ '$Id: Tools__ChangeSetBrowser2.st 8029 2012-07-27 14:56:44Z vranyj1 $'
!
version_CVS
@@ -3555,5 +3591,5 @@
!
version_SVN
- ^ '$Id: Tools__ChangeSetBrowser2.st 8027 2012-07-26 18:46:57Z vranyj1 $'
+ ^ '$Id: Tools__ChangeSetBrowser2.st 8029 2012-07-27 14:56:44Z vranyj1 $'
! !