Go Back   Scooter Forums > Beyond Compare 3 Discussion > Text Compare (2-way)
Register FAQ Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 08-Jan-2010, 01:19 PM
MarkB MarkB is offline
Journeyman
 
Join Date: Mar 2008
Posts: 19
Default Grammar & alignment

Do the grammar settings affect alignment? I would think alignment and importance would be independent of each other.
Reply With Quote
  #2  
Old 08-Jan-2010, 03:21 PM
Chris Chris is offline
Team Scooter
 
Join Date: Oct 2007
Location: Madison, WI
Posts: 3,792
Default

Hi MarkB,

Grammar can affect alignment within a line. BC3 will only align text that is of the same grammar type, so if you have a comment on the left and a string on the right BC will not match them up for comparison.

In the Grammar tab of File Formats, you can specify Line weights. These do affect how lines are aligned. This way you can specify certain text has a greater affect on alignment. For an example file format that uses line weights, look at the "Delphi Source" file format.
__________________
Chris K Scooter Software
Reply With Quote
  #3  
Old 11-Jan-2010, 08:22 AM
MarkB MarkB is offline
Journeyman
 
Join Date: Mar 2008
Posts: 19
Default

Thank you Chris.

1) If I have a grammar element that is unchecked (unimportant), will it still align based on that element? If not, what if I have a grammar element "Text in list:ABC" that is unimportant and a Line Weight "Text matching: ABC"? Which takes precedence - will it align on ABC?

2) I'm trying to show all the differences that are marked with 123456 or 987654 in the first 6 positions of a line. Any other differences I want to ignore. I can get it to show only the lines that are marked that way, but the alignment is off. I have the usual language verbs defined as a grammar element which is marked unimportant. I have ^123456 & ^987654 defined as important. I've added some language verbs as line weights, but it's still not aligning right. I'm not sure what I'm doing wrong.
Reply With Quote
  #4  
Old 12-Jan-2010, 01:41 PM
Aaron Aaron is offline
Team Scooter
 
Join Date: Oct 2007
Location: Madison, WI
Posts: 5,430
Default

Hello,

Firstly, order is important. If your files are out of order, BC3 will not sort them automatically to align on similar lines. BC3 will make alignments in order where it can, and the other lines will align in place (or be Orphan lines) in their relative positions.

Unimportant text will still align, but the differences can be Ignored. If you enable the option "Never Align Differences" then only Important text will be used in this case. This way you could use this option to only align lines that have Important sections that match, and other differences will be Unimportant/Blue with "Ignore Unimportant Differences" toggled off.

If you are still having trouble, you can email us at support@scootersoftware.com with
1) a link back to this forum post
2) a pair of example files
3) your Support package zip (Help menu -> Support; Export)
4) a screenshot showing a misalignment in your example files (Show Line Numbers and Show Whitespace often help).
__________________
Aaron P Scooter Software
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 06:01 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.