intellij-protobuf-editor
intellij-protobuf-editor copied to clipboard
Adding Import paths using Jar File
I have read the readme about adding import paths for the missing proto, but this time I would like to add an import path using a jar file, in my case the proto is in that jar file and it is very troublesome for me to cherry-pick and copy those files one by one.
I have created a PR(#29) for this feature, but the author said he will refactor the file resolver, but there are no updates after many months.
So I built a new plugin for improving development experience with protobuf for Java Project.
If it's just a single jar file, you can use this workaround currently:
- Add any path to the list of include paths
- Double click on that new path (or highlight it and click the edit button) and replace the entire URL including
file://
with something like:jar:///path/to/my.jar!/path/in/jar
This is a built-in scheme supported by IntelliJ's virtual filesystem, and is used by the plugin already to include built-in files (e.g., descriptor.proto
). The exclamation point marks the start of the path to search within the jar file.