codetools: fixed type of property

git-svn-id: trunk@35791 -
This commit is contained in:
mattias 2012-03-07 08:35:47 +00:00
parent 4b6ff7a919
commit 6fdd286ea2

View File

@ -7228,26 +7228,30 @@ var
ExprType.Context.Node.FirstChild);
ctnClass, ctnClassInterface, ctnDispinterface, ctnObject, ctnRecordType,
ctnObjCClass, ctnObjCCategory, ctnObjCProtocol, ctnCPPClass,
ctnObjCClass, ctnObjCCategory, ctnObjCProtocol, ctnCPPClass:
begin
// search default property of the class / interface
Params.Save(OldInput);
Params.Flags:=[fdfSearchInAncestors,fdfExceptionOnNotFound]
+fdfGlobals*Params.Flags;
// special identifier for default property
Params.SetIdentifier(Self,@Src[CurAtom.StartPos],nil);
Params.ContextNode:=ExprType.Context.Node;
ExprType.Context.Tool.FindIdentifierInContext(Params);
ExprType.Context:=CreateFindContext(Params);
Params.Load(OldInput,true);
ExprType.Context:=ExprType.Context.Tool.FindBaseTypeOfNode(Params,
ExprType.Context.Node);
end;
ctnProperty, ctnGlobalProperty:
begin
if ExprType.Context.Node.Desc in AllClasses then begin
// search default property of the class / interface
Params.Save(OldInput);
Params.Flags:=[fdfSearchInAncestors,fdfExceptionOnNotFound]
+fdfGlobals*Params.Flags;
// special identifier for default property
Params.SetIdentifier(Self,@Src[CurAtom.StartPos],nil);
Params.ContextNode:=ExprType.Context.Node;
ExprType.Context.Tool.FindIdentifierInContext(Params);
ExprType.Context:=CreateFindContext(Params);
Params.Load(OldInput,true);
ExprType.Context:=ExprType.Context.Tool.FindBaseTypeOfNode(Params,
ExprType.Context.Node);
end else
if not ExprType.Context.Tool.PropertyNodeHasParamList(ExprType.Context.Node) then
RaiseIdentInCurContextNotFound;
ExprType.Context:=ExprType.Context.Tool.FindBaseTypeOfNode(Params,
ExprType.Context.Node);
end;
ctnIdentifier:
begin
MoveCursorToNodeStart(ExprType.Context.Node);