Results 1 to 2 of 2
  1. #1
    Join Date
    May 2015
    Posts
    1

    Default Is there anyway to open a comparison with a specific line alignment

    I'm using a tool (Resharper dupfinder) to produce a report of duplicate code blocks within my codebase. The tool provides me with the filename and line-number of each duplicate block as well as a number of lines that it considers to be the same. So, for example I might get a report that says..

    56 duplicate lines
    Fragment1: foo.cs starting at line 945
    Fragment2: bar.cs starting at line 874

    I would like to then use BeyondCompare to give me a manual comparison of the two blocks (since the dupfinder tool does a fuzzy match).

    My question is this. Is there any way to provide command line parameters to bcomp or to script it in such a way that it will open the two files aligned at the line-numbers I specify and, ideally, to force the alignment over a specific number of lines?

    If necessary I will process the dupfinder output and spit the duplicated blocks into dedicated files with all context removed so no alignment is necessary but I would prefer to diff them in context if possible.

    Thanks,
    Neil

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,366

    Default

    Hello,

    Unfortunately, no, BC4 does not support opening entire files but specifying that specific line numbers should be a starting point/match. I believe the closest would be that we do have an Open Clipboard command, so you can copy a section out of a text program, and Open Clipboard in the Text Compare on the Left, then repeat again for the right, but this would remove the context of the files.

    Alternatively, if the files are already open in BC4 but haven't aligned correctly, you can use the Align With command to push a manual alignment of two lines. Or select a block of text and Copy it, then select a different block of text and Compare Selection With Clipboard.
    Aaron P Scooter Software

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •