Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

Adding Import paths using Jar File #64

Open
cheatmenot opened this issue Apr 9, 2021 · 2 comments
Open

Adding Import paths using Jar File #64

cheatmenot opened this issue Apr 9, 2021 · 2 comments

Comments

@cheatmenot
Copy link

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.

@devkanro
Copy link

devkanro commented Apr 12, 2021

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.

@jvolkman
Copy link
Owner

If it's just a single jar file, you can use this workaround currently:

  1. Add any path to the list of include paths
  2. 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants