You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
// <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.SharpDevelop; |
|
using ICSharpCode.SharpDevelop.Dom; |
|
using ICSharpCode.SharpDevelop.Editor; |
|
using ICSharpCode.SharpDevelop.Editor.AvalonEdit; |
|
using ICSharpCode.SharpDevelop.Refactoring; |
|
|
|
namespace SharpRefactoring.ContextActions |
|
{ |
|
/// <summary> |
|
/// Description of ImplementAbstractClass. |
|
/// </summary> |
|
public class ImplementAbstractClassProvider : ContextActionsProvider |
|
{ |
|
public override IEnumerable<IContextAction> GetAvailableActions(EditorContext editorContext) |
|
{ |
|
var ambience = AmbienceService.GetCurrentAmbience(); |
|
|
|
foreach (var targetClass in editorContext.GetClassDeclarationsOnCurrentLine().Where(c => c.ClassType == ClassType.Class)) { |
|
|
|
foreach (var implementAction in RefactoringService.GetImplementAbstractClassActions(targetClass)) { |
|
yield return implementAction; |
|
} |
|
} |
|
} |
|
} |
|
}
|
|
|