Compare commits
10 Commits
c7118e4b8c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dca95db153 | ||
|
|
22da346e16 | ||
|
|
fb203e4b4d | ||
|
|
a5d4216472 | ||
|
|
a0429295c5 | ||
|
|
c5752bd226 | ||
|
|
d90c3045c7 | ||
|
|
934c75ece9 | ||
|
|
826fc851c3 | ||
|
|
ac9462586d |
2
.github/workflows/create-release.yml
vendored
2
.github/workflows/create-release.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v5
|
||||||
- uses: chickensoft-games/setup-godot@v2
|
- uses: chickensoft-games/setup-godot@v2
|
||||||
with:
|
with:
|
||||||
version: 4.5.1
|
version: 4.6.0
|
||||||
use-dotnet: true
|
use-dotnet: true
|
||||||
include-templates: true
|
include-templates: true
|
||||||
- name: Determine If Release Necessary
|
- name: Determine If Release Necessary
|
||||||
|
|||||||
@@ -603,12 +603,14 @@ public partial class RoslynAnalysis(ILogger<RoslynAnalysis> logger, BuildService
|
|||||||
// This may not be the best way to do this, but it seems to work okay. It may only be a problem because I continue to update the doc in the workspace as the user continues typing, filtering the completion
|
// This may not be the best way to do this, but it seems to work okay. It may only be a problem because I continue to update the doc in the workspace as the user continues typing, filtering the completion
|
||||||
// I could possibly pause updating the document while the completion list is open, but that seems more complex - handling accepted vs cancelled completions etc
|
// I could possibly pause updating the document while the completion list is open, but that seems more complex - handling accepted vs cancelled completions etc
|
||||||
public record IdeCompletionListResult(Document Document, CompletionList CompletionList, LinePosition LinePosition);
|
public record IdeCompletionListResult(Document Document, CompletionList CompletionList, LinePosition LinePosition);
|
||||||
public async Task<IdeCompletionListResult> GetCodeCompletionsForDocumentAtPosition(SharpIdeFile fileModel, LinePosition linePosition, CompletionTrigger completionTrigger)
|
public async Task<IdeCompletionListResult> GetCodeCompletionsForDocumentAtPosition(SharpIdeFile fileModel, string documentText, LinePosition linePosition, CompletionTrigger completionTrigger)
|
||||||
{
|
{
|
||||||
using var _ = SharpIdeOtel.Source.StartActivity($"{nameof(RoslynAnalysis)}.{nameof(GetCodeCompletionsForDocumentAtPosition)}");
|
using var _ = SharpIdeOtel.Source.StartActivity($"{nameof(RoslynAnalysis)}.{nameof(GetCodeCompletionsForDocumentAtPosition)}");
|
||||||
await _solutionLoadedTcs.Task;
|
await _solutionLoadedTcs.Task;
|
||||||
var document = await GetDocumentForSharpIdeFile(fileModel);
|
var document = await GetDocumentForSharpIdeFile(fileModel);
|
||||||
Guard.Against.Null(document, nameof(document));
|
Guard.Against.Null(document, nameof(document));
|
||||||
|
// The document in the workspace may have been further updated since the completion request was made, so we need to fork a document with the text at the time of the completion request
|
||||||
|
document = document.WithText(SourceText.From(documentText, Encoding.UTF8));
|
||||||
var (completions, triggerLinePosition) = await GetCompletionsAsync(document, linePosition, completionTrigger).ConfigureAwait(false);
|
var (completions, triggerLinePosition) = await GetCompletionsAsync(document, linePosition, completionTrigger).ConfigureAwait(false);
|
||||||
return new IdeCompletionListResult(document, completions, triggerLinePosition);
|
return new IdeCompletionListResult(document, completions, triggerLinePosition);
|
||||||
}
|
}
|
||||||
@@ -738,7 +740,6 @@ public partial class RoslynAnalysis(ILogger<RoslynAnalysis> logger, BuildService
|
|||||||
return (completions, triggerLinePosition);
|
return (completions, triggerLinePosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Currently unused
|
|
||||||
public async Task<bool> ShouldTriggerCompletionAsync(SharpIdeFile file, string documentText, LinePosition linePosition, CompletionTrigger completionTrigger, CancellationToken cancellationToken = default)
|
public async Task<bool> ShouldTriggerCompletionAsync(SharpIdeFile file, string documentText, LinePosition linePosition, CompletionTrigger completionTrigger, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
await _solutionLoadedTcs.Task;
|
await _solutionLoadedTcs.Task;
|
||||||
@@ -746,7 +747,6 @@ public partial class RoslynAnalysis(ILogger<RoslynAnalysis> logger, BuildService
|
|||||||
var completionService = CompletionService.GetService(document);
|
var completionService = CompletionService.GetService(document);
|
||||||
if (completionService is null) throw new InvalidOperationException("Completion service is not available for the document.");
|
if (completionService is null) throw new InvalidOperationException("Completion service is not available for the document.");
|
||||||
|
|
||||||
//var sourceText = await document.GetTextAsync(cancellationToken);
|
|
||||||
var sourceText = SourceText.From(documentText, Encoding.UTF8);
|
var sourceText = SourceText.From(documentText, Encoding.UTF8);
|
||||||
var position = sourceText.Lines.GetPosition(linePosition);
|
var position = sourceText.Lines.GetPosition(linePosition);
|
||||||
var shouldTrigger = completionService.ShouldTriggerCompletion(document.Project, document.Project.Services, sourceText, position, completionTrigger, CompletionOptions.Default, document.Project.Solution.Options ?? OptionSet.Empty);
|
var shouldTrigger = completionService.ShouldTriggerCompletion(document.Project, document.Project.Services, sourceText, position, completionTrigger, CompletionOptions.Default, document.Project.Solution.Options ?? OptionSet.Empty);
|
||||||
|
|||||||
@@ -27,3 +27,12 @@ public class EventWrapper<TArg1, TArg2, TReturn>(Func<TArg1, TArg2, TReturn> @ev
|
|||||||
await InvokeDelegatesAsync(Event.GetInvocationList(), del => ((Func<TArg1, TArg2, TReturn>)del)(arg, arg2));
|
await InvokeDelegatesAsync(Event.GetInvocationList(), del => ((Func<TArg1, TArg2, TReturn>)del)(arg, arg2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class EventWrapper<TArg1, TArg2, TArg3, TReturn>(Func<TArg1, TArg2, TArg3, TReturn> @event) : EventWrapperBase<Func<TArg1, TArg2, TArg3, TReturn>>(@event) where TReturn : Task
|
||||||
|
{
|
||||||
|
public void InvokeParallelFireAndForget(TArg1 arg1, TArg2 arg2, TArg3 arg3) => FireAndForget(() => InvokeParallelAsync(arg1, arg2, arg3));
|
||||||
|
public async Task InvokeParallelAsync(TArg1 arg, TArg2 arg2, TArg3 arg3)
|
||||||
|
{
|
||||||
|
await InvokeDelegatesAsync(Event.GetInvocationList(), del => ((Func<TArg1, TArg2, TArg3, TReturn>)del)(arg, arg2, arg3));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -303,45 +303,3 @@ public partial class CustomHighlighter : SyntaxHighlighter
|
|||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class CachedColors
|
|
||||||
{
|
|
||||||
public static readonly Color Orange = new("f27718");
|
|
||||||
public static readonly Color White = new("dcdcdc");
|
|
||||||
public static readonly Color Yellow = new("dcdcaa");
|
|
||||||
public static readonly Color CommentGreen = new("57a64a");
|
|
||||||
public static readonly Color KeywordBlue = new("569cd6");
|
|
||||||
public static readonly Color LightOrangeBrown = new("d69d85");
|
|
||||||
public static readonly Color NumberGreen = new("b5cea8");
|
|
||||||
public static readonly Color InterfaceGreen = new("b8d7a3");
|
|
||||||
public static readonly Color ClassGreen = new("4ec9b0");
|
|
||||||
public static readonly Color VariableBlue = new("9cdcfe");
|
|
||||||
public static readonly Color Gray = new("a9a9a9");
|
|
||||||
public static readonly Color Pink = new("c586c0");
|
|
||||||
public static readonly Color ErrorRed = new("da5b5a");
|
|
||||||
|
|
||||||
public static readonly Color RazorComponentGreen = new("0b7f7f");
|
|
||||||
public static readonly Color RazorMetaCodePurple = new("a699e6");
|
|
||||||
public static readonly Color HtmlDelimiterGray = new("808080");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class CachedColorsLight
|
|
||||||
{
|
|
||||||
public static readonly Color Orange = new("b776fb"); //
|
|
||||||
public static readonly Color White = new("000000"); //
|
|
||||||
public static readonly Color Yellow = new("74531f"); //
|
|
||||||
public static readonly Color CommentGreen = new("008000"); //
|
|
||||||
public static readonly Color KeywordBlue = new("0000ff"); //
|
|
||||||
public static readonly Color LightOrangeBrown = new("a31515"); //
|
|
||||||
public static readonly Color NumberGreen = new("000000"); //
|
|
||||||
public static readonly Color InterfaceGreen = new("2b91af"); //
|
|
||||||
public static readonly Color ClassGreen = new("2b91af"); //
|
|
||||||
public static readonly Color VariableBlue = new("1f377f"); //
|
|
||||||
public static readonly Color Gray = new("a9a9a9"); //
|
|
||||||
public static readonly Color Pink = new("c586c0"); //
|
|
||||||
public static readonly Color ErrorRed = new("da5b5a"); //
|
|
||||||
|
|
||||||
public static readonly Color RazorComponentGreen = new("0b7f7f");
|
|
||||||
public static readonly Color RazorMetaCodePurple = new("826ee6");
|
|
||||||
public static readonly Color HtmlDelimiterGray = new("808080");
|
|
||||||
}
|
|
||||||
@@ -6,44 +6,44 @@ public static class EditorThemeColours
|
|||||||
{
|
{
|
||||||
public static readonly EditorThemeColorSet Light = new EditorThemeColorSet
|
public static readonly EditorThemeColorSet Light = new EditorThemeColorSet
|
||||||
{
|
{
|
||||||
Orange = CachedColorsLight.Orange,
|
Orange = TextEditorDotnetColoursLight.Orange,
|
||||||
White = CachedColorsLight.White,
|
White = TextEditorDotnetColoursLight.White,
|
||||||
Yellow = CachedColorsLight.Yellow,
|
Yellow = TextEditorDotnetColoursLight.Yellow,
|
||||||
CommentGreen = CachedColorsLight.CommentGreen,
|
CommentGreen = TextEditorDotnetColoursLight.CommentGreen,
|
||||||
KeywordBlue = CachedColorsLight.KeywordBlue,
|
KeywordBlue = TextEditorDotnetColoursLight.KeywordBlue,
|
||||||
LightOrangeBrown = CachedColorsLight.LightOrangeBrown,
|
LightOrangeBrown = TextEditorDotnetColoursLight.LightOrangeBrown,
|
||||||
NumberGreen = CachedColorsLight.NumberGreen,
|
NumberGreen = TextEditorDotnetColoursLight.NumberGreen,
|
||||||
InterfaceGreen = CachedColorsLight.InterfaceGreen,
|
InterfaceGreen = TextEditorDotnetColoursLight.InterfaceGreen,
|
||||||
ClassGreen = CachedColorsLight.ClassGreen,
|
ClassGreen = TextEditorDotnetColoursLight.ClassGreen,
|
||||||
VariableBlue = CachedColorsLight.VariableBlue,
|
VariableBlue = TextEditorDotnetColoursLight.VariableBlue,
|
||||||
Gray = CachedColorsLight.Gray,
|
Gray = TextEditorDotnetColoursLight.Gray,
|
||||||
Pink = CachedColorsLight.Pink,
|
Pink = TextEditorDotnetColoursLight.Pink,
|
||||||
ErrorRed = CachedColorsLight.ErrorRed,
|
ErrorRed = TextEditorDotnetColoursLight.ErrorRed,
|
||||||
|
|
||||||
RazorComponentGreen = CachedColorsLight.RazorComponentGreen,
|
RazorComponentGreen = TextEditorDotnetColoursLight.RazorComponentGreen,
|
||||||
RazorMetaCodePurple = CachedColorsLight.RazorMetaCodePurple,
|
RazorMetaCodePurple = TextEditorDotnetColoursLight.RazorMetaCodePurple,
|
||||||
HtmlDelimiterGray = CachedColorsLight.HtmlDelimiterGray
|
HtmlDelimiterGray = TextEditorDotnetColoursLight.HtmlDelimiterGray
|
||||||
};
|
};
|
||||||
|
|
||||||
public static readonly EditorThemeColorSet Dark = new EditorThemeColorSet
|
public static readonly EditorThemeColorSet Dark = new EditorThemeColorSet
|
||||||
{
|
{
|
||||||
Orange = CachedColors.Orange,
|
Orange = TextEditorDotnetColoursDark.Orange,
|
||||||
White = CachedColors.White,
|
White = TextEditorDotnetColoursDark.White,
|
||||||
Yellow = CachedColors.Yellow,
|
Yellow = TextEditorDotnetColoursDark.Yellow,
|
||||||
CommentGreen = CachedColors.CommentGreen,
|
CommentGreen = TextEditorDotnetColoursDark.CommentGreen,
|
||||||
KeywordBlue = CachedColors.KeywordBlue,
|
KeywordBlue = TextEditorDotnetColoursDark.KeywordBlue,
|
||||||
LightOrangeBrown = CachedColors.LightOrangeBrown,
|
LightOrangeBrown = TextEditorDotnetColoursDark.LightOrangeBrown,
|
||||||
NumberGreen = CachedColors.NumberGreen,
|
NumberGreen = TextEditorDotnetColoursDark.NumberGreen,
|
||||||
InterfaceGreen = CachedColors.InterfaceGreen,
|
InterfaceGreen = TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
ClassGreen = CachedColors.ClassGreen,
|
ClassGreen = TextEditorDotnetColoursDark.ClassGreen,
|
||||||
VariableBlue = CachedColors.VariableBlue,
|
VariableBlue = TextEditorDotnetColoursDark.VariableBlue,
|
||||||
Gray = CachedColors.Gray,
|
Gray = TextEditorDotnetColoursDark.Gray,
|
||||||
Pink = CachedColors.Pink,
|
Pink = TextEditorDotnetColoursDark.Pink,
|
||||||
ErrorRed = CachedColors.ErrorRed,
|
ErrorRed = TextEditorDotnetColoursDark.ErrorRed,
|
||||||
|
|
||||||
RazorComponentGreen = CachedColors.RazorComponentGreen,
|
RazorComponentGreen = TextEditorDotnetColoursDark.RazorComponentGreen,
|
||||||
RazorMetaCodePurple = CachedColors.RazorMetaCodePurple,
|
RazorMetaCodePurple = TextEditorDotnetColoursDark.RazorMetaCodePurple,
|
||||||
HtmlDelimiterGray = CachedColors.HtmlDelimiterGray
|
HtmlDelimiterGray = TextEditorDotnetColoursDark.HtmlDelimiterGray
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,4 +66,46 @@ public class EditorThemeColorSet
|
|||||||
public required Color RazorComponentGreen;
|
public required Color RazorComponentGreen;
|
||||||
public required Color RazorMetaCodePurple;
|
public required Color RazorMetaCodePurple;
|
||||||
public required Color HtmlDelimiterGray;
|
public required Color HtmlDelimiterGray;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class TextEditorDotnetColoursDark
|
||||||
|
{
|
||||||
|
public static readonly Color Orange = new("f27718");
|
||||||
|
public static readonly Color White = new("dcdcdc");
|
||||||
|
public static readonly Color Yellow = new("dcdcaa");
|
||||||
|
public static readonly Color CommentGreen = new("57a64a");
|
||||||
|
public static readonly Color KeywordBlue = new("569cd6");
|
||||||
|
public static readonly Color LightOrangeBrown = new("d69d85");
|
||||||
|
public static readonly Color NumberGreen = new("b5cea8");
|
||||||
|
public static readonly Color InterfaceGreen = new("b8d7a3");
|
||||||
|
public static readonly Color ClassGreen = new("4ec9b0");
|
||||||
|
public static readonly Color VariableBlue = new("9cdcfe");
|
||||||
|
public static readonly Color Gray = new("a9a9a9");
|
||||||
|
public static readonly Color Pink = new("c586c0");
|
||||||
|
public static readonly Color ErrorRed = new("da5b5a");
|
||||||
|
|
||||||
|
public static readonly Color RazorComponentGreen = new("0b7f7f");
|
||||||
|
public static readonly Color RazorMetaCodePurple = new("a699e6");
|
||||||
|
public static readonly Color HtmlDelimiterGray = new("808080");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class TextEditorDotnetColoursLight
|
||||||
|
{
|
||||||
|
public static readonly Color Orange = new("b776fb"); //
|
||||||
|
public static readonly Color White = new("000000"); //
|
||||||
|
public static readonly Color Yellow = new("74531f"); //
|
||||||
|
public static readonly Color CommentGreen = new("008000"); //
|
||||||
|
public static readonly Color KeywordBlue = new("0000ff"); //
|
||||||
|
public static readonly Color LightOrangeBrown = new("a31515"); //
|
||||||
|
public static readonly Color NumberGreen = new("000000"); //
|
||||||
|
public static readonly Color InterfaceGreen = new("2b91af"); //
|
||||||
|
public static readonly Color ClassGreen = new("2b91af"); //
|
||||||
|
public static readonly Color VariableBlue = new("1f377f"); //
|
||||||
|
public static readonly Color Gray = new("a9a9a9"); //
|
||||||
|
public static readonly Color Pink = new("c586c0"); //
|
||||||
|
public static readonly Color ErrorRed = new("da5b5a"); //
|
||||||
|
|
||||||
|
public static readonly Color RazorComponentGreen = new("0b7f7f");
|
||||||
|
public static readonly Color RazorMetaCodePurple = new("826ee6");
|
||||||
|
public static readonly Color HtmlDelimiterGray = new("808080");
|
||||||
}
|
}
|
||||||
@@ -216,28 +216,30 @@ public partial class SharpIdeCodeEdit : CodeEdit
|
|||||||
|
|
||||||
private void OnTextChanged()
|
private void OnTextChanged()
|
||||||
{
|
{
|
||||||
|
var text = Text;
|
||||||
|
var pendingCompletionTrigger = _pendingCompletionTrigger;
|
||||||
|
_pendingCompletionTrigger = null;
|
||||||
|
var cursorPosition = GetCaretPosition();
|
||||||
_ = Task.GodotRun(async () =>
|
_ = Task.GodotRun(async () =>
|
||||||
{
|
{
|
||||||
var __ = SharpIdeOtel.Source.StartActivity($"{nameof(SharpIdeCodeEdit)}.{nameof(OnTextChanged)}");
|
var __ = SharpIdeOtel.Source.StartActivity($"{nameof(SharpIdeCodeEdit)}.{nameof(OnTextChanged)}");
|
||||||
_currentFile.IsDirty.Value = true;
|
_currentFile.IsDirty.Value = true;
|
||||||
await _fileChangedService.SharpIdeFileChanged(_currentFile, Text, FileChangeType.IdeUnsavedChange);
|
await _fileChangedService.SharpIdeFileChanged(_currentFile, text, FileChangeType.IdeUnsavedChange);
|
||||||
if (pendingCompletionTrigger is not null)
|
if (pendingCompletionTrigger is not null)
|
||||||
{
|
{
|
||||||
var cursorPosition = GetCaretPosition();
|
_completionTrigger = pendingCompletionTrigger;
|
||||||
var linePosition = new LinePosition(cursorPosition.line, cursorPosition.col);
|
var linePosition = new LinePosition(cursorPosition.line, cursorPosition.col);
|
||||||
completionTrigger = pendingCompletionTrigger;
|
var shouldTriggerCompletion = await _roslynAnalysis.ShouldTriggerCompletionAsync(_currentFile, text, linePosition, _completionTrigger!.Value);
|
||||||
pendingCompletionTrigger = null;
|
GD.Print($"Code completion trigger typed: '{_completionTrigger.Value.Character}' at {linePosition.Line}:{linePosition.Character} should trigger: {shouldTriggerCompletion}");
|
||||||
var shouldTriggerCompletion = await _roslynAnalysis.ShouldTriggerCompletionAsync(_currentFile, Text, linePosition, completionTrigger!.Value);
|
|
||||||
GD.Print($"Code completion trigger typed: '{completionTrigger.Value.Character}' at {linePosition.Line}:{linePosition.Character} should trigger: {shouldTriggerCompletion}");
|
|
||||||
if (shouldTriggerCompletion)
|
if (shouldTriggerCompletion)
|
||||||
{
|
{
|
||||||
await OnCodeCompletionRequested(completionTrigger.Value);
|
await OnCodeCompletionRequested(_completionTrigger.Value, text, cursorPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (pendingCompletionFilterReason is not null)
|
else if (_pendingCompletionFilterReason is not null)
|
||||||
{
|
{
|
||||||
var filterReason = pendingCompletionFilterReason.Value;
|
var filterReason = _pendingCompletionFilterReason.Value;
|
||||||
pendingCompletionFilterReason = null;
|
_pendingCompletionFilterReason = null;
|
||||||
await CustomFilterCodeCompletionCandidates(filterReason);
|
await CustomFilterCodeCompletionCandidates(filterReason);
|
||||||
}
|
}
|
||||||
__?.Dispose();
|
__?.Dispose();
|
||||||
|
|||||||
@@ -67,12 +67,12 @@ public partial class SharpIdeCodeEdit
|
|||||||
return texture;
|
return texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
private EventWrapper<CompletionTrigger, Task> CustomCodeCompletionRequested { get; } = new(_ => Task.CompletedTask);
|
private EventWrapper<CompletionTrigger, string, (int,int), Task> CustomCodeCompletionRequested { get; } = new((_, _, _) => Task.CompletedTask);
|
||||||
private CompletionList? completionList;
|
private CompletionList? _completionList;
|
||||||
private Document? completionResultDocument;
|
private Document? _completionResultDocument;
|
||||||
private CompletionTrigger? completionTrigger;
|
private CompletionTrigger? _completionTrigger;
|
||||||
private CompletionTrigger? pendingCompletionTrigger;
|
private CompletionTrigger? _pendingCompletionTrigger;
|
||||||
private CompletionFilterReason? pendingCompletionFilterReason;
|
private CompletionFilterReason? _pendingCompletionFilterReason;
|
||||||
|
|
||||||
private readonly List<string> _codeCompletionTriggers =
|
private readonly List<string> _codeCompletionTriggers =
|
||||||
[
|
[
|
||||||
@@ -83,9 +83,9 @@ public partial class SharpIdeCodeEdit
|
|||||||
private void ResetCompletionPopupState()
|
private void ResetCompletionPopupState()
|
||||||
{
|
{
|
||||||
_codeCompletionOptions = ImmutableArray<SharpIdeCompletionItem>.Empty;
|
_codeCompletionOptions = ImmutableArray<SharpIdeCompletionItem>.Empty;
|
||||||
completionList = null;
|
_completionList = null;
|
||||||
completionResultDocument = null;
|
_completionResultDocument = null;
|
||||||
completionTrigger = null;
|
_completionTrigger = null;
|
||||||
_completionTriggerPosition = null;
|
_completionTriggerPosition = null;
|
||||||
_codeCompletionCurrentSelected = 0;
|
_codeCompletionCurrentSelected = 0;
|
||||||
_codeCompletionForceItemCenter = -1;
|
_codeCompletionForceItemCenter = -1;
|
||||||
@@ -93,47 +93,44 @@ public partial class SharpIdeCodeEdit
|
|||||||
|
|
||||||
private async Task CustomFilterCodeCompletionCandidates(CompletionFilterReason filterReason)
|
private async Task CustomFilterCodeCompletionCandidates(CompletionFilterReason filterReason)
|
||||||
{
|
{
|
||||||
if (completionList is null || completionList.ItemsList.Count is 0) return;
|
if (_completionList is null || _completionList.ItemsList.Count is 0) return;
|
||||||
var cursorPosition = GetCaretPosition();
|
var cursorPosition = await this.InvokeAsync(() => GetCaretPosition());
|
||||||
var linePosition = new LinePosition(cursorPosition.line, cursorPosition.col);
|
var linePosition = new LinePosition(cursorPosition.line, cursorPosition.col);
|
||||||
var filteredCompletions = RoslynAnalysis.FilterCompletions(_currentFile, Text, linePosition, completionList, completionTrigger!.Value, filterReason);
|
var filteredCompletions = RoslynAnalysis.FilterCompletions(_currentFile, Text, linePosition, _completionList, _completionTrigger!.Value, filterReason);
|
||||||
_codeCompletionOptions = filteredCompletions;
|
_codeCompletionOptions = filteredCompletions;
|
||||||
await this.InvokeAsync(QueueRedraw);
|
await this.InvokeAsync(QueueRedraw);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task OnCodeCompletionRequested(CompletionTrigger completionTrigger)
|
private async Task OnCodeCompletionRequested(CompletionTrigger completionTrigger, string documentTextAtTimeOfCompletionRequest, (int, int) completionCaretPosition)
|
||||||
{
|
{
|
||||||
var (caretLine, caretColumn) = GetCaretPosition();
|
var (caretLine, caretColumn) = completionCaretPosition;
|
||||||
|
|
||||||
GD.Print($"Code completion requested at line {caretLine}, column {caretColumn}");
|
GD.Print($"Code completion requested at line {caretLine}, column {caretColumn}");
|
||||||
_ = Task.GodotRun(async () =>
|
var linePos = new LinePosition(caretLine, caretColumn);
|
||||||
{
|
|
||||||
var linePos = new LinePosition(caretLine, caretColumn);
|
|
||||||
|
|
||||||
var completionsResult = await _roslynAnalysis.GetCodeCompletionsForDocumentAtPosition(_currentFile, linePos, completionTrigger);
|
var completionsResult = await _roslynAnalysis.GetCodeCompletionsForDocumentAtPosition(_currentFile, documentTextAtTimeOfCompletionRequest, linePos, completionTrigger);
|
||||||
|
|
||||||
// We can't draw until we get this position
|
// We can't draw until we get this position
|
||||||
_completionTriggerPosition = await this.InvokeAsync(() => GetPosAtLineColumn(completionsResult.LinePosition.Line, completionsResult.LinePosition.Character));
|
_completionTriggerPosition = await this.InvokeAsync(() => GetPosAtLineColumn(completionsResult.LinePosition.Line, completionsResult.LinePosition.Character));
|
||||||
|
|
||||||
completionList = completionsResult.CompletionList;
|
_completionList = completionsResult.CompletionList;
|
||||||
completionResultDocument = completionsResult.Document;
|
_completionResultDocument = completionsResult.Document;
|
||||||
var filterReason = completionTrigger.Kind switch
|
var filterReason = completionTrigger.Kind switch
|
||||||
{
|
{
|
||||||
CompletionTriggerKind.Insertion => CompletionFilterReason.Insertion,
|
CompletionTriggerKind.Insertion => CompletionFilterReason.Insertion,
|
||||||
CompletionTriggerKind.Deletion => CompletionFilterReason.Deletion,
|
CompletionTriggerKind.Deletion => CompletionFilterReason.Deletion,
|
||||||
CompletionTriggerKind.InvokeAndCommitIfUnique => CompletionFilterReason.Other,
|
CompletionTriggerKind.InvokeAndCommitIfUnique => CompletionFilterReason.Other,
|
||||||
_ => throw new ArgumentOutOfRangeException(nameof(completionTrigger.Kind), completionTrigger.Kind, null),
|
_ => throw new ArgumentOutOfRangeException(nameof(completionTrigger.Kind), completionTrigger.Kind, null),
|
||||||
};
|
};
|
||||||
await CustomFilterCodeCompletionCandidates(filterReason);
|
await CustomFilterCodeCompletionCandidates(filterReason);
|
||||||
GD.Print($"Found {completionsResult.CompletionList.ItemsList.Count} completions, displaying menu");
|
GD.Print($"Found {completionsResult.CompletionList.ItemsList.Count} completions, displaying menu");
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ApplySelectedCodeCompletion()
|
public void ApplySelectedCodeCompletion()
|
||||||
{
|
{
|
||||||
var selectedIndex = _codeCompletionCurrentSelected;
|
var selectedIndex = _codeCompletionCurrentSelected;
|
||||||
var completionItem = _codeCompletionOptions[selectedIndex];
|
var completionItem = _codeCompletionOptions[selectedIndex];
|
||||||
var document = completionResultDocument;
|
var document = _completionResultDocument;
|
||||||
_ = Task.GodotRun(async () =>
|
_ = Task.GodotRun(async () =>
|
||||||
{
|
{
|
||||||
Guard.Against.Null(document);
|
Guard.Against.Null(document);
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ public partial class SharpIdeCodeEdit
|
|||||||
{
|
{
|
||||||
if (@event.IsActionPressed(InputStringNames.CodeEditorRequestCompletions))
|
if (@event.IsActionPressed(InputStringNames.CodeEditorRequestCompletions))
|
||||||
{
|
{
|
||||||
completionTrigger = new CompletionTrigger(CompletionTriggerKind.InvokeAndCommitIfUnique);
|
_completionTrigger = new CompletionTrigger(CompletionTriggerKind.InvokeAndCommitIfUnique);
|
||||||
CustomCodeCompletionRequested.InvokeParallelFireAndForget(completionTrigger!.Value);
|
CustomCodeCompletionRequested.InvokeParallelFireAndForget(_completionTrigger!.Value, Text, GetCaretPosition());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,7 @@ public partial class SharpIdeCodeEdit
|
|||||||
}
|
}
|
||||||
else if (@event.IsActionPressed(InputStringNames.Backspace))
|
else if (@event.IsActionPressed(InputStringNames.Backspace))
|
||||||
{
|
{
|
||||||
pendingCompletionFilterReason = CompletionFilterReason.Deletion;
|
_pendingCompletionFilterReason = CompletionFilterReason.Deletion;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,13 +104,13 @@ public partial class SharpIdeCodeEdit
|
|||||||
var unicodeString = char.ConvertFromUtf32((int)keyEvent.Unicode);
|
var unicodeString = char.ConvertFromUtf32((int)keyEvent.Unicode);
|
||||||
if (isCodeCompletionPopupOpen && keyEvent.Unicode >= 32)
|
if (isCodeCompletionPopupOpen && keyEvent.Unicode >= 32)
|
||||||
{
|
{
|
||||||
pendingCompletionFilterReason = CompletionFilterReason.Insertion;
|
_pendingCompletionFilterReason = CompletionFilterReason.Insertion;
|
||||||
return false; // Let the text update happen
|
return false; // Let the text update happen
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCodeCompletionPopupOpen is false && _codeCompletionTriggers.Contains(unicodeString, StringComparer.OrdinalIgnoreCase))
|
if (isCodeCompletionPopupOpen is false && _codeCompletionTriggers.Contains(unicodeString, StringComparer.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
pendingCompletionTrigger = CompletionTrigger.CreateInsertionTrigger(unicodeString[0]);
|
_pendingCompletionTrigger = CompletionTrigger.CreateInsertionTrigger(unicodeString[0]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetUnknownTooltip(ISymbol symbol)
|
public static RichTextLabel GetUnknownTooltip(ISymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddText($"UNHANDLED SYMBOL TYPE: {symbol.GetType().Name} - please create an issue!");
|
label.AddText($"UNHANDLED SYMBOL TYPE: {symbol.GetType().Name} - please create an issue!");
|
||||||
label.Newline();
|
label.Newline();
|
||||||
@@ -44,7 +44,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static void AddAccessibilityModifier(this RichTextLabel label, ISymbol methodSymbol)
|
private static void AddAccessibilityModifier(this RichTextLabel label, ISymbol methodSymbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText(methodSymbol.DeclaredAccessibility.GetAccessibilityString());
|
label.AddText(methodSymbol.DeclaredAccessibility.GetAccessibilityString());
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,7 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (symbol.IsSealed)
|
if (symbol.IsSealed)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("sealed");
|
label.AddText("sealed");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -64,7 +64,7 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (methodSymbol.IsOverride)
|
if (methodSymbol.IsOverride)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("override");
|
label.AddText("override");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -76,7 +76,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (symbol is INamedTypeSymbol { TypeKind: TypeKind.Interface }) return;
|
if (symbol is INamedTypeSymbol { TypeKind: TypeKind.Interface }) return;
|
||||||
if (symbol.IsAbstract)
|
if (symbol.IsAbstract)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("abstract");
|
label.AddText("abstract");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -87,7 +87,7 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (methodSymbol.IsVirtual)
|
if (methodSymbol.IsVirtual)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("virtual");
|
label.AddText("virtual");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -141,7 +141,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
foreach (var (index, ns) in namespaces.Index())
|
foreach (var (index, ns) in namespaces.Index())
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText(ns);
|
label.AddText(ns);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
if (index < namespaces.Length - 1) label.AddText(".");
|
if (index < namespaces.Length - 1) label.AddText(".");
|
||||||
@@ -151,7 +151,7 @@ public static partial class SymbolInfoComponents
|
|||||||
private static void AddAttribute(this RichTextLabel label, AttributeData attribute, bool newLines)
|
private static void AddAttribute(this RichTextLabel label, AttributeData attribute, bool newLines)
|
||||||
{
|
{
|
||||||
label.AddText("[");
|
label.AddText("[");
|
||||||
label.PushColor(CachedColors.ClassGreen);
|
label.PushColor(TextEditorDotnetColoursDark.ClassGreen);
|
||||||
var displayString = attribute.AttributeClass?.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat);
|
var displayString = attribute.AttributeClass?.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat);
|
||||||
if (displayString?.EndsWith("Attribute") is true) displayString = displayString[..^9]; // remove last 9 chars
|
if (displayString?.EndsWith("Attribute") is true) displayString = displayString[..^9]; // remove last 9 chars
|
||||||
label.AddText(displayString ?? "unknown");
|
label.AddText(displayString ?? "unknown");
|
||||||
@@ -167,13 +167,13 @@ public static partial class SymbolInfoComponents
|
|||||||
var typeChar = metadataName[0];
|
var typeChar = metadataName[0];
|
||||||
var typeColour = typeChar switch
|
var typeColour = typeChar switch
|
||||||
{
|
{
|
||||||
'N' => CachedColors.KeywordBlue,
|
'N' => TextEditorDotnetColoursDark.KeywordBlue,
|
||||||
'T' => CachedColors.ClassGreen,
|
'T' => TextEditorDotnetColoursDark.ClassGreen,
|
||||||
'F' => CachedColors.White,
|
'F' => TextEditorDotnetColoursDark.White,
|
||||||
'P' => CachedColors.White,
|
'P' => TextEditorDotnetColoursDark.White,
|
||||||
'M' => CachedColors.Yellow,
|
'M' => TextEditorDotnetColoursDark.Yellow,
|
||||||
'E' => CachedColors.White,
|
'E' => TextEditorDotnetColoursDark.White,
|
||||||
_ => CachedColors.Orange
|
_ => TextEditorDotnetColoursDark.Orange
|
||||||
};
|
};
|
||||||
var minimalTypeName = (typeChar, metadataName) switch
|
var minimalTypeName = (typeChar, metadataName) switch
|
||||||
{
|
{
|
||||||
@@ -222,7 +222,7 @@ public static partial class SymbolInfoComponents
|
|||||||
var name = reader.GetAttribute(DocumentationCommentXmlNames.NameAttributeName);
|
var name = reader.GetAttribute(DocumentationCommentXmlNames.NameAttributeName);
|
||||||
if (name is not null)
|
if (name is not null)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.ClassGreen);
|
label.PushColor(TextEditorDotnetColoursDark.ClassGreen);
|
||||||
label.AddText(name);
|
label.AddText(name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -232,7 +232,7 @@ public static partial class SymbolInfoComponents
|
|||||||
var name = reader.GetAttribute(DocumentationCommentXmlNames.NameAttributeName);
|
var name = reader.GetAttribute(DocumentationCommentXmlNames.NameAttributeName);
|
||||||
if (name is not null)
|
if (name is not null)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.VariableBlue);
|
label.PushColor(TextEditorDotnetColoursDark.VariableBlue);
|
||||||
label.AddText(name);
|
label.AddText(name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -242,7 +242,7 @@ public static partial class SymbolInfoComponents
|
|||||||
var nameOrCref = reader.GetAttribute(DocumentationCommentXmlNames.CrefAttributeName) ?? reader.GetAttribute(DocumentationCommentXmlNames.NameAttributeName);
|
var nameOrCref = reader.GetAttribute(DocumentationCommentXmlNames.CrefAttributeName) ?? reader.GetAttribute(DocumentationCommentXmlNames.NameAttributeName);
|
||||||
if (nameOrCref is not null)
|
if (nameOrCref is not null)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText(nameOrCref);
|
label.AddText(nameOrCref);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -270,7 +270,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (docComment.ParameterNames.Length is not 0)
|
if (docComment.ParameterNames.Length is not 0)
|
||||||
{
|
{
|
||||||
label.PushCell();
|
label.PushCell();
|
||||||
label.PushColor(CachedColors.Gray);
|
label.PushColor(TextEditorDotnetColoursDark.Gray);
|
||||||
label.AddText("Params: ");
|
label.AddText("Params: ");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.Pop();
|
label.Pop();
|
||||||
@@ -279,7 +279,7 @@ public static partial class SymbolInfoComponents
|
|||||||
var parameterText = docComment.GetParameterText(parameterName);
|
var parameterText = docComment.GetParameterText(parameterName);
|
||||||
if (parameterText is null) continue;
|
if (parameterText is null) continue;
|
||||||
label.PushCell();
|
label.PushCell();
|
||||||
label.PushColor(CachedColors.VariableBlue);
|
label.PushColor(TextEditorDotnetColoursDark.VariableBlue);
|
||||||
label.AddText(parameterName);
|
label.AddText(parameterName);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" - ");
|
label.AddText(" - ");
|
||||||
@@ -296,7 +296,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (docComment.TypeParameterNames.Length is not 0)
|
if (docComment.TypeParameterNames.Length is not 0)
|
||||||
{
|
{
|
||||||
label.PushCell();
|
label.PushCell();
|
||||||
label.PushColor(CachedColors.Gray);
|
label.PushColor(TextEditorDotnetColoursDark.Gray);
|
||||||
label.AddText("Type Params: ");
|
label.AddText("Type Params: ");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.Pop();
|
label.Pop();
|
||||||
@@ -305,7 +305,7 @@ public static partial class SymbolInfoComponents
|
|||||||
var typeParameterText = docComment.GetTypeParameterText(typeParameterName);
|
var typeParameterText = docComment.GetTypeParameterText(typeParameterName);
|
||||||
if (typeParameterText is null) continue;
|
if (typeParameterText is null) continue;
|
||||||
label.PushCell();
|
label.PushCell();
|
||||||
label.PushColor(CachedColors.ClassGreen);
|
label.PushColor(TextEditorDotnetColoursDark.ClassGreen);
|
||||||
label.AddText(typeParameterName);
|
label.AddText(typeParameterName);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" - ");
|
label.AddText(" - ");
|
||||||
@@ -321,7 +321,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (docComment.ReturnsText is not null)
|
if (docComment.ReturnsText is not null)
|
||||||
{
|
{
|
||||||
label.PushCell();
|
label.PushCell();
|
||||||
label.PushColor(CachedColors.Gray);
|
label.PushColor(TextEditorDotnetColoursDark.Gray);
|
||||||
label.AddText("Returns: ");
|
label.AddText("Returns: ");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.Pop();
|
label.Pop();
|
||||||
@@ -333,7 +333,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (docComment.ExceptionTypes.Length is not 0)
|
if (docComment.ExceptionTypes.Length is not 0)
|
||||||
{
|
{
|
||||||
label.PushCell();
|
label.PushCell();
|
||||||
label.PushColor(CachedColors.Gray);
|
label.PushColor(TextEditorDotnetColoursDark.Gray);
|
||||||
label.AddText("Exceptions: ");
|
label.AddText("Exceptions: ");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.Pop();
|
label.Pop();
|
||||||
@@ -342,7 +342,7 @@ public static partial class SymbolInfoComponents
|
|||||||
var exceptionText = docComment.GetExceptionTexts(exceptionTypeName).FirstOrDefault();
|
var exceptionText = docComment.GetExceptionTexts(exceptionTypeName).FirstOrDefault();
|
||||||
if (exceptionText is null) continue;
|
if (exceptionText is null) continue;
|
||||||
label.PushCell();
|
label.PushCell();
|
||||||
label.PushColor(CachedColors.ClassGreen);
|
label.PushColor(TextEditorDotnetColoursDark.ClassGreen);
|
||||||
label.AddText(exceptionTypeName.Split('.').Last());
|
label.AddText(exceptionTypeName.Split('.').Last());
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" - ");
|
label.AddText(" - ");
|
||||||
@@ -359,7 +359,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (docComment.RemarksText is not null)
|
if (docComment.RemarksText is not null)
|
||||||
{
|
{
|
||||||
label.PushCell();
|
label.PushCell();
|
||||||
label.PushColor(CachedColors.Gray);
|
label.PushColor(TextEditorDotnetColoursDark.Gray);
|
||||||
label.AddText("Remarks: ");
|
label.AddText("Remarks: ");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.Pop();
|
label.Pop();
|
||||||
@@ -389,7 +389,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static RichTextLabel AddUnknownType(this RichTextLabel label, ITypeSymbol symbol)
|
private static RichTextLabel AddUnknownType(this RichTextLabel label, ITypeSymbol symbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.Orange);
|
label.PushColor(TextEditorDotnetColoursDark.Orange);
|
||||||
label.AddText("[UNKNOWN TYPE]");
|
label.AddText("[UNKNOWN TYPE]");
|
||||||
label.AddText(symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
|
label.AddText(symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
|
||||||
label.Pop();
|
label.Pop();
|
||||||
@@ -443,7 +443,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static RichTextLabel AddTypeParameter(this RichTextLabel label, ITypeParameterSymbol symbol)
|
private static RichTextLabel AddTypeParameter(this RichTextLabel label, ITypeParameterSymbol symbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.ClassGreen);
|
label.PushColor(TextEditorDotnetColoursDark.ClassGreen);
|
||||||
label.AddText(symbol.Name);
|
label.AddText(symbol.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
return label;
|
return label;
|
||||||
@@ -451,7 +451,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static RichTextLabel AddDynamicType(this RichTextLabel label, IDynamicTypeSymbol symbol)
|
private static RichTextLabel AddDynamicType(this RichTextLabel label, IDynamicTypeSymbol symbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText(symbol.Name);
|
label.AddText(symbol.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
return label;
|
return label;
|
||||||
@@ -464,29 +464,29 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
{SpecialType: not SpecialType.None} => symbol.SpecialType switch
|
{SpecialType: not SpecialType.None} => symbol.SpecialType switch
|
||||||
{
|
{
|
||||||
SpecialType.System_Collections_IEnumerable => CachedColors.InterfaceGreen,
|
SpecialType.System_Collections_IEnumerable => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
SpecialType.System_Collections_Generic_IEnumerable_T => CachedColors.InterfaceGreen,
|
SpecialType.System_Collections_Generic_IEnumerable_T => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
SpecialType.System_Collections_Generic_IList_T => CachedColors.InterfaceGreen,
|
SpecialType.System_Collections_Generic_IList_T => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
SpecialType.System_Collections_Generic_ICollection_T => CachedColors.InterfaceGreen,
|
SpecialType.System_Collections_Generic_ICollection_T => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
SpecialType.System_Collections_IEnumerator => CachedColors.InterfaceGreen,
|
SpecialType.System_Collections_IEnumerator => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
SpecialType.System_Collections_Generic_IEnumerator_T => CachedColors.InterfaceGreen,
|
SpecialType.System_Collections_Generic_IEnumerator_T => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
SpecialType.System_Collections_Generic_IReadOnlyList_T => CachedColors.InterfaceGreen,
|
SpecialType.System_Collections_Generic_IReadOnlyList_T => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
SpecialType.System_Collections_Generic_IReadOnlyCollection_T => CachedColors.InterfaceGreen,
|
SpecialType.System_Collections_Generic_IReadOnlyCollection_T => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
SpecialType.System_IDisposable => CachedColors.InterfaceGreen,
|
SpecialType.System_IDisposable => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
SpecialType.System_IAsyncResult => CachedColors.InterfaceGreen,
|
SpecialType.System_IAsyncResult => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
_ => CachedColors.KeywordBlue
|
_ => TextEditorDotnetColoursDark.KeywordBlue
|
||||||
},
|
},
|
||||||
INamedTypeSymbol namedTypeSymbol => namedTypeSymbol.TypeKind switch
|
INamedTypeSymbol namedTypeSymbol => namedTypeSymbol.TypeKind switch
|
||||||
{
|
{
|
||||||
TypeKind.Class => CachedColors.ClassGreen,
|
TypeKind.Class => TextEditorDotnetColoursDark.ClassGreen,
|
||||||
TypeKind.Interface => CachedColors.InterfaceGreen,
|
TypeKind.Interface => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
TypeKind.Struct => CachedColors.ClassGreen,
|
TypeKind.Struct => TextEditorDotnetColoursDark.ClassGreen,
|
||||||
TypeKind.Enum => CachedColors.InterfaceGreen,
|
TypeKind.Enum => TextEditorDotnetColoursDark.InterfaceGreen,
|
||||||
TypeKind.Delegate => CachedColors.ClassGreen,
|
TypeKind.Delegate => TextEditorDotnetColoursDark.ClassGreen,
|
||||||
TypeKind.Dynamic => CachedColors.KeywordBlue,
|
TypeKind.Dynamic => TextEditorDotnetColoursDark.KeywordBlue,
|
||||||
_ => CachedColors.Orange
|
_ => TextEditorDotnetColoursDark.Orange
|
||||||
},
|
},
|
||||||
_ => CachedColors.Orange
|
_ => TextEditorDotnetColoursDark.Orange
|
||||||
};
|
};
|
||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetDiagnostic(SharpIdeDiagnostic diagnostic)
|
public static RichTextLabel GetDiagnostic(SharpIdeDiagnostic diagnostic)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFontSize(14);
|
label.PushFontSize(14);
|
||||||
label.AddText(diagnostic.Diagnostic.GetMessage());
|
label.AddText(diagnostic.Diagnostic.GetMessage());
|
||||||
label.Pop();
|
label.Pop();
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetDiscardSymbolInfo(IDiscardSymbol symbol)
|
public static RichTextLabel GetDiscardSymbolInfo(IDiscardSymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddText("discard ");
|
label.AddText("discard ");
|
||||||
label.AddType(symbol.Type);
|
label.AddType(symbol.Type);
|
||||||
@@ -22,7 +22,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static void AddDiscard(this RichTextLabel label, IDiscardSymbol _)
|
private static void AddDiscard(this RichTextLabel label, IDiscardSymbol _)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.VariableBlue);
|
label.PushColor(TextEditorDotnetColoursDark.VariableBlue);
|
||||||
label.AddText("_");
|
label.AddText("_");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetDynamicTypeSymbolInfo(IDynamicTypeSymbol symbol)
|
public static RichTextLabel GetDynamicTypeSymbolInfo(IDynamicTypeSymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText(symbol.ToDisplayString());
|
label.AddText(symbol.ToDisplayString());
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.Pop();
|
label.Pop();
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ public static partial class SymbolInfoComponents
|
|||||||
}
|
}
|
||||||
|
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddAttributes(symbol);
|
label.AddAttributes(symbol);
|
||||||
label.AddFieldName(symbol);
|
label.AddFieldName(symbol);
|
||||||
label.AddText(" = ");
|
label.AddText(" = ");
|
||||||
label.PushColor(CachedColors.NumberGreen);
|
label.PushColor(TextEditorDotnetColoursDark.NumberGreen);
|
||||||
label.AddText($"{symbol.ConstantValue}");
|
label.AddText($"{symbol.ConstantValue}");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(";");
|
label.AddText(";");
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetEventSymbolInfo(IEventSymbol symbol)
|
public static RichTextLabel GetEventSymbolInfo(IEventSymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddAccessibilityModifier(symbol);
|
label.AddAccessibilityModifier(symbol);
|
||||||
label.AddEventKeyword(symbol);
|
label.AddEventKeyword(symbol);
|
||||||
@@ -26,7 +26,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static void AddEventKeyword(this RichTextLabel label, IEventSymbol symbol)
|
private static void AddEventKeyword(this RichTextLabel label, IEventSymbol symbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("event ");
|
label.AddText("event ");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static void AddEventName(this RichTextLabel label, IEventSymbol symbol)
|
private static void AddEventName(this RichTextLabel label, IEventSymbol symbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText(symbol.Name);
|
label.AddText(symbol.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -47,11 +47,11 @@ public static partial class SymbolInfoComponents
|
|||||||
private static void AddEventMethods(this RichTextLabel label, IEventSymbol symbol)
|
private static void AddEventMethods(this RichTextLabel label, IEventSymbol symbol)
|
||||||
{
|
{
|
||||||
label.AddText(" { ");
|
label.AddText(" { ");
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("add");
|
label.AddText("add");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText("; ");
|
label.AddText("; ");
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("remove");
|
label.AddText("remove");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText("; }");
|
label.AddText("; }");
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetFieldSymbolInfo(IFieldSymbol symbol)
|
public static RichTextLabel GetFieldSymbolInfo(IFieldSymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddAttributes(symbol);
|
label.AddAttributes(symbol);
|
||||||
label.AddAccessibilityModifier(symbol);
|
label.AddAccessibilityModifier(symbol);
|
||||||
@@ -35,7 +35,7 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (symbol.IsStatic)
|
if (symbol.IsStatic)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("static");
|
label.AddText("static");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -46,7 +46,7 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (fieldSymbol.IsReadOnly)
|
if (fieldSymbol.IsReadOnly)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("readonly");
|
label.AddText("readonly");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -57,7 +57,7 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (symbol.IsRequired)
|
if (symbol.IsRequired)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("required");
|
label.AddText("required");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -72,7 +72,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static void AddFieldName(this RichTextLabel label, IFieldSymbol fieldSymbol)
|
private static void AddFieldName(this RichTextLabel label, IFieldSymbol fieldSymbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText(fieldSymbol.Name);
|
label.AddText(fieldSymbol.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetLabelSymbolInfo(ILabelSymbol symbol)
|
public static RichTextLabel GetLabelSymbolInfo(ILabelSymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddText("label ");
|
label.AddText("label ");
|
||||||
label.AddLabelName(symbol);
|
label.AddLabelName(symbol);
|
||||||
@@ -20,7 +20,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static void AddLabelName(this RichTextLabel label, ILabelSymbol symbol)
|
private static void AddLabelName(this RichTextLabel label, ILabelSymbol symbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText(symbol.Name);
|
label.AddText(symbol.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetLocalVariableSymbolInfo(ILocalSymbol symbol)
|
public static RichTextLabel GetLocalVariableSymbolInfo(ILocalSymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddAttributes(symbol);
|
label.AddAttributes(symbol);
|
||||||
label.AddText("local variable ");
|
label.AddText("local variable ");
|
||||||
@@ -35,7 +35,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static void AddLocalVariableName(this RichTextLabel label, ILocalSymbol symbol)
|
private static void AddLocalVariableName(this RichTextLabel label, ILocalSymbol symbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.VariableBlue);
|
label.PushColor(TextEditorDotnetColoursDark.VariableBlue);
|
||||||
label.AddText(symbol.Name);
|
label.AddText(symbol.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetMethodSymbolInfo(IMethodSymbol methodSymbol)
|
public static RichTextLabel GetMethodSymbolInfo(IMethodSymbol methodSymbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddAttributes(methodSymbol);
|
label.AddAttributes(methodSymbol);
|
||||||
label.AddAccessibilityModifier(methodSymbol);
|
label.AddAccessibilityModifier(methodSymbol);
|
||||||
@@ -41,7 +41,7 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (methodSymbol.IsStatic || methodSymbol.ReducedFrom?.IsStatic is true)
|
if (methodSymbol.IsStatic || methodSymbol.ReducedFrom?.IsStatic is true)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("static");
|
label.AddText("static");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -52,7 +52,7 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (methodSymbol.IsAsync)
|
if (methodSymbol.IsAsync)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("async");
|
label.AddText("async");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -63,7 +63,7 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (methodSymbol.ReturnsVoid)
|
if (methodSymbol.ReturnsVoid)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("void");
|
label.AddText("void");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
return;
|
return;
|
||||||
@@ -74,7 +74,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static void AddMethodName(this RichTextLabel label, IMethodSymbol methodSymbol)
|
private static void AddMethodName(this RichTextLabel label, IMethodSymbol methodSymbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.Yellow);
|
label.PushColor(TextEditorDotnetColoursDark.Yellow);
|
||||||
label.AddText(methodSymbol.Name);
|
label.AddText(methodSymbol.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -82,12 +82,12 @@ public static partial class SymbolInfoComponents
|
|||||||
private static void AddTypeParameters(this RichTextLabel label, IMethodSymbol methodSymbol)
|
private static void AddTypeParameters(this RichTextLabel label, IMethodSymbol methodSymbol)
|
||||||
{
|
{
|
||||||
if (methodSymbol.TypeParameters.Length == 0) return;
|
if (methodSymbol.TypeParameters.Length == 0) return;
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText("<");
|
label.AddText("<");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
foreach (var (index, typeParameter) in methodSymbol.TypeParameters.Index())
|
foreach (var (index, typeParameter) in methodSymbol.TypeParameters.Index())
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.ClassGreen);
|
label.PushColor(TextEditorDotnetColoursDark.ClassGreen);
|
||||||
label.AddText(typeParameter.Name);
|
label.AddText(typeParameter.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
if (index < methodSymbol.TypeParameters.Length - 1)
|
if (index < methodSymbol.TypeParameters.Length - 1)
|
||||||
@@ -95,7 +95,7 @@ public static partial class SymbolInfoComponents
|
|||||||
label.AddText(", ");
|
label.AddText(", ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText(">");
|
label.AddText(">");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -104,7 +104,7 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (methodSymbol.IsExtensionMethod)
|
if (methodSymbol.IsExtensionMethod)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("this");
|
label.AddText("this");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -123,21 +123,21 @@ public static partial class SymbolInfoComponents
|
|||||||
}
|
}
|
||||||
if (parameterSymbol.RefKind != RefKind.None) // ref, in, out
|
if (parameterSymbol.RefKind != RefKind.None) // ref, in, out
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText(parameterSymbol.RefKind.ToString().ToLower());
|
label.AddText(parameterSymbol.RefKind.ToString().ToLower());
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
}
|
}
|
||||||
else if (parameterSymbol.IsParams)
|
else if (parameterSymbol.IsParams)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("params");
|
label.AddText("params");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
}
|
}
|
||||||
label.AddType(parameterSymbol.Type);
|
label.AddType(parameterSymbol.Type);
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
label.PushColor(CachedColors.VariableBlue);
|
label.PushColor(TextEditorDotnetColoursDark.VariableBlue);
|
||||||
label.AddText(parameterSymbol.Name);
|
label.AddText(parameterSymbol.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
// default value
|
// default value
|
||||||
@@ -146,7 +146,7 @@ public static partial class SymbolInfoComponents
|
|||||||
label.AddText(" = ");
|
label.AddText(" = ");
|
||||||
if (parameterSymbol.ExplicitDefaultValue is null)
|
if (parameterSymbol.ExplicitDefaultValue is null)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("null");
|
label.AddText("null");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -160,19 +160,19 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
if (enumMember != null)
|
if (enumMember != null)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.InterfaceGreen);
|
label.PushColor(TextEditorDotnetColoursDark.InterfaceGreen);
|
||||||
label.AddText(parameterSymbol.Type.Name);
|
label.AddText(parameterSymbol.Type.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText(".");
|
label.AddText(".");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText(enumMember.Name);
|
label.AddText(enumMember.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.InterfaceGreen);
|
label.PushColor(TextEditorDotnetColoursDark.InterfaceGreen);
|
||||||
label.AddText(parameterSymbol.Type.Name);
|
label.AddText(parameterSymbol.Type.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText($"({explicitDefaultValue})");
|
label.AddText($"({explicitDefaultValue})");
|
||||||
@@ -180,7 +180,7 @@ public static partial class SymbolInfoComponents
|
|||||||
}
|
}
|
||||||
else if (parameterSymbol.ExplicitDefaultValue is string str)
|
else if (parameterSymbol.ExplicitDefaultValue is string str)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.LightOrangeBrown);
|
label.PushColor(TextEditorDotnetColoursDark.LightOrangeBrown);
|
||||||
label.AddText($"""
|
label.AddText($"""
|
||||||
"{str}"
|
"{str}"
|
||||||
""");
|
""");
|
||||||
@@ -188,7 +188,7 @@ public static partial class SymbolInfoComponents
|
|||||||
}
|
}
|
||||||
else if (parameterSymbol.ExplicitDefaultValue is bool b)
|
else if (parameterSymbol.ExplicitDefaultValue is bool b)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText(b ? "true" : "false");
|
label.AddText(b ? "true" : "false");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -214,7 +214,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (typeParameters.Length != typeArguments.Length) throw new Exception("Type parameters and type arguments length mismatch.");
|
if (typeParameters.Length != typeArguments.Length) throw new Exception("Type parameters and type arguments length mismatch.");
|
||||||
foreach (var (index, (typeArgument, typeParameter)) in methodSymbol.TypeArguments.Zip(typeParameters).Index())
|
foreach (var (index, (typeArgument, typeParameter)) in methodSymbol.TypeArguments.Zip(typeParameters).Index())
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.ClassGreen);
|
label.PushColor(TextEditorDotnetColoursDark.ClassGreen);
|
||||||
label.AddType(typeParameter);
|
label.AddType(typeParameter);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" is ");
|
label.AddText(" is ");
|
||||||
@@ -234,7 +234,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (hasConstraints is false) continue;
|
if (hasConstraints is false) continue;
|
||||||
|
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("where");
|
label.AddText("where");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -244,7 +244,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
if (typeParameter.HasReferenceTypeConstraint)
|
if (typeParameter.HasReferenceTypeConstraint)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("class");
|
label.AddText("class");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -252,7 +252,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (typeParameter.HasValueTypeConstraint)
|
if (typeParameter.HasValueTypeConstraint)
|
||||||
{
|
{
|
||||||
MaybeAddComma();
|
MaybeAddComma();
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("struct");
|
label.AddText("struct");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -260,7 +260,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (typeParameter.HasUnmanagedTypeConstraint)
|
if (typeParameter.HasUnmanagedTypeConstraint)
|
||||||
{
|
{
|
||||||
MaybeAddComma();
|
MaybeAddComma();
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("unmanaged");
|
label.AddText("unmanaged");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -268,7 +268,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (typeParameter.HasNotNullConstraint)
|
if (typeParameter.HasNotNullConstraint)
|
||||||
{
|
{
|
||||||
MaybeAddComma();
|
MaybeAddComma();
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("notnull");
|
label.AddText("notnull");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -282,7 +282,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (typeParameter.HasConstructorConstraint)
|
if (typeParameter.HasConstructorConstraint)
|
||||||
{
|
{
|
||||||
MaybeAddComma();
|
MaybeAddComma();
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("new");
|
label.AddText("new");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText("()");
|
label.AddText("()");
|
||||||
@@ -291,7 +291,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (typeParameter.AllowsRefLikeType)
|
if (typeParameter.AllowsRefLikeType)
|
||||||
{
|
{
|
||||||
MaybeAddComma();
|
MaybeAddComma();
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("allows ref struct");
|
label.AddText("allows ref struct");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetNamedTypeSymbolInfo(INamedTypeSymbol symbol)
|
public static RichTextLabel GetNamedTypeSymbolInfo(INamedTypeSymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddAttributes(symbol);
|
label.AddAttributes(symbol);
|
||||||
label.AddAccessibilityModifier(symbol);
|
label.AddAccessibilityModifier(symbol);
|
||||||
@@ -39,7 +39,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static void AddNamedTypeSymbolType(this RichTextLabel label, INamedTypeSymbol symbol)
|
private static void AddNamedTypeSymbolType(this RichTextLabel label, INamedTypeSymbol symbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText(GetNamedTypeSymbolTypeName(symbol));
|
label.AddText(GetNamedTypeSymbolTypeName(symbol));
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -80,7 +80,7 @@ public static partial class SymbolInfoComponents
|
|||||||
if (containingModule is not null)
|
if (containingModule is not null)
|
||||||
{
|
{
|
||||||
label.Newline();
|
label.Newline();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText($"from module {containingModule.Name}");
|
label.AddText($"from module {containingModule.Name}");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ public static partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (symbol.IsReadOnly)
|
if (symbol.IsReadOnly)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("readonly");
|
label.AddText("readonly");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetNamespaceSymbolInfo(INamespaceSymbol symbol)
|
public static RichTextLabel GetNamespaceSymbolInfo(INamespaceSymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("namespace");
|
label.AddText("namespace");
|
||||||
label.Pop(); // color
|
label.Pop(); // color
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetParameterSymbolInfo(IParameterSymbol symbol)
|
public static RichTextLabel GetParameterSymbolInfo(IParameterSymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddAttributes(symbol);
|
label.AddAttributes(symbol);
|
||||||
label.AddText("parameter ");
|
label.AddText("parameter ");
|
||||||
@@ -37,7 +37,7 @@ public static partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static void AddParameterName(this RichTextLabel label, IParameterSymbol symbol)
|
private static void AddParameterName(this RichTextLabel label, IParameterSymbol symbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.VariableBlue);
|
label.PushColor(TextEditorDotnetColoursDark.VariableBlue);
|
||||||
label.AddText(symbol.Name);
|
label.AddText(symbol.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetPropertySymbolInfo(IPropertySymbol symbol)
|
public static RichTextLabel GetPropertySymbolInfo(IPropertySymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddAttributes(symbol);
|
label.AddAttributes(symbol);
|
||||||
label.AddAccessibilityModifier(symbol);
|
label.AddAccessibilityModifier(symbol);
|
||||||
@@ -35,7 +35,7 @@ public partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (symbol.IsReadOnly)
|
if (symbol.IsReadOnly)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("readonly");
|
label.AddText("readonly");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -46,7 +46,7 @@ public partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (symbol.IsRequired)
|
if (symbol.IsRequired)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("required");
|
label.AddText("required");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -61,7 +61,7 @@ public partial class SymbolInfoComponents
|
|||||||
|
|
||||||
private static void AddPropertyName(this RichTextLabel label, IPropertySymbol symbol)
|
private static void AddPropertyName(this RichTextLabel label, IPropertySymbol symbol)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText(symbol.Name);
|
label.AddText(symbol.Name);
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
@@ -72,10 +72,10 @@ public partial class SymbolInfoComponents
|
|||||||
|
|
||||||
if (symbol.GetMethod is not null)
|
if (symbol.GetMethod is not null)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("get");
|
label.AddText("get");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText(";");
|
label.AddText(";");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -84,7 +84,7 @@ public partial class SymbolInfoComponents
|
|||||||
{
|
{
|
||||||
if (setMethod.DeclaredAccessibility != symbol.DeclaredAccessibility)
|
if (setMethod.DeclaredAccessibility != symbol.DeclaredAccessibility)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText(setMethod.DeclaredAccessibility.ToString().ToLower());
|
label.AddText(setMethod.DeclaredAccessibility.ToString().ToLower());
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.AddText(" ");
|
label.AddText(" ");
|
||||||
@@ -92,19 +92,19 @@ public partial class SymbolInfoComponents
|
|||||||
|
|
||||||
if (setMethod.IsInitOnly)
|
if (setMethod.IsInitOnly)
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("init");
|
label.AddText("init");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText(";");
|
label.AddText(";");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
label.PushColor(CachedColors.KeywordBlue);
|
label.PushColor(TextEditorDotnetColoursDark.KeywordBlue);
|
||||||
label.AddText("set");
|
label.AddText("set");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.AddText(";");
|
label.AddText(";");
|
||||||
label.Pop();
|
label.Pop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public static partial class SymbolInfoComponents
|
|||||||
public static RichTextLabel GetTypeParameterSymbolInfo(ITypeParameterSymbol symbol)
|
public static RichTextLabel GetTypeParameterSymbolInfo(ITypeParameterSymbol symbol)
|
||||||
{
|
{
|
||||||
var label = new RichTextLabel();
|
var label = new RichTextLabel();
|
||||||
label.PushColor(CachedColors.White);
|
label.PushColor(TextEditorDotnetColoursDark.White);
|
||||||
label.PushFont(MonospaceFont);
|
label.PushFont(MonospaceFont);
|
||||||
label.AddTypeParameter(symbol);
|
label.AddTypeParameter(symbol);
|
||||||
label.AddText(" in ");
|
label.AddText(" in ");
|
||||||
|
|||||||
@@ -34,12 +34,12 @@ public partial class ThreadsVariablesSubTab
|
|||||||
|
|
||||||
var variableValueDisplayColour = variable switch
|
var variableValueDisplayColour = variable switch
|
||||||
{
|
{
|
||||||
_ when variable.PresentationHint?.Attributes is { } attrs && (attrs & VariablePresentationHint.AttributesValue.FailedEvaluation) != 0 => CachedColors.ErrorRed,
|
_ when variable.PresentationHint?.Attributes is { } attrs && (attrs & VariablePresentationHint.AttributesValue.FailedEvaluation) != 0 => TextEditorDotnetColoursDark.ErrorRed,
|
||||||
{ Value: "null" } => CachedColors.KeywordBlue,
|
{ Value: "null" } => TextEditorDotnetColoursDark.KeywordBlue,
|
||||||
{ Value: "true" or "false" } => CachedColors.KeywordBlue,
|
{ Value: "true" or "false" } => TextEditorDotnetColoursDark.KeywordBlue,
|
||||||
{ Type: "string" or "char" } => CachedColors.LightOrangeBrown,
|
{ Type: "string" or "char" } => TextEditorDotnetColoursDark.LightOrangeBrown,
|
||||||
{ Type: "byte" or "sbyte" or "short" or "ushort" or "int" or "uint" or "long" or "ulong" or "nint" or "nuint" or "float" or "double" or "decimal" } => CachedColors.NumberGreen,
|
{ Type: "byte" or "sbyte" or "short" or "ushort" or "int" or "uint" or "long" or "ulong" or "nint" or "nuint" or "float" or "double" or "decimal" } => TextEditorDotnetColoursDark.NumberGreen,
|
||||||
{ Type: "byte?" or "sbyte?" or "short?" or "ushort?" or "int?" or "uint?" or "long?" or "ulong?" or "nint?" or "nuint?" or "float?" or "double?" or "decimal?" } => CachedColors.NumberGreen, // value here will never actually be null, as we handled "null" value above
|
{ Type: "byte?" or "sbyte?" or "short?" or "ushort?" or "int?" or "uint?" or "long?" or "ulong?" or "nint?" or "nuint?" or "float?" or "double?" or "decimal?" } => TextEditorDotnetColoursDark.NumberGreen, // value here will never actually be null, as we handled "null" value above
|
||||||
_ => VariableWhiteColor
|
_ => VariableWhiteColor
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
[ext_resource type="ButtonGroup" uid="uid://c2nmo2x3va0gi" path="res://Features/LeftSideBar/LeftBottomSidebarButtonGroup.tres" id="2_1aad6"]
|
[ext_resource type="ButtonGroup" uid="uid://c2nmo2x3va0gi" path="res://Features/LeftSideBar/LeftBottomSidebarButtonGroup.tres" id="2_1aad6"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ccj0dw81x3bkc" path="res://Features/LeftSideBar/Resources/SidebarFolder.svg" id="2_jg03n"]
|
[ext_resource type="Texture2D" uid="uid://ccj0dw81x3bkc" path="res://Features/LeftSideBar/Resources/SidebarFolder.svg" id="2_jg03n"]
|
||||||
[ext_resource type="Texture2D" uid="uid://uukf1nwjhthv" path="res://Features/LeftSideBar/Resources/SidebarProblem.svg" id="4_prju6"]
|
[ext_resource type="Texture2D" uid="uid://uukf1nwjhthv" path="res://Features/LeftSideBar/Resources/SidebarProblem.svg" id="4_prju6"]
|
||||||
[ext_resource type="StyleBox" uid="uid://cosaurtj574yc" path="res://Features/LeftSideBar/Resources/LeftSideBarButtonStyleNormal.tres" id="4_umcfu"]
|
|
||||||
[ext_resource type="StyleBox" uid="uid://d26wbe6o067ko" path="res://Features/LeftSideBar/Resources/LeftSideBarButtonStylePressed.tres" id="5_csqeq"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://cre7q0efp4vrq" path="res://Features/LeftSideBar/Resources/SidebarRun.svg" id="5_jg03n"]
|
[ext_resource type="Texture2D" uid="uid://cre7q0efp4vrq" path="res://Features/LeftSideBar/Resources/SidebarRun.svg" id="5_jg03n"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b0170ypw8uf3a" path="res://Features/LeftSideBar/Resources/Terminal.svg" id="6_ddh6f"]
|
[ext_resource type="Texture2D" uid="uid://b0170ypw8uf3a" path="res://Features/LeftSideBar/Resources/Terminal.svg" id="6_ddh6f"]
|
||||||
[ext_resource type="Texture2D" uid="uid://butisxqww0boc" path="res://Features/LeftSideBar/Resources/SidebarDebug.svg" id="6_jg03n"]
|
[ext_resource type="Texture2D" uid="uid://butisxqww0boc" path="res://Features/LeftSideBar/Resources/SidebarDebug.svg" id="6_jg03n"]
|
||||||
@@ -42,9 +40,8 @@ layout_mode = 2
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(0, 50)
|
custom_minimum_size = Vector2(0, 50)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_type_variation = &"IdeSidebarButton"
|
||||||
theme_override_font_sizes/font_size = 13
|
theme_override_font_sizes/font_size = 13
|
||||||
theme_override_styles/normal = ExtResource("4_umcfu")
|
|
||||||
theme_override_styles/pressed = ExtResource("5_csqeq")
|
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
button_pressed = true
|
button_pressed = true
|
||||||
text = "Explorer"
|
text = "Explorer"
|
||||||
@@ -61,9 +58,8 @@ size_flags_vertical = 3
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(0, 50)
|
custom_minimum_size = Vector2(0, 50)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_type_variation = &"IdeSidebarButton"
|
||||||
theme_override_font_sizes/font_size = 13
|
theme_override_font_sizes/font_size = 13
|
||||||
theme_override_styles/normal = ExtResource("4_umcfu")
|
|
||||||
theme_override_styles/pressed = ExtResource("5_csqeq")
|
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
button_group = ExtResource("2_1aad6")
|
button_group = ExtResource("2_1aad6")
|
||||||
text = "Problems"
|
text = "Problems"
|
||||||
@@ -76,9 +72,8 @@ expand_icon = true
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(0, 50)
|
custom_minimum_size = Vector2(0, 50)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_type_variation = &"IdeSidebarButton"
|
||||||
theme_override_font_sizes/font_size = 13
|
theme_override_font_sizes/font_size = 13
|
||||||
theme_override_styles/normal = ExtResource("4_umcfu")
|
|
||||||
theme_override_styles/pressed = ExtResource("5_csqeq")
|
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
button_pressed = true
|
button_pressed = true
|
||||||
button_group = ExtResource("2_1aad6")
|
button_group = ExtResource("2_1aad6")
|
||||||
@@ -92,9 +87,8 @@ expand_icon = true
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(0, 50)
|
custom_minimum_size = Vector2(0, 50)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_type_variation = &"IdeSidebarButton"
|
||||||
theme_override_font_sizes/font_size = 13
|
theme_override_font_sizes/font_size = 13
|
||||||
theme_override_styles/normal = ExtResource("4_umcfu")
|
|
||||||
theme_override_styles/pressed = ExtResource("5_csqeq")
|
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
button_group = ExtResource("2_1aad6")
|
button_group = ExtResource("2_1aad6")
|
||||||
text = "Debug"
|
text = "Debug"
|
||||||
@@ -107,9 +101,8 @@ expand_icon = true
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(0, 50)
|
custom_minimum_size = Vector2(0, 50)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_type_variation = &"IdeSidebarButton"
|
||||||
theme_override_font_sizes/font_size = 13
|
theme_override_font_sizes/font_size = 13
|
||||||
theme_override_styles/normal = ExtResource("4_umcfu")
|
|
||||||
theme_override_styles/pressed = ExtResource("5_csqeq")
|
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
button_group = ExtResource("2_1aad6")
|
button_group = ExtResource("2_1aad6")
|
||||||
text = "Build"
|
text = "Build"
|
||||||
@@ -123,9 +116,8 @@ unique_name_in_owner = true
|
|||||||
visible = false
|
visible = false
|
||||||
custom_minimum_size = Vector2(0, 50)
|
custom_minimum_size = Vector2(0, 50)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_type_variation = &"IdeSidebarButton"
|
||||||
theme_override_font_sizes/font_size = 13
|
theme_override_font_sizes/font_size = 13
|
||||||
theme_override_styles/normal = ExtResource("4_umcfu")
|
|
||||||
theme_override_styles/pressed = ExtResource("5_csqeq")
|
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
button_group = ExtResource("2_1aad6")
|
button_group = ExtResource("2_1aad6")
|
||||||
text = "IDE"
|
text = "IDE"
|
||||||
@@ -138,9 +130,8 @@ expand_icon = true
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(0, 50)
|
custom_minimum_size = Vector2(0, 50)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_type_variation = &"IdeSidebarButton"
|
||||||
theme_override_font_sizes/font_size = 13
|
theme_override_font_sizes/font_size = 13
|
||||||
theme_override_styles/normal = ExtResource("4_umcfu")
|
|
||||||
theme_override_styles/pressed = ExtResource("5_csqeq")
|
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
button_group = ExtResource("2_1aad6")
|
button_group = ExtResource("2_1aad6")
|
||||||
text = "NuGet"
|
text = "NuGet"
|
||||||
@@ -153,9 +144,8 @@ expand_icon = true
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(0, 50)
|
custom_minimum_size = Vector2(0, 50)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
theme_type_variation = &"IdeSidebarButton"
|
||||||
theme_override_font_sizes/font_size = 13
|
theme_override_font_sizes/font_size = 13
|
||||||
theme_override_styles/normal = ExtResource("4_umcfu")
|
|
||||||
theme_override_styles/pressed = ExtResource("5_csqeq")
|
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
button_group = ExtResource("2_1aad6")
|
button_group = ExtResource("2_1aad6")
|
||||||
text = "Tests"
|
text = "Tests"
|
||||||
|
|||||||
@@ -38,6 +38,31 @@ corner_radius_bottom_right = 3
|
|||||||
corner_radius_bottom_left = 3
|
corner_radius_bottom_left = 3
|
||||||
corner_detail = 5
|
corner_detail = 5
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dsk6k"]
|
||||||
|
content_margin_left = 4.0
|
||||||
|
content_margin_top = 4.0
|
||||||
|
content_margin_right = 4.0
|
||||||
|
content_margin_bottom = 4.0
|
||||||
|
bg_color = Color(0.1, 0.1, 0.1, 0.6)
|
||||||
|
draw_center = false
|
||||||
|
corner_radius_top_left = 3
|
||||||
|
corner_radius_top_right = 3
|
||||||
|
corner_radius_bottom_right = 3
|
||||||
|
corner_radius_bottom_left = 3
|
||||||
|
corner_detail = 5
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_njudc"]
|
||||||
|
content_margin_left = 4.0
|
||||||
|
content_margin_top = 4.0
|
||||||
|
content_margin_right = 4.0
|
||||||
|
content_margin_bottom = 4.0
|
||||||
|
bg_color = Color(0, 0, 0, 0.39215687)
|
||||||
|
corner_radius_top_left = 3
|
||||||
|
corner_radius_top_right = 3
|
||||||
|
corner_radius_bottom_right = 3
|
||||||
|
corner_radius_bottom_left = 3
|
||||||
|
corner_detail = 5
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3gh6f"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3gh6f"]
|
||||||
content_margin_left = 0.0
|
content_margin_left = 0.0
|
||||||
content_margin_top = 0.0
|
content_margin_top = 0.0
|
||||||
@@ -85,6 +110,9 @@ Gray600Label/base_type = &"Label"
|
|||||||
Gray600Label/colors/font_color = Color(0.67058825, 0.67058825, 0.67058825, 1)
|
Gray600Label/colors/font_color = Color(0.67058825, 0.67058825, 0.67058825, 1)
|
||||||
Gray700Label/base_type = &"Label"
|
Gray700Label/base_type = &"Label"
|
||||||
Gray700Label/colors/font_color = Color(0.83137256, 0.83137256, 0.83137256, 1)
|
Gray700Label/colors/font_color = Color(0.83137256, 0.83137256, 0.83137256, 1)
|
||||||
|
IdeSidebarButton/base_type = &"Button"
|
||||||
|
IdeSidebarButton/styles/normal = SubResource("StyleBoxFlat_dsk6k")
|
||||||
|
IdeSidebarButton/styles/pressed = SubResource("StyleBoxFlat_njudc")
|
||||||
Panel/styles/panel = SubResource("StyleBoxFlat_3gh6f")
|
Panel/styles/panel = SubResource("StyleBoxFlat_3gh6f")
|
||||||
PanelContainer/styles/panel = SubResource("StyleBoxFlat_6e8is")
|
PanelContainer/styles/panel = SubResource("StyleBoxFlat_6e8is")
|
||||||
PopupPanel/styles/panel = SubResource("StyleBoxFlat_amw38")
|
PopupPanel/styles/panel = SubResource("StyleBoxFlat_amw38")
|
||||||
|
|||||||
@@ -108,6 +108,43 @@ corner_radius_bottom_right = 3
|
|||||||
corner_radius_bottom_left = 3
|
corner_radius_bottom_left = 3
|
||||||
corner_detail = 5
|
corner_detail = 5
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5ta8e"]
|
||||||
|
content_margin_left = 4.0
|
||||||
|
content_margin_top = 4.0
|
||||||
|
content_margin_right = 4.0
|
||||||
|
content_margin_bottom = 4.0
|
||||||
|
bg_color = Color(0, 0, 0, 0.05882353)
|
||||||
|
corner_radius_top_left = 3
|
||||||
|
corner_radius_top_right = 3
|
||||||
|
corner_radius_bottom_right = 3
|
||||||
|
corner_radius_bottom_left = 3
|
||||||
|
corner_detail = 5
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dsk6k"]
|
||||||
|
content_margin_left = 4.0
|
||||||
|
content_margin_top = 4.0
|
||||||
|
content_margin_right = 4.0
|
||||||
|
content_margin_bottom = 4.0
|
||||||
|
bg_color = Color(0.1, 0.1, 0.1, 0.6)
|
||||||
|
draw_center = false
|
||||||
|
corner_radius_top_left = 3
|
||||||
|
corner_radius_top_right = 3
|
||||||
|
corner_radius_bottom_right = 3
|
||||||
|
corner_radius_bottom_left = 3
|
||||||
|
corner_detail = 5
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_njudc"]
|
||||||
|
content_margin_left = 4.0
|
||||||
|
content_margin_top = 4.0
|
||||||
|
content_margin_right = 4.0
|
||||||
|
content_margin_bottom = 4.0
|
||||||
|
bg_color = Color(0, 0, 0, 0.13725491)
|
||||||
|
corner_radius_top_left = 3
|
||||||
|
corner_radius_top_right = 3
|
||||||
|
corner_radius_bottom_right = 3
|
||||||
|
corner_radius_bottom_left = 3
|
||||||
|
corner_detail = 5
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_guqd5"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_guqd5"]
|
||||||
content_margin_left = 4.0
|
content_margin_left = 4.0
|
||||||
content_margin_top = 4.0
|
content_margin_top = 4.0
|
||||||
@@ -231,6 +268,14 @@ Gray600Label/base_type = &"Label"
|
|||||||
Gray600Label/colors/font_color = Color(0.33, 0.33, 0.33, 1)
|
Gray600Label/colors/font_color = Color(0.33, 0.33, 0.33, 1)
|
||||||
Gray700Label/base_type = &"Label"
|
Gray700Label/base_type = &"Label"
|
||||||
Gray700Label/colors/font_color = Color(0.17, 0.17, 0.17, 1)
|
Gray700Label/colors/font_color = Color(0.17, 0.17, 0.17, 1)
|
||||||
|
IdeSidebarButton/base_type = &"Button"
|
||||||
|
IdeSidebarButton/colors/icon_hover_color = Color(0.3019608, 0.3019608, 0.3019608, 1)
|
||||||
|
IdeSidebarButton/colors/icon_hover_pressed_color = Color(0.3019608, 0.3019608, 0.3019608, 1)
|
||||||
|
IdeSidebarButton/colors/icon_normal_color = Color(0.3, 0.3, 0.3, 1)
|
||||||
|
IdeSidebarButton/colors/icon_pressed_color = Color(0.3019608, 0.3019608, 0.3019608, 1)
|
||||||
|
IdeSidebarButton/styles/hover = SubResource("StyleBoxFlat_5ta8e")
|
||||||
|
IdeSidebarButton/styles/normal = SubResource("StyleBoxFlat_dsk6k")
|
||||||
|
IdeSidebarButton/styles/pressed = SubResource("StyleBoxFlat_njudc")
|
||||||
Label/colors/font_color = Color(0.17, 0.17, 0.17, 1)
|
Label/colors/font_color = Color(0.17, 0.17, 0.17, 1)
|
||||||
LineEdit/colors/caret_color = Color(0.05, 0.05, 0.05, 1)
|
LineEdit/colors/caret_color = Color(0.05, 0.05, 0.05, 1)
|
||||||
LineEdit/colors/font_color = Color(0.12, 0.12, 0.12, 1)
|
LineEdit/colors/font_color = Color(0.12, 0.12, 0.12, 1)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
0.1.19
|
0.1.20
|
||||||
Reference in New Issue
Block a user