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.
28 lines
833 B
28 lines
833 B
// 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 |
|
{ |
|
/// <summary> |
|
/// Runs the find references command. |
|
/// </summary> |
|
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); |
|
} |
|
} |
|
} |
|
}
|
|
|