Skip to content

Commit f901c6a

Browse files
committed
Merge pull request #169 from rkeithhill/rkeithhill/is95-partialfix-hover-tips
Partial fix for issue 95 - set all scopes but Local as expensive.
2 parents 1b4eff0 + 84724a0 commit f901c6a

File tree

1 file changed

+15
-15
lines changed
  • src/PowerShellEditorServices.Protocol/DebugAdapter

1 file changed

+15
-15
lines changed

src/PowerShellEditorServices.Protocol/DebugAdapter/Scope.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,34 @@
33
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
44
//
55

6-
using System;
7-
using System.Collections.Generic;
8-
using System.Linq;
9-
using System.Text;
10-
using System.Threading.Tasks;
11-
126
namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter
137
{
148
public class Scope
159
{
16-
// /** name of the scope (as such 'Arguments', 'Locals') */
17-
// name: string;
10+
/// <summary>
11+
/// Gets or sets the name of the scope (as such 'Arguments', 'Locals')
12+
/// </summary>
1813
public string Name { get; set; }
1914

20-
// /** The variables of this scope can be retrieved by passing the value of variablesReference to the VariablesRequest. */
21-
// variablesReference: number;
15+
/// <summary>
16+
/// Gets or sets the variables of this scope can be retrieved by passing the
17+
/// value of variablesReference to the VariablesRequest.
18+
/// </summary>
2219
public int VariablesReference { get; set; }
2320

24-
// /** If true, the number of variables in this scope is large or expensive to retrieve. */
25-
// expensive: boolean;
21+
/// <summary>
22+
/// Gets or sets a boolean value indicating if number of variables in
23+
/// this scope is large or expensive to retrieve.
24+
/// </summary>
2625
public bool Expensive { get; set; }
2726

2827
public static Scope Create(VariableScope scope)
2928
{
30-
return new Scope
31-
{
29+
return new Scope {
3230
Name = scope.Name,
33-
VariablesReference = scope.Id
31+
VariablesReference = scope.Id,
32+
// Temporary fix for #95 to get debug hover tips to work well at least for the local scope.
33+
Expensive = (scope.Name != VariableContainerDetails.LocalScopeName)
3434
};
3535
}
3636
}

0 commit comments

Comments
 (0)