Jump to content
Brandon Staggs

Code formatting in Delphi 12

Recommended Posts

The publicly listed "What's New" page for Delphi 12 says this:

 

Quote

Moving Deprecated Features

In RAD Studio 12.0 Athens, we are moving some old and unsupported tools out of the core product installation, making them available as add-ons:

  • VCL Translation Support.
  • Modeling. Note that you must install this if you want to use Delphi code formatting, and it is available in the Technology section of the installer.

 

Am I misunderstanding this, or are they saying that there will be no Delphi code formatting in the default configuration for the IDE?

Edited by Brandon Staggs
removed color formatting from paste

Share this post


Link to post

AFAIK, the Modeling option is selected by default. So, as long as you don't deselect it...

Share this post


Link to post
2 minutes ago, Uwe Raabe said:

AFAIK, the Modeling option is selected by default. So, as long as you don't deselect it...

Okaybut, they are saying this is deprecated and that it's no longer part of the core installation. I am trying to wrap my head around the idea that code formatting in a professional IDE can be deprecated.

 

Surely I am not understanding this correctly.

Share this post


Link to post

The current implementation of the code formatter is deprecated, probably because it relies on some dotnet code that is going to be thrown out. I expect a proper replacement for the formatter in the future.

  • Like 3

Share this post


Link to post
4 hours ago, Brandon Staggs said:

code formatting in a professional IDE can be deprecated.

Correct

 

It doesn't work well with new language features and there's no desire to put any effort into the old DotNet based implementation.  They have yet to announce when a replacement will be available.

  • Like 1

Share this post


Link to post

TBH, I've never used the formatter, except a couple of times by accident - which quickly was undone.
I do have a somewhat unconventional formatting, but given that the team has adopted it as well - I'd say it works.

Share this post


Link to post
20 hours ago, Darian Miller said:

Correct

 

It doesn't work well with new language features and there's no desire to put any effort into the old DotNet based implementation.  They have yet to announce when a replacement will be available.

I suppose what confused me about this is the fact that it is deprecated but there is no alternative. Typically when something is deprecated I expect to be able to learn what the "right" "new" way to do it is, but there is no other solution in the IDE for code formatting other than the modeling plugin. But it is still included by default so ... whatever.

Share this post


Link to post

My installation of Rad Studio 12 does have "Formatter.exe" in the bin directory.  I added this to the tools menu and ran it against some Rad Studio 12 code.

 

It worked fine,

 

I am confident that the new long strings feature would not format correctly, but I am not sure.

 

Can anyone tell me where the formatting configuration is stored in Rad Studio 11 so I can migrate it to Rad Studio 12?

 

Thank you.

Share this post


Link to post

Delphi 11 stores the Formatter configuration files in 

C:\Users\?\AppData\Roaming\Embarcadero\BDS\22.0.

 

I copied my Delph 11 formatter.config file to C:\Users\?\AppData\Roaming\Embarcadero\BDS\23.0.

 

It worked.

  • Like 2

Share this post


Link to post
2 hours ago, Fr0sT.Brutal said:

Seems like a candidate for "Top most weird tech decisions"

And equally a candidate for the Darwin Award...if there was a software category.

Share this post


Link to post
3 hours ago, Fr0sT.Brutal said:

Code formatter

Depends on modelling

Written in .Net

 

Seems like a candidate for "Top most weird tech decisions"

How about the Debugger and Compiler Helper dcc64xxxN.dll being build by MinGW GCC, doesn't that deserve an award too.

  • Haha 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×