NINJA-IDE

Contents

Module: plugin_manager.py API

No description.


Global Functions:

Function: PluginManager(*args, **kw) [at ln:108]

def PluginManager(*args, **kw):

No description.


Function: __get_all_plugin_descriptors() [at ln:426]

def __get_all_plugin_descriptors():
Returns all the .plugin files

Function: _availables_plugins(url) [at ln:390]

def _availables_plugins(url):
Return the availables plugins from an url in NINJA-IDE web page

Function: available_community_plugins() [at ln:409]

def available_community_plugins():
Returns a dict with COMMUNITY availables plugins in NINJA-IDE web page

Function: available_oficial_plugins() [at ln:402]

def available_oficial_plugins():
Returns a dict with OFICIAL availables plugins in NINJA-IDE web page

Function: download_plugin(file_) [at ln:435]

def download_plugin(file_):
Download a plugin specified by file_

Function: has_dependencies(plug) [at ln:482]

def has_dependencies(plug):

No description.


Function: local_plugins() [at ln:416]

def local_plugins():
Returns the local plugins

Function: manual_install(file_) [at ln:461]

def manual_install(file_):
Copy zip file and install.

Function: uninstall_plugin(plug) [at ln:530]

def uninstall_plugin(plug):
Uninstall the given plugin

Function: update_local_plugin_descriptor(plugins) [at ln:505]

def update_local_plugin_descriptor(plugins):
updates the local plugin description
The description.json file holds the information about the plugins
downloaded with NINJA-IDE
This is a way to track the versions of the plugins

Class: __PluginManager(object)

class __PluginManager(object):
Plugin manager allows to load, unload, initialize plugins.

Function: __bool__() [at ln:235]

def __bool__():
Magic method to indicate that any
instance must pass the if conditional
if x:

Function: __contains__(plugin_name) [at ln:206]

def __contains__(plugin_name):
Magic method to know whether the
PluginManager contains
a plugin with a given name.

@param plugin_name: plugin name.

@return: True or False.

Function: __create_list(obj) [at ln:145]

def __create_list(obj):

No description.


Function: __getitem__(plugin_name) [at ln:179]

def __getitem__(plugin_name):
Magic method to get a plugin instance
from a given name.
@Note: This method has the logic below.
Check if the plugin is known,
if it is active return it,
otherwise, active it and return it.
If the plugin name does not exist
raise KeyError exception.

@param plugin_name: plugin name.

@return: Plugin instance or None

Function: __init__(plugins_dir, service_locator) [at ln:123]

def __init__(plugins_dir, service_locator):
@param plugins_dir: Path to search plugins.
@param service_loctor: ServiceLocator object.

Function: __iter__() [at ln:218]

def __iter__():
Magic method to iterate over all
the plugin's names.

@return: iterator.

Function: __len__() [at ln:227]

def __len__():
Magic method to know the plugins
quantity.
@return: length.

Function: _add_error(plugin_name, traceback_msg) [at ln:379]

def _add_error(plugin_name, traceback_msg):

No description.


Function: _get_dir_from_plugin_name(plugin_name) [at ln:171]

def _get_dir_from_plugin_name(plugin_name):
Returns the dir of the plugin_name

Function: _load_module(module, klassname, metadata, dir_name) [at ln:285]

def _load_module(module, klassname, metadata, dir_name):

No description.


Function: add_plugin_dir(plugin_dir) [at ln:151]

def add_plugin_dir(plugin_dir):
Add a new directory to search plugins.

@param plugin_dir: absolute path.

Function: discover() [at ln:273]

def discover():
Search all files for directory
and get the valid plugin's names.

Function: errors() [at ln:382]

def errors():
Returns a comma separated values of errors

Decorators:

  • property

Function: get_active_plugins() [at ln:165]

def get_active_plugins():
Returns a list the instances

Function: get_actives_plugins() [at ln:160]

def get_actives_plugins():

No description.


Function: get_availables_services() [at ln:373]

def get_availables_services():
Returns all services availables

Function: get_plugin_name(file_name) [at ln:243]

def get_plugin_name(file_name):
Get the plugin's name from a file name.
@param file_name: A file object name.
@return: A plugin name from a file.

Function: is_plugin_active(plugin_name) [at ln:265]

def is_plugin_active(plugin_name):
Check if a plugin is or not active
@param plugin_name: Plugin name to check.
@return: True or False

Function: list_plugins(dir_name) [at ln:252]

def list_plugins(dir_name):
Crawl a directory and collect plugins.
@return: List with plugin names.

Function: load(plugin_name, dir_name) [at ln:302]

def load(plugin_name, dir_name):

No description.


Function: load_all() [at ln:340]

def load_all():

No description.


Function: load_all_external(plugin_path) [at ln:347]

def load_all_external(plugin_path):

No description.


Function: shutdown() [at ln:370]

def shutdown():

No description.


Function: unload(plugin_name) [at ln:353]

def unload(plugin_name):

No description.


Function: unload_all() [at ln:364]

def unload_all():

No description.


Class: PluginManagerException(Exception)

class PluginManagerException(Exception):

No description.


Class: ServiceLocator(object)

class ServiceLocator(object):
Hold the services and allows the interaction between NINJA-IDE and plugins

Function: __init__(services=None) [at ln:57]

def __init__(services=None):

No description.


Function: get_availables_services() [at ln:63]

def get_availables_services():

No description.


Function: get_service(name) [at ln:60]

def get_service(name):

No description.

Contents © 2013 NINJA-IDE - Powered by Nikola and Documentor