How to mark a run configuration as invalid?

For the plugin I am developing, the user can create run configurations and must select a module and a class. If he does not select that, I want the run configuration to be added but be marked as invalid ( that red X), so the user knows he was forgotten something. How can I achieve that?

1 comment

In your implementation of RunConfiguration override   checkConfiguration()

Throw an instance of RuntimeConfigurationException to indicate an error.

public void checkConfiguration() throws RuntimeConfigurationException {

    if (/* invalid configuration settings */)
         throw new RuntimeConfigurationException("Reason the configuration is invliad.");


Please sign in to leave a comment.