public void FindReferences()
        {
            var member = widget.ActiveMember as IMember;

            if (member == null)
            {
                return;
            }
            FindReferencesHandler.FindRefs(member);
        }
Example #2
0
 /// <summary>
 /// Finds references through the given visitor. Traverses the whole AST in all translation units.
 /// </summary>
 /// <param name="visitor">
 /// A <see cref="FindReferencesHandler"/>: a visitor
 /// </param>
 public void FindReferences(FindReferencesHandler visitor)
 {
     lock (SyncRoot) {
         foreach (var T in translationUnits)
         {
             visitor.File = T.Key;
             clang.visitChildren(
                 clang.getTranslationUnitCursor(T.Value),
                 visitor.Visit,
                 new CXClientData(new IntPtr(0))
                 );
         }
     }
 }
        public void FindReferences()
        {
            var doc = IdeApp.Workbench.ActiveDocument;

            if (doc == null || doc.FileName == FilePath.Null)
            {
                return;
            }
            var findReferencesHandler = new FindReferencesHandler(
                (CProject)DocumentContext.Project,
                doc
                );

            findReferencesHandler.Run();
        }