@@ -640,10 +640,10 @@ 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.
646
- StringRef SourceFile ;
643
+ // The name of the input buffer 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
+ StringRef InputBufferName ;
647
647
unsigned Line;
648
648
unsigned Column;
649
649
unsigned Length;
@@ -982,14 +982,15 @@ 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 PrimaryFilePath, StringRef InputBufferName, 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
991
992
virtual void
992
- getDiagnostics (StringRef InputFile , ArrayRef<const char *> Args,
993
+ getDiagnostics (StringRef PrimaryFilePath , ArrayRef<const char *> Args,
993
994
Optional<VFSOptions> VfsOptions,
994
995
SourceKitCancellationToken CancellationToken,
995
996
std::function<void (const RequestResult<DiagnosticsResult> &)>
@@ -1003,26 +1004,28 @@ 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 PrimaryFilePath, StringRef InputBufferName , 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 PrimaryFilePath, StringRef InputBufferName, 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 PrimaryFilePath, StringRef InputBufferName, 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 ,
1025
- SourceKitCancellationToken CancellationToken,
1027
+ StringRef PrimaryFilePath, StringRef InputBufferName ,
1028
+ ArrayRef< const char *> Args, SourceKitCancellationToken CancellationToken,
1026
1029
std::function<void (const RequestResult<ActiveRegionsInfo> &)>
1027
1030
Receiver) = 0;
1028
1031
@@ -1052,25 +1055,27 @@ class LangSupport {
1052
1055
SourceKitCancellationToken CancellationToken,
1053
1056
CategorizedRenameRangesReceiver Receiver) = 0 ;
1054
1057
1055
- virtual void semanticRefactoring (StringRef PrimaryFile ,
1058
+ virtual void semanticRefactoring (StringRef PrimaryFilePath ,
1056
1059
SemanticRefactoringInfo Info,
1057
1060
ArrayRef<const char *> Args,
1058
1061
SourceKitCancellationToken CancellationToken,
1059
1062
CategorizedEditsReceiver Receiver) = 0;
1060
1063
1061
1064
virtual void collectExpressionTypes (
1062
- StringRef FileName, ArrayRef<const char *> Args,
1063
- ArrayRef<const char *> ExpectedProtocols, bool FullyQualified,
1064
- bool CanonicalType, SourceKitCancellationToken CancellationToken,
1065
+ StringRef PrimaryFilePath, StringRef InputBufferName,
1066
+ ArrayRef<const char *> Args, ArrayRef<const char *> ExpectedProtocols,
1067
+ bool FullyQualified, bool CanonicalType,
1068
+ SourceKitCancellationToken CancellationToken,
1065
1069
std::function<void (const RequestResult<ExpressionTypesInFile> &)>
1066
1070
Receiver) = 0;
1067
1071
1068
1072
// / Collects variable types for a range defined by `Offset` and `Length` in
1069
1073
// / the source file. If `Offset` or `Length` are empty, variable types for
1070
1074
// / the entire document are collected.
1071
1075
virtual void collectVariableTypes (
1072
- StringRef FileName, ArrayRef<const char *> Args,
1073
- Optional<unsigned > Offset, Optional<unsigned > Length, bool FullyQualified,
1076
+ StringRef PrimaryFilePath, StringRef InputBufferName,
1077
+ ArrayRef<const char *> Args, Optional<unsigned > Offset,
1078
+ Optional<unsigned > Length, bool FullyQualified,
1074
1079
SourceKitCancellationToken CancellationToken,
1075
1080
std::function<void (const RequestResult<VariableTypesInFile> &)>
1076
1081
Receiver) = 0;
0 commit comments