Beyond Compare Ignore Unimportant Differences in all files - beyondcompare3

I am using Beyond Compare 3.3.4.
I want to compare a large number of files and ignore unimportant differences.
In Session -> Session Settings -> Comparison tab, the "Requires opening files" section has a "Compare contents - Rules-based comparison". This does what I want when I open each file individually. The "quick test" section doesn't have this option. How do I apply rules-based comparisons to my "quick test"?
EDIT:
I am having the same problem as the original poster here. The answer given was "You can change this by going to the Session menu and changing your Comparison Criteria to use Rules-based content". Problem is, the "Rules-based comparison" is under the "Requires opening files" section, so this doesn't work. How do I fix this?

This answer describes the behavior of 3.3.4 (and 3.3.8) for Windows 32-bit, which seems to automatically report folder results as if I'd opened each file, as long as I have my session settings correct.
To perform a comparison that ignores unimportant differences, it is necessary to compare the file contents. BC3 can't know if line endings are the only difference (for example) unless it scans the contents for line endings. Therefore, you must set the "Compare contents" checkbox under the "Requires opening files" section. By doing so, the folder comparison automatically scans all file contents, I don't have to open each one individually.
A "quick test", by definition, is based solely on directory information like timestamp and size. It is quick because it does not open nor read the files; so if quickness is what you desire in a comparison, it cannot be rules-based. The concepts are incompatible.
You can see whether a "quick" or "contents" comparison has been run for any pair of files in a folder-compare window by looking at the middle column. If it is blank, only a quick test has been run; if there is an icon, a contents test has also been run.
That icon will be a black ≈ ("almost equal") symbol, two wavy lines, when a "Rules-based comparison" has detected only unimportant differences. The files themselves will be black and treated as matching if you have "View > Ignore Unimportant Differences" active, otherwise they'll be red or gray and treated as mismatching.
For the meaning of each possible icon, here is the relevant section from the Beyond Compare 3 help file:

Please find below screenshot. Hope this will help.

Related

ignore differences in syntax in beyondcompare

In a branch of code I have changed all of the code from obj.varname to obj("varname") and when I compare the code I would like to ignore these differences since varname is the same.
I have a regular expression that I think I need but unfortunately can't get the comparison to be ignored using Beyond Compare from Scooter
^obj\("\w*"\)|obj\.\w*$
I am following this tutorial http://www.scootersoftware.com/support.php?zz=kb_unimportantv3
So my question: is this even possible with beyond compare? If yes, please share a solution including either instructions or post your screenshots.
Beyond Compare 3's Professional edition supports this through its Text Replacements feature. If you've already purchased a Standard edition license you need to revert to trial mode to test it: http://www.scootersoftware.com/suppo...?zz=kb_evalpro
Load your two files in the Text Compare.
Open the Session Settings dialog from the the Session menu, and on the Replacements tab click New to create a new replacement.
In the Text to find edit, use (\w+)\.(\w+)
In the Replace with edit, use $1("$2")
Check the Regular expression checkbox.
The alternative would be to mark any instance of obj.varname and obj("varname") as unimportant. The basic steps would be this:
Load your two files in the Text Compare.
Open the Session Settings dialog from the Session menu, and on the Importance tab click the Edit Grammar... button.
In the next dialog click the New... button below the top listbox.
Change the Element name field to something useful (say, "PropertyAccess").
Change the Category* to List.
In the Text in list* edit, add these two lines:
obj.varname
obj("varname")
Click OK to close the Grammar Item dialog and then click OK again to close the Text Format* grammar item.
Uncheck "PropertyAccess" (or whatever you named it) in the Grammar elements listbox in the Session Settings dialog, then click OK to close it.
This approach isn't as flexible or clean. In the steps above you're matching specific, hardcoded object and variable names, so obj.varname is unimportant but obj.othervar isn't, even if it's aligned against obj("othervar"). If text on both sides is unimportant the difference will be unimportant; if one side is important it will be an important difference. So, with the above steps, obj.varname and obj("varname") will be unimportant everywhere, but it will work correctly since they'll either be matched to other cases that also match those definitions (and thus unimportant) or will be matched to something else that doesn't match that definition, which will be important and will make the difference important.
You can use regular expressions to match more general text categories, but you probably don't want to. For example, if you wanted to match all text that followed that pattern you could use these two lines instead:
\w+\.\w+
\w+\("\w+"\)
And then check the Regular expressions checkbox in the Grammar Item dialog so they're matched that way.
The upside/downside to that is that any text that matches those patterns is then unimportant. abc.newvar vs. def.varname would be considered an unimportant difference because both sides match the unimportant definition. That's good for things like comments or whitespace changes, but probably isn't what you want to do here.

Searching in eclipse always fails first time, always succeeds seconds time with identical search string

