How do I make Beyond Compare ignore certain differences while comparing versions of Delphi Form Files

為{幸葍}努か 提交于 2019-11-27 18:40:56
  1. Load a pair of DFM files showing the difference.
  2. Click the Session Settings button (aka Rules w/ umpire icon) or use the Session->Session Settings menu item.
  3. Switch to the Importance tab then click the Edit Grammar... button to open a second dialog.
  4. Click the New... button below the top listbox to open a third dialog.
  5. Change the Element Name option to something like Explicit*, change the Text Matching to Explicit(Left|Top|Width|Height) = \d+ and check the Match character case and Regular expression checkboxes, then click Ok, then click Ok again in the second dialog.
  6. Explicit* should now appear in the original dialog's Grammar Elements list. Uncheck it, then change the combobox at the bottom of the dialog from Use for this view only to Update session defaults.

I don't use Beyond Compare, but if you want to have newer versions of Delphi stop adding the (IMO useless) Explicit* properties, you can use Andreas Hausladen's DDevExtensions

Neville

In my case (C#), I wanted to ignore the entire line which contained namespaces (and thus, using's) which I changed. (Referenced Walkthrough - Ignore entire line if text exist in line

ie.

namespace INSERT.NAMESPACE.HERE 
      changed to 
namespace INSERT.NAMESPACE.HERE.NEW

To do that

In step 5. of Craig's solution, change the Text Matching to

" .\*INSERT.NAMESPACE.HERE.\* "

(include the quotes)

That's it.

Craig Peterson's answer is correct. N.B. However! The tab 'importance' is not always visible from Session/Session-settings. Always, from inside a Folder list view, it will not be there. It seems there are certain filetypes that do not have it either, though I'm less clear on that. BC has so many options and plugins I bet there is a workaround, but for me I have been ok so far. http://www.scootersoftware.com/vbulletin/showthread.php?t=8457

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!