Make it so Adding a DAML item doesn't reformat existing code

927
1
03-05-2021 01:17 PM
Status: Open
Labels (1)
KirkKuykendall1
Occasional Contributor III

Change Add>New Item so it doesn't reformat code.

After formatting my DAML for readability, it looks like this:

KirkKuykendall1_0-1614978575941.png

I then right click on project and choose New Item, and then a Button.

KirkKuykendall1_1-1614978668944.png

 

When I open my DAML, I see the code I just formatted has been un-necessarily changed.

KirkKuykendall1_2-1614978755487.png

Not only is it harder to read within Visual Studio, but it also clutters the git commit history, and makes pasting code to forums less readable.

<customControl id="ProAppModule3_CustomControl1" caption="CustomControl 1" className="CustomControl1ViewModel" keytip="key tip" loadOnClick="true" staysOpenOnClick="true" isDropDown="true" disableIfBusy="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonPurple16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonPurple32.png">
  <content className="CustomControl1View" />
  <tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip>
</customControl>

 

1 Comment
KirkKuykendall1

Also, maybe XamlStyler could be adapted to provide something like DamlStyler.