I've noticed that if I search for something in Eclipse (using it for Android development thus has the Android plugin) then the first time I search for a search string it always says there are no matches, but if I immediatly report the same search, then there are matches.
Using: Search/Search/File Search - then enter something in the "Containing text:" box (Case sensitvie is off, regular expression is off, file name patterns are .).
It will report "'search term' - 0 matches in workspace(.).
If I search again it will fail again unless I retype the search term or copy and paste it (no, I'm not mistyping it, if I enter it the first time when it fails, then copy and paste the term for the next successful search its obviously an identical search term).
This happens 100% of the time. Why is it doing this? Its really bugging me, when I search something I have to enter it twice it in order to get the results which is irritating.
Check the search scope at the bottom and make sure the correct one is selected:
Workspace
Selected resources
Enclosing projects
Working set
If you have a project highlighted in your workspace when you open the search dialog, it will default to the selected resource, otherwise it will default to the workspace, so that may be why you are seeing different results the second time around.
Hope this helps.

Beyond Compare 3 editing disabled

With BC2, when i click the Show differences... option in SourceGear Vault. It allow me to copy from the repository to the working version and save but I can't do this with BC3. It doesn't allow copying to the otherside (right) and have the editing disabled showing at the bottom of the BC3. It is even the same with DiffMerge. What am I not understanding here?
Can someone explain to me why the changes in BC3 and is there a workaround?
Beyond Compare will disable editing of a file for any of the following reasons:
It's one of the input files in a 3-way merge
The comparison was cancelled
The comparison encountered an error (corrupt file, invalid character encoding, out of memory, gamma rays, etc)
The file format's conversion settings don't support converting back to the original format (MS Word, PDF)
The file is on a read-only "filesystem" (7zip/RAR/CHM archives, CD/DVD-ROMs)
A file or parent folder had editing explicitly disabled by the user in the session settings or using the /ro command line switches
The viewer itself doesn't support editing (eg, Hex Compare prior to v4)
Also, the Full Edit (F2) toggle in the Text Compare View menu switches between inline editing and line-based mode. If it's disabled you can copy/delete whole lines and type in the line details edits at the bottom of the window, but the main windows won't have a cursor, typing is disabled, and it will always select whole lines. Unlike the above items, this doesn't show "Editing Disabled" in the status bar.
there must be a flag on the command line to call BC such as /ro# or /#ro or /(side)readonly (where side is left or right), it prevents editing.
these flags are there because differs are often called with temporary files to diff, in particular from SCC. and Vault probably has a single "external diff" command, thus you have to choose whether the flags are always there, it protects you from unexpectly editing a temporary file and loose this work when closing the diff tool, or not.
The few reasons I have found are:
If the encoding of the file is different than the default. In this case change the encoding to the expected one. (Japanese-ShiftJIS in my case)
If a refresh of files is in progress.

Why would eclipse not show search results inside file in results list?

We have one installation of Eclipse which does not show the individual lines on which search results occur as do all other installations, as shown here:
How can we turn on this feature so that individual results in each line are shown?
I think it's a question of what tool you are using. If you do a text search, you get one line per hit. But if, say, you look for references to a Java method, you get one line per file.
Although it seems like a perfectly desirable thing, I can't find any way to get Java search to return one line per hit.
In the preferences of the Search window (usually button with triangle icon) choose "Show as List" item

What tool can do a visual comparison of two sections within the same file?

Good file comparison tools were already discussed to the pain, but my problem is more exotic. Is there any visual text comparison tool (like WinMerge) that would allow me easily do visual comparison on two sections within the same file?
I have multiple configurations within vcproj file and need to maintain them. It is a pain to do this manually -- splitting windows, scrolling character-by character. On top of that xml is very verbose and takes lots of screen real-estate. I cannot believe there is no tool to do automatic file section comparison, since this sounds like a very common problem.
Please, do not offer me to use property pages, I do not want more complexity, I want less. Splitting manually into files and then comparing them is also too medieval (I am doing this now anyways).
I use Beyond Compare (not free, but I think a shareware version is available). You can select the same file for left and right sides, then right-click the beginning of your section on each side and select "Align Manually". This would allow you to compare two sections of the same file relatively easily.
Overall, I highly recommend the product. I haven't tried version 3, which is what they currently have on their Web site, but version 2 is a fabulous tool. A+
Emacs Ediff.
I use UltraEdit for most of my text editing and they have a product called UltraCompare that does a visual compare.
Update by Mofi
UltraCompare Professional supports also a comparison of text snippets in addition to entire files.
After starting UltraCompare, select Text Compare in menu Mode if not already selected. Select in text editor the first text block which should be compared, press Ctrl+C, switch back to UC and paste with Ctrl+V the block into left text area pane. Switch again to text editor, select the other block in same file, press Ctrl+C, switch back to UC, click into right pane and paste the block with Ctrl+V. The two blocks are immediately compared and the differences are displayed.
Such a text snippet comparison for two blocks in same file can be started also directly from within UltraEdit. Select the first block in file, press Ctrl+C, Ctrl+N, Ctrl+V and Ctrl+A to copy, paste and reselect this block in a new file. Select the second block in file. Execute command Compare from menu File in UltraEdit with option Compare selected text automatically being enabled and click on button Compare. UC Professional is started with just the 2 selected blocks for comparison.
You can use Meld to do this
Open up meld without specifying file names
Meld with prompt which type of comparison you want. Choose file comparison
Meld will present the the icon to select the file names. Below that it will prompt for a Blank comparison. Choose that.
In the file comparison window, paste the sections of the file you want to compare.