mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: Assist cosmetics
This commit is contained in:
parent
28b61e9465
commit
3f9c7a8a59
2 changed files with 23 additions and 21 deletions
|
|
@ -182,17 +182,19 @@ void Ide::Usage(const String& id, const String& name, Point ref_pos)
|
|||
}
|
||||
|
||||
SortByKey(CodeIndex());
|
||||
for(const auto& f : ~CodeIndex()) {
|
||||
auto Add = [&](Point mpos) {
|
||||
AddReferenceLine(f.key, mpos, name, unique);
|
||||
};
|
||||
for(const AnnotationItem& m : f.value.items)
|
||||
if(ids.Find(m.id) >= 0)
|
||||
Add(m.pos);
|
||||
for(const ReferenceItem& m : f.value.refs)
|
||||
if(ids.Find(m.id) >= 0)
|
||||
Add(m.pos);
|
||||
}
|
||||
for(int src = 0; src < 2; src++)
|
||||
for(const auto& f : ~CodeIndex())
|
||||
if((findarg(GetFileExt(f.key), ".h", "") < 0) == src) { // headers first
|
||||
auto Add = [&](Point mpos) {
|
||||
AddReferenceLine(f.key, mpos, name, unique);
|
||||
};
|
||||
for(const AnnotationItem& m : f.value.items)
|
||||
if(ids.Find(m.id) >= 0)
|
||||
Add(m.pos);
|
||||
for(const ReferenceItem& m : f.value.refs)
|
||||
if(ids.Find(m.id) >= 0)
|
||||
Add(m.pos);
|
||||
}
|
||||
}
|
||||
|
||||
FFoundFinish();
|
||||
|
|
|
|||
|
|
@ -749,16 +749,16 @@ void Ide::DebugMenu(Bar& menu)
|
|||
|
||||
void Ide::AssistMenu(Bar& menu)
|
||||
{
|
||||
menu.Add(!designer, AK_JUMPS, [=] { ContextGoto(); });
|
||||
menu.Add(!designer, AK_SWAPS, THISBACK(SwapS));
|
||||
menu.Add(!designer, AK_USAGE, [=] { Usage(); });
|
||||
menu.Add(!designer, AK_IDUSAGE, THISBACK(IdUsage));
|
||||
menu.Add(!designer, AK_ASSIST, [=] { editor.Assist(true); });
|
||||
menu.Add(!designer, AK_DCOPY, callback(&editor, &AssistEditor::DCopy));
|
||||
menu.Add(!designer, AK_VIRTUALS, callback(&editor, &AssistEditor::Virtuals));
|
||||
menu.Add(!designer, AK_THISBACKS, callback(&editor, &AssistEditor::Events));
|
||||
menu.Add(!designer, AK_COMPLETE, callback(&editor, &AssistEditor::Complete));
|
||||
menu.Add(!designer, AK_ABBR, callback(&editor, &AssistEditor::Abbr));
|
||||
menu.Add(!designer, AK_ASSIST, [=] { editor.Assist(true); });
|
||||
menu.Add(!designer, AK_JUMPS, [=] { ContextGoto(); });
|
||||
menu.Add(!designer, AK_SWAPS, THISBACK(SwapS));
|
||||
menu.Add(!designer, AK_DCOPY, callback(&editor, &AssistEditor::DCopy));
|
||||
menu.Add(!designer, AK_IDUSAGE, THISBACK(IdUsage));
|
||||
menu.Add(!designer, AK_USAGE, [=] { Usage(); });
|
||||
menu.Add(!designer, AK_VIRTUALS, callback(&editor, &AssistEditor::Virtuals));
|
||||
menu.Add(!designer, AK_THISBACKS, callback(&editor, &AssistEditor::Events));
|
||||
menu.Add(!designer, AK_COMPLETE, callback(&editor, &AssistEditor::Complete));
|
||||
menu.Add(!designer, AK_ABBR, callback(&editor, &AssistEditor::Abbr));
|
||||
}
|
||||
|
||||
void Ide::BrowseMenu(Bar& menu)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue