~ubuntu-branches/ubuntu/precise/padre/precise

« back to all changes in this revision

Viewing changes to lib/Padre/QuickFixProvider.pm

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2009-10-29 17:40:10 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20091029174010-yu27elyiv9izv0dv
Tags: 0.48.ds2-1
* New Upstream Version
  + new dependencies:
    - libdevel-refactor-perl 0.05
    - libfile-next-perl 1.04
    - libpod-perldoc-perl 3.15
    - libversion-perl (perl 5.10)
    - pip 0.13
  + new Recommends:
    - libformat-human-bytes-perl
  + dropped dependdencies
    - libcapture-tiny-perl
    - libfile-sharedir-par-perl
    - libpar-perl
  + bump libfile-which-perl, libppi-per, libppix-editortools-perl,
    libtest-script-perl and libwx-perl-processstream-perl dependencies
  + update translators list in d/copyright
  + add copyright holders for code borrowed from ExtUtils::MakeMaker
  + rules: drop empty Padre::Wx::Dialog::OpenResource::SearchTask manpage
  + refresh disable-tcp-server.patch
  + drop patches applied upstream: fix-perl-interpreter-path.patch,
    fix-pod-errors.patch and fix-whatis.patch
* Standards-Version: 3.8.3 (no changes)
* update debian/repack.sh to remove script/padre.exe,
  share/padre-splash-ccnc.bmp and  share/doc/perlopref.pod and plug it
  into debian/watch; describe repackaging in debian/copyright
* copyright: update
* update lintian override of template/example scripts not being
  executable
* add fix-helpprovider-with-no-perldoc.patch so that the Help browser does
  not hang because of the missing perlopref.pod
* update README.debian with regard to repackaging

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package Padre::QuickFixProvider;
 
2
 
 
3
use 5.008;
 
4
use strict;
 
5
use warnings;
 
6
 
 
7
our $VERSION = '0.48';
 
8
 
 
9
#
 
10
# Constructor.
 
11
# No need to override this
 
12
#
 
13
sub new {
 
14
        my ($class) = @_;
 
15
 
 
16
        # Create myself :)
 
17
        my $self = bless {}, $class;
 
18
 
 
19
        return $self;
 
20
}
 
21
 
 
22
#
 
23
# Returns the quick fix list
 
24
#
 
25
sub quick_fix_list {
 
26
        my ( $self, $doc, $editor ) = @_;
 
27
        warn "quick_fix_list, You need to override this to do something useful with quick fix";
 
28
        return ();
 
29
}
 
30
 
 
31
1;
 
32
 
 
33
__END__
 
34
 
 
35
=head1 NAME
 
36
 
 
37
Padre::QuickFixProvider - Padre Quick Fix Provider API
 
38
 
 
39
=head1 DESCRIPTION
 
40
 
 
41
=head2 Quick Fix (Shortcut: Ctrl-2)
 
42
 
 
43
This opens a dialog that lists different actions that relate to 
 
44
fixing the code at the cursor. It will call B<event_on_quick_fix> method 
 
45
passing a L<Padre::Wx::Editor> object on the current Padre document. 
 
46
Please see the following sample implementation:
 
47
 
 
48
        sub quick_fix_list {
 
49
                my ($self, $editor) = @_;
 
50
                
 
51
                my @items = ( 
 
52
                        {
 
53
                                text     => '123...', 
 
54
                                listener => sub { 
 
55
                                        print "123...\n";
 
56
                                } 
 
57
                        },
 
58
                        {
 
59
                                text     => '456...', 
 
60
                                listener => sub { 
 
61
                                        print "456...\n";
 
62
                                } 
 
63
                        },
 
64
                );
 
65
                
 
66
                return @items;
 
67
        }
 
68
 
 
69
=cut
 
70
 
 
71
The B<Padre::QuickFixProvider> class provides a base class, default implementation
 
72
and API documentation for quick fix provision support in L<Padre>.
 
73
 
 
74
# Copyright 2008-2009 The Padre development team as listed in Padre.pm.
 
75
# LICENSE
 
76
# This program is free software; you can redistribute it and/or
 
77
# modify it under the same terms as Perl 5 itself.