Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4080 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
6 changed files with 38 additions and 4 deletions
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Daniel Grunwald"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.SharpDevelop.Dom; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Editor |
||||
{ |
||||
/// <summary>
|
||||
/// Produces MethodInsightItem instances for showing the insight window on indexer calls.
|
||||
/// </summary>
|
||||
public class IndexerInsightProvider : MethodInsightProvider |
||||
{ |
||||
public override IInsightItem[] ProvideInsight(ExpressionResult expressionResult, ResolveResult result) |
||||
{ |
||||
if (result == null) |
||||
return null; |
||||
IReturnType type = result.ResolvedType; |
||||
if (type == null) |
||||
return null; |
||||
return (from p in type.GetProperties() |
||||
where p.IsIndexer |
||||
select new MethodInsightItem(p) |
||||
).ToArray(); |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue