Add support for renaming PowerShell class references
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Comienza reproduciendo los dos ejemplos de clases y pulsando F2 sobre las referencias a los nombres de clase. Sigue el manejo existente del renombrado en PowerShell Editor Services, incluidas las referencias a clases en el mismo archivo y el comportamiento del sufijo opcional Attribute. Se considera terminado cuando el renombrado actualiza de forma coherente la declaración, el constructor, las referencias de tipo y el uso del atributo.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with PowerShell Editor Services itself and does not reproduce in a standalone PowerShell instance, and is not an issue with my editor.
- I have verified that I am using the latest version of PowerShell Editor Services.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
This is not a bug, but the README says that rename scenarios should be filed as bug reports, so that's what I'm doing.
I think it should be fairly trivial to add renaming support for PowerShell classes defined in the same script file.
Expected:
class DemoClass
{
[string] $SomeProperty
DemoClass ([string] $SomeArg)
{
$this.SomeProperty = $SomeArg
}
}
[DemoClass]
Actual:
class NewName
{
[string] $SomeProperty
NewName ([string] $SomeArg)
{
$this.SomeProperty = $SomeArg
}
}
[NewName]
One thing to keep in mind during implementation is that a PowerShell class can also be used to define an attribute, and an attribute type can drop the optional Attribute suffix in an attribute context as seen here:
class ValidateSomethingAttribute : System.Management.Automation.ValidateArgumentsAttribute
{
[void]Validate([System.Object]$arguments, [System.Management.Automation.EngineIntrinsics]$engineIntrinsics)
{
}
}
[ValidateSomething()][string]$Path = "c:\windows"
PowerShell Version
Name Value
---- -----
PSVersion 7.6.1
PSEdition Core
GitCommitId 7.6.1
OS Microsoft Windows 10.0.26200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Editor Version
VS code:
Version: 1.117.0 (system setup)
Commit: 10c8e557c8b9f9ed0a87f61f1c9a44bde731c409
Date: 2026-04-21T16:12:14-07:00
Electron: 39.8.7
ElectronBuildId: 13841579
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
PowerShell Editor Services Version
Major Minor Build Revision
----- ----- ----- --------
4 6 0 0
Steps to Reproduce
Use the code blocks from before and press F2 on the class name references.
Visuals
No response
Logs
No response
- Lenguaje dominante
- C#
- Estrellas
- 780
- Forks
- 267
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PowerShell/PowerShellEditorServices
-
Issue-Enhancement Needs: Triage
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
[Bug] None of the string overloads of `EditorExtensionServiceProvider.GetService()` work on .NET.Quizá libre de nuevo @andyleejordan la tomó hace 143 días y no hay ningún pull request abierto. Abierto
PowerShell/PowerShellEditorServices#2331 · 1 reacción · 2 asignados ·
-
Area-Language Server Issue-Enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
PowerShell/PowerShellEditorServices#2315 · 1 comentario ·
-
Improve Constrained Runspace Debug ExperiencePosiblemente ocupada @JustinGrote la tomó hace 166 días. AbiertoArea-Debugging Issue-Enhancement
PowerShell/PowerShellEditorServices#2294 · 1 reacción · 2 asignados ·
-
Document outline drops child variables when a function/filter reuses a variable name declared earlier (scope-blind declaration dedup)Posiblemente ocupada @JustinGrote la tomó hace 194 días. Abierto
PowerShell/PowerShellEditorServices#2282 · 1 comentario · 1 reacción · 2 asignados ·
Todos los issues de PowerShell/PowerShellEditorServices
Issues similares
-
kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
unoplatform/uno#26555 ·
Los mantenedores suelen responder en 1 día
-
Add File sorts a picked file by VB6's extensions, not the project format's (#4243 follow-up)Abiertochore project-system small
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
vikramlearning/blazorbootstrap#1388 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
GamaEdtech/gamatrain-back#977 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
jhaizhou-ops/S2Arm#1396 · 1 comentario ·
Los mantenedores suelen responder en 1 día