No announcement yet.

Moved lines and Alignment on File comparsion.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Moved lines and Alignment on File comparsion.

    Is there any option to complete ignore lines which have been merely moved?

    For example, Visual Studio (2003) Form designer automatically generates a lot of code relating to the form's controls. Whenever a change is made to the control, it re-generates this section which can quite often be in a completely different order. Unfortunately it also sometimes decide to change the position of the controls slightly resulting in the controls driftly slightly out of alignment.
    Correcting this using Beyond Compare is usually very straight forward, except when VS has moved all the lines around.

    I have tried changing the alignment options in the viewer, but this does not seem to help. I am not sure whether this could be because there is no large section of un-changed code, because maybe every tenth line has been amended (as well as being moved)

    Does this make sense and is should Beyond Compare cope with this?


  • #2

    The general strategy is to use a conversion process which can sort the lines back into a common order. We have a few for download to help tidy HTML and XML, but not one specific for VS Form files. We do have a KB article example (for resx files) which applies as a general strategy for any command line conversion utility:
    Aaron P Scooter Software


    • #3
      I have a similar issue with XML files. XML files have code minified and auto-generated by my company software. Which is restructured every time a change is done in the software. Due to this, it becomes difficult to compare between the versions.

      XML Tidied takes care for XML formatting perfectly. However, the reordering of XML elements is not working using resx, xml sorted and tidied, xml tidied with attributes sorted.

      Resx just returned two ordered lines

      <?xml version="1.0" encoding="utf-8"?>
      <cclquery />


      • #4
        RESX is specifically for .resx files. The KB article is a set of detailed steps of how to plug in any external conversion program (it just happens to use .resx as the example provided by another user's external conversion).

        BC3's XML sorted and tidied is probably the closest format on the Additional Downloads page. If needed, it includes an .xslt file in the Helpers\ directory, which you could manually modify to match your XML files' pattern.

        Each additional download format has slightly different methods of sorting or tidying the files. We have 4 different BC3 variants to handle most cases, but given the extreme flexibility of XML, it is difficult to construct a single format to handle any file, hence including the .xslt for user configuration.
        Aaron P Scooter Software