diff: add javadoc - do not allow to call DiffRequestProducer with ReadLock
authorAleksey Pivovarov <AMPivovarov@gmail.com>
Mon, 17 Aug 2015 13:00:03 +0000 (16:00 +0300)
committerAleksey Pivovarov <AMPivovarov@gmail.com>
Wed, 19 Aug 2015 17:36:11 +0000 (20:36 +0300)
platform/diff-api/src/com/intellij/diff/chains/DiffRequestProducer.java

index 2ce21ae5503e1848127fcdfcae751b6a86d4e4b7..73d625cb71dda3b7d1c66a9cb4376d2e1f9db95c 100644 (file)
@@ -26,6 +26,12 @@ public interface DiffRequestProducer {
   @NotNull
   String getName();
 
+  /*
+   * Should be called either in EDT or without ReadLock.
+   * Some implementors might need WriteLock, so usage of Application.invokeAndWait() is possible.
+   *
+   * Valid ModalityState should be passed with ProgressIndicator.getModalityState().
+   */
   @CalledInBackground
   @NotNull
   DiffRequest process(@NotNull UserDataHolder context, @NotNull ProgressIndicator indicator)