Skip to content

Commit 6e0895c

Browse files
committed
Rename FocusCodeFinder to FocusCodeFinderType
1 parent 221a034 commit 6e0895c

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

Tool/Sources/FocusedCodeFinder/ActiveDocumentContext.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public struct ActiveDocumentContext {
9292
}
9393

9494
public mutating func moveToCodeContainingRange(_ range: CursorRange) {
95-
let finder: FocusedCodeFinder = {
95+
let finder: FocusedCodeFinderType = {
9696
switch language {
9797
case .builtIn(.swift):
9898
return SwiftFocusedCodeFinder()

Tool/Sources/FocusedCodeFinder/FocusedCodeFinder.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ public struct CodeContext: Equatable {
4646
}
4747
}
4848

49-
public protocol FocusedCodeFinder {
49+
public protocol FocusedCodeFinderType {
5050
func findFocusedCode(
5151
containingRange: CursorRange,
5252
activeDocumentContext: ActiveDocumentContext
5353
) -> CodeContext
5454
}
5555

56-
public struct UnknownLanguageFocusedCodeFinder: FocusedCodeFinder {
56+
public struct UnknownLanguageFocusedCodeFinder: FocusedCodeFinderType {
5757
let proposedSearchRange: Int
5858

5959
public init(proposedSearchRange: Int) {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//
2+
// File.swift
3+
//
4+
//
5+
// Created by Shangxin Guo on 2023/11/16.
6+
//
7+
8+
import Foundation

Tool/Sources/FocusedCodeFinder/SwiftFocusedCodeFinder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import SuggestionModel
55
import SwiftParser
66
import SwiftSyntax
77

8-
public struct SwiftFocusedCodeFinder: FocusedCodeFinder {
8+
public struct SwiftFocusedCodeFinder: FocusedCodeFinderType {
99
public let maxFocusedCodeLineCount: Int
1010

1111
public init(

0 commit comments

Comments
 (0)