internal static void GotoCode(SourceFile file, SourceRange range, LocatorBeacon beacon)
 {
     try
     {
         CodeRush.File.Activate(file.Name);
         TextView view = (TextView)CodeRush.Source.Active.View;
         view.MakeVisible(range.Start);
         CodeRush.Caret.MoveTo(range.Start);
         beacon.Start(view, range.Start.Line, range.Start.Offset);
     }
     catch
     {
         MessageBox.Show("Couldn't find file or line", "Can't goto issue");
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Put the cursor on the next given element and use a beacon
 /// </summary>
 private void MoveToTest(LanguageElement dxCoreElement)
 {
     if (dxCoreElement != null)
     {
         CodeRush.File.Activate(dxCoreElement.FileNode.Name);
         CodeRush.Caret.MoveTo(dxCoreElement.StartLine, dxCoreElement.StartOffset);
         TextView view = (TextView)CodeRush.Source.Active.View;
         using (LocatorBeacon beacon = new LocatorBeacon {
             Color = FailedColor
         })
         {
             beacon.Start(view, dxCoreElement.StartLine, dxCoreElement.StartOffset);
         }
     }
 }
 private void lstMarkers_DoubleClick(object sender, EventArgs e)
 {
     if (lstMarkers.SelectedIndex < 0 || lstMarkers.SelectedIndex >= lstMarkers.Items.Count)
         return;
     IMarker marker = lstMarkers.Items[lstMarkers.SelectedIndex] as IMarker;
     if (marker == null)
         return;
     marker.RestorePosition();
     using (LocatorBeacon locatorBeacon = new LocatorBeacon())
     {
         locatorBeacon.Color = DevExpress.DXCore.Platform.Drawing.Color.FromArgb(0x6F, 0x62, 0xBD);
         locatorBeacon.Duration = 2500;
         locatorBeacon.Start(marker.Line, marker.Column);
     }
 }
 internal static void GotoCode(SourceFile file, SourceRange range, LocatorBeacon beacon)
 {
     try
     {
         CodeRush.File.Activate(file.Name);
         TextView view = (TextView)CodeRush.Source.Active.View;
         view.MakeVisible(range.Start);
         CodeRush.Caret.MoveTo(range.Start);
         beacon.Start(view, range.Start.Line, range.Start.Offset);
     }
     catch
     {
         MessageBox.Show("Couldn't find file or line", "Can't goto issue");
     }
 }
 /// <summary>
 /// Put the cursor on the next given element and use a beacon
 /// </summary>
 private void MoveToTest(LanguageElement dxCoreElement)
 {
     if (dxCoreElement != null)
     {
         CodeRush.File.Activate(dxCoreElement.FileNode.Name);
         CodeRush.Caret.MoveTo(dxCoreElement.StartLine, dxCoreElement.StartOffset);
         TextView view = (TextView)CodeRush.Source.Active.View;
         using (LocatorBeacon beacon = new LocatorBeacon { Color = FailedColor })
         {
             beacon.Start(view, dxCoreElement.StartLine, dxCoreElement.StartOffset);
         }
     }
 }