mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-19 02:22:23 -07:00
more work on watch-window-driven file lister
This commit is contained in:
+36
-6
@@ -427,23 +427,53 @@ str8_chop(String8 str, U64 amt){
|
||||
}
|
||||
|
||||
internal String8
|
||||
str8_skip_chop_whitespace(String8 string){
|
||||
str8_skip_chop_whitespace(String8 string)
|
||||
{
|
||||
U8 *first = string.str;
|
||||
U8 *opl = first + string.size;
|
||||
for (;first < opl; first += 1){
|
||||
if (!char_is_space(*first)){
|
||||
for(;first < opl; first += 1)
|
||||
{
|
||||
if(!char_is_space(*first))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (;opl > first;){
|
||||
for(;opl > first;)
|
||||
{
|
||||
opl -= 1;
|
||||
if (!char_is_space(*opl)){
|
||||
if(!char_is_space(*opl))
|
||||
{
|
||||
opl += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String8 result = str8_range(first, opl);
|
||||
return(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
internal String8
|
||||
str8_skip_chop_slashes(String8 string)
|
||||
{
|
||||
U8 *first = string.str;
|
||||
U8 *opl = first + string.size;
|
||||
for(;first < opl; first += 1)
|
||||
{
|
||||
if(!char_is_slash(*first))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(;opl > first;)
|
||||
{
|
||||
opl -= 1;
|
||||
if(!char_is_slash(*opl))
|
||||
{
|
||||
opl += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String8 result = str8_range(first, opl);
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
@@ -220,6 +220,7 @@ internal String8 str8_skip(String8 str, U64 amt);
|
||||
internal String8 str8_postfix(String8 str, U64 size);
|
||||
internal String8 str8_chop(String8 str, U64 amt);
|
||||
internal String8 str8_skip_chop_whitespace(String8 string);
|
||||
internal String8 str8_skip_chop_slashes(String8 string);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: String Formatting & Copying
|
||||
|
||||
+12
-4
@@ -124,8 +124,11 @@ dr_string_from_fstrs(Arena *arena, DR_FStrList *list)
|
||||
U64 idx = 0;
|
||||
for(DR_FStrNode *n = list->first; n != 0; n = n->next)
|
||||
{
|
||||
MemoryCopy(result.str+idx, n->v.string.str, n->v.string.size);
|
||||
idx += n->v.string.size;
|
||||
if(!fnt_tag_match(n->v.params.font, dr_thread_ctx->icon_font))
|
||||
{
|
||||
MemoryCopy(result.str+idx, n->v.string.str, n->v.string.size);
|
||||
idx += n->v.string.size;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -143,6 +146,7 @@ dr_fruns_from_fstrs(Arena *arena, F32 tab_size_px, DR_FStrList *strs)
|
||||
dst_n->v.color = n->v.params.color;
|
||||
dst_n->v.underline_thickness = n->v.params.underline_thickness;
|
||||
dst_n->v.strikethrough_thickness = n->v.params.strikethrough_thickness;
|
||||
dst_n->v.icon = (fnt_tag_match(n->v.params.font, dr_thread_ctx->icon_font));
|
||||
SLLQueuePush(run_list.first, run_list.last, dst_n);
|
||||
run_list.node_count += 1;
|
||||
run_list.dim.x += dst_n->v.run.dim.x;
|
||||
@@ -169,7 +173,7 @@ dr_dim_from_fstrs(DR_FStrList *fstrs)
|
||||
// (Frame boundaries)
|
||||
|
||||
internal void
|
||||
dr_begin_frame(void)
|
||||
dr_begin_frame(FNT_Tag icon_font)
|
||||
{
|
||||
if(dr_thread_ctx == 0)
|
||||
{
|
||||
@@ -181,6 +185,7 @@ dr_begin_frame(void)
|
||||
arena_pop_to(dr_thread_ctx->arena, dr_thread_ctx->arena_frame_start_pos);
|
||||
dr_thread_ctx->free_bucket_selection = 0;
|
||||
dr_thread_ctx->top_bucket = 0;
|
||||
dr_thread_ctx->icon_font = icon_font;
|
||||
}
|
||||
|
||||
internal void
|
||||
@@ -627,7 +632,10 @@ dr_truncated_fancy_run_fuzzy_matches(Vec2F32 p, DR_FRunList *list, F32 max_x, Fu
|
||||
pixel_range.min = Min(pre_advance, pixel_range.min);
|
||||
pixel_range.max = Max(post_advance, pixel_range.max);
|
||||
}
|
||||
byte_off += piece->decode_size;
|
||||
if(!fr->icon)
|
||||
{
|
||||
byte_off += piece->decode_size;
|
||||
}
|
||||
advance += piece->advance;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -48,6 +48,7 @@ struct DR_FRun
|
||||
Vec4F32 color;
|
||||
F32 underline_thickness;
|
||||
F32 strikethrough_thickness;
|
||||
B32 icon;
|
||||
};
|
||||
|
||||
typedef struct DR_FRunNode DR_FRunNode;
|
||||
@@ -98,6 +99,7 @@ struct DR_ThreadCtx
|
||||
{
|
||||
Arena *arena;
|
||||
U64 arena_frame_start_pos;
|
||||
FNT_Tag icon_font;
|
||||
DR_BucketSelectionNode *top_bucket;
|
||||
DR_BucketSelectionNode *free_bucket_selection;
|
||||
};
|
||||
@@ -129,7 +131,7 @@ internal Vec2F32 dr_dim_from_fstrs(DR_FStrList *fstrs);
|
||||
//
|
||||
// (Frame boundaries & bucket submission)
|
||||
|
||||
internal void dr_begin_frame(void);
|
||||
internal void dr_begin_frame(FNT_Tag icon_font);
|
||||
internal void dr_submit_bucket(OS_Handle os_window, R_Handle r_window, DR_Bucket *bucket);
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
+90
-29
@@ -115,41 +115,51 @@ E_LOOKUP_INFO_FUNCTION_DEF(folder)
|
||||
E_Interpretation lhs_interp = e_interpret(lhs_bytecode);
|
||||
E_Value lhs_value = lhs_interp.value;
|
||||
U64 lhs_string_id = lhs_value.u64;
|
||||
|
||||
//- rjf: gather files in this folder
|
||||
String8 folder_path = e_string_from_id(lhs_string_id);
|
||||
|
||||
//- rjf: compute filter - omit common prefixes (common parent paths)
|
||||
String8 local_filter = filter;
|
||||
{
|
||||
U64 folder_pos_in_filter = str8_find_needle(filter, 0, folder_path, StringMatchFlag_CaseInsensitive|StringMatchFlag_SlashInsensitive);
|
||||
if(folder_pos_in_filter < filter.size)
|
||||
{
|
||||
local_filter = str8_skip(local_filter, folder_pos_in_filter+folder_path.size);
|
||||
local_filter = str8_skip_chop_slashes(local_filter);
|
||||
}
|
||||
else
|
||||
{
|
||||
MemoryZeroStruct(&local_filter);
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: gather & filter files in this folder
|
||||
String8List folder_paths = {0};
|
||||
String8List file_paths = {0};
|
||||
{
|
||||
OS_FileIter *iter = os_file_iter_begin(scratch.arena, folder_path, 0);
|
||||
for(OS_FileInfo info = {0}; os_file_iter_next(scratch.arena, iter, &info);)
|
||||
{
|
||||
if(info.props.flags & FilePropertyFlag_IsFolder)
|
||||
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, local_filter, info.name);
|
||||
if(matches.count == matches.needle_part_count)
|
||||
{
|
||||
str8_list_push(scratch.arena, &folder_paths, push_str8_copy(arena, info.name));
|
||||
}
|
||||
else
|
||||
{
|
||||
str8_list_push(scratch.arena, &file_paths, push_str8_copy(arena, info.name));
|
||||
if(info.props.flags & FilePropertyFlag_IsFolder)
|
||||
{
|
||||
str8_list_push(scratch.arena, &folder_paths, push_str8_copy(arena, info.name));
|
||||
}
|
||||
else
|
||||
{
|
||||
str8_list_push(scratch.arena, &file_paths, push_str8_copy(arena, info.name));
|
||||
}
|
||||
}
|
||||
}
|
||||
os_file_iter_end(iter);
|
||||
}
|
||||
|
||||
//- rjf: build filtered paths
|
||||
String8List folder_paths__filtered = {0};
|
||||
String8List file_paths__filtered = {0};
|
||||
{
|
||||
// TODO(rjf)
|
||||
folder_paths__filtered = folder_paths;
|
||||
file_paths__filtered = file_paths;
|
||||
}
|
||||
|
||||
//- rjf: build accelerator
|
||||
E_FolderAccel *accel = push_array(arena, E_FolderAccel, 1);
|
||||
accel->folder_path = push_str8_copy(arena, folder_path);
|
||||
accel->folders = str8_array_from_list(arena, &folder_paths__filtered);
|
||||
accel->files = str8_array_from_list(arena, &file_paths__filtered);
|
||||
accel->folders = str8_array_from_list(arena, &folder_paths);
|
||||
accel->files = str8_array_from_list(arena, &file_paths);
|
||||
info.user_data = accel;
|
||||
info.idxed_expr_count = accel->folders.count + accel->files.count;
|
||||
scratch_end(scratch);
|
||||
@@ -192,6 +202,48 @@ E_LOOKUP_RANGE_FUNCTION_DEF(folder)
|
||||
}
|
||||
}
|
||||
|
||||
E_LOOKUP_ID_FROM_NUM_FUNCTION_DEF(folder)
|
||||
{
|
||||
U64 id = 0;
|
||||
E_FolderAccel *accel = (E_FolderAccel *)user_data;
|
||||
String8 name = {0};
|
||||
if(0 < num && num <= accel->folders.count)
|
||||
{
|
||||
name = accel->folders.v[num-1];
|
||||
}
|
||||
else if(accel->folders.count < num && num <= accel->folders.count+accel->files.count)
|
||||
{
|
||||
name = accel->files.v[num-accel->folders.count-1];
|
||||
}
|
||||
id = e_hash_from_string(5381, name);
|
||||
return id;
|
||||
}
|
||||
|
||||
E_LOOKUP_NUM_FROM_ID_FUNCTION_DEF(folder)
|
||||
{
|
||||
U64 num = 0;
|
||||
E_FolderAccel *accel = (E_FolderAccel *)user_data;
|
||||
for(U64 idx = 0; idx < accel->folders.count+accel->files.count; idx += 1)
|
||||
{
|
||||
String8 name = {0};
|
||||
if(0 <= idx && idx < accel->folders.count)
|
||||
{
|
||||
name = accel->folders.v[idx];
|
||||
}
|
||||
else if(accel->folders.count <= idx && idx < accel->folders.count+accel->files.count)
|
||||
{
|
||||
name = accel->files.v[idx-accel->folders.count];
|
||||
}
|
||||
U64 hash = e_hash_from_string(5381, name);
|
||||
if(hash == id)
|
||||
{
|
||||
num = idx+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
typedef struct E_FileAccel E_FileAccel;
|
||||
struct E_FileAccel
|
||||
{
|
||||
@@ -433,7 +485,9 @@ e_lookup_rule_map_make(Arena *arena, U64 slots_count)
|
||||
map.slots = push_array(arena, E_LookupRuleSlot, map.slots_count);
|
||||
e_lookup_rule_map_insert_new(arena, &map, str8_lit("folder"),
|
||||
.info = E_LOOKUP_INFO_FUNCTION_NAME(folder),
|
||||
.range = E_LOOKUP_RANGE_FUNCTION_NAME(folder));
|
||||
.range = E_LOOKUP_RANGE_FUNCTION_NAME(folder),
|
||||
.id_from_num = E_LOOKUP_ID_FROM_NUM_FUNCTION_NAME(folder),
|
||||
.num_from_id = E_LOOKUP_NUM_FROM_ID_FUNCTION_NAME(folder));
|
||||
e_lookup_rule_map_insert_new(arena, &map, str8_lit("file"),
|
||||
.info = E_LOOKUP_INFO_FUNCTION_NAME(file),
|
||||
.access = E_LOOKUP_ACCESS_FUNCTION_NAME(file),
|
||||
@@ -2253,22 +2307,27 @@ E_IRGEN_FUNCTION_DEF(default)
|
||||
case E_ExprKind_LeafFilePath:
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
String8 file_path = path_normalized_from_string(scratch.arena, expr->string);
|
||||
String8 file_path = expr->string;
|
||||
FileProperties props = os_properties_from_file_path(file_path);
|
||||
if(props.flags & FilePropertyFlag_IsFolder || file_path.size == 0 || str8_match(file_path, str8_lit("/"), StringMatchFlag_SlashInsensitive))
|
||||
{
|
||||
E_Space space = e_space_make(E_SpaceKind_FileSystem);
|
||||
result.root = e_irtree_set_space(arena, space, e_irtree_const_u(arena, e_id_from_string(file_path)));
|
||||
result.type_key = e_type_key_cons(.kind = E_TypeKind_Set, .name = str8_lit("folder"));
|
||||
result.mode = E_Mode_Value;
|
||||
}
|
||||
else
|
||||
if(!str8_match(expr->qualifier, str8_lit("folder"), 0) && !(props.flags & FilePropertyFlag_IsFolder) && file_path.size != 0)
|
||||
{
|
||||
E_Space space = e_space_make(E_SpaceKind_FileSystem);
|
||||
result.root = e_irtree_set_space(arena, space, e_irtree_const_u(arena, e_id_from_string(file_path)));
|
||||
result.type_key = e_type_key_cons(.kind = E_TypeKind_Set, .name = str8_lit("file"));
|
||||
result.mode = E_Mode_Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
String8 folder_path = str8_chop_last_slash(file_path);
|
||||
props = os_properties_from_file_path(folder_path);
|
||||
if(props.flags & FilePropertyFlag_IsFolder || folder_path.size == 0 || str8_match(folder_path, str8_lit("/"), StringMatchFlag_SlashInsensitive))
|
||||
{
|
||||
E_Space space = e_space_make(E_SpaceKind_FileSystem);
|
||||
result.root = e_irtree_set_space(arena, space, e_irtree_const_u(arena, e_id_from_string(folder_path)));
|
||||
result.type_key = e_type_key_cons(.kind = E_TypeKind_Set, .name = str8_lit("folder"));
|
||||
result.mode = E_Mode_Value;
|
||||
}
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}break;
|
||||
|
||||
@@ -2637,6 +2696,7 @@ e_expr_irext_member_access(Arena *arena, E_Expr *lhs, E_IRTreeAndType *lhs_irtre
|
||||
E_Expr *lhs_bytecode = e_push_expr(arena, E_ExprKind_LeafBytecode, lhs->location);
|
||||
E_OpList lhs_oplist = e_oplist_from_irtree(arena, lhs_irtree->root);
|
||||
lhs_bytecode->string = e_string_from_expr(arena, lhs);
|
||||
lhs_bytecode->qualifier = lhs->qualifier;
|
||||
lhs_bytecode->space = lhs->space;
|
||||
lhs_bytecode->mode = lhs_irtree->mode;
|
||||
lhs_bytecode->type_key = lhs_irtree->type_key;
|
||||
@@ -2655,6 +2715,7 @@ e_expr_irext_array_index(Arena *arena, E_Expr *lhs, E_IRTreeAndType *lhs_irtree,
|
||||
E_Expr *lhs_bytecode = e_push_expr(arena, E_ExprKind_LeafBytecode, lhs->location);
|
||||
E_OpList lhs_oplist = e_oplist_from_irtree(arena, lhs_irtree->root);
|
||||
lhs_bytecode->string = e_string_from_expr(arena, lhs);
|
||||
lhs_bytecode->qualifier = lhs->qualifier;
|
||||
lhs_bytecode->space = lhs->space;
|
||||
lhs_bytecode->mode = lhs_irtree->mode;
|
||||
lhs_bytecode->type_key = lhs_irtree->type_key;
|
||||
|
||||
@@ -747,6 +747,7 @@ e_expr_copy(Arena *arena, E_Expr *src)
|
||||
dst->value = t->src->value;
|
||||
dst->string = push_str8_copy(arena, t->src->string);
|
||||
dst->bytecode = push_str8_copy(arena, t->src->bytecode);
|
||||
dst->qualifier = push_str8_copy(arena, t->src->qualifier);
|
||||
if(t->dst_parent == &e_expr_nil)
|
||||
{
|
||||
result = dst;
|
||||
@@ -1920,7 +1921,8 @@ e_parse_expr_from_text_tokens__prec(Arena *arena, String8 text, E_TokenArray *to
|
||||
//- rjf: string => leaf string literal, or file path
|
||||
case E_TokenKind_StringLiteral:
|
||||
{
|
||||
if(str8_match(resolution_qualifier, str8_lit("file"), 0))
|
||||
if(str8_match(resolution_qualifier, str8_lit("file"), 0) ||
|
||||
str8_match(resolution_qualifier, str8_lit("folder"), 0))
|
||||
{
|
||||
String8 string_value_escaped = str8_chop(str8_skip(token_string, 1), 1);
|
||||
String8 string_value_raw = raw_from_escaped_str8(arena, string_value_escaped);
|
||||
|
||||
@@ -443,7 +443,7 @@ RD_CmdKindInfo rd_cmd_kind_info_table[213] =
|
||||
{ str8_lit_comp("tab_bar_top"), str8_lit_comp("Anchors a panel's tab bar to the top of the panel."), str8_lit_comp(""), str8_lit_comp("$tab,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("tab_bar_bottom"), str8_lit_comp("Anchors a panel's tab bar to the bottom of the panel."), str8_lit_comp(""), str8_lit_comp("$tab,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("set_current_path"), str8_lit_comp("Sets the debugger's current path, which is used as a starting point when browsing for files."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("open"), str8_lit_comp("Opens a file."), str8_lit_comp("code,source,file"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("query:search_path"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("open"), str8_lit_comp("Opens a file."), str8_lit_comp("code,source,file"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("switch"), str8_lit_comp("Switches to a recent file."), str8_lit_comp("code,source,file"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:recent_files"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("switch_to_partner_file"), str8_lit_comp("Switches to the focused file's partner; or from header to implementation or vice versa."), str8_lit_comp("code,source,file"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("record_file_in_project"), str8_lit_comp("Records the passed file path as a recent file in the currently loaded project."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
@@ -451,8 +451,8 @@ RD_CmdKindInfo rd_cmd_kind_info_table[213] =
|
||||
{ str8_lit_comp("go_to_disassembly"), str8_lit_comp("Goes to the disassembly, if any, for a given source code line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("$text_pt,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("go_to_source"), str8_lit_comp("Goes to the source code, if any, for a given disassembly line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("set_file_replacement_path"), str8_lit_comp("Sets the path which should be used as the replacement for the passed file."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_user"), str8_lit_comp("Opens a user file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("load,user,project,layout"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("query:search_path"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_project"), str8_lit_comp("Opens a project file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("project,project,session"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("query:search_path"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_user"), str8_lit_comp("Opens a user file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("load,user,project,layout"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_project"), str8_lit_comp("Opens a project file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("project,project,session"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_recent_project"), str8_lit_comp("Opens a recently used project file."), str8_lit_comp("project,project,session"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:recent_projects"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("write_user_data"), str8_lit_comp("Writes user data to the active user file."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("write_project_data"), str8_lit_comp("Writes project data to the active project file."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
@@ -535,7 +535,7 @@ RD_CmdKindInfo rd_cmd_kind_info_table[213] =
|
||||
{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_String, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("add_auto_view_rule"), str8_lit_comp("Adds a new auto view rule."), str8_lit_comp(""), str8_lit_comp("$auto_view_rules,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_String, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("set_next_statement"), str8_lit_comp("Sets the selected thread's instruction pointer to the cursor's position."), str8_lit_comp(""), str8_lit_comp("$text_pt,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("add_target"), str8_lit_comp("Adds a new target."), str8_lit_comp("application,executable,debug"), str8_lit_comp("$targets,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("query:search_path"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("add_target"), str8_lit_comp("Adds a new target."), str8_lit_comp("application,executable,debug"), str8_lit_comp("$targets,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("select_target"), str8_lit_comp("Selects a target."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:targets"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("enable_target"), str8_lit_comp("Enables a target, in addition to all targets currently enabled."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:targets"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("disable_target"), str8_lit_comp("Disables a target."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:targets"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
@@ -566,9 +566,9 @@ RD_CmdKindInfo rd_cmd_kind_info_table[213] =
|
||||
{ str8_lit_comp("output"), str8_lit_comp("Opens an output view."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("memory"), str8_lit_comp("Opens a memory view."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("settings"), str8_lit_comp("Opens the settings view."), str8_lit_comp("theme,color,scheme,options"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("pick_file"), str8_lit_comp("Opens the file browser to pick a file."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("query:search_path"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("pick_folder"), str8_lit_comp("Opens the file browser to pick a folder."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*1)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("query:search_path"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("pick_file_or_folder"), str8_lit_comp("Opens the file browser to pick a file or folder."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*1)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("query:search_path"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("pick_file"), str8_lit_comp("Opens the file browser to pick a file."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("pick_folder"), str8_lit_comp("Opens the file browser to pick a folder."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*1)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("pick_file_or_folder"), str8_lit_comp("Opens the file browser to pick a file or folder."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*1)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("push_lister"), str8_lit_comp("Pushes a new lister onto the lister stack."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("complete_lister"), str8_lit_comp("Completes a lister, and pops it off the lister stack."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("cancel_lister"), str8_lit_comp("Cancels a lister, and pops it off the lister stack."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
|
||||
@@ -427,7 +427,7 @@ RD_CmdTable: // | | | |
|
||||
|
||||
//- rjf: files
|
||||
{SetCurrentPath 0 1 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "set_current_path" "Set Current Path" "Sets the debugger's current path, which is used as a starting point when browsing for files." "" "" }
|
||||
{Open 1 1 "query:search_path" FilePath null Nil Null 1 0 0 0 0 1 1 FileOutline "open" "Open" "Opens a file." "code,source,file" "" }
|
||||
{Open 1 1 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 FileOutline "open" "Open" "Opens a file." "code,source,file" "" }
|
||||
{Switch 1 1 "query:recent_files" Cfg null RecentFile Null 0 0 0 0 0 1 1 FileOutline "switch" "Switch" "Switches to a recent file." "code,source,file" "" }
|
||||
{SwitchToPartnerFile 1 1 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "switch_to_partner_file" "Switch To Partner File" "Switches to the focused file's partner; or from header to implementation or vice versa." "code,source,file" "" }
|
||||
{RecordFileInProject 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 FileOutline "record_file_in_project" "Record File In Project" "Records the passed file path as a recent file in the currently loaded project." "" "" }
|
||||
@@ -441,8 +441,8 @@ RD_CmdTable: // | | | |
|
||||
{SetFileReplacementPath 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "set_file_replacement_path" "Set File Replacement Path" "Sets the path which should be used as the replacement for the passed file." "" "" }
|
||||
|
||||
//- rjf: setting config paths
|
||||
{OpenUser 1 1 "query:search_path" FilePath null Nil Null 1 0 0 0 0 1 1 Person "open_user" "Open User" "Opens a user file path, immediately loading it, and begins autosaving to it." "load,user,project,layout" "" }
|
||||
{OpenProject 1 1 "query:search_path" FilePath null Nil Null 1 0 0 0 0 1 1 Briefcase "open_project" "Open Project" "Opens a project file path, immediately loading it, and begins autosaving to it." "project,project,session" "" }
|
||||
{OpenUser 1 1 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Person "open_user" "Open User" "Opens a user file path, immediately loading it, and begins autosaving to it." "load,user,project,layout" "" }
|
||||
{OpenProject 1 1 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Briefcase "open_project" "Open Project" "Opens a project file path, immediately loading it, and begins autosaving to it." "project,project,session" "" }
|
||||
{OpenRecentProject 1 1 "query:recent_projects" Cfg null RecentProject Null 0 0 0 0 0 1 1 Briefcase "open_recent_project" "Open Recent Project" "Opens a recently used project file." "project,project,session" "" }
|
||||
|
||||
//- rjf: writing config changes
|
||||
@@ -555,7 +555,7 @@ RD_CmdTable: // | | | |
|
||||
{SetNextStatement 1 1 "" Null null Nil Null 0 0 0 0 0 0 0 RightArrow "set_next_statement" "Set Next Statement" "Sets the selected thread's instruction pointer to the cursor's position." "" "$text_pt," }
|
||||
|
||||
//- rjf: targets
|
||||
{AddTarget 1 1 "query:search_path" FilePath null Nil Null 1 0 0 0 0 1 1 Target "add_target" "Add Target" "Adds a new target." "application,executable,debug" "$targets," }
|
||||
{AddTarget 1 1 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Target "add_target" "Add Target" "Adds a new target." "application,executable,debug" "$targets," }
|
||||
{SelectTarget 1 1 "query:targets" Cfg null Target Null 0 0 0 0 0 1 1 Target "select_target" "Select Target" "Selects a target." "" "" }
|
||||
{EnableTarget 1 1 "query:targets" Cfg null Target Null 0 0 0 0 0 1 1 CheckFilled "enable_target" "Enable Target" "Enables a target, in addition to all targets currently enabled." "" "" }
|
||||
{DisableTarget 1 1 "query:targets" Cfg null Target Null 0 0 0 0 0 1 1 CheckHollow "disable_target" "Disable Target" "Disables a target." "" "" }
|
||||
@@ -596,9 +596,9 @@ RD_CmdTable: // | | | |
|
||||
{Settings 1 1 "" Null null Nil Null 0 0 0 0 0 0 0 Gear "settings" "Settings" "Opens the settings view." "theme,color,scheme,options" "" }
|
||||
|
||||
//- rjf: queries
|
||||
{PickFile 0 0 "query:search_path" FilePath null Nil Null 1 0 0 0 0 1 1 FileOutline "pick_file" "Pick File" "Opens the file browser to pick a file." "" "" }
|
||||
{PickFolder 0 0 "query:search_path" FilePath null Nil Null 0 1 0 0 0 1 1 FolderOpenFilled "pick_folder" "Pick Folder" "Opens the file browser to pick a folder." "" "" }
|
||||
{PickFileOrFolder 0 0 "query:search_path" FilePath null Nil Null 1 1 0 0 0 1 1 FileOutline "pick_file_or_folder" "Pick File/Folder" "Opens the file browser to pick a file or folder." "" "" }
|
||||
{PickFile 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 FileOutline "pick_file" "Pick File" "Opens the file browser to pick a file." "" "" }
|
||||
{PickFolder 0 0 `folder:\\"$input\\"` FilePath null Nil Null 0 1 0 0 0 1 1 FolderOpenFilled "pick_folder" "Pick Folder" "Opens the file browser to pick a folder." "" "" }
|
||||
{PickFileOrFolder 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 1 0 0 0 1 1 FileOutline "pick_file_or_folder" "Pick File/Folder" "Opens the file browser to pick a file or folder." "" "" }
|
||||
|
||||
//- rjf: query stack
|
||||
{PushQuery 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "push_lister" "Push Lister" "Pushes a new lister onto the lister stack." "" "" }
|
||||
|
||||
+12
-13
@@ -5223,24 +5223,32 @@ rd_window_frame(void)
|
||||
String8 cmd_name = ws->query_cmd_name;
|
||||
RD_CmdKindInfo *cmd_kind_info = rd_cmd_kind_info_from_string(cmd_name);
|
||||
RD_Cfg *view = rd_cfg_child_from_string_or_alloc(query, str8_lit("watch"));
|
||||
RD_Cfg *expr = rd_cfg_child_from_string_or_alloc(view, str8_lit("expression"));
|
||||
RD_Cfg *cmd = rd_cfg_child_from_string_or_alloc(view, str8_lit("cmd"));
|
||||
rd_cfg_new_replace(cmd, cmd_name);
|
||||
rd_cfg_child_from_string_or_alloc(view, str8_lit("lister"));
|
||||
B32 size_query_by_expr_eval = (cmd_kind_info->query.expr.size == 0);
|
||||
RD_ViewState *vs = rd_view_state_from_cfg(view);
|
||||
vs->is_searching = 1;
|
||||
arena_clear(vs->search_arena);
|
||||
vs->search_cmd_name = push_str8_copy(vs->search_arena, ws->query_cmd_name);
|
||||
vs->search_regs = rd_regs_copy(vs->search_arena, ws->query_regs);
|
||||
RD_Cfg *expr = rd_cfg_child_from_string_or_alloc(view, str8_lit("expression"));
|
||||
String8 query_expression = cmd_kind_info->query.expr;
|
||||
B32 size_query_by_expr_eval = 0;
|
||||
if(query_expression.size == 0)
|
||||
{
|
||||
query_expression = str8(vs->search_buffer, vs->search_string_size);
|
||||
RD_Cfg *explicit_root = rd_cfg_child_from_string_or_alloc(view, str8_lit("explicit_root"));
|
||||
rd_cfg_new(explicit_root, str8_lit("1"));
|
||||
size_query_by_expr_eval = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
U64 input_insertion_pos = str8_find_needle(query_expression, 0, str8_lit("$input"), 0);
|
||||
if(input_insertion_pos < query_expression.size)
|
||||
{
|
||||
String8 pre_insertion = str8_prefix(query_expression, input_insertion_pos);
|
||||
String8 post_insertion = str8_skip(query_expression, input_insertion_pos + 6);
|
||||
query_expression = push_str8f(scratch.arena, "%S%S%S", pre_insertion, str8(vs->search_buffer, vs->search_string_size), post_insertion);
|
||||
}
|
||||
rd_cfg_release(rd_cfg_child_from_string(view, str8_lit("explicit_root")));
|
||||
}
|
||||
rd_cfg_new_replace(expr, query_expression);
|
||||
@@ -11344,15 +11352,6 @@ rd_frame(void)
|
||||
e_string2expr_map_insert(scratch.arena, ctx->macro_map, str8_lit("call_stack"), expr);
|
||||
}
|
||||
|
||||
//- rjf: add macro for 'search path'
|
||||
{
|
||||
String8 search_path = rd_state->current_path;
|
||||
String8 search_path_escaped = escaped_from_raw_str8(scratch.arena, search_path);
|
||||
String8 search_path_eval_string = push_str8f(scratch.arena, "file:\"%S\"", search_path_escaped);
|
||||
E_Expr *expr = e_parse_expr_from_text(scratch.arena, search_path_eval_string).exprs.first;
|
||||
e_string2expr_map_insert(scratch.arena, ctx->macro_map, str8_lit("search_path"), expr);
|
||||
}
|
||||
|
||||
//- rjf: add macro for watches group
|
||||
{
|
||||
String8 collection_name = str8_lit("watches");
|
||||
@@ -15264,7 +15263,7 @@ Z(getting_started)
|
||||
//- rjf: update/render all windows
|
||||
//
|
||||
{
|
||||
dr_begin_frame();
|
||||
dr_begin_frame(rd_font_from_slot(RD_FontSlot_Icons));
|
||||
RD_CfgList windows = rd_cfg_top_level_list_from_string(scratch.arena, str8_lit("window"));
|
||||
for(RD_CfgNode *n = windows.first; n != 0; n = n->next)
|
||||
{
|
||||
|
||||
@@ -3044,7 +3044,16 @@ RD_VIEW_UI_FUNCTION_DEF(watch)
|
||||
{
|
||||
searched_string = dr_string_from_fstrs(scratch.arena, &cell_info.fstrs);
|
||||
}
|
||||
FuzzyMatchRangeList fuzzy_matches = fuzzy_match_find(scratch.arena, rd_view_search(), searched_string);
|
||||
String8 search_query = rd_view_search();
|
||||
FuzzyMatchRangeList fuzzy_matches = fuzzy_match_find(scratch.arena, search_query, searched_string);
|
||||
if(fuzzy_matches.count == 0)
|
||||
{
|
||||
String8 path_needle = str8_skip_last_slash(search_query);
|
||||
if(0 < path_needle.size && path_needle.size < search_query.size)
|
||||
{
|
||||
fuzzy_matches = fuzzy_match_find(scratch.arena, path_needle, searched_string);
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: build
|
||||
RD_LineEditParams line_edit_params = {0};
|
||||
|
||||
Reference in New Issue
Block a user