JitendraZaa / java-diff-utils

Automatically exported from code.google.com/p/java-diff-utils
1 stars 0 forks source link

Add type information to the interface #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!

This is not an issue and sorry if I suggest something stupid, but I was 
wondering can you improve the usability of the diff tools, by introducing some 
type information about the Delta.

So instead of looking after the types, with the instanceof operator, I can get 
the type of the change by retrieving an enum.

E.g.:
Delta delta = patch.getDeltas().get(0);
if(Delta.TYPE.Delete.equals(delta.getType());

Than you can make the change deltas package-private for cleanable API.

Just an idea.

David

Original issue reported on code.google.com by edvi...@gmail.com on 6 Aug 2010 at 1:43

GoogleCodeExporter commented 9 years ago
Hi, thanks for this suggestion.

If this can make you happy, I've added the types as you described :) I think 
it's good to bring a little happiness with a software, you know.

Seriously, changes are in trunk and will be released with 1.3 version or in 
1.2p1 if version 1.3 will not be ready in near time (2-3 weeks, I think).

Note that delete, insert and changes deltas are still public. Just in case 
someone is still using it, so don't want to break up the compatibility.  

Original comment by dm.naume...@gmail.com on 15 Oct 2010 at 12:21