diff -r 41f056db1b83 -r bc62fb9a8df6 SmalltalkCodeGeneratorTool.st --- a/SmalltalkCodeGeneratorTool.st Tue May 03 06:42:52 2016 +0200 +++ b/SmalltalkCodeGeneratorTool.st Wed May 04 06:51:10 2016 +0200 @@ -259,24 +259,24 @@ !SmalltalkCodeGeneratorTool class methodsFor:'compilation'! compile:theCode forClass:aClass inCategory:cat - "install some code for a class. + "install some code for a class. Return the new method or nil. If refactory browser stuff is avaliable the refactory tools are used to support undo" - | parser | + | parser selector | super compile:theCode forClass:aClass inCategory:cat. + parser := Parser parseMethodSpecification: theCode in: aClass ignoreErrors: true ignoreWarnings: true. - ^ parser selector notNil ifTrue:[ - aClass compiledMethodAt: parser selector. - ] ifFalse:[ - nil + (selector := parser selector notNil) ifTrue:[ + ^ aClass compiledMethodAt: selector. ]. + ^ nil "Created: / 05-08-2014 / 16:14:55 / Jan Vrany " ! compile:theCode forClass:aClass inCategory:cat notifying: requestor - "install some code for a class. + "install some code for a class. Return the new method or nil. If refactory browser stuff is avaliable the refactory tools are used to support undo" CompilationErrorHandlerQuery