-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMatlabLanguageServerHelper.m
38 lines (32 loc) · 1.44 KB
/
MatlabLanguageServerHelper.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
classdef (Hidden) MatlabLanguageServerHelper < handle
% MATLABLANGUAGESERVERHELPER Class for managing the MATLAB®-side operations
% which support the MATLAB Language Server.
% Copyright 2022 - 2024 The MathWorks, Inc.
properties
FeatureHandlers (1,:) matlabls.handlers.FeatureHandler
end
methods
function this = MatlabLanguageServerHelper ()
matlabls.internal.CommunicationManager.initialize();
this.initializeFeatureHandlers()
end
function close (this)
arrayfun(@(handler) handler.close(), this.FeatureHandlers)
end
function delete (this)
this.close()
end
end
methods (Access = private)
function initializeFeatureHandlers (this)
% Initialize all supported feature handlers
this.FeatureHandlers(end + 1) = matlabls.handlers.CompletionSupportHandler();
this.FeatureHandlers(end + 1) = matlabls.handlers.FormatSupportHandler();
this.FeatureHandlers(end + 1) = matlabls.handlers.IndexingHandler();
this.FeatureHandlers(end + 1) = matlabls.handlers.LintingSupportHandler();
this.FeatureHandlers(end + 1) = matlabls.handlers.NavigationSupportHandler();
this.FeatureHandlers(end + 1) = matlabls.handlers.FoldingSupportHandler();
this.FeatureHandlers(end + 1) = matlabls.handlers.PathSynchronizerHandler();
end
end
end