Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access plugin Javapackages ? #148

Open
cmp-nct opened this issue Oct 18, 2022 · 2 comments
Open

How to access plugin Javapackages ? #148

cmp-nct opened this issue Oct 18, 2022 · 2 comments

Comments

@cmp-nct
Copy link

cmp-nct commented Oct 18, 2022

I am trying to repair functionality of Copilot.
Using IDE scripting console I can call most things I need (util = com.github.copilot.util.ApplicationUtil) but the javascript does not offer any docs and I have not been able to bind a shortcut.
So I looked at LivePlugin with Kotlin.

However, here I can not import the required packages.
"import com.github.copilot.util.ApplicationUtil" will just throw an error.

How, if at all, can I access these Javapackages ?

@dkandalov
Copy link
Owner

Short answer is you can try adding // depends-on-plugin com.github.copilot (where "com.github.copilot" is the copilot plugin id). See also https://github.com/dkandalov/live-plugin/blob/master/plugin-examples/kotlin/additional-classpath/plugin.kts

LivePlugin depends only on core modules/classes in IDE and doesn't know about copilot. In theory, it could depend on every installed plugin but it will make compilation and IDE support even slower. This is why it needs "depends-on-plugin". It might be an interesting idea to make LivePlugin search for missing classes on compilation error and suggest adding the required dependency.

Hopefully, you'll find it easier creating an action with shortcut with LivePlugin 🙂
It also would be interesting to know your particular use case.

@cmp-nct
Copy link
Author

cmp-nct commented Oct 18, 2022

Thanks a lot, that worked!
LivePlugin certainly works a lot better than the IDE scripting function they supply, I miss the "javascript", Kotlin is way too precise, but at least it all works now :)

It would be nice if STDOUT would be visible in Run menu

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

No branches or pull requests

2 participants