parameters: (self, cls)
return_statement: return plugin
docstring: Gets and returns the instance of given class if it has
          already been activated.
          @param cls: class object to get from metaregistery
          @return: returns either None or the intialiazed class object
docstring_summary: Gets and returns the instance of given class if it has
          already been activated.
          @param cls: class object to get from metaregistery
          @return: returns either None or the intialiazed class object
docstring_tokens: Gets and returns the instance of given class if it has already been activated . @param cls : class object to get from metaregistery @return : returns either None or the intialiazed class object
function: def __getitem__(self, cls):
          """Gets and returns the instance of given class if it has
          already been activated.
          @param cls: class object to get from metaregistery
          @return: returns either None or the intialiazed class object
  
          """
          nspace = cls.__module__ + "." + cls.__name__
          if nspace in ed_glob.DEFAULT_PLUGINS:
              self._enabled[cls] = True
  
          if cls not in self._enabled:
              self._enabled[cls] = False # If its a new plugin disable by default
  
          if not self._enabled[cls]:
              return None
  
  #        plugin = self._plugins.get(cls)
          plugin = None
          pdata = self._pdata.get(cls, None)
          if pdata is not None:
              plugin = pdata.GetInstance()
          else:
              # Check defaults
              plugin = self._defaults.get(cls, None)
  
          # Plugin not instantiated yet
          if plugin is None:
              if cls not in PluginMeta._plugins:
                  self.LOG("[pluginmgr][err] %s Not Registered" % cls.__name__)
              try:
                  plugin = cls(self)
              except (AttributeError, TypeError), msg:
                  self.LOG("[pluginmgr][err] Unable in initialize plugin")
                  self.LOG("[pluginmgr][err] %s" % str(msg))
  
          return plugin
function_tokens: def __getitem__ ( self , cls ) : nspace = cls . __module__ + "." + cls . __name__ if nspace in ed_glob . DEFAULT_PLUGINS : self . _enabled [ cls ] = True if cls not in self . _enabled : self . _enabled [ cls ] = False # If its a new plugin disable by default if not self . _enabled [ cls ] : return None #        plugin = self._plugins.get(cls) plugin = None pdata = self . _pdata . get ( cls , None ) if pdata is not None : plugin = pdata . GetInstance ( ) else : # Check defaults plugin = self . _defaults . get ( cls , None ) # Plugin not instantiated yet if plugin is None : if cls not in PluginMeta . _plugins : self . LOG ( "[pluginmgr][err] %s Not Registered" % cls . __name__ ) try : plugin = cls ( self ) except ( AttributeError , TypeError ) , msg : self . LOG ( "[pluginmgr][err] Unable in initialize plugin" ) self . LOG ( "[pluginmgr][err] %s" % str ( msg ) ) return plugin