controller.getViewController().setWaitingCursor(true);
final URL url = toURL(urlField.getText());
setStatusInfo(getText("status.installing"));
final ModeController modeController = controller.getModeController(MModeController.MODENAME);
final MFileManager fileManager = (MFileManager) MFileManager.getController(modeController);
MapModel newMap = new MMapModel();
if (!fileManager.loadCatchExceptions(url, newMap)) {
LogUtils.warn("can not load " + url);
return;
}
controller.getModeController().getMapController().fireMapCreated(newMap);
AddOnProperties addOn = (AddOnProperties) ScriptingEngine.executeScript(newMap.getRootNode(),
getInstallScriptSource(), ScriptingPermissions.getPermissiveScriptingPermissions());
if (addOn != null) {
setStatusInfo(getText("status.success", addOn.getName()));
AddOnsController.getController().registerInstalledAddOn(addOn);
final ManageAddOnsPanel managementPanel = addOn.isTheme() ? manageThemesPanel