@@ -640,9 +640,9 @@ enum class SemanticRefactoringKind {
640
640
641
641
struct SemanticRefactoringInfo {
642
642
SemanticRefactoringKind Kind;
643
- // The name of the source file to start the refactoring in. Empty if it is
644
- // the primary file (in which case the primary file from the AST is used).
645
- // This must match the buffer identifier stored in the source manager.
643
+ // The name of the source file to start the refactoring in. This must either
644
+ // be empty (in which case the primary file for the AST is used), or exactly
645
+ // match the buffer identifier stored in the source manager.
646
646
StringRef SourceFile;
647
647
unsigned Line;
648
648
unsigned Column;
@@ -982,9 +982,10 @@ class LangSupport {
982
982
EditorConsumer &Consumer) = 0;
983
983
984
984
virtual void getCursorInfo (
985
- StringRef Filename, unsigned Offset, unsigned Length, bool Actionables,
986
- bool SymbolGraph, bool CancelOnSubsequentRequest,
987
- ArrayRef<const char *> Args, Optional<VFSOptions> vfsOptions,
985
+ StringRef PrimaryFile, StringRef InputFile, unsigned Offset,
986
+ unsigned Length, bool Actionables, bool SymbolGraph,
987
+ bool CancelOnSubsequentRequest, ArrayRef<const char *> Args,
988
+ Optional<VFSOptions> vfsOptions,
988
989
SourceKitCancellationToken CancellationToken,
989
990
std::function<void (const RequestResult<CursorInfoData> &)> Receiver) = 0;
990
991
@@ -1003,25 +1004,27 @@ class LangSupport {
1003
1004
Receiver) = 0 ;
1004
1005
1005
1006
virtual void getRangeInfo (
1006
- StringRef Filename, unsigned Offset , unsigned Length ,
1007
- bool CancelOnSubsequentRequest, ArrayRef< const char *> Args ,
1008
- SourceKitCancellationToken CancellationToken,
1007
+ StringRef PrimaryFile, StringRef InputFile , unsigned Offset ,
1008
+ unsigned Length, bool CancelOnSubsequentRequest ,
1009
+ ArrayRef< const char *> Args, SourceKitCancellationToken CancellationToken,
1009
1010
std::function<void (const RequestResult<RangeInfo> &)> Receiver) = 0;
1010
1011
1011
1012
virtual void getCursorInfoFromUSR (
1012
- StringRef Filename, StringRef USR, bool CancelOnSubsequentRequest,
1013
- ArrayRef<const char *> Args, Optional<VFSOptions> vfsOptions,
1013
+ StringRef PrimaryFile, StringRef InputFile, StringRef USR,
1014
+ bool CancelOnSubsequentRequest, ArrayRef<const char *> Args,
1015
+ Optional<VFSOptions> vfsOptions,
1014
1016
SourceKitCancellationToken CancellationToken,
1015
1017
std::function<void (const RequestResult<CursorInfoData> &)> Receiver) = 0;
1016
1018
1017
1019
virtual void findRelatedIdentifiersInFile (
1018
- StringRef Filename, unsigned Offset, bool CancelOnSubsequentRequest,
1019
- ArrayRef<const char *> Args, SourceKitCancellationToken CancellationToken,
1020
+ StringRef PrimaryFile, StringRef InputFile, unsigned Offset,
1021
+ bool CancelOnSubsequentRequest, ArrayRef<const char *> Args,
1022
+ SourceKitCancellationToken CancellationToken,
1020
1023
std::function<void (const RequestResult<RelatedIdentsInfo> &)>
1021
1024
Receiver) = 0;
1022
1025
1023
1026
virtual void findActiveRegionsInFile (
1024
- StringRef Filename , ArrayRef<const char *> Args,
1027
+ StringRef PrimaryFile, StringRef InputFile , ArrayRef<const char *> Args,
1025
1028
SourceKitCancellationToken CancellationToken,
1026
1029
std::function<void (const RequestResult<ActiveRegionsInfo> &)>
1027
1030
Receiver) = 0;
@@ -1059,7 +1062,7 @@ class LangSupport {
1059
1062
CategorizedEditsReceiver Receiver) = 0;
1060
1063
1061
1064
virtual void collectExpressionTypes (
1062
- StringRef FileName , ArrayRef<const char *> Args,
1065
+ StringRef PrimaryFile, StringRef InputFile , ArrayRef<const char *> Args,
1063
1066
ArrayRef<const char *> ExpectedProtocols, bool FullyQualified,
1064
1067
bool CanonicalType, SourceKitCancellationToken CancellationToken,
1065
1068
std::function<void (const RequestResult<ExpressionTypesInFile> &)>
@@ -1069,7 +1072,7 @@ class LangSupport {
1069
1072
// / the source file. If `Offset` or `Length` are empty, variable types for
1070
1073
// / the entire document are collected.
1071
1074
virtual void collectVariableTypes (
1072
- StringRef FileName , ArrayRef<const char *> Args,
1075
+ StringRef PrimaryFile, StringRef InputFile , ArrayRef<const char *> Args,
1073
1076
Optional<unsigned > Offset, Optional<unsigned > Length, bool FullyQualified,
1074
1077
SourceKitCancellationToken CancellationToken,
1075
1078
std::function<void (const RequestResult<VariableTypesInFile> &)>
0 commit comments