mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 23:31:05 +07:00
The main problem with them is that due to an odd design decision they both share the same configuration type -- RestRunConfigurationType, and it doesn't quite fit in this newer typed API, e.g. isConfigurationFromContext() can receive a configuration instance of a wrong type (DocutilsRunConfiguration for SphinxConfigurationProducer and vice-versa) due to it, producing a CCE at runtime. I employed a workaround already used in Python testing run configurations sharing the same problem. Namely, overloaded getConfigurationSettingsList() to additionally check that instances of RunnerAndConfigurationSettings with RestRunConfigurationType type actually correspond to run configurations of the proper concrete class. Note that setupConfigurationFromContext can also receive a run configuration of a wrong type but in reality it doesn't happen since Sphinx and Docutils run configurations are applied to different contexts -- directories and individual .rst files respectively. GitOrigin-RevId: 15fbb90917edd68e6f29b696c527ff04d4eed433