scala-ide/scala-search — pull request #62 by mads379 (2013-06-27 11:55:18+00:00)
Title: UI Code for type-hierarchy view

This PR is a bit messy, sorry about that. I had to change some of the main abstractions used to pass information between the SearchPresentationCompiler and the rest of the code.

- We now have our own little abstraction for Scala entities called **Entity**. It simply represents a Scala enity (Type, Class, Trait, etc) and a Location where the entity was spotted.
- Before we used Hit/PotentialHit to represent the result of checking a single occurrence to see see if it matched the entity we were looking for. This has been changed to a more generic container called **Confidence** (Certain/Uncertain) which in the case of finding occurrences contains a Hit. In the case of finding subtypes it contains a TypeEntity.

Here's the new key classes that should be reviewed related to the Type Hierarchy view code.

- [TypeHierarchyNode](https://github.com/mads379/scala-search/compare/1001764-type-hierarchy-ui?expand=1#diff-13)
- [TypeHierarchyContentProvider](https://github.com/mads379/scala-search/compare/1001764-type-hierarchy-ui?expand=1#diff-20)
- [TypeHierarchyTreeLabelProvider.scala](https://github.com/mads379/scala-search/compare/1001764-type-hierarchy-ui?expand=1#diff-21)
- [TypeHierarchyView.scala](https://github.com/mads379/scala-search/compare/1001764-type-hierarchy-ui?expand=1#diff-22)

And this is related to the new abstraction

- [Confidence](https://github.com/mads379/scala-search/compare/1001764-type-hierarchy-ui?expand=1#diff-8)
- [Entity](https://github.com/mads379/scala-search/compare/1001764-type-hierarchy-ui?expand=1#diff-4)

Most of the rest is just refactoring to fix the new abstractions.

I'll keep the changes smaller in the future, but hopefully I won't need to refactor this much again in the near future ;)