简体   繁体   中英

Need a Java and Javascript diff tool written in Java

We need an accurate diff utility for Java and Javascript files, written in Java. It should be invokable from within an Eclipse (version 3.2 or 3.3) application. Preferably we need the Java source code for this utility also.

The utility should be able to compare two files (old and new, say) and determine the following accurately:

  • Number of LOC added to the new file
  • Number of LOC deleted from the old file
  • Number of LOC changed in the old file
  • Number of change deltas, ie, contiguous blocks of code added/changed/deleted.

Eclipse has a very good diff/compare plugin installed by default. Have you looked into using and/or extending that (it's opensource)? I would not think that adding some statistics reporting to the existing plug-in would be all that difficult, though sometimes plug-in development (even just simple extension) can be deceiving.

Good luck.

参见Diffj

我需要一个Java差异实现,并找到了它: http : //javacook.darwinsys.com/javasrc/textproc/Diff.java ,我对此进行了修改。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM