Reload a module
@param {aria.templates.ModuleCtrl} moduleCtrl
4700
function (moduleCtrl) {
            var moduleFactory = this.bridge.getAriaPackage().templates.ModuleCtrlFactory;
            ariaUtilsJson.setValue(this._data, "locked", true);

            // do some cleaning
            this.clearHightlight();

            moduleFactory.reloadModuleCtrl(moduleCtrl, {
                fn : this._unlock,
                scope : this
            });
        }
606386
private void reloadForLocaleCompareRoot(final EditorMode editorMode) {

        final String localeRootIdStr = CmsJsUtil.getAttributeString(
            CmsJsUtil.getWindow(),
            CmsGwtConstants.VAR_LOCALE_ROOT);
        CmsRpcAction<String> action = new CmsRpcAction<String>() {

            @SuppressWarnings("synthetic-access")
            @Override
            public void execute() {

                start(0, false);
                m_controller.getService().prepareReloadSitemap(new CmsUUID(localeRootIdStr), editorMode, this);
            }

            @Override
            protected void onResponse(String result) {

                stop(false);
                if (result != null) {
                    Window.Location.assign(result);
                } else {
                    Window.Location.reload();
                }
            }
        };
        action.execute();

    }
1356911
void reload() {

        List<CmsResource> broken = m_linkValidator.failedResources(m_resourcesToCheck);

        if (broken.size() > 0) {
            setVisible(true);
            m_introComponent.setVisible(false);
            m_nullComponent.setVisible(false);
        } else {
            setVisible(false);
            m_introComponent.setVisible(false);
            m_nullComponent.setVisible(true);
        }
        fillTable(getRootCms(), broken);
    }
379845
public void onModuleLoad() {
    VueGWT.init();

    // Inject JS Components
    HTMLScriptElement scriptElement =
        (HTMLScriptElement) DomGlobal.document.createElement("script");
    scriptElement.text = JsFilesResources.INSTANCE.jsComponents().getText();
    DomGlobal.document.body.appendChild(scriptElement);

    MelisandreComponentClientBundle.INSTANCE.melisandreComponentStyle().ensureInjected();
    Vue.customElement("animal-selector", AnimalSelectorComponentFactory.get());

    VueGwtExamplesService.initExamples();
  }
265940
function reload(moduleName) {
    var id = require.resolve(moduleName);
    var mod = require.cache[id];
    if (mod) {
        var base = path.dirname(mod.filename);
        // expunge each module cache entry beneath this folder
        var stack = [mod];
        while (stack.length) {
            var mod = stack.pop();
            if (beneathBase(mod.filename)) {
                delete require.cache[mod.id];
            }
            stack.push.apply(stack, mod.children);
        }
    }

    // expunge each path cache entry beneath the folder
    for (var cacheKey in module.constructor._pathCache) {
        if (cacheKey.indexOf(moduleName) > 0 && beneathBase(cacheKey)) {
            delete module.constructor._pathCache[cacheKey];
        }
    }

    // re-require the module
    return require(moduleName);

    function beneathBase(file) {
        return base === undefined
            || (file.length > base.length
                && file.substr(0, base.length + 1) === base + path.sep);
    }
}
735947
def reload(self, *modules):
        """"""
        self.notify('before_reload')

        if 'configfiles' in self.config:
            # reload configfiles
            self.log.info('Reloading configuration...')
            cfg = utils.parse_config(
                self.server and 'server' or 'bot', *self.config['configfiles'])
            self.config.update(cfg)

        self.log.info('Reloading python code...')
        if not modules:
            modules = self.registry.includes
        scanned = list(reversed(self.registry.scanned))

        # reset includes and events
        self.registry.reset()

        to_scan = []
        for module_name, categories in scanned:
            if module_name in modules:
                module = utils.maybedotted(module_name)
                reload_module(module)
            to_scan.append((module_name, categories))

        # rescan all modules
        for module_name, categories in to_scan:
            self.include(module_name, venusian_categories=categories)

        self.registry.reloading = {}

        self.notify('after_reload')
946800
def reload_module(module):
    
    try:
        # For Python 2.x
        reload(module)
    except (ImportError, NameError):
        # For <= Python3.3:
        import imp
        imp.reload(module)
    except (ImportError, NameError):
        # For >= Python3.4
        import importlib
        importlib.reload(module)
