Welcome to Community Server Sign in | Join | Help

CodeRush: Expriring HardMarker Syntax

Template syntax for a timeboxed hard marker is «HardMarker(n)» where n is logically the number of seconds until expiry.

Better still Mark Miller, the father of CodeRush, has a blog.

I was playing with CR mouse binding and markers in my own CR plugin this weekend.

The net of what I learned is best summarized as follows: (1) CR plugins are ridiculously easy to build, they even debug pretty well and (2) CR is sorely in need of developer documentation if plugins are ever going to be more widely developed (this ignores the obvious fact that CR probably needs to first be more widespread in terms of users--to which end, I think it needs to be somewhat less expensive to gain market penetration even though I personally think it's more than worth the current price).

In the end, I wasn't get it so middle-click would drop a marker whereever the mouse was (well I was but this involved hooking EditorMouseDown and tracking mouse coordinates, and then creating my own action to bind the mouse to:

DocPoint currentDocPoint = CodeRush.TextViews.Active.NewDocPoint(mouseX, mouseY);
CodeRush.TextViews.Active.SetCaretPos(currentDocPoint.Row, currentDocPoint.
Column);
CodeRush.Marker.Insert(CodeRush.Marker.Count, MarkerStyle.Standard);

Which ultimately did what I wanted, but was semi-clunky and the forward/back mouse navigation in other DevExpress newsgroup threads never really worked as cleanly as I originally thought it might. In the end, Alt-Home, Esc and Shift-Alt-Home are enough.

Published Monday, June 28, 2004 10:20 AM by grant

Comments

No Comments
Anonymous comments are disabled