Artistic Style on selection

Help with setting up and configuring custom user tools in UltraEdit (based on command line input)

Artistic Style on selection

Postby mwb1100 » Wed Apr 04, 2012 2:01 pm

Reindent Selection does very badly on pretty much any C or C++ code I feed it (it likes to keep pushing code farther and farther to the right as it proceeds down the selection - I've ask IDM support for help with that).

So I thought to try the Artistic Style gadget, but it seems that the Artistic Style tool works only on the entire file - does anyone have information on how I can set up a custom tool to run it only on a selection?
User avatar
mwb1100
Basic User
Basic User
 
Posts: 42
Joined: Tue Nov 21, 2006 12:00 am

Re: Artistic Style on selection

Postby Mofi » Thu Apr 05, 2012 12:17 am

As you can read in Artistic Style documentation this tool is designed for being executed on source files and has no option to run on an input byte stream. Therefore you need to copy a selection temporarily to a new file, save this file with any name like Temp.c, run Artistic Style, copy the result, delete the file and paste the reformatted text over the selection in real source file.

Please note that Artistic Style installed with UE / UES has the version 1.22. There are lots of changes in options in comparison to v2.02. I have started writing an email with the suggestion to update Artistic Style to v2.02 and what must be changed in UltraEdit/UEStudio (code, dialog, help) to support v2.02 of Artistic Style. Because there are so many changes which must be taken into account I have not yet finished this email.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3936
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Artistic Style on selection

Postby mwb1100 » Thu Apr 05, 2012 11:33 am

Thanks for the info. I was hoping there would be a simple command line I could drop in, but sounds like a little bit of scripting will do the trick.
User avatar
mwb1100
Basic User
Basic User
 
Posts: 42
Joined: Tue Nov 21, 2006 12:00 am


Return to Custom User Tools/Tool Configuration