line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PLS::Server::Response::WorkspaceSymbols; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
46
|
use strict; |
|
9
|
|
|
|
|
26
|
|
|
9
|
|
|
|
|
217
|
|
4
|
9
|
|
|
9
|
|
44
|
use warnings; |
|
9
|
|
|
|
|
9
|
|
|
9
|
|
|
|
|
246
|
|
5
|
|
|
|
|
|
|
|
6
|
9
|
|
|
9
|
|
48
|
use parent 'PLS::Server::Response'; |
|
9
|
|
|
|
|
30
|
|
|
9
|
|
|
|
|
111
|
|
7
|
|
|
|
|
|
|
|
8
|
9
|
|
|
9
|
|
640
|
use PLS::Parser::Index; |
|
9
|
|
|
|
|
12
|
|
|
9
|
|
|
|
|
2337
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new |
11
|
|
|
|
|
|
|
{ |
12
|
0
|
|
|
0
|
0
|
|
my ($class, $request) = @_; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
my $query = $request->{params}{query}; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my $index = PLS::Parser::Index->new(); |
17
|
0
|
|
|
|
|
|
my @symbols; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
foreach my $name (keys %{$index->subs}) |
|
0
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
{ |
21
|
0
|
0
|
|
|
|
|
next if ($name !~ /\Q$query\E/i); |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
my $refs = $index->subs->{$name}; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
foreach my $sub (@{$refs}) |
|
0
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
{ |
27
|
0
|
|
|
|
|
|
push @symbols, |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
name => $name, |
30
|
|
|
|
|
|
|
kind => 12, |
31
|
|
|
|
|
|
|
location => $sub |
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
} ## end foreach my $sub (@{$refs}) |
34
|
|
|
|
|
|
|
} ## end foreach my $name (keys %{$index...}) |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
foreach my $name (keys %{$index->packages}) |
|
0
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
{ |
38
|
0
|
0
|
|
|
|
|
next if ($name !~ /\Q$query\E/i); |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
my $refs = $index->packages->{$name}; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
foreach my $package (@{$refs}) |
|
0
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
{ |
44
|
0
|
|
|
|
|
|
push @symbols, |
45
|
|
|
|
|
|
|
{ |
46
|
|
|
|
|
|
|
name => $name, |
47
|
|
|
|
|
|
|
kind => 4, |
48
|
|
|
|
|
|
|
location => $package |
49
|
|
|
|
|
|
|
}; |
50
|
|
|
|
|
|
|
} ## end foreach my $package (@{$refs...}) |
51
|
|
|
|
|
|
|
} ## end foreach my $name (keys %{$index...}) |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
return |
54
|
|
|
|
|
|
|
bless { |
55
|
|
|
|
|
|
|
id => $request->{id}, |
56
|
0
|
|
|
|
|
|
result => \@symbols |
57
|
|
|
|
|
|
|
}, $class; |
58
|
|
|
|
|
|
|
} ## end sub new |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |