bfacc1a3c5
Previously, ResolverForProjectImpl had multiple callbacks in constructor. Some of those callbacks were used only to overcome module visibility and provide an ability to inject IDE-specific logic into compiler (ResolverForProject is in the 'compiler'-module) This commit introduces abstract class which implements environment-independent logic (previously, this logic had been stored in ResolverForProjectImpl) with several abstract met hods (previously, callbacks). Then, we provide few concrete implementations of AbstractResolverForProject with clear semantics: - IdeaResolverForProject: resolver used in IDE, where we have indices, oracles, multiple modules, etc. - ResolverForSingleModuleProject: resolver for project with only one module, commonly used for CLI compiler/tests - one anonymous implementation for MultimoduleTests This refactoring achieves several things: - now it is easier to see what kinds of ResolverForProject you might see in some particular environment (previously, one had to inspect all call-sites of constructor) - we can easily add IDE-specific logic in IdeaResolverForProject without adding noisy callbacks (which most probably wouldn't have any other non-trivial implementations)