How to add an item to the menu Intellij IDEA

Answered
 

For the first time in my life I am developing a plugin for IDEA. Already almost fully implemented all the functionality. Now you need to add an item to the file-> settings menu. How can I do that? In the documentation I did not find anything like this.

And the second question. Is it possible to execute the 'save all' command (Ctrl + S) somehow from the java code?

0
1 comment

You can register `com.intellij.openapi.options.Configurable` extension.
See multiple examples in community source code. (ex: com.intellij.openapi.updateSettings.impl.UpdateSettingsConfigurable)
https://sites.google.com/site/malenkov/java/150403
http://corochann.com/intellij-plugin-development-introduction-applicationconfigurable-projectconfigurable-873.html

For the "Save All" see `com.intellij.openapi.fileEditor.FileDocumentManager#saveAllDocuments` (to save changed files on disk) and `com.intellij.openapi.application.Application#saveAll` (to save all - files, app settings, project settings).

0

Please sign in to leave a comment.