« blib/lib/PLS/Parser/Element/Variable.pm
↑ Summary
blib/lib/PLS/Server/Request/Workspace/DidChangeConfiguration.pm »
| 1 | package PLS::Server::Request::Workspace::ApplyEdit; | ||
| 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 parent 'PLS::Server::Request'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 13 | ▶ | use URI; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | PLS::Server::Request::Workspace::ApplyEdit | ||
| 13 | |||
| 14 | =head1 DESCRIPTION | ||
| 15 | |||
| 16 | This is a message from the server to the client requesting that | ||
| 17 | an edit be made to one or more sections of one or more documents. | ||
| 18 | |||
| 19 | =cut | ||
| 20 | |||
| 21 | sub new | ||
| 22 | 0 | ▶ | { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 23 | 0 | my ($class, %args) = @_; | |
| 24 | |||
| 25 | 0 | my $uri = URI::file->new($args{path})->as_string; | |
| 26 | 0 | my $text = $args{text}; | |
| 27 | |||
| 28 | my $self = { | ||
| 29 | method => 'workspace/applyEdit', | ||
| 30 | params => { | ||
| 31 | edit => { | ||
| 32 | changes => { | ||
| 33 | $uri => [ | ||
| 34 | { | ||
| 35 | range => { | ||
| 36 | start => {line => 0, character => 0}, | ||
| 37 | end => {line => $args{lines}, character => 0} | ||
| 38 | }, | ||
| 39 | 0 | newText => ${$text} | |
| 40 | } | ||
| 41 | ] | ||
| 42 | } | ||
| 43 | } | ||
| 44 | } | ||
| 45 | }; | ||
| 46 | |||
| 47 | 0 | return bless $self, $class; | |
| 48 | } ## end sub new | ||
| 49 | |||
| 50 | 13 | 1; | |