From ac495620a8450e17f4847fade30c0de9a9189a9d Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 2 Jan 2008 00:14:27 +0000 Subject: [PATCH] IDE: codeexplorer: fixed showing sub nodes of classes git-svn-id: trunk@13567 - --- ide/codeexplorer.pas | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/ide/codeexplorer.pas b/ide/codeexplorer.pas index 9178266f6b..758b9ddf47 100644 --- a/ide/codeexplorer.pas +++ b/ide/codeexplorer.pas @@ -584,7 +584,7 @@ begin // don't show keyword nodes if CodeNode.Desc in [ctnIdentifier,ctnRangedArrayType, ctnOpenArrayType,ctnOfConstType,ctnRangeType,ctnTypeType,ctnFileType, - ctnVariantType] + ctnVariantType,ctnEnumerationType,ctnSetType,ctnProcedureType] then ShowNode:=false; @@ -605,20 +605,24 @@ begin // category mode: put nodes in categories Category:=cecNone; - case CodeNode.Desc of - ctnUsesSection: Category:=cecUses; - ctnTypeDefinition,ctnGenericType: Category:=cecTypes; - ctnVarDefinition: Category:=cecVariables; - ctnConstDefinition: Category:=cecConstants; - ctnProcedure: Category:=cecProcedures; - ctnProperty: - if (CodeNode.Parent=nil) - or (CodeNode.Parent.Desc in [ctnInterface,ctnImplementation]) then - Category:=cecProperties; + if (CodeNode.Parent=nil) + or (CodeNode.Parent.Desc in [ctnInterface,ctnImplementation]) + or (CodeNode.Parent.Parent=nil) + or (CodeNode.Parent.Parent.Desc in [ctnInterface,ctnImplementation]) then + begin + // top level definition + case CodeNode.Desc of + ctnUsesSection: Category:=cecUses; + ctnTypeDefinition,ctnGenericType: Category:=cecTypes; + ctnVarDefinition: Category:=cecVariables; + ctnConstDefinition: Category:=cecConstants; + ctnProcedure: Category:=cecProcedures; + ctnProperty: Category:=cecProperties; + end; end; if Category<>cecNone then begin ShowNode:=Category in CodeExplorerOptions.Categories; - ShowChilds:=false; + ShowChilds:=CodeNode.Desc in [ctnTypeDefinition,ctnGenericType]; if ShowNode then begin if fCategoryNodes[Category]=nil then begin NodeData:=TViewNodeData.Create(CodeNode.Parent);