|
|
@ -26,9 +26,9 @@ namespace SharpRefactoring.ContextActions |
|
|
|
// Using CurrentLineAST is basically OK, but when the "class" keyword is on different line than class name,
|
|
|
|
// Using CurrentLineAST is basically OK, but when the "class" keyword is on different line than class name,
|
|
|
|
// parsing only one line never tells us that we are looking at TypeDeclaration
|
|
|
|
// parsing only one line never tells us that we are looking at TypeDeclaration
|
|
|
|
// Alternative solution could be to try to resolve also IdentifierExpression to see if it is class declaration.
|
|
|
|
// Alternative solution could be to try to resolve also IdentifierExpression to see if it is class declaration.
|
|
|
|
foreach (var targetClass in editorContext.GetClassDeclarationsOnCurrentLine(). |
|
|
|
foreach (var targetClass in editorContext.GetClassDeclarationsOnCurrentLine() |
|
|
|
Where(c => c.ClassType == ClassType.Class || c.ClassType == ClassType.Interface)) { |
|
|
|
.Where(c => c.ClassType == ClassType.Class || c.ClassType == ClassType.Interface) |
|
|
|
|
|
|
|
.Select(c2 => c2.GetCurrentClassPart(editorContext.Editor.FileName))) { |
|
|
|
foreach (var implementAction in RefactoringService.GetImplementInterfaceActions(targetClass)) { |
|
|
|
foreach (var implementAction in RefactoringService.GetImplementInterfaceActions(targetClass)) { |
|
|
|
yield return implementAction; |
|
|
|
yield return implementAction; |
|
|
|
} |
|
|
|
} |
|
|
|