Plugin development - callback for settings change

I need to detect when ANSI colors settings change by the user in order to reflect changes in my plugin. Is there a topic/listener to subscribe to for that?

The plugin is about highlighting ANSI sequences in IntelliJ editor.

1 comment

This was the solution:

MessageBusConnection connection = ApplicationManager.getApplication().getMessageBus().connect();
connection.subscribe(EditorColorsManager.TOPIC, (editorColorsScheme) -> {
//custom code goes here

For some reason editorColorsScheme is always null, thankfully the global scheme is accessible through EditorColorsManager.getInstance().getGlobalScheme().


Please sign in to leave a comment.