Hi Lucien,
Are you sure you've tried all existing diff tools since we must
absolutely reduce to the maximum the number of lines of code we write?
We're already using jrcs diff and there's also
http://code.google.com/p/google-diff-match-patch/
which could help. I'm sure there are others too.
Maybe they don't fit your use case but I'd like to be sure we're not
adding unnecessary lines of code.
Also I'm worried that xwiki committers haven't reviewed your code so
far since if there's some problems in the design we won't be able to
integrate your module easily. It's better to validate early than late.
Thanks
-Vincent
On Jun 20, 2009, at 4:44 PM, lpereira (SVN) wrote:
Author: lpereira
Date: 2009-06-20 16:44:49 +0200 (Sat, 20 Jun 2009)
New Revision: 21367
Added:
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/maintainment/
AnnotationState.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/maintainment/
XDiffAnnotationMaintainer.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/maintainment/diff/
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/maintainment/diff/
XDiff.java
Modified:
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/AnnotationMaintainer.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/AnnotationService.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/ContentAlterer.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/ContextAlterer.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/DocumentService.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/SelectionService.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/SyntaxFilter.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/
DefaultAnnotationService.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/alterer/
DefaultContentAlterer.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/alterer/
DefaultContextAlterer.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/annotation/Annotation.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/annotation/
AnnotationImpl.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/content/
AlteredContent.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/content/
AlteredContentImpl.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/context/
AlteredContext.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/context/
AlteredContextImpl.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/context/Context.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/context/ContextImpl.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/document/
DefaultDocumentService.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/exception/
ContextRetrievalException.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/exception/
NoMatchException.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/exception/
SelectionExpansionException.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/exception/
TooMuchMatchesException.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/filter/
DefaultSyntaxFilter.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/maintainment/
DefaultAnnotationMaintainer.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/selection/
AlteredSelection.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/selection/
AlteredSelectionImpl.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/selection/
DefaultSelectionService.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/selection/Selection.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/selection/
SelectionImpl.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/java/
com/xpn/xwiki/component/annotation/internal/selection/
SelectionLocation.java
sandbox/xwiki-annotation/xwiki-component-annotation/src/main/
resources/META-INF/components.txt
sandbox/xwiki-annotation/xwiki-rest-annotation/src/main/java/com/
xpn/xwiki/rest/annotation/AnnotationRESTService.java
sandbox/xwiki-annotation/xwiki-rest-annotation/src/main/java/com/
xpn/xwiki/rest/annotation/internal/AbstractAnnotationService.java
sandbox/xwiki-annotation/xwiki-rest-annotation/src/main/java/com/
xpn/xwiki/rest/annotation/internal/DefaultAnnotationRESTService.java
sandbox/xwiki-annotation/xwiki-rest-annotation/src/main/java/com/
xpn/xwiki/rest/annotation/internal/SingleAnnotationResource.java
Log:
- wrote a diff algorithm (java-diff is bugged)
- the API seems to use both '\n' and '\n\r' so removed '\r'
before
processing (that was causing bugs)