Dreamescaper / IntelliSenseExtender

GNU General Public License v3.0
88 stars 17 forks source link

Added support for static members and constants #5

Closed fitdev closed 6 years ago

fitdev commented 7 years ago

Hi!

Thanks for the excellent extension. I needed support for static imports and constants so I have added that, and provided an option. Would be nice if you add this functionality into your published extension.

Thanks.

Dreamescaper commented 7 years ago

So it would make every constant and static member of any class appearing in intellisense? Does it make any sense? Probably there is more sense to make it as code fix, how do you think?

fitdev commented 7 years ago

Yeah, there may be a huge number of them, which is why I also added an option to (by default) only show members for imported namespaces, so that will limit it quite a bit. And this works very well for me (that's why I decided to actually add this functionality to your extension cause I really needed it).

fitdev commented 7 years ago

Now that I think of it, your suggestion of using code fixes instead of adding Static usings makes sense! definitely! I haven't thought of it for some reason. But perhaps this should be made as an option? Or, better yet (don't know if it is possible though) depending on how the user completes intellisense (Enter vs Space or maybe Enter vs Alt Enter) it would be possible to use either code fix, or using static.

fitdev commented 7 years ago

I have implemented code fixes as you suggested (it's an option which is turned on by default)

Dreamescaper commented 6 years ago

Sorry for long delay. I cannot really review your code, since it has different styling than existing one. Please change it accordigly (should be easier since I committed .editorconfig file to master).

Dreamescaper commented 6 years ago

Wow, it's been a while. Sorry for delay. Sorry, but I don't think it makes sense to add. In most cases you're having too much members for it to make sense. And I don't really know the case when you need member from some class, but you don't know it's name.

fitdev commented 6 years ago

Thanks for replying. I understand. Though I have used the feature EVERY DAY. It is particularly handy if you have various static / non-static classes with public / internal constants or readonly singletons. That's my case, and there are sometimes many, such constants, and I for sure do not remember their exact names, nor quite often exact class name where they are located. I think it is quite useful. Plus you could have left it off by default - after all it's just an option. You don;t have to use it.