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