Announcement

Collapse
No announcement yet.

Compare list of items

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Compare list of items

    I have a properties file with a list of items separated by commas. When I compare, the line difference shows the first character difference and lines up the 3 on the first line with the 2 on the second line. I would like the 2 on the first line to be lined up with the 2 on the second line. Is there any way I can coax it into comparing it word by word instead of character by character?

    I tried a few things with importance and the grammar, but made little progress.

    VU_ENDCLERK3_GWRM,VU_ENDCLERK2_GWRM,VU_ENDCLERK1_G WRM,\

    VU_ENDCLERK2_GWRM,VU_ENDCLERK1_GWRM,\

    I looked very briefly at the data compare, but I'd rather start with the text compare if possible.

    Thanks,
    Gary

  • #2
    Thanks for the example, Gary.

    Our text alignment algorithm is pretty complex, and this particular case is not handled very well. I've created a tracker entry for a developer to look into it to see if it can be improved.

    The Data Compare is useful for comma separated values. As is, however, the Data Compare would place the first value in the first column, aligning VU3 with VU2 again. This would detect as a difference and stop the alignment by default since the first column is the key column by default.

    With No key columns, and an Unsorted Alignment (Session Setting), you could compare:
    VU_ENDCLERK3_GWRM,VU_ENDCLERK2_GWRM,VU_ENDCLERK1_G WRM,\
    ,VU_ENDCLERK2_GWRM,VU_ENDCLERK1_GWRM,\
    Aaron P Scooter Software

    Comment


    • #3
      Team Scooter: May I suggest the addition of a grammar-aware alignment mode?
      In other words it would be ideal if spieler could create a new file format with the following two grammar elements:

      Element Name: Property
      Element Type: Basic Regular expression
      Text matching: \w+

      Element Name: Delimiter
      Element Type: Basic
      Text matching: ,

      With these grammar elements defined, the text compare should give priority to complete grammar elements. In other words, differences should be spread over as few defined grammar elementes as possible. In the current implementation, differences are still spread over two grammar elements and the separating delimiter...which really doesn't make much sense:

      Code:
      VU_ENDCLERK[COLOR="Red"]3_GWRM[/COLOR][COLOR="Blue"],[/COLOR][COLOR="Red"]VU_ENDCLERK[/COLOR]2_GWRM,VU_ENDCLERK1_GWRM,\
      Last edited by Michael Bulgrien; 03-Jun-2010, 10:30 PM. Reason: Added code snippet
      BC v4.0.7 build 19761
      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

      Comment


      • #4
        Thanks for the idea, Michael. There are a few large scale ideas that could help in this scenario; one of our developers will be looking into it when they can.
        Aaron P Scooter Software

        Comment

        Working...
        X