msawczyn/EFDesigner

Is it possible for the generated files to have tab indents

karenvc1 opened this issue · 2 comments

Hi Michael

I would appreciate your help with a further query following my last one re filenames.

Is there somewhere in the tt files I can set the output of indentation to be tabs rather than spacing. My solution is setup for tab indentation but I am assuming your output code overrides this.

I searched for indent in the tt files but it's hard to decipher how this occurs.

I know I can convert the files of course so it's only a small thing - but I just wondered if there was a simple way of exporting directly to tabs.

Thanks again

Kind regards
Karen Comber

Code is all output through the Output method in EFDesigner.ttinclude. It looks like:

void Output(string text)
{
   if (text.StartsWith("}"))
      PopIndent();

   WriteLine(text);

   if (text.EndsWith("{"))
      PushIndent("   ");
}

You can change the PushIndent call to take a "\t" rather than a " " if you'd like.

Adding those kind of options sounds like a global thing to put into the extension options. Thanks for the insight ... I've added this as an enhancement request.

Brilliant....works perfectly. Thank you!