Browse Source

Fixed SD2-1494 - 'Move class to file' duplicates delegate declarations

Based on patch by Bruno Marques.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@4748 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 16 years ago
parent
commit
cd800c8308
  1. 13
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Refactoring/NRefactoryRefactoringProvider.cs

13
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Refactoring/NRefactoryRefactoringProvider.cs

@ -488,7 +488,7 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring
} }
} }
public override object VisitTypeDeclaration(TypeDeclaration typeDeclaration, object data) void HandleTypeDeclaration(AttributedNode typeDeclaration)
{ {
if (typeDeclaration.EndLocation.Y > includeCommentsAfterLine) if (typeDeclaration.EndLocation.Y > includeCommentsAfterLine)
includeCommentsAfterLine = typeDeclaration.EndLocation.Y; includeCommentsAfterLine = typeDeclaration.EndLocation.Y;
@ -498,6 +498,17 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring
} else { } else {
RemoveCurrentNode(); RemoveCurrentNode();
} }
}
public override object VisitTypeDeclaration(TypeDeclaration typeDeclaration, object data)
{
HandleTypeDeclaration(typeDeclaration);
return null;
}
public override object VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration, object data)
{
HandleTypeDeclaration(delegateDeclaration);
return null; return null;
} }
} }

Loading…
Cancel
Save