createNodeStyleMap(rootNode);
}
void createStyleMap(final MapModel parentMap, MapStyleModel mapStyleModel, final String styleMapStr) {
final ModeController modeController = Controller.getCurrentModeController();
MapModel styleMap = new StyleMapModel();
styleMap.createNewRoot();
final MapReader mapReader = modeController.getMapController().getMapReader();
final Reader styleReader = new StringReader(styleMapStr);
NodeModel root;
try {
Map<Object, Object> hints = new HashMap<Object, Object>();
hints.put(Hint.MODE, Mode.FILE);
hints.put(NodeBuilder.FOLDING_LOADED, Boolean.TRUE);
root = mapReader.createNodeTreeFromXml(styleMap, styleReader, hints);
styleMap.setRoot(root);
insertStyleMap(parentMap, styleMap);
NodeModel predefinedStyleParentNode = getStyleNodeGroup(styleMap, STYLES_PREDEFINED);
if(predefinedStyleParentNode == null){
predefinedStyleParentNode = new NodeModel(styleMap);
predefinedStyleParentNode.setUserObject(new StyleNamedObject(MapStyleModel.STYLES_PREDEFINED));