codetools: fixed FindExprTypeAsString for ctnEnumIdentifier

git-svn-id: trunk@30963 -
This commit is contained in:
mattias 2011-05-29 13:05:22 +00:00
parent 061cea8274
commit b0b0e73b4d
2 changed files with 13 additions and 17 deletions

View File

@ -10228,19 +10228,6 @@ begin
xtContext:
begin
FindContext:=ExprType.Context;
if not (FindContext.Node.Desc in AllIdentifierDefinitions) then
begin
if (FindContext.Node.Parent<>nil)
and (FindContext.Node.Parent.Desc in AllIdentifierDefinitions) then
begin
FindContext.Node:=FindContext.Node.Parent;
end else begin
Params.Flags:=[fdfSearchInParentNodes,fdfSearchInAncestors,
fdfTopLvlResolving,fdfFunctionResult];
FindContext:=ExprType.Context.Tool.FindBaseTypeOfNode(Params,
ExprType.Context.Node);
end;
end;
// ToDo: PPU, DCU
@ -10266,12 +10253,21 @@ begin
Result:=GetIdentifier(
@FindContext.Tool.Src[FindContext.Node.Parent.StartPos]);
ctnEnumerationType:
ctnEnumIdentifier:
if (FindContext.Node.Parent<>nil)
and (FindContext.Node.Parent.Desc=ctnTypeDefinition)
and (FindContext.Node.Parent.Desc=ctnEnumerationType)
and (FindContext.Node.Parent.Parent<>nil)
and (FindContext.Node.Parent.Parent.Desc=ctnTypeDefinition)
then
Result:=GetIdentifier(
@FindContext.Tool.Src[FindContext.Node.Parent.StartPos]);
@FindContext.Tool.Src[FindContext.Node.Parent.Parent.StartPos]);
ctnEnumerationType:
if (FindContext.Node.Parent.Parent<>nil)
and (FindContext.Node.Parent.Parent.Desc=ctnTypeDefinition)
then
Result:=GetIdentifier(
@FindContext.Tool.Src[FindContext.Node.Parent.Parent.StartPos]);
ctnProperty,ctnGlobalProperty:
begin

View File

@ -335,7 +335,7 @@ begin
try
try
// todo: check node and cursor
//Range:=trTillCursor;
if Delete then begin
end;