Getting all the classes in project and their packages from CodeRush extension

Posted by drasto on Stack Overflow See other posts from Stack Overflow or by drasto
Published on 2010-05-22T00:11:00Z Indexed on 2010/05/24 8:11 UTC
Read the original article Hit count: 222

Filed under:
|
|
|

I've spent some time trying to find a way CodeRush could add using when it finds undeclared element that is in the fact class name with no using added. The solution suggested in this answer to my question (Refactor_resolve) does not work (bugged?).

In a process I found out that writing plug-ins for CodeRush is easy, so I decided to code this functionality myself (and share it). I'd only implement a CodeProvider (like in this tutorial). The only thinks I need to do the job are answers to this questions:

  1. At the start up of my plugin I need to get a list (set, map, whatever) of all classes and their packages. This means all the classes(interfaces...) and their packages in project, and within all referenced libraries. And I also need to receive updated on this (when user adds reference, creates new class). Can I get this from some CodeRush classes or maybe VS interface available from CodeProvider class?

  2. How do I add created CodeProvider to the pop-up that is shown when user hovers over an Issue?

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio