Book a Demo

Author Topic: Spaces instead of tabs  (Read 3548 times)

dtthompso

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Spaces instead of tabs
« on: August 29, 2007, 08:18:34 am »
How do I modify a code generation template to use spaces instead of tabs for indentation?

thomaskilian

  • Guest
Re: Spaces instead of tabs
« Reply #1 on: August 29, 2007, 09:22:09 am »
You need to modify the templates manually. RTFM or simply open/edit them with the build-in editor.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Spaces instead of tabs
« Reply #2 on: August 29, 2007, 10:49:23 am »
What about the old pi macro?
No, you can't have it!

thomaskilian

  • Guest
Re: Spaces instead of tabs
« Reply #3 on: August 29, 2007, 12:48:04 pm »
Yes, the good old pi-calculus ;D

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Spaces instead of tabs
« Reply #4 on: August 29, 2007, 01:03:45 pm »
Ouch!

I guess I should have seen that coming Thomas. :-[

David
No, you can't have it!

thomas_h

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • EA is pretty cool
    • View Profile
Re: Spaces instead of tabs
« Reply #5 on: September 05, 2007, 06:18:08 am »
I have the same problem, but I don't understand, how I am supposed to use the PI macro to cure the problem. I have an Add In, that will generate the complete documentation header for me in a multiline string. (separated by "\r\n") Each line of the string starts directly with "///". In the generated file, the first line will start with the appropriate number of spaces, the next lines will all start with a tab. (And in the macro I have set %PI=""%)

As a workaround I would be also happy if there would be a way of postprocessing the generated sourcecode, but the only EA callback I have found for this pupropse is a MDG callback, and I don't want to spent the effort of making my AddIn an MDG AddIn.
Thomas

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Spaces instead of tabs
« Reply #6 on: September 05, 2007, 10:34:06 am »
I don't really think you have another options Thomas (H). It only hurts once though, and the MDG stuff does work.

David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Spaces instead of tabs
« Reply #7 on: September 05, 2007, 01:30:41 pm »
The tabs created on synchronisation of a comment will be calculated by EA from the list macros in the class body and namespace body.  You should be able to get the right indent by modifying these.

thomas_h

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • EA is pretty cool
    • View Profile
Re: Spaces instead of tabs
« Reply #8 on: September 05, 2007, 09:32:15 pm »
Thanks for the hint looking at the class body macros! Modifying these did the trick for me. (No MDG Add In required for now...)
Thomas