Run write action when IDE is backgrounded

Answered

I want to run some clean up task that requires write action. Since i don't want to block the user, I would like to run it when the user has backgrounded IntelliJ or moved to a different application. Is there a way to get updated on that type of event? 

Thanks! 

0
2 comments

See listener com.intellij.openapi.application.ApplicationActivationListener, https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_listeners.html on how to register

0
Avatar
Permanently deleted user

Thank you Yann Cebron!

0

Please sign in to leave a comment.