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

Running plugin with all listeners/extensions in plugin.xml #177

Open
Yoskaldyr opened this issue Apr 1, 2024 · 5 comments
Open

Running plugin with all listeners/extensions in plugin.xml #177

Yoskaldyr opened this issue Apr 1, 2024 · 5 comments

Comments

@Yoskaldyr
Copy link

Is it possible to run live plugin with all listeners/extensions defined in plugin.xml (Or maybe run created zip file with full plugin inside the plugin folder)?

@dkandalov
Copy link
Owner

Is it possible to run live plugin with all listeners/extensions defined in plugin.xml

At the moment live plugin just runs the code in plugin.kts (or plugin.groovy). In theory, nothing stops it from parsing plugin.xml and (un)load all the related listeners/extensions. I experimented with it to load actions in about 50 lines of Kotlin. It quickly becomes tricky and it essentially reimplements the functionality of IntelliJ plugin loader.

You can also try https://plugins.jetbrains.com/docs/intellij/dynamic-plugins.html with auto-reload https://plugins.jetbrains.com/docs/intellij/ide-development-instance.html#enabling-auto-reload I looked at it a couple years ago and it was restarting IDE anyway, but it might work better now 🤷

Or maybe run created zip file with full plugin inside the plugin folder

Not sure I understood this 🤔

@Yoskaldyr
Copy link
Author

Yoskaldyr commented Apr 2, 2024

Not sure I understood this 🤔

Create Kotlin Plugin Zip feature creates zip file with plugin that can be loaded like classic plugin. And before creating zip-file, plugin.xml file can be edited (more listeners/extension is added etc). So it will be great if this zip file can be run directly from the Live Plugin

@dkandalov
Copy link
Owner

👍 plugin.xml by live plugin is only editable to specify plugin id, name and description. I haven't tried addition more listeners/extensions.

Do you want to plugin.xml because it's more obvious how to register listeners/extensions?

@Yoskaldyr
Copy link
Author

Yoskaldyr commented Apr 2, 2024

Do you want to plugin.xml because it's more obvious how to register listeners/extensions?

yes. But only because JB is still changing internal plugin API now and hard to find examples how to extend something in realtime. But xml definition is staying the same long period of time.

For me approach of your addon is much-much better, especially for a small plugins. I can see result of my code changes almost instantly. And standard plugin creation workflow is just overkill for such small changes.

@Yoskaldyr
Copy link
Author

I need custom idea plugins just for own small team productivity (and maybe for community if it get some interest). But not for creating BIG and COMPLEX paid plugins.
That's why your plugin is the best for such things👍

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