Search code examples
intellij-ideaintellij-plugin

Saving an Intellij project programmatically


I am working on an Intellij Plugin. When a button is pressed I would like to have the project save itself(like when the user modifies code) before the plugin executes. I can't seem to find a way to do this


Solution

  • Use FileDocumentManager.getInstance(project).saveAllDocuments().