763569
function loadModuleList() {
  $.getScript( modulesPath+"portal-ng-modules.js" )
    .done(
      function( script, textStatus ) {
        log( 'loadModuleList', textStatus );
        ajaxOngoing--;
      }
    )
    .fail(
      function( jqxhr, settings, exception ) {
        logErr( 'loadModuleList', exception );
        ajaxOngoing--;
      }
    );
}
297976
function refresh(force) {
        if (force) {
            currentTheme = null;
        }

        $.when(force && loadCurrentTheme()).done(function () {
            var editor = EditorManager.getActiveEditor();
            if (!editor || !editor._codeMirror) {
                return;
            }

            var cm = editor._codeMirror;
            ThemeView.updateThemes(cm);

            // currentTheme can be undefined, so watch out
            cm.setOption("addModeClass", !!(currentTheme && currentTheme.addModeClass));
        });
    }
411905
function (cfg) {
            if (!ariaCoreJsonValidator.normalize({
                json : cfg,
                beanName : "aria.templates.CfgBeans.InitTemplateCfg"
            })) {
                return false;
            }
            this._out = null;
            this._cfg = cfg;
            if (cfg.id) {
                this._id = cfg.id;
            } else {
                this._id = "tpl" + idCount;
                idCount++;
            }

            if (Aria.testMode) {
                this._prefixIds = {};
            }

            // if the template has been customized, the widget returns already the actual (customized) classpath
            this.tplClasspath = cfg.classpath;

            // TODO: check if cfg.classpath corresponds to a template is a template
            var tpl;
            try {
                tpl = Aria.getClassInstance(cfg.classpath);
            } catch (e) {
                this.$logError(this.TEMPLATE_CONSTR_ERROR, [cfg.classpath], e);
                return false;
            }
            this._tpl = tpl;

            // set the macro after tpl
            if (cfg.macro == null) {
                cfg.macro = {
                    name : "main",
                    args : cfg.args,
                    scope : tpl
                };
            }
            cfg.macro = this.checkMacro(cfg.macro);

            // PTR05228660: use private interface for performances
            var context = cfg.context, moduleCtrl = cfg.moduleCtrl, data = cfg.data;
            var privateInfo, moduleCtrlPrivate;

            // retrieve information from context if not specified
            if (context && !moduleCtrl) {
                if (!data) {
                    data = context.data;
                }
                moduleCtrl = context.moduleCtrl;
            }

            if (moduleCtrl) {
                // When a moduleCtrl is used, the ModuleCtrlFactory should be loaded.
                // However, the ModuleCtrlFactory is not a static dependency cause sometimes we don't need it.
                // TODO: today, we just fail if it's not here, replace this with a silent dynamic loading
                // (Aria.load)
                if (!aria.templates.ModuleCtrlFactory) {
                    this.$logError(this.MISSING_MODULE_CTRL_FACTORY, [cfg.classpath]);
                } else {

                    if (!__getModulePrivateInfo) {
                        __getModulePrivateInfo = aria.templates.ModuleCtrlFactory.__getModulePrivateInfoMethod();
                    }
                    privateInfo = __getModulePrivateInfo.call(this, moduleCtrl);

                    if (!privateInfo) {
                        // if privateInfo is null, it means either the module controller was not created through
                        // aria.templates.ModuleCtrlFactory or it was already disposed (error was already logged in
                        // __getModulePrivateInfo)
                        return false;
                    }
                    moduleCtrlPrivate = privateInfo.moduleCtrlPrivate;

                    if (!data) {
                        data = moduleCtrlPrivate.getData();
                    } else {
                        // data where specified. If a context was also specified, try to match data with a sub
                        // controller
                        if (context) {
                            var newModuleCtrl = moduleCtrlPrivate.getSubModuleCtrl(data);
                            if (newModuleCtrl != moduleCtrl) {
                                moduleCtrl = newModuleCtrl;
                                // update moduleCtrl info
                                privateInfo = __getModulePrivateInfo.call(this, moduleCtrl);
                                if (!privateInfo) {
                                    // if privateInfo is null, it means either the module controller was not created
                                    // through aria.templates.ModuleCtrlFactory or it was already disposed (error
                                    // was already logged in __getModulePrivateInfo)
                                    return false;
                                }
                                moduleCtrlPrivate = privateInfo.moduleCtrlPrivate;
                            }
                        }
                    }
                }
            }

            this.data = data;
            this.moduleCtrl = moduleCtrl;
            if (privateInfo) {
                this.flowCtrl = privateInfo.flowCtrl;
                this.flowCtrlPrivate = privateInfo.flowCtrlPrivate;
                this.moduleCtrlPrivate = moduleCtrlPrivate;
                this.moduleRes = moduleCtrlPrivate.getResourceSet();
            }

            // update configuration
            cfg.data = data;
            cfg.moduleCtrl = moduleCtrl;

            // register this template in the templateCtxtManager
            ariaTemplatesTemplateCtxtManager.add(this);

            if (this.data != null) {
                this.__dataGround = {
                    data : this.data
                };
            }

            // We no longer create new methods in a closure each time a new instance of a template is created,
            // instead we use the interface mechanism to expose methods to the template and prevent access to the
            // template context
            // LEAK & PERF IMPROVMENT : interface on these two functions results in poor performance and leaks

            var oSelf = this, index, name;

            for (index = 0; name = paramMapping[index]; index++) {
                tpl[name] = this[name];
            }

            var functionUtils = ariaUtilsFunction;
            for (index = 0; name = methodMapping[index]; index++) {
                tpl[name] = functionUtils.bind(this[name], this);
            }

            // do not use bind for __$write as this method is called intensively (Perf improvment)
            tpl.__$write = function (s, line) {
                return oSelf.__$write(s, line, this.$classpath);
            };

            if (this.moduleCtrl) {
                this.moduleCtrl.$on({
                    '*' : {
                        fn : tpl.onModuleEvent,
                        scope : tpl
                    },
                    'beforeDispose' : {
                        fn : this._beforeModuleDispose,
                        scope : this
                    }
                });
            }
            if (this.flowCtrl) {
                this.flowCtrl.$on({
                    '*' : tpl.onFlowEvent,
                    scope : tpl
                });
            }

            this._width = {};
            this._height = {};
            this.$setViewportWidth(ariaTemplatesLayout.realWidth(cfg.width));
            this.$setViewportHeight(ariaTemplatesLayout.realHeight(cfg.height));
            this.$setSizeCfg(tpl.__$width, tpl.__$height);
            this.__addDebugInfo(cfg.tplDiv);
            var res = tpl.__$initTemplate();
            this.__loadLibs(tpl.__$macrolibs, "macrolibs");
            return res;
        }
