Find usages - usually doesn't work

Issue #48 resolved
Daniel Roziecki created an issue

This is part of source code:

  try
    _file_name := gl_errors_path + '/' + 'exceptions.txt';
    AssignFile(_journal, _file_name);
    try
      if not FileExists(_file_name)
      then Rewrite(_journal)
      else Append(_journal);
      _s := '-----------------' + DateToStr(Now()) + ' - ' + TimeToStr(Now()) + ' --------------------';
      WriteLn(_journal, _s);
        _s := _s + ' MEM APP: ' + IntToStr(GetUsedMemory())
        + ' RAM: '          + IntToStr(GetTotalRAM())
        + ' SWAP: '         + IntToStr(GetTotalSwap())
        + ' FREE RAM: '     + IntToStr(GetFreeRAM())
        + ' FREE SWAP: '    + IntToStr(GetFreeSwap());
      WriteLn(_journal, _s);
      WriteLn(_journal, sFunction);
      WriteLn(_journal, sException);
      WriteLn(_journal, sText);
    finally
      CloseFile(_journal);
    end;

This is part of another unit:

function  GetUsedMemory()    : integer;
function  GetUptime()        : integer;
function  GetTotalRAM()      : Longword;
function  GetFreeRAM()       : Longword;
function  GetSharedRAM()     : Longword;
function  GetBuffersRAM()    : Longword;
function  GetTotalSwap()     : Longword;
function  GetFreeSwap()      : Longword;
function  GetProcessesCount(): Word;
function  GetSysInfo()       : PSysInfo;

When I try find usages for GetUsedMemory() I use find usages (alt + F7) and I have correct answer - like this:

error15.png

But when I try find other functions (GetTotalRAM, or GetTotalSwap, etc), I have answer "No usages found in All Places", even if I use ctrl+alt+sh + F7, still no results.

I need this function very badly, I have a lot of refactoring to do, and "find usages" is usually very helpful with this.

Regards

Daniel Roziecki

Comments (6)

  1. George Bakhtadze repo owner

    Can't reproduce. Does find declaration for GetTotalRam work? Try File-> Invalidate caches / Restart. If it doesn't help can you send me the both files?

  2. Log in to comment