HistoryManager.st
changeset 2875 4fe2f4522753
parent 2641 e15145843efe
child 3158 f8c56a311307
child 3463 94e2c950bba2
equal deleted inserted replaced
2874:76f493ddadfe 2875:4fe2f4522753
   364 
   364 
   365     "Created: 5.3.1996 / 15:11:12 / cg"
   365     "Created: 5.3.1996 / 15:11:12 / cg"
   366     "Modified: 30.4.1996 / 10:57:35 / cg"
   366     "Modified: 30.4.1996 / 10:57:35 / cg"
   367 ! !
   367 ! !
   368 
   368 
       
   369 !HistoryManager class methodsFor:'others'!
       
   370 
       
   371 version_CVS
       
   372     ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.83 2012-07-31 12:31:47 vrany Exp $'
       
   373 ! !
       
   374 
   369 !HistoryManager methodsFor:'accessing'!
   375 !HistoryManager methodsFor:'accessing'!
   370 
   376 
   371 fullHistoryUpdate
   377 fullHistoryUpdate
   372     "return the fullHistoryUpdate; 
   378     "return the fullHistoryUpdate; 
   373      if true, the classes history method is also updated."
   379      if true, the classes history method is also updated."
   810         pos := (histories first) firstPositionInSourceCode.
   816         pos := (histories first) firstPositionInSourceCode.
   811         sourceCode := (someString copyFrom: 1 to: pos - 1) withoutSeparators.
   817         sourceCode := (someString copyFrom: 1 to: pos - 1) withoutSeparators.
   812     ].
   818     ].
   813 
   819 
   814     "add the actual user's historyLine."
   820     "add the actual user's historyLine."
   815     histLines := (previousHistories ? histories).
   821 
       
   822     "JV@2012-04-03: Add previous histories if we are updating
       
   823      existing method (avoids having bogus entries when taking
       
   824      existing method as template and then accepting with a different
       
   825      selector and/or in a different class"
       
   826     what == #creation ifTrue:[
       
   827         histLines := OrderedCollection new.
       
   828     ] ifFalse:[
       
   829         histLines := (previousHistories ? histories).
       
   830     ].
   816     histLines add:newLine.
   831     histLines add:newLine.
   817 
   832 
   818     doFilter ifTrue:[
   833     doFilter ifTrue:[
   819         "Filtering historyLines (each user with one entry)."
   834         "Filtering historyLines (each user with one entry)."
   820         histLines := HistoryLine filterHistoryLines: histLines.
   835         histLines := HistoryLine filterHistoryLines: histLines.
   831     ].
   846     ].
   832 
   847 
   833     ^ wStream contents.
   848     ^ wStream contents.
   834 
   849 
   835     "Modified: / 30-06-2011 / 17:07:18 / cg"
   850     "Modified: / 30-06-2011 / 17:07:18 / cg"
       
   851     "Modified: / 03-04-2012 / 16:35:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   852     "Modified (comment): / 31-07-2012 / 13:31:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   836 !
   853 !
   837 
   854 
   838 addHistory:what with:arg toHistoryMethodOf:aClass
   855 addHistory:what with:arg toHistoryMethodOf:aClass
   839     "private - add a historyLine at end of the classes history methods
   856     "private - add a historyLine at end of the classes history methods
   840      source - if there is one"
   857      source - if there is one"
  1001     HistoryLine deleted.
  1018     HistoryLine deleted.
  1002 "
  1019 "
  1003 !
  1020 !
  1004 
  1021 
  1005 version
  1022 version
  1006     ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.82 2011-12-04 14:45:34 cg Exp $'
  1023     ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.83 2012-07-31 12:31:47 vrany Exp $'
  1007 ! !
  1024 ! !
  1008 
  1025 
  1009 !HistoryManager::HistoryLine class methodsFor:'filtering'!
  1026 !HistoryManager::HistoryLine class methodsFor:'filtering'!
  1010 
  1027 
  1011 filterHistoryLines:aCollectionOfHistoryLines
  1028 filterHistoryLines:aCollectionOfHistoryLines
  1695     "Modified: 20.4.1996 / 20:20:29 / cg"
  1712     "Modified: 20.4.1996 / 20:20:29 / cg"
  1696 ! !
  1713 ! !
  1697 
  1714 
  1698 !HistoryManager class methodsFor:'documentation'!
  1715 !HistoryManager class methodsFor:'documentation'!
  1699 
  1716 
  1700 version_CVS
  1717 version_SVN
  1701     ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.82 2011-12-04 14:45:34 cg Exp $'
  1718     ^ '§Id: HistoryManager.st 1911 2012-04-03 17:14:36Z vranyj1 §'
  1702 ! !
  1719 ! !
  1703 
  1720 
  1704 HistoryManager initialize!
  1721 HistoryManager initialize!
  1705 HistoryManager::HistoryLine initialize!
  1722 HistoryManager::HistoryLine initialize!