File Coverage

blib/lib/PLS/Server/Request/TextDocument/DidClose.pm
Criterion Covered Total %
statement 15 21 71.4
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 20 28 71.4


line stmt bran cond sub pod time code
1             package PLS::Server::Request::TextDocument::DidClose;
2              
3 9     9   111 use strict;
  9         99  
  9         541  
4 9     9   123 use warnings;
  9         73  
  9         912  
5              
6 9     9   126 use parent 'PLS::Server::Request';
  9         118  
  9         431  
7              
8 9     9   1388 use PLS::Parser::Document;
  9         129  
  9         363  
9 9     9   110 use PLS::Server::Request::TextDocument::PublishDiagnostics;
  9         75  
  9         1191  
10              
11             =head1 NAME
12              
13             PLS::Server::Request::TextDocument::DidClose
14              
15             =head1 DESCRIPTION
16              
17             This is a notification from the client to the server that
18             a text document was closed.
19              
20             =cut
21              
22             sub service
23             {
24 0     0 0   my ($self, $server) = @_;
25              
26 0           $server->send_server_request(PLS::Server::Request::TextDocument::PublishDiagnostics->new(uri => $self->{params}{textDocument}{uri}, close => 1));
27              
28 0           my $text_document = $self->{params}{textDocument};
29 0           PLS::Parser::Document->close_file(%{$text_document});
  0            
30              
31 0           return;
32             } ## end sub service
33              
34             1;