codetools: find declaration: enum type helpers

git-svn-id: trunk@50104 -
This commit is contained in:
mattias 2015-10-18 15:01:14 +00:00
parent 68d7015320
commit 86f922df9a
2 changed files with 19 additions and 3 deletions

View File

@ -3934,7 +3934,7 @@ begin
// find class helper functions
SearchInHelpersInTheEnd := False;
if (fdfSearchInHelpers in Flags)
and (ContextNode.Desc in [ctnClass,ctnRecordType,ctnTypeType,ctnObjCClass])
and (ContextNode.Desc in [ctnClass,ctnRecordType,ctnTypeType,ctnObjCClass,ctnEnumerationType])
and (ContextNode.Parent<>nil) and (ContextNode.Parent.Desc = ctnTypeDefinition)
then begin
if (fdfSearchInHelpersInTheEnd in Flags) then

View File

@ -34,9 +34,16 @@ type
function GetStr: string;
end;
{ TEnumTypeHelperOld }
TEnumTypeHelperOld = type helper for TShiftStateEnum
public
function Old78: integer;
end;
{ TEnumTypeHelper }
TEnumTypeHelper = type helper for TShiftStateEnum
TEnumTypeHelper = type helper(TEnumTypeHelperOld) for TShiftStateEnum
public
function Get78: integer;
end;
@ -62,8 +69,17 @@ begin
if AnsiS<>'' then ;
e:=ssDouble;
i:=e.Get78{ Not yet supported: declaration:fdt_typehelper.TEnumTypeHelper.Get78};
i:=e.Old78{declaration:fdt_typehelper.TEnumTypeHelperOld.Old78};
if i<>78 then ;
i:=e.Get78{declaration:fdt_typehelper.TEnumTypeHelper.Get78};
if i<>78 then ;
end;
{ TEnumTypeHelperOld }
function TEnumTypeHelperOld.Old78: integer;
begin
Result:=78;
end;
{ TEnumTypeHelper }