// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; using ICSharpCode.Core; using ICSharpCode.NRefactory.Semantics; using ICSharpCode.SharpDevelop.Refactoring; namespace ICSharpCode.SharpDevelop.Editor.Commands { /// /// Runs the find references command. /// public class FindReferencesCommand : ResolveResultMenuCommand { public override void Run(ResolveResult symbol) { var entity = GetEntity(symbol); if (entity != null) { FindReferencesAndRenameHelper.RunFindReferences(entity); return; } if (symbol is LocalResolveResult) { FindReferencesAndRenameHelper.RunFindReferences((LocalResolveResult)symbol); } } } }