On Mon, 27 Apr 2020, Ryan Joseph via fpc-pascal wrote:



On Apr 26, 2020, at 4:46 PM, Ryan Joseph <generic...@gmail.com> wrote:

The other thing I'm stuck on with code tools. In TCodeManagerTool:

   function FindReferences(IdentifierCode: TCodeBuffer;
         X, Y: integer; SearchInCode: TCodeBuffer; SkipComments: boolean;
         var ListOfPCodeXYPosition: TFPList;
         var Cache: TFindIdentifierReferenceCache  // you must free Cache
         ): boolean;

Any word on this? Is it even possible to find all references in a project or do 
we need to extend code tools for this to work?

It is definitely possible.

Check lazarus sources, directory ide, unit findrenameidentifier.pas:

Around line 302:

   // add packages, projects
    case Options.Scope of
    frProject:
      begin
        OwnerList:=TFPList.Create;
        OwnerList.Add(LazarusIDE.ActiveProject);
      end;

That should give you a start.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to