| 1 | package PLS::Server::Method::Workspace; | ||||||||||
| 2 | |||||||||||
| 3 | 13 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 13 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 13 | ▶ | use PLS::Server::Request::Workspace::Configuration; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 13 | ▶ | use PLS::Server::Request::Workspace::DidChangeConfiguration; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 13 | ▶ | use PLS::Server::Request::Workspace::DidChangeWatchedFiles; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 13 | ▶ | use PLS::Server::Request::Workspace::DidChangeWorkspaceFolders; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 13 | ▶ | use PLS::Server::Request::Workspace::ExecuteCommand; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 13 | ▶ | use PLS::Server::Request::Workspace::Symbol; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | =head1 NAME | ||||||||||
| 14 | |||||||||||
| 15 | PLS::Server::Method::Workspace | ||||||||||
| 16 | |||||||||||
| 17 | =head1 DESCRIPTION | ||||||||||
| 18 | |||||||||||
| 19 | This module redirects requests starting with C<workspace/> to the appropriate | ||||||||||
| 20 | subclass of L<PLS::Server::Request> for the type of request. | ||||||||||
| 21 | |||||||||||
| 22 | Requests currently implemented: | ||||||||||
| 23 | |||||||||||
| 24 | =over | ||||||||||
| 25 | |||||||||||
| 26 | =item workspace/didChangeConfiguration - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_didChangeConfiguration> | ||||||||||
| 27 | |||||||||||
| 28 | L<PLS::Server::Request::Workspace::DidChangeConfiguration> | ||||||||||
| 29 | |||||||||||
| 30 | =item workspace/didChangeWatchedFiles - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_didChangeWatchedFiles> | ||||||||||
| 31 | |||||||||||
| 32 | L<PLS::Server::Request::Workspace::DidChangeWatchedFiles> | ||||||||||
| 33 | |||||||||||
| 34 | =item workspace/didChangeWorkspaceFolders - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_didChangeWorkspaceFolders> | ||||||||||
| 35 | |||||||||||
| 36 | L<PLS::Server::Request::Workspace::DidChangeWorkspaceFolders> | ||||||||||
| 37 | |||||||||||
| 38 | =item workspace/configuration - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_configuration> | ||||||||||
| 39 | |||||||||||
| 40 | L<PLS::Server::Request::Workspace::Configuration> | ||||||||||
| 41 | |||||||||||
| 42 | =item workspace/executeCommand - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_executeCommand> | ||||||||||
| 43 | |||||||||||
| 44 | L<PLS::Server::Request::Workspace::ExecuteCommand> | ||||||||||
| 45 | |||||||||||
| 46 | =back | ||||||||||
| 47 | |||||||||||
| 48 | =cut | ||||||||||
| 49 | |||||||||||
| 50 | sub get_request | ||||||||||
| 51 | 0 | ▶ | { | ||||||||
|
Subroutine
get_request: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||
| 52 | 0 | my ($request) = @_; | |||||||||
| 53 | |||||||||||
| 54 | 0 | my (undef, $method) = split m{/}, $request->{method}; | |||||||||
| 55 | |||||||||||
| 56 | 0 | ▶ | if ($method eq 'didChangeConfiguration') | ||||||||
|
Branch: 1 branch
| |||||||||||
| 57 | { | ||||||||||
| 58 | 0 | return PLS::Server::Request::Workspace::DidChangeConfiguration->new($request); | |||||||||
| 59 | } | ||||||||||
| 60 | 0 | ▶ | if ($method eq 'didChangeWatchedFiles') | ||||||||
|
Branch: 1 branch
| |||||||||||
| 61 | { | ||||||||||
| 62 | 0 | return PLS::Server::Request::Workspace::DidChangeWatchedFiles->new($request); | |||||||||
| 63 | } | ||||||||||
| 64 | 0 | ▶ | if ($method eq 'didChangeWorkspaceFolders') | ||||||||
|
Branch: 1 branch
| |||||||||||
| 65 | { | ||||||||||
| 66 | 0 | return PLS::Server::Request::Workspace::DidChangeWorkspaceFolders->new($request); | |||||||||
| 67 | } | ||||||||||
| 68 | 0 | ▶ | if ($method eq 'configuration') | ||||||||
|
Branch: 1 branch
| |||||||||||
| 69 | { | ||||||||||
| 70 | 0 | return PLS::Server::Request::Workspace::Configuration->new($request); | |||||||||
| 71 | } | ||||||||||
| 72 | 0 | ▶ | if ($method eq 'executeCommand') | ||||||||
|
Branch: 1 branch
| |||||||||||
| 73 | { | ||||||||||
| 74 | 0 | return PLS::Server::Request::Workspace::ExecuteCommand->new($request); | |||||||||
| 75 | } | ||||||||||
| 76 | 0 | ▶ | if ($method eq 'symbol') | ||||||||
|
Branch: 1 branch
| |||||||||||
| 77 | { | ||||||||||
| 78 | 0 | return PLS::Server::Request::Workspace::Symbol->new($request); | |||||||||
| 79 | } | ||||||||||
| 80 | } ## end sub get_request | ||||||||||
| 81 | |||||||||||
| 82 | 13 | 1; | |||||||||