Skip to content

Added more DebuggerDisplayAttributes to make debugging of the editor … #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System.Diagnostics;
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
Expand Down Expand Up @@ -48,13 +44,15 @@ public enum CompletionItemKind
Reference = 18
}

[DebuggerDisplay("NewText = {NewText}, Range = {Range.Start.Line}:{Range.Start.Character} - {Range.End.Line}:{Range.End.Character}")]
public class TextEdit
{
public Range Range { get; set; }

public string NewText { get; set; }
}

[DebuggerDisplay("Kind = {Kind.ToString()}, Label = {Label}, Detail = {Detail}")]
public class CompletionItem
{
public string Label { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System.Diagnostics;
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;

namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
/// <summary>
/// Defines a base parameter class for identifying a text document.
/// </summary>
[DebuggerDisplay("TextDocumentIdentifier = {Uri}")]
public class TextDocumentIdentifier
{
/// <summary>
Expand All @@ -22,6 +24,7 @@ public class TextDocumentIdentifier
/// <summary>
/// Defines a position in a text document.
/// </summary>
[DebuggerDisplay("TextDocumentPosition = {Position.Line}:{Position.Character}")]
public class TextDocumentPosition : TextDocumentIdentifier
{
/// <summary>
Expand Down Expand Up @@ -85,6 +88,7 @@ public class TextDocumentChangeEvent
public string Text { get; set; }
}

[DebuggerDisplay("Position = {Line}:{Character}")]
public class Position
{
/// <summary>
Expand All @@ -98,6 +102,7 @@ public class Position
public int Character { get; set; }
}

[DebuggerDisplay("Start = {Start.Line}:{Start.Character}, End = {End.Line}:{End.Character}")]
public struct Range
{
/// <summary>
Expand All @@ -111,6 +116,7 @@ public struct Range
public Position End { get; set; }
}

[DebuggerDisplay("Range = {Range.Start.Line}:{Range.Start.Character} - {Range.End.Line}:{Range.End.Character}, Uri = {Uri}")]
public class Location
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System.Diagnostics;
using Newtonsoft.Json.Linq;

namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol
Expand All @@ -21,6 +22,7 @@ public enum MessageType
/// <summary>
/// Provides common details for protocol messages of any format.
/// </summary>
[DebuggerDisplay("MessageType = {MessageType.ToString()}, Method = {Method}, Id = {Id}")]
public class Message
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;

namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol
{
[DebuggerDisplay("RequestType MethodName = {MethodName}")]
public class RequestType<TParams, TResult>
{
public string MethodName { get; private set; }
Expand Down
4 changes: 3 additions & 1 deletion src/PowerShellEditorServices/Language/CompletionResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using Microsoft.PowerShell.EditorServices.Utility;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Management.Automation;
using System.Text.RegularExpressions;
using Microsoft.PowerShell.EditorServices.Utility;

namespace Microsoft.PowerShell.EditorServices
{
Expand Down Expand Up @@ -135,6 +136,7 @@ public enum CompletionType
/// <summary>
/// Provides the details about a single completion result.
/// </summary>
[DebuggerDisplay("CompletionType = {CompletionType.ToString()}, CompletionText = {CompletionText}")]
public sealed class CompletionDetails
{
#region Properties
Expand Down
8 changes: 4 additions & 4 deletions src/PowerShellEditorServices/Language/SymbolDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System.Linq;
using System.Diagnostics;
using System.Management.Automation;
using System.Management.Automation.Runspaces;

namespace Microsoft.PowerShell.EditorServices
{
using System.Management.Automation;
using System.Management.Automation.Runspaces;

/// <summary>
/// Provides detailed information for a given symbol.
/// </summary>
[DebuggerDisplay("SymbolReference = {SymbolReference.SymbolType}/{SymbolReference.SymbolName}, DisplayString = {DisplayString}")]
public class SymbolDetails
{
#region Properties
Expand Down
2 changes: 2 additions & 0 deletions src/PowerShellEditorServices/Language/SymbolReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System.Diagnostics;
using System.Management.Automation.Language;

namespace Microsoft.PowerShell.EditorServices
{
/// <summary>
/// A class that holds the type, name, script extent, and source line of a symbol
/// </summary>
[DebuggerDisplay("SymbolType = {SymbolType}, SymbolName = {SymbolName}")]
public class SymbolReference
{
#region Properties
Expand Down