atom / fuzzy-finder

Find and open files quickly
MIT License
274 stars 138 forks source link

Adds getters for View classes #391

Closed robobenklein closed 5 years ago

robobenklein commented 5 years ago

Description of the Change

This adds 5 get functions for access to the 4 view classes and the metricsReporter so that other plugins can have easier access to construct their own instances of the 4 view classes.

Alternate Designs

Some alternate options were covered in #390

Benefits

This doesn't change the existing functionality, and still maintains the lazy-load requires() style used in the createX() functions.

Possible Drawbacks

I would think we'd want to expose the metricsReporter here, but if not I can instead add checks in the other view classes to special-case the metricsReporter being undefined.

Applicable Issues

This is one of the ideas from #390

lee-dohm commented 5 years ago

As stated in https://github.com/atom/fuzzy-finder/issues/390#issuecomment-494558400, we believe that services are the proper way to create such a system. Additionally, any pull request would require tests to be included in order to be reviewed and accepted.

Thanks very much for your contribution and your effort!