|
|
|
@ -5,11 +5,12 @@ using System;
@@ -5,11 +5,12 @@ using System;
|
|
|
|
|
using System.IO; |
|
|
|
|
using ICSharpCode.Core; |
|
|
|
|
using ICSharpCode.SharpDevelop; |
|
|
|
|
using ICSharpCode.SharpDevelop.Dom; |
|
|
|
|
using ICSharpCode.SharpDevelop.Project; |
|
|
|
|
|
|
|
|
|
namespace SharpRefactoring |
|
|
|
|
{ |
|
|
|
|
public class RefactoringHelpers |
|
|
|
|
public static class RefactoringHelpers |
|
|
|
|
{ |
|
|
|
|
/// <summary>
|
|
|
|
|
/// Renames file as well as files it is dependent upon.
|
|
|
|
@ -39,5 +40,17 @@ namespace SharpRefactoring
@@ -39,5 +40,17 @@ namespace SharpRefactoring
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static IClass GetCurrentClassPart(this IClass c, string fileName) |
|
|
|
|
{ |
|
|
|
|
if (c is CompoundClass) { |
|
|
|
|
foreach (IClass part in ((CompoundClass)c).Parts) { |
|
|
|
|
if (fileName.Equals(part.CompilationUnit.FileName, StringComparison.OrdinalIgnoreCase)) |
|
|
|
|
return part; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return c; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|