/// <summary> /// Force a redraw when the cursor leaves. Also clean up anythine we were doing with the tile /// </summary> private void PlugIn1_TileMouseLeave(object sender, TileEventArgs ea) { ea.Tile.Invalidate(); _hoveredTest = null; if (CodeRush.SmartTags.IsSmartTagVisible) { CodeRush.SmartTags.HidePopupMenu(); } }
private void ShowTestPopupMenu(TextView textView, Tile tile) { if (TileIsOurs(tile) && _hoveredTest == null) { _hoveredTest = tile.Object as ITestDetail; Point tilePoint = new Point(tile.Bounds.Left, tile.Bounds.Bottom); Point menuPoint = textView.ToScreenPoint(tilePoint); CodeRush.SmartTags.ShowPopupMenu(menuPoint, _hoveredTest.SmartTagProvider); } }
/// <summary> /// Draw the icon for the tile /// </summary> /// <param name="attributes"></param> private void DrawTestRunnerIcon(EditorPaintEventArgs paintArgs, ITestDetail attributes) { Rectangle indicator = CreateIndicator(paintArgs, attributes.IconCoordinates); paintArgs.TextView.AddTile(NewTile(indicator, attributes)); try { paintArgs.TextView.Graphics.DrawIcon(new Icon(GetType(), "TestIndicator.ico"), indicator); } catch {// fail silently if icon is missing from the project. } }
/// <summary> /// Force a redraw when the cursor leaves. Also clean up anythine we were doing with the tile /// </summary> private void PlugIn1_TileMouseLeave(object sender, TileEventArgs ea) { ea.Tile.Invalidate(); _hoveredTest = null; if(CodeRush.SmartTags.IsSmartTagVisible) { CodeRush.SmartTags.HidePopupMenu(); } }