1
0
mirror of https://github.com/salexdv/bsl_console.git synced 2024-11-28 08:48:48 +02:00

Автоматическая инициализация пунктов контекстного меню при переключении режима редактора

This commit is contained in:
salexdv 2020-09-29 09:00:52 +03:00
parent 55d5564322
commit 431cd45ac1

View File

@ -9,6 +9,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
generateModificationEvent = false;
readOnlyMode = false;
queryMode = false;
version1C = '';
contextActions = [];
sendEvent = function(eventName, eventParams) {
@ -147,7 +148,7 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
return bsl.findText(string);
}
init = function(version1C) {
initContextMenuActions = function() {
contextActions.forEach(action => {
action.dispose();
@ -173,6 +174,13 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
}
init = function(version) {
version1C = version;
initContextMenuActions();
}
enableQuickSuggestions = function (enabled) {
editor.updateOptions({ quickSuggestions: enabled });
@ -218,6 +226,8 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
else
monaco.editor.setModelLanguage(editor.getModel(), "bsl");
initContextMenuActions();
}
editor = undefined;