1253195
function (res, args) {
            var tplcfg = this._tplcfg;
            if (!tplcfg) {
                // the template may be ready after the widget has been disposed
                // do nothing in this case
                // except disposing the module which has just been created
                if (args.autoDispose) {
                    res.moduleCtrlPrivate.$dispose();
                }
                return;
            }

            var tplDiv = this._subTplDiv; // may be null at this time

            tplcfg.tplDiv = tplDiv;
            tplcfg.div = this._domElt;
            tplcfg.data = this._cfg.data;

            // if a module controller was created, inject it in template initialization
            if (res.moduleCtrl) {
                tplcfg.moduleCtrl = res.moduleCtrl;
            }
            tplcfg.isRootTemplate = false; // a Template Widget is not a root template
            tplcfg.context = this._context;

            if (args.autoDispose) {
                if (tplcfg.toDispose == null) {
                    tplcfg.toDispose = [res.moduleCtrlPrivate];
                } else {
                    tplcfg.toDispose.push(res.moduleCtrlPrivate);
                }
            }

            var tplCtxt = new ariaTemplatesTemplateCtxt();
            this.subTplCtxt = tplCtxt;
            tplCtxt.parent = this._context;

            var res = tplCtxt.initTemplate(tplcfg);

            if (res) {
                tplCtxt.dataReady(); // data successfully loaded: signal to template through TemplateContext
                // check that tplCtxt was not disposed
                if (tplDiv && tplCtxt._cfg) {
                    // Load the CSS dependencies, the style should be added before the html
                    tplDiv.className = tplCtxt.getCSSClassNames();
                    tplCtxt.$onOnce({
                        "Ready" : this.__innerTplReadyCb,
                        "SectionRefreshed" : {
                            fn : this.__innerTpl1stRefreshed,
                            args : {
                                success : true,
                                templateCtxt : tplCtxt
                            },
                            scope : this
                        },
                        scope : this
                    });
                    tplCtxt.$refresh();
                }
                // don't clean this object, as the template context will do it. Just break reference
                this.tplcfg = null;

            } else {
                tplCtxt.$dispose();
                this.subTplCtxt = null;
                this._errorWhileLoadingTemplate();
            }

            tplDiv = null;
        }
