# HG changeset patch # User Claus Gittinger # Date 1288699811 -3600 # Node ID 6c2edf41aae921ced586694647f6b9ed43c6bf50 # Parent df14391bb61628c9e229474ceb5536aede012968 x diff -r df14391bb616 -r 6c2edf41aae9 TextCollectingCompilationErrorHandler.st --- a/TextCollectingCompilationErrorHandler.st Tue Nov 02 13:01:13 2010 +0100 +++ b/TextCollectingCompilationErrorHandler.st Tue Nov 02 13:10:11 2010 +0100 @@ -12,7 +12,7 @@ "{ Package: 'stx:libcomp' }" CompilationErrorHandler subclass:#TextCollectingCompilationErrorHandler - instanceVariableNames:'lines' + instanceVariableNames:'lines collectWarnings' classVariableNames:'' poolDictionaries:'' category:'System-Compiler' @@ -40,6 +40,14 @@ " ! ! +!TextCollectingCompilationErrorHandler methodsFor:'accessing'! + +errorsOnly:aBoolean + collectWarnings := aBoolean not + + "Created: / 02-11-2010 / 13:09:34 / cg" +! ! + !TextCollectingCompilationErrorHandler methodsFor:'error handling'! error:aMessage position:position to:endPos from:aCompiler @@ -51,9 +59,11 @@ ! warning:aMessage position:position to:endPos from:aCompiler - (lines includes:aMessage) ifTrue:[^ self ]. - lines add:aMessage. - myStream nextPutLine:aMessage. + collectWarnings ifTrue:[ + (lines includes:aMessage) ifTrue:[^ self ]. + lines add:aMessage. + myStream nextPutLine:aMessage. + ]. "Created: / 02-11-2010 / 12:51:30 / cg" ! ! @@ -62,6 +72,7 @@ initialize lines := OrderedCollection new. + collectWarnings := true. "Created: / 02-11-2010 / 13:00:55 / cg" ! ! @@ -69,5 +80,5 @@ !TextCollectingCompilationErrorHandler class methodsFor:'documentation'! version_CVS - ^ '$Header: /cvs/stx/stx/libcomp/TextCollectingCompilationErrorHandler.st,v 1.2 2010-11-02 12:01:10 cg Exp $' + ^ '$Header: /cvs/stx/stx/libcomp/TextCollectingCompilationErrorHandler.st,v 1.3 2010-11-02 12:10:11 cg Exp $' ! !