line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::ebug::Wx::Command::ShowFile; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1012
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
362
|
use Devel::ebug::Wx::Plugin qw(:plugin); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
155
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
448
|
use Wx qw(:id); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub commands : Command { |
9
|
|
|
|
|
|
|
return |
10
|
|
|
|
|
|
|
( view_menu => { tag => 'view', |
11
|
|
|
|
|
|
|
label => 'View', |
12
|
|
|
|
|
|
|
priority => 500, |
13
|
|
|
|
|
|
|
}, |
14
|
|
|
|
|
|
|
showfile => { sub => \&show_file, |
15
|
|
|
|
|
|
|
menu => 'view', |
16
|
|
|
|
|
|
|
label => 'Show file', |
17
|
|
|
|
|
|
|
priority => 100, |
18
|
|
|
|
|
|
|
}, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub show_file { |
23
|
|
|
|
|
|
|
my( $wx ) = @_; |
24
|
|
|
|
|
|
|
my $files = [ $wx->ebug->filenames ]; |
25
|
|
|
|
|
|
|
my $dlg = Wx::SingleChoiceDialog->new |
26
|
|
|
|
|
|
|
( $wx, "File to display", "Choose a file", $files ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
if( $dlg->ShowModal == wxID_OK ) { |
29
|
|
|
|
|
|
|
$wx->code_display_service->show_code_for_file( $dlg->GetStringSelection ); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
$dlg->Destroy; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |