intellij-powershell
intellij-powershell copied to clipboard
Request: completion for .net objects
Regular powershell completion works fine with the plugin (eg Write-H<tab>), but even namespace-cast .net objects don't provide completion for properties and methods. Consider:
[Void][Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Administration")
$serverManager = [Microsoft.Web.Administration.ServerManager]::OpenRemote("127.0.0.1")
at this point, I'd expect to be able to do $serverManager.get-member

Or should this be working, and I have a problem locally?
For me, the completion works (even on an older plugin version that was available at the time, v2.0.10):
Could you please clarify if this is the right kind of completion?
And if it still doesn't work for you on a modern plugin version, could you please upload the IDE logs to uploads.jetbrains.com and share the upload id?
Thanks!
In the above image, there are a few occasions where I would have really appreciated some auto-completion - and you can see the "No suggestions" popup that comes when I try to; in particular:
- [Void] completes, but there was no help for
Reflection.Assembly - methods off of that assembly complete, but when I get back the $serverManager, no completion - this is the initial cause of the issue I raised: not knowing the ServerManager api well, I really wanted completion here to solve the issue at hand. Members on an object can be listed with
Get-Member, so, whilst I'm not sure how difficult it would be to provide completions for other parts, it seems like a call to completion after a.on an object should be solvable with a call toGet-Memberon the provided object. Though, please bear in mind, I don't know what kind of model is followed in language plugins for intellij, so this may seem really simple to me, and yet, really difficult to implement irl.
It also would have been amazing if I could have gotten completions on assembly names when attempting to load by reflection, but again, this is probably a big task.
I'll leave a note to check this issue after updating PSES (#51).
After that, it'll either be closed, or I'll file a feature request to PSES.