@@ -2065,31 +2065,7 @@ extension SourceKitLSPServer {
2065
2065
originatorUri: DocumentURI ,
2066
2066
languageService: LanguageService
2067
2067
) async throws -> Location {
2068
- // Check if we're already in the target interface with the same module/group/symbol
2069
- if case . generatedInterface( let interfaceData) = try ? ReferenceDocumentURL ( from: originatorUri) ,
2070
- interfaceData. moduleName == moduleName && interfaceData. groupName == groupName
2071
- {
2072
- // If we have a specific symbol USR, try to find its position in the current interface
2073
- if let symbolUSR = symbolUSR,
2074
- let swiftLanguageService = languageService as? SwiftLanguageService
2075
- {
2076
- do {
2077
- let position = try await swiftLanguageService. generatedInterfaceManager. position (
2078
- ofUsr: symbolUSR,
2079
- in: interfaceData
2080
- )
2081
- return Location ( uri: originatorUri, range: Range ( position) )
2082
- } catch {
2083
- // If we can't find the symbol, just return the top of the current interface
2084
- return Location ( uri: originatorUri, range: Range ( Position ( line: 0 , utf16index: 0 ) ) )
2085
- }
2086
- } else {
2087
- // No specific symbol, just return the current interface location
2088
- return Location ( uri: originatorUri, range: Range ( Position ( line: 0 , utf16index: 0 ) ) )
2089
- }
2090
- }
2091
-
2092
- // If the originator URI is already a generated interface, use its primary file for build settings
2068
+ // Let openGeneratedInterface handle all the logic, including checking if we're already in the right interface
2093
2069
let documentForBuildSettings = originatorUri. buildSettingsFile
2094
2070
2095
2071
guard
0 commit comments