}
});
}
private void loadMaps( final String[] args) {
final Controller controller = Controller.getCurrentController();
final boolean alwaysLoadLastMaps = ResourceController.getResourceController().getBooleanProperty(
"always_load_last_maps");
if (alwaysLoadLastMaps && !dontLoadLastMaps) {
loadLastMaps();
}
loadMaps(controller, args);
if(controller.getMap() != null) {
return;
}
if (!alwaysLoadLastMaps && !dontLoadLastMaps) {
final AddOnsController addonsController = AddOnsController.getController();
addonsController.setAutoInstallEnabled(false);
loadLastMaps();
addonsController.setAutoInstallEnabled(true);
}
if(firstRun && ! dontLoadLastMaps){
final File baseDir = new File(FreeplaneGUIStarter.getResourceBaseDir()).getAbsoluteFile().getParentFile();
final String map = ResourceController.getResourceController().getProperty("first_start_map");
final File absolutFile = ConfigurationUtils.getLocalizedFile(new File[]{baseDir}, map, Locale.getDefault().getLanguage());
if(absolutFile != null)
loadMaps(controller, new String[]{absolutFile.getAbsolutePath()});
}
if (null != controller.getMap()) {
return;
}
controller.selectMode(MModeController.MODENAME);
final MModeController modeController = (MModeController) controller.getModeController();
MFileManager.getController(modeController).newMapFromDefaultTemplate();
}