#include const std::string configjson = "{\n" " \"source\": {\n" " \"colors\": {\n" " \"text_color\": \"black\",\n" " \"string\": \"#CC0000\",\n" " \"namespace_ref\": \"#990099\",\n" " \"type\": \"#0066FF\",\n" " \"keyword\": \"blue\",\n" " \"comment\": \"grey\",\n" " \"own\": \"pink\",\n" " \"diagnostic_warning\": \"orange\",\n" " \"diagnostic_error\": \"red\"\n" " },\n" " \"syntax\": {\n" " \"43\": \"type\",\n" " \"46\": \"namespace_ref\",\n" " \"109\": \"string\",\n" " \"702\": \"keyword\",\n" " \"703\": \"own\",\n" " \"705\": \"comment\"\n" " },\n" " \"visual\": {\n" " \"background\": \"white\",\n" " \"background_selected\": \"blue\",\n" " \"background_tooltips\": \"yellow\",\n" " \"font\": \"Monospace\",\n" " \"show_line_numbers\": 1,\n" " \"highlight_current_line\": 1\n" " },\n" " \"tab_size\": 2,\n" " \"tab_char\": \"\"\n" " },\n" " \"keybindings\": {\n" " \"new_file\": \"n\",\n" " \"open_folder\": \"o\",\n" " \"open_file\": \"o\",\n" " \"save\": \"s\",\n" " \"save_as\": \"s\",\n" " \"quit\": \"q\",\n" " \"split_window\": \"s\",\n" " \"close_tab\": \"w\",\n" " \"edit_copy\": \"c\",\n" " \"edit_cut\": \"x\",\n" " \"edit_paste\": \"v\",\n" " \"edit_undo\": \"z\",\n" " \"edit_redo\": \"z\",\n" " \"edit_find\": \"f\",\n" " \"source_goto_declaration\": \"d\",\n" " \"source_goto_method\": \"m\",\n" " \"source_rename\": \"r\",\n" " \"compile_and_run\": \"Return\",\n" " \"compile\": \"Return\"\n" " },\n" " \"directoryfilter\": {\n" " \"ignore\": [\n" " \"cmake\",\n" " \"#\",\n" " \"~\",\n" " \".idea\",\n" " \".so\",\n" " \"in-lowercase.pls\"\n" " ],\n" " \"exceptions\": [\n" " \"cmakelists.txt\",\n" " \"in-lowercase.pls\"\n" " ]\n" " },\n" " \"project\": {\n" " \"run_commands\": [\n" " \"./.build/\"\n" " ],\n" " \"compile_commands\": [\n" " \"rm -rf ./.build\",\n" " \"mkdir ./.build\",\n" " \"cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B./.build -H.\",\n" " \"cd ./.build/; make\",\n" " \"cp ./.build/compile_commands.json compile_commands.json\"\n" " ]\n" " },\n" " \"example\": {\n" " \"key\": \"value\",\n" " \"key2\": [\n" " \"val1\",\n" " \"val2\",\n" " 3\n" " ],\n" " \"key3\": \"value\"\n" " }\n" "}\n"; const std::string menuxml = "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"; const std::string pluginspy = "#!/usr/bin/python \n" "import juci_to_python_api as juci \n" "import glob \n" "\n" "def loadplugins(): \n" " plugin_files = glob.glob(\"../plugins/*.py\") \n" " for current_file in plugin_files: \n" " juci.initPlugin(current_file) \n" "loadplugins() \n"; const std::string snippetpy = "#!/usr/bin/python \n" "#snippet plugin \n" "import juci_to_python_api as juci, inspect \n" " \n" "def initPlugin(): \n" " juci.addMenuElement(\"Snippet\") \n" " juci.addSubMenuElement(\"SnippetMenu\", #name of parent menu \n" " \"Insert snippet\", #menu description \n" " \"insertSnippet()\", #function to execute \n" " inspect.getfile(inspect.currentframe()), #plugin path \n" " \"space\") \n" "snippets = {} \n" " \n" "snippets[\"for\"] = \"\"\"\\\n" "for(int i=0; i \n" " \n" "int main(int argc, char *argv[]) { \n" " std::cout << \"Hello, world! << std::endl; \n" "} \n" "\"\"\" \n" " \n" "def getSnippet(word): \n" " try: \n" " output = snippets[word] \n" " except KeyError: \n" " output = word \n" " return output \n" " \n" "def insertSnippet(): \n" " theWord=juci.getWord() \n" " output=getSnippet(theWord) \n" " juci.replaceWord(output) \n";