codetools: fixed marking very short classes as unfinished, bug #13638

git-svn-id: trunk@19806 -
This commit is contained in:
mattias 2009-05-04 20:03:21 +00:00
parent e5db74796e
commit 5abefaf3bf
2 changed files with 7 additions and 2 deletions

View File

@ -2639,7 +2639,8 @@ var
ctnClassTypePublished,ctnClassTypePublic,ctnClassTypeProtected,ctnClassTypePrivate, ctnClassTypePublished,ctnClassTypePublic,ctnClassTypeProtected,ctnClassTypePrivate,
ctnClassVarPublished,ctnClassVarPublic,ctnClassVarProtected,ctnClassVarPrivate, ctnClassVarPublished,ctnClassVarPublic,ctnClassVarProtected,ctnClassVarPrivate,
ctnRecordVariant, ctnRecordVariant,
ctnProcedureHead, ctnParameterList: ctnProcedureHead, ctnParameterList,
ctnClassInheritance:
// these codetreenodes build a parent-child-relationship, but // these codetreenodes build a parent-child-relationship, but
// for pascal it is only a range, hence after searching in the // for pascal it is only a range, hence after searching in the
// childs of the last node, search must continue in the childs // childs of the last node, search must continue in the childs
@ -4291,7 +4292,7 @@ begin
-[fdfExceptionOnNotFound]; -[fdfExceptionOnNotFound];
Params.ContextNode:=ClassContext.Node; Params.ContextNode:=ClassContext.Node;
{$IFDEF ShowTriedContexts} {$IFDEF ShowTriedContexts}
DebugLn('[TFindDeclarationTool.FindIdentifierInClassOfMethod] searching identifier in class of method'); DebugLn('[TFindDeclarationTool.FindIdentifierInClassOfMethod] searching identifier in class of method Identifier=',GetIdentifier(Params.Identifier));
{$ENDIF} {$ENDIF}
Result:=ClassContext.Tool.FindIdentifierInContext(Params); Result:=ClassContext.Tool.FindIdentifierInContext(Params);
Params.Load(OldInput,true); Params.Load(OldInput,true);

View File

@ -3314,6 +3314,10 @@ begin
if ChildCreated and (CurNode.Desc=ctnClass) and IsForward then begin if ChildCreated and (CurNode.Desc=ctnClass) and IsForward then begin
// forward class definition found // forward class definition found
CurNode.SubDesc:=CurNode.SubDesc+ctnsForwardDeclaration; CurNode.SubDesc:=CurNode.SubDesc+ctnsForwardDeclaration;
end else begin
// very short class found e.g. = class(TAncestor);
if ChildCreated and (CurNode.Desc=ctnClass) then
CurNode.SubDesc:=CurNode.SubDesc+ctnsNeedJITParsing; // will not create sub nodes now
end; end;
end else begin end else begin
if ChildCreated and (CurNode.Desc=ctnClass) then if ChildCreated and (CurNode.Desc=ctnClass) then