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 11     11   420 use strict;
  11         488  
  11         1199  
4 11     11   292 use warnings;
  11         191  
  11         3027  
5              
6 11     11   166 use parent 'PLS::Server::Request';
  11         64  
  11         1271  
7              
8 11     11   9473 use PLS::Parser::Document;
  11         185  
  11         1042  
9 11     11   353 use PLS::Server::Request::TextDocument::PublishDiagnostics;
  11         535  
  11         2818  
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;