|
Class: HistoryManager
Object
|
+--HistoryManager
- Package:
- stx:libbasic3
- Category:
- System-Changes-History
- Version:
- rev:
1.103
date: 2023/01/12 15:18:03
- user: cg
- file: HistoryManager.st directory: libbasic3
- module: stx stc-classLibrary: libbasic3
This class is part of the HistoryManagerProject.
It helps to keep track of changes made to methods.
All Methods and Classes in the system get a HistroyLine which
contains a timestamp and the name of the changing user.
This is acually the Unix loginname.
The Manager registers itself to get notifications
on change, intercepts them and appends a historyLine to the method's
code.
The HistoryManager can be turned on/off from a private.rc script,
or via the Launcher menu.
The method's history line is filtered, to only contain one
entry per modifying user, containing the date of the last change.
If fullHistoryMode is on, the classes history-ethod is also updated for
every change (containing every change).
Full mode is enabled via:
HistoryManager fullHistoryUpdate:true
or via the Launchers compilation-settings dialog.
claus:
I changed things to avoid depending on every class in the system.
Now also catch Smalltalk change messages, related to class changes.
copyrightCOPYRIGHT (c) 1995 by AEG Industry Automation
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
accessing
-
fullHistoryUpdate
-
return true, if the historyManagement does full updates
-
fullHistoryUpdate: aBoolean
-
set/clear, full updates
-
instance
-
return the one and only historyManager instance
-
isActive
-
return true, if the historyManagement is activated
activation / deactivation
-
activate
-
activate the HistoryManagement
Usage example(s):
creating an instance activates me
|
Usage example(s):
-
deactivate
-
deactivate the HistoryManagement
Usage example(s):
HistoryManager deactivate
|
change & update
-
update: what with: aParameter from: changedObject
-
intercepts system restart - reinstall mySelf as dependent of all classes
helpers
-
codeForInitialHistoryMethodIn: aClass
-
create an initial (empty) history method
-
createInitialHistoryMethodIn: aClass
-
create an initial (empty) history method
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
getAllHistoriesFrom: someString
-
returns anArray of HistoryLines from a string.
Usually, the argument is a method's source code.
Usage example(s):
HistoryManager getAllHistoriesFrom:( HistoryManager class sourceCodeAt:#getAllHistoriesFrom: )
|
-
getLastHistoryLineFrom: someString
-
returns the last HistoryLine, if no HistoryLine available, return nil
-
withoutHistoryLines: someString
-
given some method's sourceString, return a copy without any
history lines
Usage example(s):
HistoryManager withoutHistoryLines:nil
HistoryManager withoutHistoryLines:''
HistoryManager
withoutHistoryLines:(HistoryManager class sourceCodeAt:#withoutHistoryLines:)
|
initialization
-
enforcedUserName
-
-
enforcedUserName: aStringOrNil
-
self enforcedUserName:'fm'
self enforcedUserName:nil
-
initMe
-
setup theOneAndOnly instance of myself (if not already present
-
initialize
-
add myself as a dependent of ObjectMemory to be told about image restarts
instance creation
-
new
-
because there can be only ONE HistoryManager, new must me redefiend
Usage example(s):
queries
-
currentUserName
-
return the current user's name
Usage example(s):
HistoryManager currentUserName
|
accessing
-
fullHistoryUpdate
-
return the fullHistoryUpdate;
if true, the classes history method is also updated.
-
fullHistoryUpdate: aBoolean
-
set the fullHistoryUpdate;
if true, the classes history method is also updated.
-
historyMode
-
return historyMode
-
historyMode: something
-
set historyMode
change & update
-
update: something with: someArgument from: changedObject
-
arrive here, whenever any class changed somehow.
(something contains aSymbol describing what happened)
-
updateAfterClassChange: whatChange in: aClass
-
it is a class definition that has changed
-
updateAfterMethodChange: selector from: oldMethod in: changedClass
-
initialization
-
exclude
-
public - return an exclusionlist for some smalltalk classes which should not be notified or historisized
-
initialize
-
public - make me depend on all smalltalk classes (except the exclusionList)
to be notified later about changes. This intercepts source installation and allows
be to patch the source-string with a historyLine.
-
releaseDependencies
-
no longer depend on class changes
updateHistory
-
addHistory: what with: argument to: someString filter: doFilter
-
private - add a historyLine at end to the sourceCode;
check for multiple lines of the same user and merge into one.
What may be one of #modification or #creation, to choose among
'Modified' or 'Created' lines.
-
addHistory: what with: argument to: previousHistories inSource: someString filter: doFilter
-
private - add a historyLine at end to the sourceCode;
check for multiple lines of the same user and merge into one.
What may be one of #modification or #creation, to choose among
'Modified' or 'Created' lines.
-
addHistory: what with: arg toHistoryMethodOf: aClass
-
private - add a historyLine at end of the classes history methods
source - if there is one
-
createHistoryMethodFor: aClass
-
private - create a history method
HistoryLine
|