resharper/resharper-unity/src/Unity/Odin/Feature/Services/CodeCompletion/GroupingAttributes/OdinLayoutAttributesCodeCompletionProvider.cs [152:188]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private sealed class StringLiteralItem : TextLookupItemBase, IMLSortingAwareItem { public StringLiteralItem([NotNull] string text, TextLookupRanges ranges) { Text = "\"" + text + "\""; Ranges = ranges; } public override IconId Image => PsiSymbolsThemedIcons.Const.Id; public override MatchingResult Match(PrefixMatcher prefixMatcher) { var matchingResult = prefixMatcher.Match(Text); if (matchingResult == null) return null; return new MatchingResult(matchingResult.MatchedIndices, matchingResult.AdjustedScore - 100, matchingResult.OriginalScore); } public override void Accept(ITextControl textControl, DocumentRange nameRange, LookupItemInsertType insertType, Suffix suffix, ISolution solution, bool keepCaretStill) { base.Accept(textControl, nameRange, LookupItemInsertType.Replace, suffix, solution, keepCaretStill); } protected override void OnAfterComplete(ITextControl textControl, ref DocumentRange nameRange, ref DocumentRange decorationRange, TailType tailType, ref Suffix suffix, ref IRangeMarker caretPositionRangeMarker) { base.OnAfterComplete(textControl, ref nameRange, ref decorationRange, tailType, ref suffix, ref caretPositionRangeMarker); // Consistently move caret to end of path; i.e., end of the string literal, before closing quote textControl.Caret.MoveTo(Ranges!.ReplaceRange.StartOffset + Text.Length - 1, CaretVisualPlacement.DontScrollIfVisible); } public bool UseMLSort() => false; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - resharper/resharper-unity/src/Unity/Odin/Feature/Services/CodeCompletion/GroupingAttributes/OdinTabGroupAttributeCodeCompletionProvider.cs [125:161]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - private sealed class StringLiteralItem : TextLookupItemBase, IMLSortingAwareItem { public StringLiteralItem([NotNull] string text, TextLookupRanges ranges) { Text = "\"" + text + "\""; Ranges = ranges; } public override IconId Image => PsiSymbolsThemedIcons.Const.Id; public override MatchingResult Match(PrefixMatcher prefixMatcher) { var matchingResult = prefixMatcher.Match(Text); if (matchingResult == null) return null; return new MatchingResult(matchingResult.MatchedIndices, matchingResult.AdjustedScore - 100, matchingResult.OriginalScore); } public override void Accept(ITextControl textControl, DocumentRange nameRange, LookupItemInsertType insertType, Suffix suffix, ISolution solution, bool keepCaretStill) { base.Accept(textControl, nameRange, LookupItemInsertType.Replace, suffix, solution, keepCaretStill); } protected override void OnAfterComplete(ITextControl textControl, ref DocumentRange nameRange, ref DocumentRange decorationRange, TailType tailType, ref Suffix suffix, ref IRangeMarker caretPositionRangeMarker) { base.OnAfterComplete(textControl, ref nameRange, ref decorationRange, tailType, ref suffix, ref caretPositionRangeMarker); // Consistently move caret to end of path; i.e., end of the string literal, before closing quote textControl.Caret.MoveTo(Ranges!.ReplaceRange.StartOffset + Text.Length - 1, CaretVisualPlacement.DontScrollIfVisible); } public bool UseMLSort() => false; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -