Messages.showMessagesDialog() on plugin startup

Can I call the Messages.showMessagesDialog() method from the ProjectComponent.projectOpened() method? Or does this call may cause IDE hangup?

What is the best place for the Messages.showMessagesDialog() call to show a message after the project is opened? I check the plugin configuration on startup and need to display a message if config is invalid.

1 comment
Comment actions Permalink

Hello Alex,

AO> Can I call the Messages.showMessagesDialog() method from the
AO> ProjectComponent.projectOpened() method? Or does this call
AO> may cause IDE hangup?
AO>
AO> What is the best place for the Messages.showMessagesDialog() call to
AO> show a message after the project is opened? I check the plugin
AO> configuration on startup and need to display a message if config is
AO> invalid.

The best place is to call SwingUtilities.invokeLater() from the runnable
passed to StartupManager.registerPostStartupActivity().

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.