Fixing Lazarus CodeTools identifier completion mechanism to use dotted unit identifiers
- Lazarus/FPC Version: Lazarus 3.0RC2 (rev 7243a280) FPC 3.2.2 x86_64-win64-win32/win64
- Operating System: Win7
- CPU / Bitness: 64
What happens
While a program uses a dotted unit so activating identifier/code completion does not offer "dotted unit" identifier for selecting its sub-items.
What did you expect
It should be opposite.
Steps to reproduce
program dotted1;
uses dottedunit.unit1;
type
TypeA = record
z:dottedunit.unit1.TBleble;
k:integer;
end;
var a:dottedunit.unit1.TBleble;
b:TypeA;
begin
a.a:=1;
b.z.a:=2;
WriteLn('a.a=',a.a,' is odd =',a.foo);
WriteLn('b.z.a=',b.z.a,' is odd =',b.z.foo);
//try CTRL + SPACE to invoke dottedunit.unit1 -> does not work
//dottedunit.unit1. //<- this was expected
//next CTRL + SPACE should show dottedunit.unit1 content
ReadLn;
end.
unit dottedunit.unit1;
{$mode ObjFPC}{$H+}
{$modeswitch advancedrecords}
interface
type
TBleble = record
a:integer;
function foo:boolean;
end;
procedure writeSomething;
implementation
procedure writeSomething;
begin
writeLn('Something');
end;
function TBleble.foo:boolean;
begin
result:=odd(a);
end;
end.
Edited by WooBean007