about run configurations
Answered
This is the result I got according to the tutorial.
I want to know the method called by the "run" button, so that I can do some form validation.
I have extends SettingsEditor, and override applyEditorTo.But this method will only be called when the "Run" button is clicked when the form changes.
please help me, thanks!
Please sign in to leave a comment.
As shown in the figure, the apply button is disabled, and the applyEditorTo method will not be called when the run button is clicked.
Or can you tell me how to control the state of the apply button?
Please help me, thanks
It is not possible to control the Apply button.
You can implement the RunConfiguration.checkConfiguration() method to raise an error when the configuration is not valid.
dear Jakub, thanks
I have done what you said,extends RunConfigurationBase class and override checkConfiguration() method.
When I click the run button, there will only be a prompt.But it can still be executed.as the picture shows.
I hope it is mandatory verification, not optional.
I threw a RuntimeConfigurationError exception in the checkConfiguration() method.
like this,
Is the exception I thrown wrong? Or can you tell me which exception should I use?
Can this problem be solved? thanks
Yang, sorry for the late reply – this thread got lost in a queue. Did you manage to handle it?
Not at all, This may be a defect of IDEA.