Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Is it possible for the generated files to have tab indents #221

Closed
karenvc1 opened this issue Oct 4, 2020 · 2 comments
Closed

Is it possible for the generated files to have tab indents #221

karenvc1 opened this issue Oct 4, 2020 · 2 comments
Labels
enhancement New feature request question Requesting information released Issue is resolved in a current release
Milestone

Comments

@karenvc1
Copy link

karenvc1 commented Oct 4, 2020

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

@msawczyn
Copy link
Owner

msawczyn commented Oct 6, 2020

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.

@msawczyn msawczyn added enhancement New feature request question Requesting information labels Oct 6, 2020
@karenvc1
Copy link
Author

karenvc1 commented Oct 6, 2020

Brilliant....works perfectly. Thank you!

@msawczyn msawczyn closed this as completed Oct 6, 2020
@msawczyn msawczyn added the pending release Issue is resolved in the current codebase, will be published with the next release label Oct 7, 2020
@msawczyn msawczyn added this to the 2.0.5.7 milestone Oct 7, 2020
msawczyn added a commit that referenced this issue Oct 7, 2020
   - Added ability to select tabs or spaces for indentation in generated code (Tools/Options/Entity Framework Visual Editor/Visual Editor Options) (See #221)
   - Fixed an issue with changing visual grid size on design surface.
msawczyn added a commit that referenced this issue Oct 7, 2020
   - Added ability to select tabs or spaces for indentation in generated code (Tools/Options/Entity Framework Visual Editor/Visual Editor Options) (See #221)
   - Fixed an issue with changing visual grid size on design surface.
@msawczyn msawczyn added released Issue is resolved in a current release and removed pending release Issue is resolved in the current codebase, will be published with the next release labels Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature request question Requesting information released Issue is resolved in a current release
Projects
None yet
Development

No branches or pull requests

2 participants