1Padre::PluginManager(3)User Contributed Perl DocumentatioPnadre::PluginManager(3)
2
3
4

NAME

6       Padre::PluginManager - Padre plug-in manager
7

DESCRIPTION

9       The "PluginManager" class contains logic for locating and loading Padre
10       plug-ins, as well as providing part of the interface to plug-in
11       writers.
12

METHODS

14   "new"
15       The constructor returns a new "Padre::PluginManager" object, but you
16       should normally access it via the main Padre object:
17
18         my $manager = Padre->ide->plugin_manager;
19
20       First argument should be a Padre object.
21
22   "parent"
23       Stores a reference back to the parent IDE object.
24
25   "plugin_dir"
26       Returns the user plug-in directory (below the Padre configuration
27       directory).  This directory was added to the @INC module search path.
28
29   "plugins"
30       Returns a hash (reference) of plug-in names associated with a
31       Padre::PluginHandle.
32
33       This hash is only populated after "load_plugins()" was called.
34
35   "plugins_with_context_menu"
36       Returns a hash (reference) with the names of all plug-ins as keys which
37       define a hook for the context menu.
38
39       See Padre::Plugin.
40
41   current
42       Gets a Padre::Current context for the plugin manager.
43
44   "main"
45       A convenience method to get to the main window.
46
47   "load_plugins"
48       Scans for new plug-ins in the user plug-in directory, in @INC, and in
49       .par files in the user plug-in directory.
50
51       Loads any given module only once, i.e. does not refresh if the plug-in
52       has changed while Padre was running.
53
54   "reload_plugins"
55       For all registered plug-ins, unload them if they were loaded and then
56       reload them.
57
58   "alert_new"
59       The "alert_new" method is called by the main window post-initialisation
60       and checks for new plug-ins. If any are found, it presents a message to
61       the user.
62
63   "failed"
64       Returns the plug-in names (without "Padre::Plugin::" prefixed) of all
65       plug-ins that the editor attempted to load but failed. Note that after
66       a failed attempt, the plug-in is usually disabled in the configuration
67       and not loaded again when the editor is restarted.
68
69   "load_plugin"
70       Given a plug-in name such as "Foo" (the part after "Padre::Plugin"),
71       load the corresponding module, enable the plug-in and update the Plug-
72       ins menu, etc.
73
74   "unload_plugin"
75       Given a plug-in name such as "Foo" (the part after "Padre::Plugin"),
76       disable the plug-in, unload the corresponding module, and update the
77       Plug-ins menu, etc.
78
79   "reload_plugin"
80       Reload a single plug-in whose name (without "Padre::Plugin::") is
81       passed in as first argument.
82
83   "plugin_db"
84       Given a plug-in name or namespace, returns a hash reference which
85       corresponds to the configuration section in the Padre database of that
86       plug-in. Any modifications of that hash reference will, on normal exit,
87       be serialized and written back to the database file.
88
89       If the plug-in name is omitted and this method is called from a plug-in
90       namespace, the plug-in name is determine automatically.
91
92   "reload_current_plugin"
93       When developing a plug-in one usually edits the files belonging to the
94       plug-in (The "Padre::Plugin::Wonder" itself or
95       "Padre::Documents::Wonder" located in the same project as the plug-in
96       itself.
97
98       This call and the appropriate menu option should be able to load (or
99       reload) that plug-in.
100
101   "on_context_menu"
102       Called by "Padre::Wx::Editor" when a context menu is about to be
103       displayed. The method calls the context menu hooks in all plug-ins that
104       have one for plug-in specific manipulation of the context menu.
105

SEE ALSO

107       Padre, Padre::Config
108
110       Copyright 2008-2011 The Padre development team as listed in Padre.pm.
111

LICENSE

113       This program is free software; you can redistribute it and/or modify it
114       under the same terms as Perl 5 itself.
115
116
117
118perl v5.30.1                      2020-01-30           Padre::PluginManager(3)
Impressum