mirror of
https://github.com/moparisthebest/Simba
synced 2025-02-07 02:30:19 -05:00
Made code insight recognize function/constructor types in objects.
This commit is contained in:
parent
a12fb8bda1
commit
1b44904328
@ -888,7 +888,7 @@ begin
|
||||
inherited Create;
|
||||
|
||||
Proposal_InsertList := TStringList.Create;
|
||||
//TStringList(Proposal_InsertList).Sorted := True;
|
||||
TStringList(Proposal_InsertList).Sorted := True;
|
||||
Proposal_ItemList := TStringList.Create;
|
||||
|
||||
fOnFindInclude := nil;
|
||||
@ -1015,6 +1015,11 @@ procedure TCodeInsight.Proposal_AddDeclaration(Item: TDeclaration; ItemList, Ins
|
||||
else if a[ii].HasOwnerClass(TciProcedureDeclaration, d, True) and (d.Owner <> nil) then
|
||||
Continue;}
|
||||
|
||||
{$IFDEF ciCHECKDUPLICATES}
|
||||
if (InsertList.IndexOf(a[ii].ShortText) > -1) then
|
||||
Continue;
|
||||
{$ENDIF}
|
||||
|
||||
s := FormatFirstColumn('enum') + FormatMainName(a[ii].ShortText);
|
||||
if a[ii].HasOwnerClass(TciTypeDeclaration, d, True) then
|
||||
begin
|
||||
@ -1047,6 +1052,11 @@ procedure TCodeInsight.Proposal_AddDeclaration(Item: TDeclaration; ItemList, Ins
|
||||
Exit;
|
||||
n := d.ShortText;
|
||||
|
||||
{$IFDEF ciCHECKDUPLICATES}
|
||||
if (InsertList.IndexOf(n) > -1) then
|
||||
Exit;
|
||||
{$ENDIF}
|
||||
|
||||
s := s + FormatMainName(n);
|
||||
if (Item.Params <> '') then
|
||||
begin
|
||||
@ -1178,10 +1188,11 @@ begin
|
||||
for i := Low(a) to High(a) do
|
||||
begin
|
||||
n := a[i].ShortText;
|
||||
(*{$IFDEF ciCHECKDUPLICATES}
|
||||
|
||||
{$IFDEF ciCHECKDUPLICATES}
|
||||
if (InsertList.IndexOf(n) > -1) then
|
||||
Continue;
|
||||
{$ENDIF}*)
|
||||
{$ENDIF}
|
||||
s := FirstColumn + FormatMainName(n);
|
||||
if (Item is TciClassProperty) then
|
||||
s := s + FormatMainExtra(PropertyIndex(TciClassProperty(Item)));
|
||||
|
@ -695,7 +695,11 @@ begin
|
||||
begin
|
||||
Result := True;
|
||||
if (Return = vbType) then
|
||||
Decl := b[ii].Owner
|
||||
//Decl := b[ii].Owner
|
||||
if (a[ii] is TciProcedureDeclaration) and (LowerCase(TciProcedureDeclaration(a[i]).ProcType) = 'constructor') then
|
||||
Decl := Self
|
||||
else
|
||||
Decl := b[ii].Owner.Items.GetFirstItemOfClass(TciTypeKind)
|
||||
else
|
||||
Decl := b[ii];
|
||||
Exit;
|
||||
|
Loading…
Reference in New Issue
Block a user