Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Unreal UPROPERTY still causes extra tab?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sitnduck
Senior Member

47 Posts

Posted - Jan 26 2022 :  09:34:10 AM  Show Profile  Reply with Quote
I know it's probably something I missed, but I thought the latest versions would get rid of "annoying tabs" when writing UPROPERTY code.

Writing the following:
UPROPERTY()
hello

works great (no extra tab), however if I PASTE code instead of writing "hello", an extra tab gets added. :(

This is extra annoying when pasting multiple UPROPERTY's, each one gets that extra tab.

Is this due to some other setting that is adding a tab somewhere?

Thanks!

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jan 26 2022 :  10:47:56 AM  Show Profile  Reply with Quote
Unfortunately exactly the same problem happens without VA installed. VA tries to fix the indenting as you type, but what you are seeing when you copy / paste is the IDE's formatting being applied to the code.

We are considering getting involved in the IDE formatting for Unreal Engine to fix this:

case=141666

For now, I did work out the following Regular Expression IDE find and replace command that cleans up the formatting. Search for:

^([ \t]+)((UCLASS|UINTERFACE|USTRUCT|UFUNCTION|UPROPERTY)\(.*)\n([ \t])+(\w)

and replace it with:

$1$2\n$1$5

it might work the same in other editors, but that depends on the details of how regular expressions are handled, and the IDE find and replace regex syntax is rather unusual.

zen is the art of being at one with the two'ness
Go to Top of Page

sitnduck
Senior Member

47 Posts

Posted - Jan 26 2022 :  8:31:50 PM  Show Profile  Reply with Quote
Thanks, yeah that's what I thought; something else in the IDE cleaning up things.

You mentioned "Regular expression IDE", and the expression you listed makes sense. Is this some automated system, or do you just mean a generic search-and-replace to perform to clean things up after the fact? (I fear it's the latter, Just making sure!)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jan 27 2022 :  07:08:04 AM  Show Profile  Reply with Quote
Sadly it is a manual find and replace, but there are tools that can be set to run a find and replace on a file automatically, either on schedule or on command. Obviously the details would depend on what tools you want to use.

If you had this set up as some form of script file you could set up calling the script from the IDE. Just be careful to test that any tool you use interprets the regular expression how you expect.

zen is the art of being at one with the two'ness
Go to Top of Page

sitnduck
Senior Member

47 Posts

Posted - Jan 27 2022 :  09:04:09 AM  Show Profile  Reply with Quote
Haha thanks... yeah... I'll wait for you guys to fix everything. ;)

BTW Where is the issue tracker you mentioned "case=141666".

Cheers
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jan 27 2022 :  10:02:46 AM  Show Profile  Reply with Quote
The case number references our bug tracker, also our support emails. Unfortunately it isn't publicly viewable, but this is down as a fairly high priority case, and we are hoping to look at it soon. Hopefully it won't be to difficult to get the IDE formatting to cooperate...

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jan 27 2022 :  10:03:33 AM  Show Profile  Reply with Quote
p.s. I am tempted to say "show no fear in the face of regular expressions", but that would be rather foolish, given how many different engines there seem to be

zen is the art of being at one with the two'ness
Go to Top of Page

sitnduck
Senior Member

47 Posts

Posted - Jan 27 2022 :  10:07:25 AM  Show Profile  Reply with Quote
Haha I used to fear RE's myself but have found them to be incredibly useful. In this particular case though, it's mostly a workflow issue as it's a similar effort to manually remove the tab as to fire a replace macro. So ideally neither would be required. :)
Go to Top of Page

sitnduck
Senior Member

47 Posts

Posted - Mar 08 2022 :  07:22:16 AM  Show Profile  Reply with Quote
Hi! Just checking in on this, as I yet again pasted a couple of blocks of code with UPROPERTY'ies I needed to go back in and re-re-fix.

As you mentioned this is not publicly trackable but was high priority so I have my hopes up. :)

Thank you!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Mar 08 2022 :  09:16:58 AM  Show Profile  Reply with Quote
We are hoping to look at this fairly soon, but unfortunately no progress to report yet, and no current estimate, but yes, this is down as a high priority fix.

This thread should also be updated when we release the fix for this.

zen is the art of being at one with the two'ness
Go to Top of Page

sitnduck
Senior Member

47 Posts

Posted - Mar 08 2022 :  11:15:59 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

We are hoping to look at this fairly soon, but unfortunately no progress to report yet, and no current estimate, but yes, this is down as a high priority fix.

This thread should also be updated when we release the fix for this.



Thanks for the update, it's appreciated! Good to know the thread will be updated, I'll look for it.

Cheers
Go to Top of Page

sitnduck
Senior Member

47 Posts

Posted - Aug 18 2022 :  09:33:17 AM  Show Profile  Reply with Quote
Hi! I just upgraded to the latest and I think it's still not implemented so I wanted to check if there was any progress on this.

I know it feels trivial, but I want to reiterate it's a multiple-time-daily annoyance that would be fantastic to see resolved, well-deserving of a "high priority fix" status. :)

Thank you!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 19 2022 :  06:14:09 AM  Show Profile  Reply with Quote
This is still down as a high priority fix, and we haven't forgotten about this. We just haven't gotten to it yet. I have made a note on the case that you are still looking forward to a fix for this.

Have you tried the regular expression search and replace at the start of this thread? This should work well, or could be set up as a command or script to run on demand for the current file.

zen is the art of being at one with the two'ness
Go to Top of Page

sitnduck
Senior Member

47 Posts

Posted - Mar 13 2023 :  7:50:44 PM  Show Profile  Reply with Quote
Hi!I just noticed the latest patch notes mentioned that case=141666 is fixed, can't wait to try it! :) Thank you for listening to the feedback!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000