I'm need to write R# plugin performs a specialized search from a class properties(R# 6x, vs2010). I've tried to use INavigateFromHereProvider
[ActionHandler("ReSharperPlugIn1.NavigateFrom")] //binded to group-id="VS#Code Window"
public class ClassNameNavigationAction : ContextNavigationActionBase<ClassNameContextNavigationProvider>
public class ClassNameContextNavigationProvider : INavigateFromHereProvider
private readonly ICSharpContextActionDataProvider _provider;
public IEnumerable<ContextNavigation> CreateWorkflow(IDataContext dataContext)
yield return new ContextNavigation("ClassName", "ClassNameNavigationAction", NavigationActionGroup.Other, () => Execute(dataContext));
private void Execute(IDataContext dataContext)
var selectionContext = dataContext.GetData(DataConstants.CurrentSelectionContext);
var c1 = selectionContext as IType;
but I don't know how to get property as an object. In debug-mode I've called the context menu on the property's declaration and casting of "selectionContext" as IType(and others interfaces) returns null.
Please point my mistakes. Which interfaces should I use and implement to make this?
p.s. At the end results should be viewed in the window like a "Find Usages". How to do it?
Sorry for many questions, I've found out extremely little information about R# plugins and most of it are not detailed.