Tab size in Code Modules

Bug reports.
anja
Posts: 67
Joined: Fri Nov 26, 2010 3:39 pm

Tab size in Code Modules

Post by anja » Thu Apr 28, 2011 12:25 pm

Hi,

all our skripts should be based on a coding guidline... in this coding guidline it is written that we have to change the editorsettings to tabsize 2 and convert them to spaces.

If I create a new Code Module, the automatically generated code appears with tabsize 4 (they are converted to spaces). Manually added code is added with tabsize 2.

Is it possible that the automatically generated Code is adapted to the Editor-Settings so that there is a tabsize with 2?

Thank you!

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Tab size in Code Modules

Post by Support Team » Thu Apr 28, 2011 12:42 pm

Hi,

Thank you for your bug report.
We're sorry, but for now there is no way to adapt this for aut generated code.
I've just added a feature request. A solution will be available in one of our future releases.

Kind regards,
Tobias
Support Team
.
Image

anja
Posts: 67
Joined: Fri Nov 26, 2010 3:39 pm

Re: Tab size in Code Modules

Post by anja » Wed Sep 07, 2011 12:45 pm

Hello,

I've seen in the Release-Notes that this Bug should be fixed since Ranorex 3.0.3...
Now I've tried it with Ranorex 3.1... and it is still the same...

I've changed the editor settings according to our coding guidline to Tabsize 2 and Replace with spaces...

The generated Code for a new Code Module still got Tabsize 4... manually added code is correctly indented.

Have I missed something or is this bug still not solved?

Thank you

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Tab size in Code Modules

Post by Support Team » Wed Sep 07, 2011 1:14 pm

Hi,

You have to check the "Indent generated code" checkbox, in Ranorex Studio Tools->Options->Tools->Ranorex Code Generation.

Regards,
Markus
Ranorex Support Team
.
Image

anja
Posts: 67
Joined: Fri Nov 26, 2010 3:39 pm

Re: Tab size in Code Modules

Post by anja » Thu Sep 08, 2011 8:56 am

I've retried it... but it does not work even with this checkbox active...

My Text-Editor Settings --> Behaviour: Tabsize 2; Indentation size 2; Intendateion Smart; Convert Tabs to spaces active

Tools --> Ranorex Code Generation: Indent generated Code active

The solution is still the same as before...

Generating a new Code Module --> the tabs are still of size 4...
I've even restarted Ranorex Studio --> still the same...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Tab size in Code Modules

Post by Support Team » Thu Sep 08, 2011 12:29 pm

Hi,

Okay i have checked it with the UserCode module and you are right the settings are not used.
The reason is because this feature is only used for Ranorex specific code generated classes like a Recording.
But i will set it on our feature request list.
As workaround you can right click into your UserCode file and then select "Indent" or you can also use the key combination "Ctrl+I".

Regards,
Markus
Ranorex Support Team
.
Image

anja
Posts: 67
Joined: Fri Nov 26, 2010 3:39 pm

Re: Tab size in Code Modules

Post by anja » Thu Sep 08, 2011 12:50 pm

Ok, thank you for this information....