Skip to content

Commit

Permalink
renaming ShouldGenerateAlias to create CreateAlias
Browse files Browse the repository at this point in the history
  • Loading branch information
Razmo99 authored and JustinGrote committed Jun 10, 2024
1 parent 956dbea commit 386b707
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Microsoft.PowerShell.EditorServices.Handlers
internal interface IRenameSymbolHandler : IJsonRpcRequestHandler<RenameSymbolParams, RenameSymbolResult> { }

public class RenameSymbolOptions {
public bool ShouldGenerateAlias { get; set; }
public bool CreateAlias { get; set; }
}

public class RenameSymbolParams : IRequest<RenameSymbolResult>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public IterativeVariableRename(string NewName, int StartLineNumber, int StartCol
this.StartLineNumber = StartLineNumber;
this.StartColumnNumber = StartColumnNumber;
this.ScriptAst = ScriptAst;
this.options = options ?? new RenameSymbolOptions { ShouldGenerateAlias = true };
this.options = options ?? new RenameSymbolOptions { CreateAlias = true };

VariableExpressionAst Node = (VariableExpressionAst)GetVariableTopAssignment(StartLineNumber, StartColumnNumber, ScriptAst);
if (Node != null)
Expand Down Expand Up @@ -406,7 +406,7 @@ private void ProcessVariableExpressionAst(VariableExpressionAst variableExpressi
};
// If the variables parent is a parameterAst Add a modification
if (variableExpressionAst.Parent is ParameterAst paramAst && !AliasSet &&
options.ShouldGenerateAlias)
options.CreateAlias)
{
TextChange aliasChange = NewParameterAliasChange(variableExpressionAst, paramAst);
Modifications.Add(aliasChange);
Expand Down

0 comments on commit 386b707

Please sign in to comment.