Project parameter in RunConfigurationBase constructor


I want to understand why Project is given as a parameter to RunConfigurationBase constructor.

Because whenever a configuration is executed we can always get access to the project instance by using the ExecutionEnvironment instance.

Simply put, what is the difference between getProject() and environment.getProject()? Are they always guaranteed to be the same? If yes, then that means that configuration objects are instantiated separately for all projects just like a project component?  If no, then when are they different and why?   


1 comment
Vassiliy Kudryashov
Comment actions Permalink

It's part of public API for at least last 12 years and there are a lot of usages inside IntelliJ codebase, for instance framework-specific validations and some application-level logic where ExecutionEnvironment is not present.


Please sign in to leave a comment.