Bugzilla – Bug 547947
the default text when creating a new class has too many newlines
Last modified: 2010-04-09 05:28:38 UTC
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20091007 Ubuntu/9.10 (karmic) Firefox/3.5.3 remove all blank newlines from newly created classes Reproducible: Always Steps to Reproduce: 1. Right click on project 2. Add 3. New file 4. select class or interface, .... (what you like) Actual Results: using System; namespace Test { public class NewClass { public NewClass () { } } } Expected Results: using System; namespace Test { public class NewClass { public NewClass () { } } }
fixed.
revision 144519 It still has too many newlines. Only 1 has been removed namespace Test { ### this line ### public class Refactor { ### this line ### public Refactor () { } } }
My bugfix was reverted by Michael Hutchinson. @mhutch: what is with this bug ?
@mkeruger: your fix broke the code generation for iPhone. I reverted it and then reapplied your fix and some fixes of my own as more granular patches with comments on exactly what had been changed. I probably missed some of your fixes. It was hard to see what you'd changed in the imported code. Hopefully the comments and more granular changes will make it easier for others to understand. Btw, what's the PrivateImplementationType fix? Should it be fixed in the original too?
Ok, then I've just added the newline removal again. I thougt this broke something - but I thought the fix is safe. Both things the PrivateImplementationType and the new lines should be fixed in the original. If we don't want to write a CodeDOM genarator that takes directly our output settings there is no need to deliver an own implementation. I've already opened a bug for the PrivateImplementationType - because this generates non compiling code out of valid CodeDOM. Bug 540051 - Bug in CSharpCodeGenerator.cs/PrivateImplementationType output For the new lines I opened a new bug: Bug 549472 - CodeDOM produces unwanted newlines in C# output ... I really hope that these two are fixed for the next mono version, because then we can just throw out our CodeDOM generator hack. (yes this is a hack!)
Now there are not enough. Code generated by stetic has the class on the same line as the namespace: namespace MonoDevelop.IPhone.Gui {internal partial class IPhoneSigningKeyPanelWidget {
FYI Geoff reverted the patches over the weekend because it was not inserting newlines at the end of code snippets, which broke the #pragma directives MonoTouch generates.
Not yet fixed.
It's a bug that should be fixed in mono: https://bugzilla.novell.com/show_bug.cgi?id=549472 as well with: https://bugzilla.novell.com/show_bug.cgi?id=540051 This is something like 10 minutes work (including booting the computer) for the people working on the codedom code. *** This bug has been marked as a duplicate of bug 549472 ***