Improve automatic source jar redirection.
The plugin now just attaches the source jar automatically. Once that's done, IntelliJ will automatically navigate to the correct position in the source jar.
Ideally we'd just navigate straight to the source jar, but this is an improvement at least.
@@ -95,13 +95,11 @@ public class BlazeAttachSourceProvider implements AttachSourcesProvider {
// Hack: When sources are requested and we have them, we attach them automatically in the
// background.
if (attachAutomatically.getValue()) {
- ActionCallback callback = new ActionCallback().doWhenDone(() -> navigateToSource(psiFile));
TransactionGuard.getInstance()
.submitTransactionLater(
project,
() -> {
attachSources(project, blazeProjectData, librariesToAttachSourceTo);
- callback.setDone();
});
return ImmutableList.of();
}
