mirror of https://gitlab.com/cppit/jucipp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
144 lines
3.3 KiB
144 lines
3.3 KiB
|
8 years ago
|
#pragma once
|
||
|
6 years ago
|
#include "dispatcher.hpp"
|
||
|
10 years ago
|
#include <boost/filesystem.hpp>
|
||
|
8 years ago
|
#include <boost/property_tree/json_parser.hpp>
|
||
|
10 years ago
|
#include <string>
|
||
|
8 years ago
|
#include <unordered_map>
|
||
|
10 years ago
|
#include <utility>
|
||
|
|
#include <vector>
|
||
|
11 years ago
|
|
||
|
10 years ago
|
class Config {
|
||
|
11 years ago
|
public:
|
||
|
10 years ago
|
class Menu {
|
||
|
|
public:
|
||
|
|
std::unordered_map<std::string, std::string> keys;
|
||
|
|
};
|
||
|
8 years ago
|
|
||
|
7 years ago
|
class Theme {
|
||
|
10 years ago
|
public:
|
||
|
7 years ago
|
std::string name;
|
||
|
|
std::string variant;
|
||
|
|
std::string font;
|
||
|
10 years ago
|
};
|
||
|
8 years ago
|
|
||
|
10 years ago
|
class Terminal {
|
||
|
10 years ago
|
public:
|
||
|
|
int history_size;
|
||
|
10 years ago
|
std::string font;
|
||
|
10 years ago
|
};
|
||
|
8 years ago
|
|
||
|
10 years ago
|
class Project {
|
||
|
10 years ago
|
public:
|
||
|
9 years ago
|
class CMake {
|
||
|
|
public:
|
||
|
|
std::string command;
|
||
|
|
std::string compile_command;
|
||
|
|
};
|
||
|
|
class Meson {
|
||
|
|
public:
|
||
|
|
std::string command;
|
||
|
|
std::string compile_command;
|
||
|
|
};
|
||
|
8 years ago
|
|
||
|
10 years ago
|
std::string default_build_path;
|
||
|
10 years ago
|
std::string debug_build_path;
|
||
|
9 years ago
|
CMake cmake;
|
||
|
|
Meson meson;
|
||
|
7 years ago
|
std::string default_build_management_system;
|
||
|
10 years ago
|
bool save_on_compile_or_run;
|
||
|
10 years ago
|
bool clear_terminal_on_compile;
|
||
|
10 years ago
|
std::string ctags_command;
|
||
|
6 years ago
|
std::string grep_command;
|
||
|
8 years ago
|
std::string python_command;
|
||
|
6 years ago
|
std::string markdown_command;
|
||
|
10 years ago
|
};
|
||
|
8 years ago
|
|
||
|
10 years ago
|
class Source {
|
||
|
|
public:
|
||
|
|
class DocumentationSearch {
|
||
|
|
public:
|
||
|
|
std::string separator;
|
||
|
|
std::unordered_map<std::string, std::string> queries;
|
||
|
|
};
|
||
|
8 years ago
|
|
||
|
10 years ago
|
std::string style;
|
||
|
|
std::string font;
|
||
|
|
std::string spellcheck_language;
|
||
|
8 years ago
|
|
||
|
10 years ago
|
bool cleanup_whitespace_characters;
|
||
|
10 years ago
|
std::string show_whitespace_characters;
|
||
|
8 years ago
|
|
||
|
9 years ago
|
bool format_style_on_save;
|
||
|
9 years ago
|
bool format_style_on_save_if_style_file_found;
|
||
|
8 years ago
|
|
||
|
9 years ago
|
bool smart_brackets;
|
||
|
9 years ago
|
bool smart_inserts;
|
||
|
8 years ago
|
|
||
|
10 years ago
|
bool show_map;
|
||
|
6 years ago
|
unsigned map_font_size;
|
||
|
10 years ago
|
bool show_git_diff;
|
||
|
10 years ago
|
bool show_background_pattern;
|
||
|
8 years ago
|
bool show_right_margin;
|
||
|
|
unsigned right_margin_position;
|
||
|
8 years ago
|
|
||
|
10 years ago
|
bool auto_tab_char_and_size;
|
||
|
|
char default_tab_char;
|
||
|
|
unsigned default_tab_size;
|
||
|
10 years ago
|
bool tab_indents_line;
|
||
|
10 years ago
|
bool wrap_lines;
|
||
|
|
bool highlight_current_line;
|
||
|
|
bool show_line_numbers;
|
||
|
8 years ago
|
bool enable_multiple_cursors;
|
||
|
8 years ago
|
bool auto_reload_changed_files;
|
||
|
6 years ago
|
bool search_for_selection;
|
||
|
8 years ago
|
|
||
|
10 years ago
|
std::string clang_format_style;
|
||
|
8 years ago
|
unsigned clang_usages_threads;
|
||
|
8 years ago
|
|
||
|
6 years ago
|
bool enable_clang_tidy;
|
||
|
|
std::string clang_tidy_checks;
|
||
|
|
|
||
|
6 years ago
|
bool debug_place_cursor_at_stop;
|
||
|
|
|
||
|
10 years ago
|
std::unordered_map<std::string, DocumentationSearch> documentation_searches;
|
||
|
|
};
|
||
|
8 years ago
|
|
||
|
7 years ago
|
class Log {
|
||
|
|
public:
|
||
|
7 years ago
|
bool libclang;
|
||
|
7 years ago
|
bool language_server;
|
||
|
|
};
|
||
|
|
|
||
|
10 years ago
|
private:
|
||
|
10 years ago
|
Config();
|
||
|
8 years ago
|
|
||
|
10 years ago
|
public:
|
||
|
|
static Config &get() {
|
||
|
|
static Config singleton;
|
||
|
|
return singleton;
|
||
|
|
}
|
||
|
8 years ago
|
|
||
|
10 years ago
|
void load();
|
||
|
8 years ago
|
|
||
|
7 years ago
|
std::string version;
|
||
|
10 years ago
|
Menu menu;
|
||
|
7 years ago
|
Theme theme;
|
||
|
10 years ago
|
Terminal terminal;
|
||
|
10 years ago
|
Project project;
|
||
|
10 years ago
|
Source source;
|
||
|
7 years ago
|
Log log;
|
||
|
8 years ago
|
|
||
|
9 years ago
|
boost::filesystem::path home_path;
|
||
|
|
boost::filesystem::path home_juci_path;
|
||
|
10 years ago
|
|
||
|
|
private:
|
||
|
9 years ago
|
/// Used to dispatch Terminal outputs after juCi++ GUI setup and configuration
|
||
|
|
Dispatcher dispatcher;
|
||
|
8 years ago
|
|
||
|
9 years ago
|
void update(boost::property_tree::ptree &cfg);
|
||
|
|
void make_version_dependent_corrections(boost::property_tree::ptree &cfg, const boost::property_tree::ptree &default_cfg, const std::string &version);
|
||
|
8 years ago
|
bool add_missing_nodes(boost::property_tree::ptree &cfg, const boost::property_tree::ptree &default_cfg, std::string parent_path = "");
|
||
|
|
bool remove_deprecated_nodes(boost::property_tree::ptree &cfg, const boost::property_tree::ptree &default_cfg, std::string parent_path = "");
|
||
|
9 years ago
|
void read(const boost::property_tree::ptree &cfg);
|
||
|
11 years ago
|
};
|