Commands in project stringize
This commit is contained in:
parent
a4e634b0e5
commit
cc326a2a2d
|
@ -192,12 +192,18 @@ prj_stringize_project(Application_Links *app, Arena *arena, Variable_Handle proj
|
||||||
String_ID project_name_id = vars_save_string_lit("project_name");
|
String_ID project_name_id = vars_save_string_lit("project_name");
|
||||||
String_ID patterns_id = vars_save_string_lit("patterns");
|
String_ID patterns_id = vars_save_string_lit("patterns");
|
||||||
String_ID blacklist_patterns_id = vars_save_string_lit("blacklist_patterns");
|
String_ID blacklist_patterns_id = vars_save_string_lit("blacklist_patterns");
|
||||||
String_ID load_paths_id = vars_save_string_lit("load_paths");
|
|
||||||
|
|
||||||
|
String_ID load_paths_id = vars_save_string_lit("load_paths");
|
||||||
String_ID path_id = vars_save_string_lit("path");
|
String_ID path_id = vars_save_string_lit("path");
|
||||||
String_ID relative_id = vars_save_string_lit("relative");
|
String_ID relative_id = vars_save_string_lit("relative");
|
||||||
String_ID recursive_id = vars_save_string_lit("recursive");
|
String_ID recursive_id = vars_save_string_lit("recursive");
|
||||||
|
|
||||||
|
String_ID commands_id = vars_save_string_lit("commands");
|
||||||
|
String_ID out_id = vars_save_string_lit("out");
|
||||||
|
String_ID footer_panel_id = vars_save_string_lit("footer_panel");
|
||||||
|
String_ID save_dirty_files_id = vars_save_string_lit("save_dirty_files");
|
||||||
|
String_ID cursor_at_end_id = vars_save_string_lit("cursor_at_end");
|
||||||
|
|
||||||
String8 os_strings[] = { str8_lit("win"), str8_lit("linux"), str8_lit("mac"), };
|
String8 os_strings[] = { str8_lit("win"), str8_lit("linux"), str8_lit("mac"), };
|
||||||
local_const i32 os_string_count = ArrayCount(os_strings);
|
local_const i32 os_string_count = ArrayCount(os_strings);
|
||||||
String_ID os_string_ids[os_string_count];
|
String_ID os_string_ids[os_string_count];
|
||||||
|
@ -205,7 +211,10 @@ prj_stringize_project(Application_Links *app, Arena *arena, Variable_Handle proj
|
||||||
os_string_ids[i] = vars_save_string(os_strings[i]);
|
os_string_ids[i] = vars_save_string(os_strings[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE(allen): Stringizing
|
|
||||||
|
// NOTE(allen): Stringizing...
|
||||||
|
|
||||||
|
// NOTE(allen): Header Stuff
|
||||||
u64 version = vars_u64_from_var(app, vars_read_key(project, version_id));
|
u64 version = vars_u64_from_var(app, vars_read_key(project, version_id));
|
||||||
version = clamp_bot(2, version);
|
version = clamp_bot(2, version);
|
||||||
string_list_pushf(arena, out, "version(%llu);\n", version);
|
string_list_pushf(arena, out, "version(%llu);\n", version);
|
||||||
|
@ -218,6 +227,8 @@ prj_stringize_project(Application_Links *app, Arena *arena, Variable_Handle proj
|
||||||
|
|
||||||
string_list_push(arena, out, str8_lit("\n"));
|
string_list_push(arena, out, str8_lit("\n"));
|
||||||
|
|
||||||
|
|
||||||
|
// NOTE(allen): File Match Patterns
|
||||||
Variable_Handle patterns = vars_read_key(project, patterns_id);
|
Variable_Handle patterns = vars_read_key(project, patterns_id);
|
||||||
if (!vars_is_nil(patterns)){
|
if (!vars_is_nil(patterns)){
|
||||||
prj_stringize__string_list(app, arena, str8_lit("patterns"), patterns, out);
|
prj_stringize__string_list(app, arena, str8_lit("patterns"), patterns, out);
|
||||||
|
@ -230,6 +241,8 @@ prj_stringize_project(Application_Links *app, Arena *arena, Variable_Handle proj
|
||||||
|
|
||||||
string_list_push(arena, out, str8_lit("\n"));
|
string_list_push(arena, out, str8_lit("\n"));
|
||||||
|
|
||||||
|
|
||||||
|
// NOTE(allen): Load Paths
|
||||||
Variable_Handle load_paths = vars_read_key(project, load_paths_id);
|
Variable_Handle load_paths = vars_read_key(project, load_paths_id);
|
||||||
if (!vars_is_nil(load_paths)){
|
if (!vars_is_nil(load_paths)){
|
||||||
string_list_push(arena, out, str8_lit("load_paths = {\n"));
|
string_list_push(arena, out, str8_lit("load_paths = {\n"));
|
||||||
|
@ -243,6 +256,7 @@ prj_stringize_project(Application_Links *app, Arena *arena, Variable_Handle proj
|
||||||
Variable_Handle recursive_var = vars_read_key(child, recursive_id);
|
Variable_Handle recursive_var = vars_read_key(child, recursive_id);
|
||||||
Variable_Handle relative_var = vars_read_key(child, relative_id);
|
Variable_Handle relative_var = vars_read_key(child, relative_id);
|
||||||
|
|
||||||
|
// TODO(allen): escape path_string
|
||||||
String8 path_string = vars_string_from_var(scratch, path_var);
|
String8 path_string = vars_string_from_var(scratch, path_var);
|
||||||
b32 recursive = vars_b32_from_var(recursive_var);
|
b32 recursive = vars_b32_from_var(recursive_var);
|
||||||
b32 relative = vars_b32_from_var(relative_var);
|
b32 relative = vars_b32_from_var(relative_var);
|
||||||
|
@ -257,8 +271,47 @@ prj_stringize_project(Application_Links *app, Arena *arena, Variable_Handle proj
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
string_list_push(arena, out, str8_lit("};\n"));
|
string_list_push(arena, out, str8_lit("};\n"));
|
||||||
|
|
||||||
|
string_list_push(arena, out, str8_lit("\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// NOTE(allen): Commands
|
||||||
|
Variable_Handle commands = vars_read_key(project, commands_id);
|
||||||
|
if (!vars_is_nil(commands)){
|
||||||
|
string_list_push(arena, out, str8_lit("commands = {\n"));
|
||||||
|
for (Vars_Children(command, commands)){
|
||||||
|
String8 command_name = vars_key_from_var(scratch, command);
|
||||||
|
string_list_pushf(arena, out, ".%.*s = {\n", string_expand(command_name));
|
||||||
|
|
||||||
|
for (i32 i = 0; i < os_string_count; i += 1){
|
||||||
|
Variable_Handle os_cmd_var = vars_read_key(command, os_string_ids[i]);
|
||||||
|
if (!vars_is_nil(os_cmd_var)){
|
||||||
|
// TODO(allen): escape os_cmd_string
|
||||||
|
String8 os_cmd_string = vars_string_from_var(scratch, os_cmd_var);
|
||||||
|
string_list_pushf(arena, out, ".%.*s = \"%.*s\",\n", string_expand(os_strings[i]), string_expand(os_cmd_string));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Variable_Handle out_var = vars_read_key(command, out_id);
|
||||||
|
Variable_Handle footer_panel_var = vars_read_key(command, footer_panel_id);
|
||||||
|
Variable_Handle save_dirty_files_var = vars_read_key(command, save_dirty_files_id);
|
||||||
|
Variable_Handle cursor_at_end_var = vars_read_key(command, cursor_at_end_id);
|
||||||
|
|
||||||
|
// TODO(allen): escape out_string
|
||||||
|
String8 out_string = vars_string_from_var(scratch, out_var);
|
||||||
|
b32 footer_panel = vars_b32_from_var(footer_panel_var);
|
||||||
|
b32 save_dirty_files = vars_b32_from_var(save_dirty_files_var);
|
||||||
|
b32 cursor_at_end = vars_b32_from_var(cursor_at_end_var);
|
||||||
|
|
||||||
|
string_list_pushf(arena, out, ".out = \"%.*s\",\n", string_expand(out_string));
|
||||||
|
string_list_pushf(arena, out, ".footer_panel = %s,\n", (footer_panel?"true":"false"));
|
||||||
|
string_list_pushf(arena, out, ".save_dirty_files = %s,\n", (save_dirty_files?"true":"false"));
|
||||||
|
string_list_pushf(arena, out, ".cursor_at_end = %s,\n", (cursor_at_end?"true":"false"));
|
||||||
|
string_list_push(arena, out, str8_lit("},\n"));
|
||||||
|
}
|
||||||
|
string_list_push(arena, out, str8_lit("};\n"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Prj_Setup_Status
|
function Prj_Setup_Status
|
||||||
|
|
|
@ -296,7 +296,7 @@ static Command_Metadata fcoder_metacmd_table[251] = {
|
||||||
{ PROC_LINKS(click_set_cursor_if_lbutton, 0), false, "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 243 },
|
{ PROC_LINKS(click_set_cursor_if_lbutton, 0), false, "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 243 },
|
||||||
{ PROC_LINKS(click_set_mark, 0), false, "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 256 },
|
{ PROC_LINKS(click_set_mark, 0), false, "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 256 },
|
||||||
{ PROC_LINKS(clipboard_record_clip, 0), false, "clipboard_record_clip", 21, "In response to a new clipboard contents events, saves the new clip onto the clipboard history", 93, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 7 },
|
{ PROC_LINKS(clipboard_record_clip, 0), false, "clipboard_record_clip", 21, "In response to a new clipboard contents events, saves the new clip onto the clipboard history", 93, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 7 },
|
||||||
{ PROC_LINKS(close_all_code, 0), false, "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 724 },
|
{ PROC_LINKS(close_all_code, 0), false, "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 777 },
|
||||||
{ PROC_LINKS(close_build_panel, 0), false, "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "W:\\4ed\\code\\custom\\4coder_build_commands.cpp", 44, 175 },
|
{ PROC_LINKS(close_build_panel, 0), false, "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "W:\\4ed\\code\\custom\\4coder_build_commands.cpp", 44, 175 },
|
||||||
{ PROC_LINKS(close_panel, 0), false, "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 674 },
|
{ PROC_LINKS(close_panel, 0), false, "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 674 },
|
||||||
{ PROC_LINKS(command_documentation, 0), true, "command_documentation", 21, "Prompts the user to select a command then loads a doc buffer for that item", 74, "W:\\4ed\\code\\custom\\4coder_docs.cpp", 34, 190 },
|
{ PROC_LINKS(command_documentation, 0), true, "command_documentation", 21, "Prompts the user to select a command then loads a doc buffer for that item", 74, "W:\\4ed\\code\\custom\\4coder_docs.cpp", 34, 190 },
|
||||||
|
@ -372,7 +372,7 @@ static Command_Metadata fcoder_metacmd_table[251] = {
|
||||||
{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), false, "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 224 },
|
{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), false, "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 224 },
|
||||||
{ PROC_LINKS(list_all_substring_locations, 0), false, "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 174 },
|
{ PROC_LINKS(list_all_substring_locations, 0), false, "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 174 },
|
||||||
{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), false, "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 186 },
|
{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), false, "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 186 },
|
||||||
{ PROC_LINKS(load_project, 0), false, "load_project", 12, "Looks for a project.4coder file in the current directory and tries to load it. Looks in parent directories until a project file is found or there are no more parents.", 167, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 751 },
|
{ PROC_LINKS(load_project, 0), false, "load_project", 12, "Looks for a project.4coder file in the current directory and tries to load it. Looks in parent directories until a project file is found or there are no more parents.", 167, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 804 },
|
||||||
{ PROC_LINKS(load_theme_current_buffer, 0), false, "load_theme_current_buffer", 25, "Parse the current buffer as a theme file and add the theme to the theme list. If the buffer has a .4coder postfix in it's name, it is removed when the name is saved.", 165, "W:\\4ed\\code\\custom\\4coder_config.cpp", 36, 1583 },
|
{ PROC_LINKS(load_theme_current_buffer, 0), false, "load_theme_current_buffer", 25, "Parse the current buffer as a theme file and add the theme to the theme list. If the buffer has a .4coder postfix in it's name, it is removed when the name is saved.", 165, "W:\\4ed\\code\\custom\\4coder_config.cpp", 36, 1583 },
|
||||||
{ PROC_LINKS(load_themes_default_folder, 0), false, "load_themes_default_folder", 26, "Loads all the theme files in the default theme folder.", 54, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 535 },
|
{ PROC_LINKS(load_themes_default_folder, 0), false, "load_themes_default_folder", 26, "Loads all the theme files in the default theme folder.", 54, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 535 },
|
||||||
{ PROC_LINKS(load_themes_hot_directory, 0), false, "load_themes_hot_directory", 25, "Loads all the theme files in the current hot directory.", 55, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 547 },
|
{ PROC_LINKS(load_themes_hot_directory, 0), false, "load_themes_hot_directory", 25, "Loads all the theme files in the current hot directory.", 55, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 547 },
|
||||||
|
@ -415,8 +415,8 @@ static Command_Metadata fcoder_metacmd_table[251] = {
|
||||||
{ PROC_LINKS(multi_paste_interactive_quick, 0), false, "multi_paste_interactive_quick", 29, "Paste multiple lines from the clipboard history, controlled by inputing the number of lines to paste", 100, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 380 },
|
{ PROC_LINKS(multi_paste_interactive_quick, 0), false, "multi_paste_interactive_quick", 29, "Paste multiple lines from the clipboard history, controlled by inputing the number of lines to paste", 100, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 380 },
|
||||||
{ PROC_LINKS(music_start, 0), false, "music_start", 11, "Starts the music.", 17, "W:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 213 },
|
{ PROC_LINKS(music_start, 0), false, "music_start", 11, "Starts the music.", 17, "W:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 213 },
|
||||||
{ PROC_LINKS(music_stop, 0), false, "music_stop", 10, "Stops the music.", 16, "W:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 232 },
|
{ PROC_LINKS(music_stop, 0), false, "music_stop", 10, "Stops the music.", 16, "W:\\4ed\\code\\custom\\4coder_examples.cpp", 38, 232 },
|
||||||
{ PROC_LINKS(open_all_code, 0), false, "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 733 },
|
{ PROC_LINKS(open_all_code, 0), false, "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 786 },
|
||||||
{ PROC_LINKS(open_all_code_recursive, 0), false, "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 742 },
|
{ PROC_LINKS(open_all_code_recursive, 0), false, "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 795 },
|
||||||
{ PROC_LINKS(open_file_in_quotes, 0), false, "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1576 },
|
{ PROC_LINKS(open_file_in_quotes, 0), false, "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1576 },
|
||||||
{ PROC_LINKS(open_in_other, 0), false, "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 2059 },
|
{ PROC_LINKS(open_in_other, 0), false, "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 2059 },
|
||||||
{ PROC_LINKS(open_long_braces, 0), false, "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 46 },
|
{ PROC_LINKS(open_long_braces, 0), false, "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 46 },
|
||||||
|
@ -437,10 +437,10 @@ static Command_Metadata fcoder_metacmd_table[251] = {
|
||||||
{ PROC_LINKS(profile_disable, 0), false, "profile_disable", 15, "Prevent 4coder's self profiler from gathering new profiling information.", 72, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 219 },
|
{ PROC_LINKS(profile_disable, 0), false, "profile_disable", 15, "Prevent 4coder's self profiler from gathering new profiling information.", 72, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 219 },
|
||||||
{ PROC_LINKS(profile_enable, 0), false, "profile_enable", 14, "Allow 4coder's self profiler to gather new profiling information.", 65, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 212 },
|
{ PROC_LINKS(profile_enable, 0), false, "profile_enable", 14, "Allow 4coder's self profiler to gather new profiling information.", 65, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 212 },
|
||||||
{ PROC_LINKS(profile_inspect, 0), true, "profile_inspect", 15, "Inspect all currently collected profiling information in 4coder's self profiler.", 80, "W:\\4ed\\code\\custom\\4coder_profile_inspect.cpp", 45, 886 },
|
{ PROC_LINKS(profile_inspect, 0), true, "profile_inspect", 15, "Inspect all currently collected profiling information in 4coder's self profiler.", 80, "W:\\4ed\\code\\custom\\4coder_profile_inspect.cpp", 45, 886 },
|
||||||
{ PROC_LINKS(project_command_lister, 0), false, "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 931 },
|
{ PROC_LINKS(project_command_lister, 0), false, "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 984 },
|
||||||
{ PROC_LINKS(project_fkey_command, 0), false, "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 869 },
|
{ PROC_LINKS(project_fkey_command, 0), false, "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 922 },
|
||||||
{ PROC_LINKS(project_go_to_root_directory, 0), false, "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 895 },
|
{ PROC_LINKS(project_go_to_root_directory, 0), false, "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 948 },
|
||||||
{ PROC_LINKS(project_reprint, 0), false, "project_reprint", 15, "Prints the current project to the file it was loaded from; prints in the most recent project file version", 105, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 941 },
|
{ PROC_LINKS(project_reprint, 0), false, "project_reprint", 15, "Prints the current project to the file it was loaded from; prints in the most recent project file version", 105, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 994 },
|
||||||
{ PROC_LINKS(query_replace, 0), false, "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1282 },
|
{ PROC_LINKS(query_replace, 0), false, "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1282 },
|
||||||
{ PROC_LINKS(query_replace_identifier, 0), false, "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1303 },
|
{ PROC_LINKS(query_replace_identifier, 0), false, "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1303 },
|
||||||
{ PROC_LINKS(query_replace_selection, 0), false, "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1319 },
|
{ PROC_LINKS(query_replace_selection, 0), false, "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1319 },
|
||||||
|
@ -479,10 +479,10 @@ static Command_Metadata fcoder_metacmd_table[251] = {
|
||||||
{ PROC_LINKS(set_mark, 0), false, "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 115 },
|
{ PROC_LINKS(set_mark, 0), false, "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 115 },
|
||||||
{ PROC_LINKS(set_mode_to_notepad_like, 0), false, "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 499 },
|
{ PROC_LINKS(set_mode_to_notepad_like, 0), false, "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 499 },
|
||||||
{ PROC_LINKS(set_mode_to_original, 0), false, "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 493 },
|
{ PROC_LINKS(set_mode_to_original, 0), false, "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 493 },
|
||||||
{ PROC_LINKS(setup_build_bat, 0), false, "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 913 },
|
{ PROC_LINKS(setup_build_bat, 0), false, "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 966 },
|
||||||
{ PROC_LINKS(setup_build_bat_and_sh, 0), false, "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 925 },
|
{ PROC_LINKS(setup_build_bat_and_sh, 0), false, "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 978 },
|
||||||
{ PROC_LINKS(setup_build_sh, 0), false, "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 919 },
|
{ PROC_LINKS(setup_build_sh, 0), false, "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 972 },
|
||||||
{ PROC_LINKS(setup_new_project, 0), false, "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 906 },
|
{ PROC_LINKS(setup_new_project, 0), false, "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 959 },
|
||||||
{ PROC_LINKS(show_filebar, 0), false, "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 697 },
|
{ PROC_LINKS(show_filebar, 0), false, "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 697 },
|
||||||
{ PROC_LINKS(show_scrollbar, 0), false, "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 683 },
|
{ PROC_LINKS(show_scrollbar, 0), false, "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 683 },
|
||||||
{ PROC_LINKS(show_the_log_graph, 0), true, "show_the_log_graph", 18, "Parses *log* and displays the 'log graph' UI", 44, "W:\\4ed\\code\\custom\\4coder_log_parser.cpp", 40, 991 },
|
{ PROC_LINKS(show_the_log_graph, 0), true, "show_the_log_graph", 18, "Parses *log* and displays the 'log graph' UI", 44, "W:\\4ed\\code\\custom\\4coder_log_parser.cpp", 40, 991 },
|
||||||
|
|
205
project.4coder
205
project.4coder
|
@ -1,4 +1,4 @@
|
||||||
version(1);
|
version(2);
|
||||||
project_name = "4coder";
|
project_name = "4coder";
|
||||||
|
|
||||||
patterns = {
|
patterns = {
|
||||||
|
@ -15,100 +15,117 @@ patterns = {
|
||||||
blacklist_patterns = {
|
blacklist_patterns = {
|
||||||
".*",
|
".*",
|
||||||
};
|
};
|
||||||
load_paths_only = {
|
|
||||||
{"."},
|
|
||||||
};
|
|
||||||
load_paths = {
|
load_paths = {
|
||||||
{ load_paths_only, .os = "win" },
|
.win = {
|
||||||
{ load_paths_only, .os = "linux"},
|
{ .path = ".", .recursive = true, .relative = true, },
|
||||||
{ load_paths_only, .os = "mac" },
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
build_x64_win32 = "echo build: x64 & bin\\build.bat";
|
commands = {
|
||||||
build_x86_win32 = "echo build: x86 & bin\\build.bat /DDEV_BUILD_X86";
|
.build_x64 = {
|
||||||
build_x64_linux = "echo build: x64 & bin/build-linux.sh";
|
.win = "echo build: x64 & bin\build.bat",
|
||||||
build_x86_linux = "echo build: x86 & bin/build-linux.sh -DDEV_BUILD_X86";
|
.out = "*compilation*",
|
||||||
build_x64_mac = "echo build: x64 & bin/build-mac.sh";
|
.footer_panel = true,
|
||||||
build_x86_mac = "echo build: x86 & bin/build-mac.sh -DDEV_BUILD_X86";
|
.save_dirty_files = true,
|
||||||
|
.cursor_at_end = false,
|
||||||
command_list = {
|
},
|
||||||
{ .name = "build x64",
|
.build_x86 = {
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
.win = "echo build: x86 & bin\build.bat /DDEV_BUILD_X86",
|
||||||
.cmd = { {build_x64_win32, .os = "win" },
|
.out = "*compilation*",
|
||||||
{build_x64_linux, .os = "linux"},
|
.footer_panel = true,
|
||||||
{build_x64_mac , .os = "mac" }, }, },
|
.save_dirty_files = true,
|
||||||
|
.cursor_at_end = false,
|
||||||
{ .name = "build x86",
|
},
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
.package = {
|
||||||
.cmd = { {build_x86_win32, .os = "win" },
|
.win = "echo package & bin\package.bat",
|
||||||
{build_x86_linux, .os = "linux"},
|
.out = "*compilation*",
|
||||||
{build_x86_mac , .os = "mac" }, }, },
|
.footer_panel = false,
|
||||||
|
.save_dirty_files = true,
|
||||||
{ .name = "package",
|
.cursor_at_end = false,
|
||||||
.out = "*compilation*", .footer_panel = false, .save_dirty_files = true,
|
},
|
||||||
.cmd = { {"echo package & bin\\package.bat" , .os = "win" },
|
.run_one_time = {
|
||||||
{"echo package & bin/package-linux.sh", .os = "linux"},
|
.win = "pushd ..\build & one_time",
|
||||||
{"echo package & bin/package-max.sh" , .os = "mac" }, }, },
|
.out = "*run*",
|
||||||
|
.footer_panel = false,
|
||||||
{ .name = "run one time",
|
.save_dirty_files = false,
|
||||||
.out = "*run*", .footer_panel = false, .save_dirty_files = false,
|
.cursor_at_end = false,
|
||||||
.cmd = { { "pushd ..\\build & one_time", .os = "win" },
|
},
|
||||||
{ "cd ../build && ./one_time" , .os = "linux" },
|
.build_custom_api_docs = {
|
||||||
{ "pushd ../build && ./one_time" , .os = "mac" }, }, },
|
.win = "custom\bin\build_one_time docs\4ed_doc_custom_api_main.cpp ..\build",
|
||||||
|
.out = "*compilation*",
|
||||||
{ .name = "build custom api docs",
|
.footer_panel = true,
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
.save_dirty_files = true,
|
||||||
.cmd = { { "custom\\bin\\build_one_time docs\\4ed_doc_custom_api_main.cpp ..\\build", .os = "win" },
|
.cursor_at_end = false,
|
||||||
{ "custom/bin/build_one_time.sh docs/4ed_doc_custom_api_main.cpp ../build", .os = "linux" },
|
},
|
||||||
{ "custom/bin/build_one_time.sh docs/4ed_doc_custom_api_main.cpp ../build", .os = "mac" }, }, },
|
.build_C___lexer_generator = {
|
||||||
|
.win = "custom\bin\build_one_time custom\languages\4coder_cpp_lexer_gen.cpp ..\build",
|
||||||
{ .name = "build C++ lexer generator",
|
.out = "*compilation*",
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
.footer_panel = true,
|
||||||
.cmd = { { "custom\\bin\\build_one_time custom\\languages\\4coder_cpp_lexer_gen.cpp ..\\build", .os = "win" }, }, },
|
.save_dirty_files = true,
|
||||||
|
.cursor_at_end = false,
|
||||||
{ .name = "build token tester",
|
},
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
.build_token_tester = {
|
||||||
.cmd = { { "custom\\bin\\build_one_time custom\\languages\\4coder_cpp_lexer_test.cpp ..\\build", .os = "win" }, }, },
|
.win = "custom\bin\build_one_time custom\languages\4coder_cpp_lexer_test.cpp ..\build",
|
||||||
|
.out = "*compilation*",
|
||||||
{ .name = "build system api",
|
.footer_panel = true,
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
.save_dirty_files = true,
|
||||||
.cmd = { { "custom\\bin\\build_one_time 4ed_system_api.cpp ..\\build", .os = "win" }, }, },
|
.cursor_at_end = false,
|
||||||
|
},
|
||||||
{ .name = "build font api",
|
.build_system_api = {
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
.win = "custom\bin\build_one_time 4ed_system_api.cpp ..\build",
|
||||||
.cmd = { { "custom\\bin\\build_one_time 4ed_font_api.cpp ..\\build", .os = "win" }, }, },
|
.out = "*compilation*",
|
||||||
|
.footer_panel = true,
|
||||||
{ .name = "build graphics api",
|
.save_dirty_files = true,
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
.cursor_at_end = false,
|
||||||
.cmd = { { "custom\\bin\\build_one_time 4ed_graphics_api.cpp ..\\build", .os = "win" }, }, },
|
},
|
||||||
|
.build_font_api = {
|
||||||
{ .name = "build api parser",
|
.win = "custom\bin\build_one_time 4ed_font_api.cpp ..\build",
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
.out = "*compilation*",
|
||||||
.cmd = { { "custom\\bin\\build_one_time 4ed_api_parser_main.cpp ..\\build & copy /B ..\\build\\one_time.exe ..\\build\\api_parser.exe", .os = "win" }, }, },
|
.footer_panel = true,
|
||||||
|
.save_dirty_files = true,
|
||||||
{ .name = "build api checker",
|
.cursor_at_end = false,
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
},
|
||||||
.cmd = { { "custom\\bin\\build_one_time 4ed_api_check.cpp ..\\build & copy /B ..\\build\\one_time.exe ..\\build\\api_checker.exe", .os = "win" }, }, },
|
.build_graphics_api = {
|
||||||
|
.win = "custom\bin\build_one_time 4ed_graphics_api.cpp ..\build",
|
||||||
{ .name = "build keycode generator",
|
.out = "*compilation*",
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
.footer_panel = true,
|
||||||
.cmd = { { "custom\\bin\\build_one_time 4ed_generate_keycodes.cpp ..\\build", .os = "win" },
|
.save_dirty_files = true,
|
||||||
{ "custom/bin/build_one_time.sh 4ed_generate_keycodes.cpp ../build", .os = "linux" }, }, },
|
.cursor_at_end = false,
|
||||||
|
},
|
||||||
{ .name = "build site render",
|
.build_api_parser = {
|
||||||
.out = "*compilation*", .footer_panel = true, .save_dirty_files = true,
|
.win = "custom\bin\build_one_time 4ed_api_parser_main.cpp ..\build & copy /B ..\build\one_time.exe ..\build\api_parser.exe",
|
||||||
.cmd = { { "custom\\bin\\build_one_time site/4ed_site_render_main.cpp ..\\build", .os = "win" }, }, },
|
.out = "*compilation*",
|
||||||
|
.footer_panel = true,
|
||||||
{ .name = "generate custom api master list",
|
.save_dirty_files = true,
|
||||||
.out = "*run*", .footer_panel = false, .save_dirty_files = false,
|
.cursor_at_end = false,
|
||||||
.cmd = { { "..\\build\\api_parser 4ed_api_implementation.cpp", .os = "win" }, }, },
|
},
|
||||||
|
.build_api_checker = {
|
||||||
|
.win = "custom\bin\build_one_time 4ed_api_check.cpp ..\build & copy /B ..\build\one_time.exe ..\build\api_checker.exe",
|
||||||
|
.out = "*compilation*",
|
||||||
|
.footer_panel = true,
|
||||||
|
.save_dirty_files = true,
|
||||||
|
.cursor_at_end = false,
|
||||||
|
},
|
||||||
|
.build_keycode_generator = {
|
||||||
|
.win = "custom\bin\build_one_time 4ed_generate_keycodes.cpp ..\build",
|
||||||
|
.out = "*compilation*",
|
||||||
|
.footer_panel = true,
|
||||||
|
.save_dirty_files = true,
|
||||||
|
.cursor_at_end = false,
|
||||||
|
},
|
||||||
|
.build_site_render = {
|
||||||
|
.win = "custom\bin\build_one_time site/4ed_site_render_main.cpp ..\build",
|
||||||
|
.out = "*compilation*",
|
||||||
|
.footer_panel = true,
|
||||||
|
.save_dirty_files = true,
|
||||||
|
.cursor_at_end = false,
|
||||||
|
},
|
||||||
|
.generate_custom_api_master_list = {
|
||||||
|
.win = "..\build\api_parser 4ed_api_implementation.cpp",
|
||||||
|
.out = "*run*",
|
||||||
|
.footer_panel = false,
|
||||||
|
.save_dirty_files = false,
|
||||||
|
.cursor_at_end = false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
fkey_command[1] = "build x64";
|
|
||||||
fkey_command[3] = "build site render";
|
|
||||||
fkey_command[4] = "run one time";
|
|
||||||
fkey_command[5] = "build C++ lexer generator";
|
|
||||||
fkey_command[6] = "build token tester";
|
|
||||||
fkey_command[11] = "package";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue