#NEWLINE# def collect( self , manager , node , top_config = None ) : #NEWLINE# #INDENT# top_config = ( top_config or self ) #NEWLINE# plugin_path = os . path . join ( self . path , PLUGIN_FILE ) #NEWLINE# if ( not os . path . exists ( plugin_path ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# plugin_key = ( manager , self , node , top_config ) #NEWLINE# plugin = g_plugin_cache . get ( plugin_key ) #NEWLINE# if plugin : #NEWLINE# #INDENT# return plugin #NEWLINE# #UNINDENT# cache_key = ( plugin_path , os . stat ( plugin_path ) . st_mtime ) #NEWLINE# module = g_plugin_module_cache . get ( cache_key ) #NEWLINE# if ( not module ) : #NEWLINE# #INDENT# module = imp . load_source ( ( '_poni_plugin_%r' % len ( g_plugin_module_cache ) ) , plugin_path ) #NEWLINE# g_plugin_module_cache [ cache_key ] = module #NEWLINE# #UNINDENT# plugin = module . PlugIn ( manager , self , node , top_config ) #NEWLINE# plugin . add_actions ( ) #NEWLINE# plugin . add_all_controls ( ) #NEWLINE# top_config . plugin = plugin #NEWLINE# g_plugin_cache [ plugin_key ] = plugin