Written by

Question Alin Soare · Jun 20, 2024

Prevent auto formatting after compilation in Studio.

Hi,

I would like to ask whether there is some option to stop auto-formatting when I compile.  The code is sometimes well formatted but the auto-formatter does not work correctly in some situations. I am talking about the compilation in the Studio editor in this image, not about Visual Studio Code.

Thank you in advance,

Alin C Soare.

Product version: IRIS 2023.3
$ZV: IRIS for Windows (x86-64) 2024.1 (Build 267.2) Tue Apr 30 2024 16:42:56 EDT

Comments

Brett Saviano · Jun 20, 2024

@Alin Soare 
What "auto-formatting" are you referring to? Can you provide before and after screenshots showing what gets changed on save?

0
Alin Soare  Jun 21, 2024 to Brett Saviano

In this example it does nothing bad but I do not like it to remove or insert spaces.

Can I prevent it from auto formatting as it wants ?

0
Brett Saviano  Jun 24, 2024 to Alin Soare

@Alin.SoareYou can't prevent that. The actual text of the class isn't stored in the database. During a save, it gets converted to a global that gets stored in the database, and then converted back into text. The class's text is always regenerated in "canonical" form, with excess spaces removed, capitalization normalized etc. This process doesn't affect method/query implementation code though, it's purely cosmetic.

0
Ben Spead · Jun 24, 2024

Could you please describe the situations where it does something "bad" or where you see things as not working correctly?

0
Alin Soare  Jun 24, 2024 to Ben Spead

When the code is mixed with comments it works very bad.

0
Ben Spead  Jun 24, 2024 to Alin Soare

Could you please provide an example with screenshots?

0