8181 < div class ="body " id ="spc-section-body " role ="main ">
8282
8383 < h1 > Source code for envisage.core_plugin</ h1 > < div class ="highlight "> < pre >
84- < span > </ span > < span class ="c1 "> # (C) Copyright 2007-2024 Enthought, Inc., Austin, TX</ span >
84+ < span > </ span > < span class ="c1 "> # (C) Copyright 2007-2025 Enthought, Inc., Austin, TX</ span >
8585< span class ="c1 "> # All rights reserved.</ span >
8686< span class ="c1 "> #</ span >
8787< span class ="c1 "> # This software is provided without warranty under the terms of the BSD</ span >
@@ -92,17 +92,17 @@ <h1>Source code for envisage.core_plugin</h1><div class="highlight"><pre>
9292< span class ="c1 "> # Thanks for using Enthought open source!</ span >
9393< span class ="sd "> """ The Envisage core plugin. """</ span >
9494
95- < span class ="kn "> from</ span > < span class ="nn "> contextlib</ span > < span class ="kn "> import</ span > < span class ="n "> closing</ span >
95+ < span class ="kn "> from</ span > < span class =" w " > </ span > < span class ="nn "> contextlib</ span > < span class =" w " > </ span > < span class ="kn "> import</ span > < span class ="n "> closing</ span >
9696
97- < span class ="kn "> from</ span > < span class ="nn "> traits.api</ span > < span class ="kn "> import</ span > < span class ="n "> List</ span > < span class ="p "> ,</ span > < span class ="n "> on_trait_change</ span > < span class ="p "> ,</ span > < span class ="n "> Str</ span >
97+ < span class ="kn "> from</ span > < span class =" w " > </ span > < span class ="nn "> traits.api</ span > < span class =" w " > </ span > < span class ="kn "> import</ span > < span class ="n "> List</ span > < span class ="p "> ,</ span > < span class ="n "> on_trait_change</ span > < span class ="p "> ,</ span > < span class ="n "> Str</ span >
9898
9999< span class ="c1 "> # Enthought library imports.</ span >
100- < span class ="kn "> from</ span > < span class ="nn "> envisage.extension_point</ span > < span class ="kn "> import</ span > < span class ="n "> ExtensionPoint</ span >
101- < span class ="kn "> from</ span > < span class ="nn "> envisage.plugin</ span > < span class ="kn "> import</ span > < span class ="n "> Plugin</ span >
102- < span class ="kn "> from</ span > < span class ="nn "> envisage.service_offer</ span > < span class ="kn "> import</ span > < span class ="n "> ServiceOffer</ span >
100+ < span class ="kn "> from</ span > < span class =" w " > </ span > < span class ="nn "> envisage.extension_point</ span > < span class =" w " > </ span > < span class ="kn "> import</ span > < span class ="n "> ExtensionPoint</ span >
101+ < span class ="kn "> from</ span > < span class =" w " > </ span > < span class ="nn "> envisage.plugin</ span > < span class =" w " > </ span > < span class ="kn "> import</ span > < span class ="n "> Plugin</ span >
102+ < span class ="kn "> from</ span > < span class =" w " > </ span > < span class ="nn "> envisage.service_offer</ span > < span class =" w " > </ span > < span class ="kn "> import</ span > < span class ="n "> ServiceOffer</ span >
103103
104104
105- < div class ="viewcode-block " id ="CorePlugin "> < a class ="viewcode-back " href ="../../api/envisage.core_plugin.html#envisage.core_plugin.CorePlugin "> [docs]</ a > < span class ="k "> class</ span > < span class ="nc "> CorePlugin</ span > < span class ="p "> (</ span > < span class ="n "> Plugin</ span > < span class ="p "> ):</ span >
105+ < div class ="viewcode-block " id ="CorePlugin "> < a class ="viewcode-back " href ="../../api/envisage.core_plugin.html#envisage.core_plugin.CorePlugin "> [docs]</ a > < span class ="k "> class</ span > < span class =" w " > </ span > < span class ="nc "> CorePlugin</ span > < span class ="p "> (</ span > < span class ="n "> Plugin</ span > < span class ="p "> ):</ span >
106106< span class ="w "> </ span > < span class ="sd "> """The Envisage core plugin.</ span >
107107
108108< span class ="sd "> The core plugin offers facilities that are generally useful when building</ span >
@@ -165,7 +165,7 @@ <h1>Source code for envisage.core_plugin</h1><div class="highlight"><pre>
165165 < span class ="p "> )</ span >
166166
167167 < span class ="nd "> @on_trait_change</ span > < span class ="p "> (</ span > < span class ="s2 "> "preferences_items"</ span > < span class ="p "> )</ span >
168- < span class ="k "> def</ span > < span class ="nf "> _update_preferences</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ,</ span > < span class ="n "> event</ span > < span class ="p "> ):</ span >
168+ < span class ="k "> def</ span > < span class =" w " > </ span > < span class ="nf "> _update_preferences</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ,</ span > < span class ="n "> event</ span > < span class ="p "> ):</ span >
169169< span class ="w "> </ span > < span class ="sd "> """React to new preferencess being *added*.</ span >
170170
171171< span class ="sd "> Note that we don't currently do anything if preferences are *removed*.</ span >
@@ -198,7 +198,7 @@ <h1>Source code for envisage.core_plugin</h1><div class="highlight"><pre>
198198 < span class ="p "> )</ span >
199199
200200 < span class ="nd "> @on_trait_change</ span > < span class ="p "> (</ span > < span class ="s2 "> "service_offers_items"</ span > < span class ="p "> )</ span >
201- < span class ="k "> def</ span > < span class ="nf "> _register_new_services</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ,</ span > < span class ="n "> event</ span > < span class ="p "> ):</ span >
201+ < span class ="k "> def</ span > < span class =" w " > </ span > < span class ="nf "> _register_new_services</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ,</ span > < span class ="n "> event</ span > < span class ="p "> ):</ span >
202202< span class ="w "> </ span > < span class ="sd "> """React to new service offers being *added*.</ span >
203203
204204< span class ="sd "> Note that we don't currently do anything if services are *removed* as</ span >
@@ -217,7 +217,7 @@ <h1>Source code for envisage.core_plugin</h1><div class="highlight"><pre>
217217 < span class ="c1 "> # 'IPlugin' interface.</ span >
218218 < span class ="c1 "> ###########################################################################</ span >
219219
220- < div class ="viewcode-block " id ="CorePlugin.start "> < a class ="viewcode-back " href ="../../api/envisage.core_plugin.html#envisage.core_plugin.CorePlugin.start "> [docs]</ a > < span class ="k "> def</ span > < span class ="nf "> start</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ):</ span >
220+ < div class ="viewcode-block " id ="CorePlugin.start "> < a class ="viewcode-back " href ="../../api/envisage.core_plugin.html#envisage.core_plugin.CorePlugin.start "> [docs]</ a > < span class ="k "> def</ span > < span class =" w " > </ span > < span class ="nf "> start</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ):</ span >
221221< span class ="w "> </ span > < span class ="sd "> """Start the plugin."""</ span >
222222 < span class ="c1 "> # Load all contributed preferences files into the application's root</ span >
223223 < span class ="c1 "> # preferences node.</ span >
@@ -234,11 +234,11 @@ <h1>Source code for envisage.core_plugin</h1><div class="highlight"><pre>
234234 < span class ="c1 "> # Private interface.</ span >
235235 < span class ="c1 "> ###########################################################################</ span >
236236
237- < span class ="k "> def</ span > < span class ="nf "> _load_preferences</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ,</ span > < span class ="n "> preferences</ span > < span class ="p "> ):</ span >
237+ < span class ="k "> def</ span > < span class =" w " > </ span > < span class ="nf "> _load_preferences</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ,</ span > < span class ="n "> preferences</ span > < span class ="p "> ):</ span >
238238< span class ="w "> </ span > < span class ="sd "> """Load all contributed preferences into a preferences node."""</ span >
239239
240240 < span class ="c1 "> # Enthought library imports.</ span >
241- < span class ="kn "> from</ span > < span class ="nn "> envisage.resource.api</ span > < span class ="kn "> import</ span > < span class ="n "> ResourceManager</ span >
241+ < span class ="kn "> from</ span > < span class =" w " > </ span > < span class ="nn "> envisage.resource.api</ span > < span class =" w " > </ span > < span class ="kn "> import</ span > < span class ="n "> ResourceManager</ span >
242242
243243 < span class ="c1 "> # We add the plugin preferences to the default scope. The default scope</ span >
244244 < span class ="c1 "> # is a transient scope which means that (quite nicely ;^) we never</ span >
@@ -253,12 +253,12 @@ <h1>Source code for envisage.core_plugin</h1><div class="highlight"><pre>
253253 < span class ="k "> with</ span > < span class ="n "> closing</ span > < span class ="p "> (</ span > < span class ="n "> resource_manager</ span > < span class ="o "> .</ span > < span class ="n "> file</ span > < span class ="p "> (</ span > < span class ="n "> resource_name</ span > < span class ="p "> ))</ span > < span class ="k "> as</ span > < span class ="n "> f</ span > < span class ="p "> :</ span >
254254 < span class ="n "> default</ span > < span class ="o "> .</ span > < span class ="n "> load</ span > < span class ="p "> (</ span > < span class ="n "> f</ span > < span class ="p "> )</ span >
255255
256- < span class ="k "> def</ span > < span class ="nf "> _register_service_offers</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ,</ span > < span class ="n "> service_offers</ span > < span class ="p "> ):</ span >
256+ < span class ="k "> def</ span > < span class =" w " > </ span > < span class ="nf "> _register_service_offers</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ,</ span > < span class ="n "> service_offers</ span > < span class ="p "> ):</ span >
257257< span class ="w "> </ span > < span class ="sd "> """Register a list of service offers."""</ span >
258258
259259 < span class ="k "> return</ span > < span class ="nb "> list</ span > < span class ="p "> (</ span > < span class ="nb "> map</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="o "> .</ span > < span class ="n "> _register_service_offer</ span > < span class ="p "> ,</ span > < span class ="n "> service_offers</ span > < span class ="p "> ))</ span >
260260
261- < span class ="k "> def</ span > < span class ="nf "> _register_service_offer</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ,</ span > < span class ="n "> service_offer</ span > < span class ="p "> ):</ span >
261+ < span class ="k "> def</ span > < span class =" w " > </ span > < span class ="nf "> _register_service_offer</ span > < span class ="p "> (</ span > < span class ="bp "> self</ span > < span class ="p "> ,</ span > < span class ="n "> service_offer</ span > < span class ="p "> ):</ span >
262262< span class ="w "> </ span > < span class ="sd "> """Register a service offer."""</ span >
263263
264264 < span class ="n "> service_id</ span > < span class ="o "> =</ span > < span class ="bp "> self</ span > < span class ="o "> .</ span > < span class ="n "> application</ span > < span class ="o "> .</ span > < span class ="n "> register_service</ span > < span class ="p "> (</ span >
@@ -304,10 +304,10 @@ <h3 id="searchlabel">Quick search</h3>
304304 < div class ="row-fluid ">
305305 < ul class ="inline pull-left ">
306306 < li >
307- © Copyright 2007-2024 , Enthought
307+ © Copyright 2007-2025 , Enthought
308308 </ li >
309309 < li >
310- Last updated on Sep 06, 2024 .
310+ Last updated on Apr 25, 2025 .
311311 </ li >
312312 < li >
313313 Created using < a href ="http://sphinx.pocoo.org/ "> Sphinx</ a > 6.1.3.
0 commit comments