开发者

Use of action hint ActionHint in CodeRush

I wanted to point the action hint arrow to the methodcall named MyMethod in the current class. So if there are any methodcall with name MyMethod the arrows should be pointing them when I click some combination of keys.

  1. I tried to do this with ActionHint steps given here. But I have no idea which event to use.

  2. Then I tried to call CodeRush.ActionHint.PointTo() through CodeProvider but did not work.

Is it possible to write such plugin? If yes which version of PointTo() method should I use.

A sample code i开发者_如何学Cf possible would be helpful.

Thanks in Advance.


The only reason for which the action hint doesn't appear is that your source code point might be outside of the visible screen bounds. Before calling PointTo(), make sure that the target point is visible. You can use the following PointTo overload:

CodeRush.TextViews.Active.MakeVisible(MyMethodInstance.NameRange);
CodeRush.ActionHint.PointTo(MyMethodInstance.NameRange.Start, "MyMethod", Color.Red);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