1182463
function (smList, cb) {
            // sub-module creation is now entirely managed in ModuleCtrlFactory
            // simple shortcut for aria.templates.ModuleCtrlFactory.loadSubModules
            ariaTemplatesModuleCtrlFactory.__loadSubModules(this, smList, {
                fn : this.__onLoadSubModulesComplete,
                scope : this,
                args : cb
            });
        }
446795
function (templateCtxt) {
            var moduleCtrl = templateCtxt.moduleCtrlPrivate;
            // find associated module
            var modules = this._data.modules, i, l;
            for (i = 0, l = modules.length; i < l; i++) {
                if (modules[i].moduleCtrl == moduleCtrl) {
                    this._data.selectedModule = modules[i];
                    break;
                } else {
                    this._data.selectedModule = null;
                }
            }
            // find associated template description
            this._data.selectedTemplate = this._findTemplateDes(this._data.templates, templateCtxt);

        }
364592
function (event) {
            this.data.showSource = !this.data.showSource;
            if (this.data.showSource) {
                this.data.initialSource = true;
                var filePath = this.data.templateCtxt.tplClasspath.replace(/\./g, "/") + ".tpl";
                this.data.source = this.moduleCtrl.getSource(filePath).value;
            }
            this.$refresh();
        }
1279231
function (tmpCfg, callback) {
            var div = tmpCfg.div;
            // check if the div is still in the dom
            // (because it could be inside a template which was refreshed, so no longer in the dom)
            if (!ariaUtilsDom.isInDom(div)) {
                this.$callback(callback);
                return;
            }
            var tplWidget = div.__widget;
            Aria.loadTemplate(tmpCfg, function (args) {
                // remap widget content
                if (args.success && tplWidget) {
                    var tplCtxt = args.tplCtxt;
                    var tplCtxtManager = ariaTemplatesTemplateCtxtManager;
                    // TODO: find a cleaner way to do this
                    // as this template is inside a template widget, it is not a root template
                    // (even if we reloaded it with Aria.loadTemplate)
                    // This is necessary for the inspector not to display the template twice:
                    tplCtxtManager.remove(tplCtxt); // remove the template from the list of root templates
                    args.tplCtxt._cfg.isRootTemplate = false; // remove the root template flag
                    tplCtxtManager.add(tplCtxt); // add the template back to the list of templates
                    tplWidget.subTplCtxt = tplCtxt; // add the reference to the template context in the template
                    // widget
                }

                if (callback != null) {
                    this.$callback(callback);
                }
            });
        }
914808
function () {
            // clean
            this._data.templates = [];
            this._data.modules = [];
            this._data.dataFragments = [];
            // refresh

            var startTemplates = this._data.templates;
            var startModules = this._data.modules;
            var startDatas = this._data.dataFragments;

            // this two should change if not null, as new objects are created.
            var selectedTemplate = this._data.selectedTemplate;
            var selectedModule = this._data.selectedModule;

            // The previous way of retrieving elements was to recursively look in the DOM
            // But a problem appeared with this when event delegation was implemented (because DOM elements
            // do not have any more a reference to the widget instance object until the getDom() method on the widget is
            // called, which may not happen at all, so we cannot recognize corresponding widgets).
            // We now use the hierarchies from the refresh manager.

            var refreshMgr = this.bridge.getAriaPackage().templates.RefreshManager;
            if (refreshMgr != null) {
                refreshMgr.updateHierarchies();
                var hierarchies = refreshMgr.getHierarchies();
                this._convertRefreshMgrHierarchies(hierarchies, startTemplates, startModules, startDatas);
            }

            // not used now, but could be used later to display customizations in the inspector
            // this._data.customizations = this.bridge.getAriaPackage().environment.Environment.getCustomizations();

            // if not -> nullify
            if (selectedTemplate == this._data.selectedTemplate) {
                this._data.selectedTemplate = null;
            }
            if (selectedModule == this._data.selectedModule) {
                this._data.selectedModule = null;
            }

            this.$raiseEvent("contentChanged");
        }
764127
def reload(self):
        
        self.load(self.api.get(self.objName, self.key))