Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6416 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61pull/1/head
7 changed files with 54 additions and 13 deletions
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Martin Konicek" email="martin.konicek@gmail.com"/>
|
||||
// <version>$Revision: $</version>
|
||||
// </file>
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Windows; |
||||
using ICSharpCode.NRefactory; |
||||
using Ast = ICSharpCode.NRefactory.Ast; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Dom; |
||||
using ICSharpCode.SharpDevelop.Dom.NRefactoryResolver; |
||||
using ICSharpCode.SharpDevelop.Editor; |
||||
using ICSharpCode.SharpDevelop.Editor.AvalonEdit; |
||||
using ICSharpCode.SharpDevelop.Refactoring; |
||||
|
||||
namespace SharpRefactoring.ContextActions |
||||
{ |
||||
/// <summary>
|
||||
/// Description of ImplementInterface.
|
||||
/// </summary>
|
||||
public class ImplementInterfaceExplicitProvider : ContextActionsProvider |
||||
{ |
||||
public override IEnumerable<IContextAction> GetAvailableActions(EditorContext editorContext) |
||||
{ |
||||
foreach (var targetClass in editorContext.GetClassDeclarationsOnCurrentLine(). |
||||
Where(c => c.ClassType == ClassType.Class || c.ClassType == ClassType.Interface)) { |
||||
|
||||
foreach (var implementAction in RefactoringService.GetImplementInterfaceActions(targetClass, true)) { |
||||
yield return implementAction; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue