| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
|
3
|
9
|
|
|
9
|
|
63
|
use warnings; |
|
|
9
|
|
|
|
|
66
|
|
|
|
9
|
|
|
|
|
296
|
|
|
4
|
9
|
|
|
9
|
|
44
|
|
|
|
9
|
|
|
|
|
10
|
|
|
|
9
|
|
|
|
|
208
|
|
|
5
|
|
|
|
|
|
|
use parent 'PLS::Server::Response'; |
|
6
|
9
|
|
|
9
|
|
38
|
|
|
|
9
|
|
|
|
|
65
|
|
|
|
9
|
|
|
|
|
68
|
|
|
7
|
|
|
|
|
|
|
use IO::Async::Loop; |
|
8
|
9
|
|
|
9
|
|
680
|
|
|
|
9
|
|
|
|
|
58
|
|
|
|
9
|
|
|
|
|
268
|
|
|
9
|
|
|
|
|
|
|
use PLS::Parser::Document; |
|
10
|
9
|
|
|
9
|
|
45
|
use PLS::Parser::DocumentSymbols; |
|
|
9
|
|
|
|
|
18
|
|
|
|
9
|
|
|
|
|
257
|
|
|
11
|
9
|
|
|
9
|
|
4373
|
|
|
|
9
|
|
|
|
|
26
|
|
|
|
9
|
|
|
|
|
1885
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
PLS::Server::Response::DocumentSymbol |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
This is a message from the server to the client with a list |
|
19
|
|
|
|
|
|
|
of symbols in the current document. |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
{ |
|
24
|
|
|
|
|
|
|
my ($class, $request) = @_; |
|
25
|
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
0
|
|
my $self = bless {id => $request->{id}, result => undef}, $class; |
|
27
|
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my $uri = $request->{params}{textDocument}{uri}; |
|
29
|
|
|
|
|
|
|
my $version = PLS::Parser::Document::uri_version($uri); |
|
30
|
0
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
return PLS::Parser::DocumentSymbols->get_all_document_symbols_async($uri)->then( |
|
32
|
|
|
|
|
|
|
sub { |
|
33
|
|
|
|
|
|
|
my ($symbols) = @_; |
|
34
|
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
|
|
my $current_version = PLS::Parser::Document::uri_version($uri); |
|
36
|
|
|
|
|
|
|
return Future->done($self) unless (length $current_version); |
|
37
|
0
|
|
|
|
|
|
return Future->done($self) if (length $version and $current_version > $version); |
|
38
|
0
|
0
|
|
|
|
|
|
|
39
|
0
|
0
|
0
|
|
|
|
$self->{result} = $symbols; |
|
40
|
|
|
|
|
|
|
return Future->done($self); |
|
41
|
0
|
|
|
|
|
|
}, |
|
42
|
0
|
|
|
|
|
|
sub { |
|
43
|
|
|
|
|
|
|
return Future->done($self); |
|
44
|
|
|
|
|
|
|
} |
|
45
|
0
|
|
|
0
|
|
|
); |
|
46
|
|
|
|
|
|
|
} ## end sub new |
|
47
|
0
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |