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!

0
10 comments

As shown in the figure, the apply button is disabled, and the applyEditorTo method will not be called when the run button is clicked.

0

Or can you tell me how to control the state of the apply button?

0

Please help me, thanks

0

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.

0

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.

0

I threw a RuntimeConfigurationError exception in the checkConfiguration() method.

like this,

throw new RuntimeConfigurationError("xxx is not null");
0

Is the exception I thrown wrong? Or can you tell me which exception should I use?

0

Can this problem be solved? thanks

0

Yang, sorry for the late reply – this thread got lost in a queue. Did you manage to handle it?

0

Not at all, This may be a defect of IDEA.

0

Please sign in to leave a comment.