diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index f447cb85..f48d6828 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -138,7 +138,7 @@ LanguageName ScintillaEditView::langNames[L_EXTERNAL+1] = { {TEXT("r"), TEXT("R"), TEXT("R programming language"), L_R, SCLEX_R}, {TEXT("jsp"), TEXT("JSP"), TEXT("JavaServer Pages script file"), L_JSP, SCLEX_HTML}, {TEXT("coffeescript"), TEXT("CoffeeScript"), TEXT("CoffeeScript file"), L_COFFEESCRIPT, SCLEX_COFFEESCRIPT}, -{TEXT("json"), TEXT("json"), TEXT("JSON file"), L_JSON, SCLEX_CPP }, +{TEXT("json"), TEXT("json"), TEXT("JSON file"), L_JSON, SCLEX_JSON }, {TEXT("javascript.js"), TEXT("JavaScript"), TEXT("JavaScript file"), L_JAVASCRIPT, SCLEX_CPP }, {TEXT("fortran77"), TEXT("Fortran fixed form"), TEXT("Fortran fixed form source file"), L_FORTRAN_77, SCLEX_F77}, {TEXT("baanc"), TEXT("BaanC"), TEXT("BaanC File"), L_BAANC, SCLEX_BAAN }, @@ -692,20 +692,28 @@ void ScintillaEditView::setEmbeddedJSLexer() void ScintillaEditView::setJsonLexer() { - execute(SCI_SETLEXER, SCLEX_CPP); + execute(SCI_SETLEXER, SCLEX_JSON); const TCHAR *pKwArray[10] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; makeStyle(L_JSON, pKwArray); - basic_string keywordList(""); + string keywordList; + string keywordList2; if (pKwArray[LANG_INDEX_INSTR]) { - basic_string kwlW = pKwArray[LANG_INDEX_INSTR]; + wstring kwlW = pKwArray[LANG_INDEX_INSTR]; keywordList = wstring2string(kwlW, CP_ACP); } + if (pKwArray[LANG_INDEX_INSTR2]) + { + wstring kwlW = pKwArray[LANG_INDEX_INSTR2]; + keywordList2 = wstring2string(kwlW, CP_ACP); + } + execute(SCI_SETKEYWORDS, 0, reinterpret_cast(getCompleteKeywordList(keywordList, L_JSON, LANG_INDEX_INSTR))); + execute(SCI_SETKEYWORDS, 1, reinterpret_cast(getCompleteKeywordList(keywordList2, L_JSON, LANG_INDEX_INSTR2))); execute(SCI_SETPROPERTY, reinterpret_cast("fold"), reinterpret_cast("1")); execute(SCI_SETPROPERTY, reinterpret_cast("fold.compact"), reinterpret_cast("0")); diff --git a/PowerEditor/src/langs.model.xml b/PowerEditor/src/langs.model.xml index 23b3f909..febc754d 100644 --- a/PowerEditor/src/langs.model.xml +++ b/PowerEditor/src/langs.model.xml @@ -203,6 +203,8 @@ false null true + @id @context @type @value @language @container \ +@list @set @reverse @index @base @vocab @graph diff --git a/PowerEditor/src/stylers.model.xml b/PowerEditor/src/stylers.model.xml index 5063cdc0..680fb23f 100644 --- a/PowerEditor/src/stylers.model.xml +++ b/PowerEditor/src/stylers.model.xml @@ -625,12 +625,20 @@ - - - - - - + + + + + + + + + + + + + +