mirror of
https://github.com/moparisthebest/Simba
synced 2025-02-14 06:10:10 -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;
|
inherited Create;
|
||||||
|
|
||||||
Proposal_InsertList := TStringList.Create;
|
Proposal_InsertList := TStringList.Create;
|
||||||
//TStringList(Proposal_InsertList).Sorted := True;
|
TStringList(Proposal_InsertList).Sorted := True;
|
||||||
Proposal_ItemList := TStringList.Create;
|
Proposal_ItemList := TStringList.Create;
|
||||||
|
|
||||||
fOnFindInclude := nil;
|
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
|
else if a[ii].HasOwnerClass(TciProcedureDeclaration, d, True) and (d.Owner <> nil) then
|
||||||
Continue;}
|
Continue;}
|
||||||
|
|
||||||
|
{$IFDEF ciCHECKDUPLICATES}
|
||||||
|
if (InsertList.IndexOf(a[ii].ShortText) > -1) then
|
||||||
|
Continue;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
s := FormatFirstColumn('enum') + FormatMainName(a[ii].ShortText);
|
s := FormatFirstColumn('enum') + FormatMainName(a[ii].ShortText);
|
||||||
if a[ii].HasOwnerClass(TciTypeDeclaration, d, True) then
|
if a[ii].HasOwnerClass(TciTypeDeclaration, d, True) then
|
||||||
begin
|
begin
|
||||||
@ -1047,6 +1052,11 @@ procedure TCodeInsight.Proposal_AddDeclaration(Item: TDeclaration; ItemList, Ins
|
|||||||
Exit;
|
Exit;
|
||||||
n := d.ShortText;
|
n := d.ShortText;
|
||||||
|
|
||||||
|
{$IFDEF ciCHECKDUPLICATES}
|
||||||
|
if (InsertList.IndexOf(n) > -1) then
|
||||||
|
Exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
s := s + FormatMainName(n);
|
s := s + FormatMainName(n);
|
||||||
if (Item.Params <> '') then
|
if (Item.Params <> '') then
|
||||||
begin
|
begin
|
||||||
@ -1178,10 +1188,11 @@ begin
|
|||||||
for i := Low(a) to High(a) do
|
for i := Low(a) to High(a) do
|
||||||
begin
|
begin
|
||||||
n := a[i].ShortText;
|
n := a[i].ShortText;
|
||||||
(*{$IFDEF ciCHECKDUPLICATES}
|
|
||||||
|
{$IFDEF ciCHECKDUPLICATES}
|
||||||
if (InsertList.IndexOf(n) > -1) then
|
if (InsertList.IndexOf(n) > -1) then
|
||||||
Continue;
|
Continue;
|
||||||
{$ENDIF}*)
|
{$ENDIF}
|
||||||
s := FirstColumn + FormatMainName(n);
|
s := FirstColumn + FormatMainName(n);
|
||||||
if (Item is TciClassProperty) then
|
if (Item is TciClassProperty) then
|
||||||
s := s + FormatMainExtra(PropertyIndex(TciClassProperty(Item)));
|
s := s + FormatMainExtra(PropertyIndex(TciClassProperty(Item)));
|
||||||
|
@ -695,7 +695,11 @@ begin
|
|||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
if (Return = vbType) then
|
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
|
else
|
||||||
Decl := b[ii];
|
Decl := b[ii];
|
||||||
Exit;
|
Exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user