Page 1 of 1

Pluggable diff/file comparison algorithms

Posted: Thu May 22, 2014 3:55 pm
by qb.zero
It would be a great feature if you could let users develop their own diff/file comparison algorithms and provide a mechanism for their automatic integration with the rest of the application.

The Diff Files tool will search for the user defined algorithms - it will discover all the implementations of a certain interface on the classpath (I see these algorithms as implementations of a certain interface) - and will give the user the possibility to choose from the list of discovered algorithms the one to be used when performing the diff operation.

Re: Pluggable diff/file comparison algorithms

Posted: Wed May 28, 2014 2:57 pm
by adrian
Hi,

Unfortunately the Diff tool/GUI does not expose any API at this time.
We will consider your request in the long term.

Regards,
Adrian

Re: Pluggable diff/file comparison algorithms

Posted: Wed May 28, 2014 6:08 pm
by qb.zero
Hello,

this is a bit offtopic, but can you please tell me if it is possible to obtain this kind of behavior using a plugin (I plan to write one) which will use parts of the diffFiles application?

I have been studying the plugin developer guide, but it seems to me that in order to obtain this behavior one will have to write a plugin which will contain an entirely new application (the equivalent of the diffFiles)

Thank you for your time

Re: Pluggable diff/file comparison algorithms

Posted: Wed May 28, 2014 7:41 pm
by adrian
Hi,

Due to the lack of public API for Diff, there are no parts of the diffFiles or diffDirs tools that can be used programmatically.
So, the answer is no, it's not possible at this time.

If I may ask, why do you want or need to use other comparison algorithms?
Is it for other (than XML) types of files?

Regards,
Adrian

Re: Pluggable diff/file comparison algorithms

Posted: Fri May 30, 2014 4:49 pm
by qb.zero
Hi,

the pluggable comparision algorithms are for XML files.

Their user will help me ignore the differences in the order of the elements of a file, ignore the presence of an optional attribute, or ignore differences in the cases of attributes values (TRUE vs. True).

Thank you

Re: Pluggable diff/file comparison algorithms

Posted: Fri May 30, 2014 5:17 pm
by adrian
Hi,

We already have on our issue tracking tool feature requests to provide these possibilities (ignore element, order, optional attribute, cases in values) as options for the diff algorithms.
I'm considering this as a request for these options. I've added a vote and mentioned your comments.

Regards,
Adrian

Re: Pluggable diff/file comparison algorithms

Posted: Wed May 04, 2016 4:47 pm
by tavy
Hello,

In oXygen XML Editor 18 we added support to ignore nodes using an XPath expression.
An XPath panel was added on the toolbar of the File Comparison tool and in the Compare view in the Syncro SVN Client. You can enter an XPath 2.0 expression to ignore certain nodes when comparing using the XML Fast or XML Accurate algorithms.

Watch this video demonstration to find out more more about "XML Three Way Diff" in Oxygen XML Editor 18:
https://www.youtube.com/watch?v=3wLmNZq ... e=youtu.be

For more details see the "Compare Files" section from our use manual:
http://oxygenxml.com/doc/versions/18.0/ ... son-1.html

Best Regards,
Octavian