src/org/openstreetmap/josm/plugins/opendata/core/modules/ModuleHandler.java
public static void loadModule(Component parent, ModuleInformation module, ClassLoader moduleClassLoader) {
        String msg = tr("Could not load module {0}. Delete from preferences?", module.name);
        try {
            Class<? extends Module> klass = module.loadClass(moduleClassLoader);
            if (klass != null) {
                Logging.info(tr("loading module ''{0}'' (version {1})", module.name, module.localversion));
                Module mod = module.load(klass);
                if (moduleList.add(mod)) {
                    SourceProvider styleProvider = mod.getMapPaintStyleSourceProvider();
                    if (styleProvider != null) {
                        MapPaintPreference.registerSourceProvider(styleProvider);
                    }
                    SourceProvider presetProvider = mod.getPresetSourceProvider();
                    if (presetProvider != null) {
                        TaggingPresetPreference.registerSourceProvider(presetProvider);
                    }
                }
            }
            msg = null;
        } catch (ModuleException e) {
            e.printStackTrace();
            if (e.getCause() instanceof ClassNotFoundException) {
                msg = tr("<html>Could not load module {0} because the module<br>main class ''{1}'' was not found.<br>"
                        + "Delete from preferences?</html>", module.name, module.className);
            }
        } catch (Exception e) {
            Logging.error(e);
        }
        if (msg != null && confirmDisableModule(parent, msg, module.name)) {
            PreferencesUtils.removeFromList(Config.getPref(), OdConstants.PREF_MODULES, module.name);
        }
    }
/**
     * Loads and instantiates the module described by <code>module</code> using
     * the class loader <code>moduleClassLoader</code>.
     *
     * @param parent parent component
     * @param module the module
     * @param moduleClassLoader the module class loader
     */
Loads and instantiates the module described by module using
the class loader moduleClassLoader.

@param parent parent component
@param module the module
@param moduleClassLoader the module class loader
Loads and instantiates the module described by module using the class loader moduleClassLoader . @param parent parent component @param module the module @param moduleClassLoader the module class loader
public static void loadModule(Component parent, ModuleInformation module, ClassLoader moduleClassLoader) {
        String msg = tr("Could not load module {0}. Delete from preferences?", module.name);
        try {
            Class<? extends Module> klass = module.loadClass(moduleClassLoader);
            if (klass != null) {
                Logging.info(tr("loading module ''{0}'' (version {1})", module.name, module.localversion));
                Module mod = module.load(klass);
                if (moduleList.add(mod)) {
                    SourceProvider styleProvider = mod.getMapPaintStyleSourceProvider();
                    if (styleProvider != null) {
                        MapPaintPreference.registerSourceProvider(styleProvider);
                    }
                    SourceProvider presetProvider = mod.getPresetSourceProvider();
                    if (presetProvider != null) {
                        TaggingPresetPreference.registerSourceProvider(presetProvider);
                    }
                }
            }
            msg = null;
        } catch (ModuleException e) {
            e.printStackTrace();
            if (e.getCause() instanceof ClassNotFoundException) {
                msg = tr("<html>Could not load module {0} because the module<br>main class ''{1}'' was not found.<br>"
                        + "Delete from preferences?</html>", module.name, module.className);
            }
        } catch (Exception e) {
            Logging.error(e);
        }
        if (msg != null && confirmDisableModule(parent, msg, module.name)) {
            PreferencesUtils.removeFromList(Config.getPref(), OdConstants.PREF_MODULES, module.name);
        }
    }
public static void loadModule ( Component parent , ModuleInformation module , ClassLoader moduleClassLoader ) { String msg = tr ( "Could not load module {0}. Delete from preferences?" , module . name ) ; try { Class < ? extends Module > klass = module . loadClass ( moduleClassLoader ) ; if ( klass != null ) { Logging . info ( tr ( "loading module ''{0}'' (version {1})" , module . name , module . localversion ) ) ; Module mod = module . load ( klass ) ; if ( moduleList . add ( mod ) ) { SourceProvider styleProvider = mod . getMapPaintStyleSourceProvider ( ) ; if ( styleProvider != null ) { MapPaintPreference . registerSourceProvider ( styleProvider ) ; } SourceProvider presetProvider = mod . getPresetSourceProvider ( ) ; if ( presetProvider != null ) { TaggingPresetPreference . registerSourceProvider ( presetProvider ) ; } } } msg = null ; } catch ( ModuleException e ) { e . printStackTrace ( ) ; if ( e . getCause ( ) instanceof ClassNotFoundException ) { msg = tr ( "<html>Could not load module {0} because the module<br>main class ''{1}'' was not found.<br>" + "Delete from preferences?</html>" , module . name , module . className ) ; } } catch ( Exception e ) { Logging . error ( e ) ; } if ( msg != null && confirmDisableModule ( parent , msg , module . name ) ) { PreferencesUtils . removeFromList ( Config . getPref ( ) , OdConstants . PREF_MODULES , module . name ) ; } }
Loads and instantiates the module described by <code>module</code> using
 the class loader <code>moduleClassLoader</code>.
Loads and instantiates the module described by <code > module< / code > using the class loader <code > moduleClassLoader< / code > .