Get diff between two files

Hello, I use method DiffUtil.compareWithCache to retrive differences between two files.
As I tested it, the method works as expected.
It however requires the first parameter to be of type
com.intellij.diff.requests.DiffRequest instead of
I use the class from the second package in other places.
As a general practice, Is it ok if I use both DiffRequst classes as part of the plugin development?
Comment actions Permalink

Yes, it is absolutely OK to use all the classes you need to implement your plugin.

Comment actions Permalink

It all works good in IDEA.
However, I get this error if I use the plugin in PhpStorm:

java.lang.NoClassDefFoundError: com/intellij/diff/fragments/DiffFragment
Caused by: java.lang.ClassNotFoundException: com.intellij.diff.fragments.DiffFragment PluginClassLoader

Any idea how to deal with this?


Please sign in to leave a comment.