Hi
Paul,
I detected the same as you on investigating the issue. I used Process Monitor of Sysinternals to see how exactly UltraEdit runs astyle.exe. Here is the issue report which I have just sent to IDM support by email.
I report an issue with usage of Artistic Style Formatter on being executed with parameters which is not working anymore since UE v24.10.0.23.
Do following to reproduce this issue with default configuration:
- Open ArtisticStyleFormatter.cpp in UltraEdit.
- Click on ribbon tab "Coding" on item to reformat active file with Astyle.
- Select the style "stroustrup" and check option "Tabs -> Spaces", see attached image file ArtisticStyleFormatter.png.
- Click on button "Reformat".
The result is an active file with all lines indicated as modified although absolutely nothing changed in file.
The reason is the command line used by UltraEdit to run Astyle.exe:
Astyle --style=stroustrup --convert-tabs"%TEMP%\astEA96.tmp" -s2
There is a space character missing between the list of parameters as defined in dialog and the name of the temporary file created by UE. For that reason Artistic Style Formatter does nothing because in interprets the parameter --convert-tabs with the file name appended as one invalid parameter and the result is a not reformatted temporary file read back by UltraEdit.
The usage of Artistic Style Formatter with all options set to default in the dialog works as in this case just astyle.exe with file name and with option -s2 appended is executed by UltraEdit.
This issue exists according to my tests from UE v24.10.0.23 to currently latest UE v24.20.0.35.
The file
ArtisticStyleReformatted.cpp contains the expected output with running Astyle with the options
--style=stroustrup --convert-tabs -s2 created with UE v24.00.0.76 or any former version.
ArtisticStyleFormatter.cpp contains exactly the code as I could see on your screenshots.
ArtisticStyleFormatter.png contains nearly the same as your second screenshot. The only difference is that
--style=stroustrup is also visible in the options field at bottom left edge.
ArtisticStyleReformatted.cpp contains with only spaces for the indentations:
Code: Select all
// custom countdown using while
#include <iostream>
using namespace std;
int main ()
{
int n = 20;
while (n>0) {
if (n==10) {
cout << "T-minus" << " ";
}
cout << n << ", ";
--n;
}
cout << "liftoff!\n";
}
At the moment it is necessary to run
GNU\astyle.exe in UE program files folder via a configured user tool with
"%f" as place holder for active file being automatically saved before tool execution and the additional parameters
--style=stroustrup --convert-tabs -s2 on the tool command line.
Edit: As reply on my issue report I received an email to verify the fix of this issue with private user verification build 24.20.0.37.
Paul, you have got most likely this private build too.