Issues with code formatting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Issues with code formatting

sergio_101
my pretty print is acting much differently than it used to. it seems to be breaking every statement into a separate line. at some point, i remember being able to adjust this via some system settings, but i am not finding that anymore. is this called something different now, or am i just not understanding how it works?

thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Issues with code formatting

Peter Uhnak
Hi,

what version are you using? I see it in the settings under Code Browsing > Pretty Printing.

Peter

On Tue, Feb 17, 2015 at 3:17 PM, sergio_101 <[hidden email]> wrote:
my pretty print is acting much differently than it used to. it seems to be breaking every statement into a separate line. at some point, i remember being able to adjust this via some system settings, but i am not finding that anymore. is this called something different now, or am i just not understanding how it works?

thanks!

Reply | Threaded
Open this post in threaded view
|

Re: Issues with code formatting

sergio_101
i am using pharo 3.. i don't see many options under pretty printing.. especially when dealing with cascading... hmmm...

On Tue Feb 17 2015 at 10:35:58 AM Peter Uhnák <[hidden email]> wrote:
Hi,

what version are you using? I see it in the settings under Code Browsing > Pretty Printing.

Peter

On Tue, Feb 17, 2015 at 3:17 PM, sergio_101 <[hidden email]> wrote:
my pretty print is acting much differently than it used to. it seems to be breaking every statement into a separate line. at some point, i remember being able to adjust this via some system settings, but i am not finding that anymore. is this called something different now, or am i just not understanding how it works?

thanks!

Reply | Threaded
Open this post in threaded view
|

Re: Issues with code formatting

Nicolai Hess
2015-02-17 21:53 GMT+01:00 sergio_101 <[hidden email]>:
i am using pharo 3.. i don't see many options under pretty printing.. especially when dealing with cascading... hmmm...


Settings browser -> Refactoring Engine -> Configurable Formatter

 

On Tue Feb 17 2015 at 10:35:58 AM Peter Uhnák <[hidden email]> wrote:
Hi,

what version are you using? I see it in the settings under Code Browsing > Pretty Printing.

Peter

On Tue, Feb 17, 2015 at 3:17 PM, sergio_101 <[hidden email]> wrote:
my pretty print is acting much differently than it used to. it seems to be breaking every statement into a separate line. at some point, i remember being able to adjust this via some system settings, but i am not finding that anymore. is this called something different now, or am i just not understanding how it works?

thanks!


Reply | Threaded
Open this post in threaded view
|

Re: Issues with code formatting

sergio_101
found it! thanks!.. i dunno why i couldn't find it before...

thanks again!

On Tue Feb 17 2015 at 4:05:48 PM Nicolai Hess <[hidden email]> wrote:
2015-02-17 21:53 GMT+01:00 sergio_101 <[hidden email]>:
i am using pharo 3.. i don't see many options under pretty printing.. especially when dealing with cascading... hmmm...


Settings browser -> Refactoring Engine -> Configurable Formatter

 

On Tue Feb 17 2015 at 10:35:58 AM Peter Uhnák <[hidden email]> wrote:
Hi,

what version are you using? I see it in the settings under Code Browsing > Pretty Printing.

Peter

On Tue, Feb 17, 2015 at 3:17 PM, sergio_101 <[hidden email]> wrote:
my pretty print is acting much differently than it used to. it seems to be breaking every statement into a separate line. at some point, i remember being able to adjust this via some system settings, but i am not finding that anymore. is this called something different now, or am i just not understanding how it works?

thanks!

Reply | Threaded
Open this post in threaded view
|

Re: Issues with code formatting

Sean P. DeNigris
Administrator
In reply to this post by Nicolai Hess
Nicolai Hess wrote
Settings browser -> Refactoring Engine -> Configurable Formatter
In 4.0 these settings have apparently been moved to Settings browser -> Code Browsing -> Pretty Printing.

BTW two questions:
1. are these only applied if you click "format" from a source pane's context menu or is there another way (e.g. automatically on method save)?
2. Is there a way to view the source pretty-printed without dirtying the source? I feel like there used to be an obvious option... maybe in the old browser?

Thanks.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Issues with code formatting

Peter Uhnak
BTW two questions:
1. are these only applied if you click "format" from a source pane's context
menu or is there another way (e.g. automatically on method save)?
 
There is shortcut (ctrl+shift+f on linux, couple people mentioned it being broken on Mac).
There was some discussion about it being formatted when writing, but that has yet to be thought through and implemented (afaik).

2. Is there a way to view the source pretty-printed without dirtying the
source? I feel like there used to be an obvious option... maybe in the old
browser?
You could probably feed the source to RBConfigurableFormatter (or whatever the object name is), however I'm not aware of any pretty viewer.
Reply | Threaded
Open this post in threaded view
|

Re: Issues with code formatting

Marcus Denker-4
In reply to this post by Sean P. DeNigris

On 18 Feb 2015, at 18:43, Sean P. DeNigris <[hidden email]> wrote:

Nicolai Hess wrote
Settings browser -> Refactoring Engine -> Configurable Formatter

In 4.0 these settings have apparently been moved to Settings browser -> Code
Browsing -> Pretty Printing.

BTW two questions:
1. are these only applied if you click "format" from a source pane's context
menu or is there another way (e.g. automatically on method save)?
2. Is there a way to view the source pretty-printed without dirtying the
source? I feel like there used to be an obvious option... maybe in the old
browser?



https://pharo.fogbugz.com/f/cases/14395/port-to-Pharo4-14387-ressurrect-format-on-accept-and-format-on-display

it is on the TODO… 

Marcus