Is it possible to extract the LocalHistory of a File/Project programatically?

Hello!

I’m trying to create a plugin that lets a user extract/export the current Local History state of their file/project into some textfile, but I haven’t really figured out a way to do this so far.

It’s my first time working on an IntelliJ-plugin, I’m using the template from (GitHub - JetBrains/intellij-platform-plugin-template: Template repository for creating plugins for IntelliJ Platform).

I went through code of the community version and i see a few classes like LocalHistoryImpl and others that might be of use, but I also only have access to LocalHistory itself, which doesnt really offer a lot of functionality (none to export), so this is another issue im currently facing.

TLDR:

  • Is it possible to extract the Local History programatically?
  • How do I properly get access to the internal Implementation Classes?

Any help is greatly appreciated!

There is a recent question on the same topic. Does it help?

Kind of, tho I’m stuck at the same question that OP was stuck on on their post where com.intellij.history.core and com.intellij.history.integration don’t exist when using the IntelliJ template from github.