paulirwin / JavaToCSharp

Java to C# converter
MIT License
248 stars 85 forks source link

Using directives put one line after the beginning #96

Closed NoSkillPureAndy closed 4 months ago

NoSkillPureAndy commented 5 months ago

I'm translating some code with comments at the top of every file. The files look like this:

// 1 comment
// 2 comment
// Red comment
// Blue comment
package com.example.code;

import java.something.Whatchamacallit;
...

They get converted like so:

// 1 comment
using System.Stuff;
// 2 comment
// Red comment
// Blue comment
namespace Com.Example.Code
{
...
}

I think that the using directives should be put either at the very top of the file or right above the namespace.

paulirwin commented 4 months ago

@NoSkillPureAndy Thanks for reporting this, this should be fixed. Whitespace could be improved one day, but at least it's not out of order now.