Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Apr 2010
    Posts
    1

    Default

    As indicated by egarcia74, aligning a block instead of a single line is most used when merging.

    Yesterday I spend about three hours on a failed attempt to merge:
    I have a case in which left and right have underwent removal of some code, but not in the same sections. This results in sections that need to be aligned manually to middle, and the only way to do that is line-by-line. Even when I select a block in left and request a manual align to middle, only the last active line in the selection is aligned to the line I clicked in middle!

    Sure, I know nothing about the internals, but it can't be that hard to add a loop to handle all subsequent lines in the selection in the same way as the first (applied to the following line in the target pane of course) ?

    Regards, Patrick.

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

    Default

    Hello,
    I've added your notes to our Customer Wishlist entry.

    We always appreciate specific example cases. Would you be able to email us the set of merge files you had trouble with? Please include your Support package (Help menu -> Support; Export) as well, and let us know which line section you wanted to Align (you can enable Show Line numbers and/or take a screenshot).

    Our email is support@scootersoftware.com
    Aaron P Scooter Software

  3. #13
    Join Date
    Oct 2007
    Location
    Pennsylvania
    Posts
    1,772

    Default

    Quote Originally Posted by patrickvl View Post
    Even when I select a block in left and request a manual align to middle, only the last active line in the selection is aligned to the line I clicked in middle!
    Don't just click a line in the middle. To manually align two blocks of text, select the first block of lines, manually align, then click and drag to select the second block of lines. When you let go of the click/drag to finalize the selection of the second block of lines, the two blocks will be aligned to each other.
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

  4. #14
    Join Date
    Jun 2005
    Location
    Stockholm, Sweden
    Posts
    192

    Default Either missing smething stupid, or having problems getting align to work

    I'll attach 2 files - these are (for all intents and purposes identical).

    Do a text compare on the 2. On the left-hand file, select the line "convert_cobol_via_stem:" and
    press F7. For the right-hand file, look for the line containing "convert_cobol_via_array:" and selct "Align with marked".

    Based on the results, one would think the files after the aligned lines were completely different (which I don't think they are).

    Am I missing something here. (Tried it in BC2, but that gave the same results)

  5. #15
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    2,507

    Default

    Align With generally won't break existing matching line alignments. When you tell it to align two lines it looks for matching lines that are already aligned below that point and won't try to realign anything past them. I think it looks for a minimum of 10 or so lines before it decides not to go any further, but in this case it hits that right away. If you want to specifically align functions you should select the entire blocks.
    Zoë P Scooter Software

  6. #16
    Join Date
    Jun 2005
    Location
    Stockholm, Sweden
    Posts
    192

    Default Thanks Craig - that did the trick

    Mark a block in the left file, press F7, mark "similar" block in right file and select "Align with" gives the results/layout I was expecting.

    Thanks again.

  7. #17
    Join Date
    Mar 2010
    Posts
    2

    Default Same thing, but with a 3-way merge?

    I'm running into the exact same problem, but with a 3-way merge.

    I select the section in the left file using the menu option, then do "Align With" and sweep the entire matching section in the middle file. It ends up aligning only the first line from the left section with the last selected line from the middle.

    I attached 3 screenshots showing what I'm seeing. This is with version 3.1.11.

    It doesn't seem to matter if I include or exclude the slashed (empty) lines when I choose the target section. Nor does it matter if I start with the middle file (I can choose the target in either side but the single-line alignment behavior is the same).

    Am I just doing something wrong? I'm wondering if I compounded the problem by hand-aligning the method block directly above the method declaration seen in the screenshots?

  8. #18
    Join Date
    Mar 2010
    Posts
    2

    Default

    Quote Originally Posted by Aaron View Post
    Hello,

    The Text Merge session unfortunately does not support the same Align With features that the Text Compare session type has. Adding this functionality is on our wishlist, but is a larger project and would not be a quick change.
    My apologies - I didn't see post #10 from Aaron on page 1 of the thread. So the "block align" capability is only in 2-way compare with the 3.1.11 build?

  9. #19
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,623

    Default

    Correct. Currently the Text Merge's Align With takes the "current" line where the blinking cursor is located, and is not based on the selected text.
    Aaron P Scooter Software

Posting Permissions

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