22 % INDEXINGHANDLER The feature handler for indexing documents for variable,
33 % function, and class references and definitions.
44
5- % Copyright 2022 - 2023 The MathWorks, Inc.
5+ % Copyright 2022 - 2024 The MathWorks, Inc.
66
77 properties (Access = private )
88 DocumentIndexingRequestChannel = ' /matlabls/indexDocument/request'
9- DocumentIndexingResponseChannel = ' /matlabls/indexDocument/response/ ' % Needs to be appended with requestId
9+ DocumentIndexingResponseChannel = ' /matlabls/indexDocument/response'
1010
1111 FolderIndexingRequestChannel = ' /matlabls/indexFolders/request'
12- FolderIndexingResponseChannel = ' /matlabls/indexFolders/response/ ' % Needs to be appended with requestId
12+ FolderIndexingResponseChannel = ' /matlabls/indexFolders/response'
1313 end
1414
1515 methods
@@ -26,22 +26,20 @@ function handleDocumentIndexRequest (this, msg)
2626
2727 code = msg .code ;
2828 filePath = msg .filePath ;
29- requestId = num2str(msg .requestId );
3029
3130 codeData = matlabls .internal .computeCodeData(code , filePath );
3231
33- responseChannel = strcat(this .DocumentIndexingResponseChannel , requestId );
32+ responseChannel = strcat(this .DocumentIndexingResponseChannel , ' / ' , msg . channelId );
3433 this .CommManager .publish(responseChannel , codeData )
3534 end
3635
3736 function handleFolderIndexRequest (this , msg )
3837 % Indexes M-files the provided folders
3938
4039 folders = msg .folders ;
41- requestId = num2str(msg .requestId );
4240
4341 files = this .getAllMFilesToIndex(folders );
44- this .parseFiles(requestId , files )
42+ this .parseFiles(msg . channelId , files )
4543 end
4644
4745 function filesToIndex = getAllMFilesToIndex (~, folders )
@@ -127,7 +125,7 @@ function parseFile (this, requestId, filePath, isLastFile)
127125 msg.isDone = false ;
128126 end
129127
130- responseChannel = strcat(this .FolderIndexingResponseChannel , requestId );
128+ responseChannel = strcat(this .FolderIndexingResponseChannel , ' / ' , requestId );
131129 this .CommManager .publish(responseChannel , msg );
132130 end
133131 end
0 commit comments