cool we should add it :) On May 21, 2012, at 11:09 AM, Goubier Thierry wrote:
> Le 18/05/2012 01:01, Ted F.A. van Gaalen a écrit : >> Pharo 1.4 Nautilus >> can't find source code auto format option. >> also not in the settings browser >> but maybe I haven't been looking good enough.. >> anyone? >> thanks >> Ted > > I added it myself because I like that functionality. But I still loose the > Cmd+r shortcut, since it's used for something else. > > in NautilusRefactoring class >> sourceCodeRefactoringMenu: > > (aBuilder item: #'Format') > action: [ | source tree formatted morph | > morph := target sourceTextArea. > source := morph text asString. > tree := RBParser > parseMethod: source > onError: [ :msg :pos | ^ target ]. > formatted := tree formattedCode. > formatted = source > ifTrue: [ ^ self]. > morph editString: formatted; > hasUnacceptedEdits: true > ]; > parent: #'Source code refactoring'; > order: 50. > > Thierry > -- > Thierry Goubier > CEA list > Laboratoire des Fondations des Systèmes Temps Réel Embarqués > 91191 Gif sur Yvette Cedex > France > Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95 >
