On Wed, May 16, 2012 at 8:48 AM, Thomas Mortagne <[email protected]> wrote: > On Wed, May 16, 2012 at 8:45 AM, Thomas Mortagne > <[email protected]> wrote: >> On Tue, May 15, 2012 at 9:13 PM, Ludovic Dubost <[email protected]> wrote: >>> Hi Thomas, >>> >>> There is the DiffPlugin which is used by the Diff code in the XWiki and >>> Document classes. >>> This API can also be used by applications. >>> >>> I included some HTML display APIs in this DiffPlugin >>> >>> If you are moving to a diff component it would make sense to migrate this >>> code to the new component. >> >> I'm doing something more generic than a String diff (look at the >> current API). And HTML presentation of the diff iss presentation stuff >> and are not going to be in this API. >> >> So the API I have already cover more that what is in the diff plugin >> (minus the HTML stuff of course). > > As for the Document diff, no it's not using this plugin. At least > Document#getContentDiff use JRCS API.
Actually looks like getDifferencesAsHTML is used directly by the UI and Document#getContentDiff does not seems very used. In any case there is too completely different things here for the same thing as well as a mixup between base API and UI which is not very nice. > >> >>> >>> Ludovic >>> >>> 2012/5/15 Thomas Mortagne <[email protected]> >>> >>>> Hi devs, >>>> >>>> Since there is not official standard for diff/merge API I started to >>>> write a simple one. Yo can find it on >>>> >>>> https://github.com/xwiki/xwiki-commons/tree/feature-diff/xwiki-commons-core/xwiki-commons-diff >>>> . >>>> >>>> The first use case for it is to provide a diff/merge API for the >>>> Extension Manager XAR merging conflict resolution UI. >>>> >>>> It is mostly inspired from JRCS/java-diff-utils APIs and implemented >>>> using java-diff-utils (http://code.google.com/p/java-diff-utils/) for >>>> the diff and JDiff (http://www.qarks.com/web/en/products_jdiff.html) >>>> for the multiline String merge. Theses are the most active independent >>>> libraries I could find so far and it's not really what I would call >>>> active library usually... >>>> >>>> Would be nice to get some comments/suggestions on the API. >>>> >>>> For the implementation side if you know some good diff/merge tool I >>>> would be glad to get some other suggestions. I took a quick look at >>>> various EDIs which obviously have this kind of tools but what I could >>>> find is not really designed to be used easily outside of the EDI for >>>> which they have been designed. Either its very tied to the EDI itself >>>> or it's generic enough but trigger a whole bunch of dependencies while >>>> we would use like 1% of the total. >>>> >>>> Here are the various features I'm looking for in an ideal library: >>>> * good 3 ways merge ("good" is not a detail, applying a patch on the >>>> third version does not always give very good results) >>>> * diff/patch API >>>> * support of single line in 3 ways merge and diff >>>> >>>> Thanks, >>>> -- >>>> Thomas Mortagne >>>> _______________________________________________ >>>> devs mailing list >>>> [email protected] >>>> http://lists.xwiki.org/mailman/listinfo/devs >>>> >>> >>> >>> >>> -- >>> Ludovic Dubost >>> Founder and CEO >>> Blog: http://blog.ludovic.org/ >>> XWiki: http://www.xwiki.com >>> Skype: ldubost GTalk: ldubost >>> _______________________________________________ >>> devs mailing list >>> [email protected] >>> http://lists.xwiki.org/mailman/listinfo/devs >> >> >> >> -- >> Thomas Mortagne > > > > -- > Thomas Mortagne -- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

