I've found that Move Type to File refactoring not always copies the comments found at the top of my source file.
I find it very convenient to have the Copyright comment copied along when I extract some type from a source file into another file, but this only happens if the code that I extract requires some additional using statements.
Try extracting IFoo on this piece of source code:
C#// Copyright © 2016, EPSITEC SA, CH-1400 Yverdon-les-Bains, Switzerland
// Author: Pierre ARNAUD, Maintainer: Pierre ARNAUD
using System.Threading.Tasks;
namespace Demo
{
public interface IBar
{
Task DoBar();
}
public interface IFoo
{
Task DoFoo();
}
}
it will include the header.
However, in this piece of code it won't:
C#// Copyright © 2016, EPSITEC SA, CH-1400 Yverdon-les-Bains, Switzerland
// Author: Pierre ARNAUD, Maintainer: Pierre ARNAUD
using System.Threading.Tasks;
namespace Demo
{
public interface IBar
{
Task DoBar();
}
public interface IFoo
{
string GetFoo();
}
}
Hi Pierre,
Thank you for the provided code snippets. I have reproduced the problem.
We will do our best to fix the issue as soon as possible. Once we resolve the problem, we will let you know about this in the context of this ticket.