Announcement

Collapse
No announcement yet.

How made not important permutation?

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

  • How made not important permutation?

    Hello,

    How can made test permutation not important?
    I compare Java sources which look like:
    Code:
    if (null == blabla)
    versus
    Code:
    if (blabla == null)
    I'd like to saw that kind of code similar.

    Regards,

    RNO

  • #2
    Hello,

    If you have BC3 Pro, you can make a Text Replacement that will determine that this specific case is Unimportant.
    So, when (null == blabla) = (blabla == null), then mark the text as unimportant.
    This is done in the Text Compare Session menu -> Session Settings -> Misc tab.

    BC3 Std can define the text as Unimportant. This would mark (null == blabla) as unimportant, regardless of what it aligns to. However, the aligned text will still detect as a difference unless, it, too, is unimportant.
    Here is a KB article on the subject:
    Beyond Compare is a multi-platform utility that combines directory compare and file compare functions in one package. Use it to manage source code, keep directories in sync, compare program output, etc.


    How does that work for you? Let us know if you have any questions.
    Aaron P Scooter Software

    Comment


    • #3
      The specific replacement values you should use are:

      Text to find: \((\w+) == (\w+)\)
      Replace with: ($2 == $1)
      [ ] Match character case
      [ ] Whole words only
      [x] Regular expression
      (x) Left ( ) Right
      That will allow you to ignore any case where the two values (identifiers/numbers/constants) have been swapped.
      Zoë P Scooter Software

      Comment

      Working...
      X