Example #1
0
        protected async override void Run()
        {
            var currentProject = IdeApp.ProjectOperations.CurrentSelectedProject;

            if (currentProject == null)
            {
                return;
            }
            var pad           = IdeApp.Workbench.GetPad <ProjectSolutionPad> ().Content as ProjectSolutionPad;
            var selectedNodes = pad.TreeView.GetSelectedNodes();

            if (selectedNodes == null || selectedNodes.Length != 1)
            {
                return;
            }
            var dataItem = selectedNodes[0].DataItem;

            var projectRef = dataItem as ProjectReference;

            if (projectRef != null)
            {
                await RefactoringService.FindReferenceUsagesAsync(projectRef);
            }
        }