- Methods that do logging (logError, logMessage, logDebug) need to
have access to an EditingSession or UserInterface or they have to
be passed an ErrorLogger. They should no longer directly call the
static methods in Editor.
- EditoringSession must have a public method:
public ErrorLogger getErrorLogger() {
return userInterface.getErrorLogger();
}
- UserInterface now has a public method:
public ErrorLogger getErrorLogger();
- For now, the GUI groups can use:
public ErrorLogger getErrorLogger() {
return Editor.getErrorLogger();
}
But eventually, the error logger should be specific to the
user interface.
- ErrorLogger methods:
- logError is meant to display a single line containing an error
message. Usually only one of these should be generated by a given
action and the action will terminate soon after the message is
produced. The user's attention should be caught when this occurs.
- logMessage is meant for a possibly multi-line string.
Only one of these should be produced as the result of an action.
it is meant to be informatory.
See for example the commands command or showclipboard command.
- LogDebug is for debugging only. Multiple calls can be generated
by a single action.
- Do we want to add: LogShortMessage ?