PowerShellEditorServices icon indicating copy to clipboard operation
PowerShellEditorServices copied to clipboard

Add language feature support for classes

Open kaylaerdmann opened this issue 10 years ago • 18 comments

The following features do not work when inside a class:

  • Parameter hints
  • Get Definition
  • Get References
  • Change Occurrences
  • Symbol search

When outside of a class all features work normally.

kaylaerdmann avatar Aug 12 '15 17:08 kaylaerdmann

Probably can't make this in for 0.1.0, will get it out soon after for 0.2.0.

daviwil avatar Nov 16 '15 14:11 daviwil

Is there any update on this request?

sgtoj avatar Apr 05 '16 19:04 sgtoj

Hey Brian, not at the moment, but we'll definitely be adding it within the next few releases. Which features have you been missing the most for classes so far?

daviwil avatar Apr 06 '16 15:04 daviwil

Intelligent auto-completion and parameter hints are my number one.

sgtoj avatar Apr 07 '16 11:04 sgtoj

Can you give an example of what you mean by intelligent auto-completion? Parameter hints for class methods are definitely coming!

daviwil avatar Apr 07 '16 14:04 daviwil

Right now, the only completion feature VS Code has when working with classes is if it see I am typing a word that already exist, it will suggest it. What I mean is: only show me the methods and constructors for the respective class type. Furthermore, it would be nice if it understood the value-types I am currently typing and show the respective signature(s) as hints or show warnings when it the object doesn't have signature the for values being pass (assuming the value was explicitly typed).

sgtoj avatar Apr 13 '16 19:04 sgtoj

Yep, most of those things are definitely coming.

daviwil avatar Apr 13 '16 20:04 daviwil

Go to Definition on Method of Object would also be nice.

Golosok avatar Jul 21 '16 11:07 Golosok

@kapilmb, any chance you might be able to help with this one for 0.8.0 release (early October)?

daviwil avatar Sep 16 '16 14:09 daviwil

@daviwil Sorry for getting back so late about this. Sure, you can assign this to me if you haven't started work on it already.

kapilmb avatar Sep 30 '16 01:09 kapilmb

Assigned, thanks Kapil!

daviwil avatar Sep 30 '16 17:09 daviwil

Any updates on this? Symbol search on class definitions/methods would be very nice.

Golosok avatar Feb 20 '17 16:02 Golosok

This issue is closed for a long time, but it doesn't really work. No symbols search, no go to definition, no itellisense for classes and methods on dot sourced files... Any updates? Can provide screenshots of things that are not working if you need examples.

Golosok avatar Jul 25 '17 14:07 Golosok

Hi. Any news about symbol search in classes? It has been "must have" feature since Powershell 5.0.

Antasik avatar May 04 '18 11:05 Antasik

IIRC PSES uses the v3 AST to cover all supported versions of PowerShell (v3-6). We've been talking about dropping support for v3/4 in the editor in the next major version of the extension. This would allow us to move to the v5 AST which recognizes class and enum. I think that would be relatively easy. If we need to continue to support back to v3 then we need a runtime swappable provider for both v3 and v5 ASTs. That's doable but would take more time.

rkeithhill avatar May 04 '18 15:05 rkeithhill

Hello, I need this functionality too. Some years ago, I created an addon for PowerShell ISE to manage group of PS scripts in a similar way folders are used with VSCode (it is in GitHub too if some one need it). I added to it the "Get definition" and "Get references" functionalities covering classes too.

Now I 'm working with VSCode to manage different language files (including PS) under the same folder and the lack of those two functionalities is so annoying that I had to implement it.

Probably it is not the best way to implement it but it works. I don't know if it is worth proposing a pull request for this change since this functionality will already be available in a next major version.

In any case, it is located in this fork if you want to review it.

livianaf avatar Oct 07 '20 10:10 livianaf

@livianaf if you would like to send a PR that would be awesome :) this is highly requested and what better time to send a PR than Hacktoberfest!

TylerLeonhardt avatar Oct 15 '20 21:10 TylerLeonhardt

Uf! I got too many errors I don't know how to manage :(

I'm sorry, this is my first PR. How can I get the detail of the errors generated by the PR checks?

livianaf avatar Oct 26 '20 14:10 livianaf

Fixed by https://github.com/PowerShell/PowerShellEditorServices/pull/1984

andyleejordan avatar Feb 02 '23 20:02 andyleejordan