IDE: codeexplorer: showing class, interface and record sub nodes in category mode

git-svn-id: trunk@13602 -
This commit is contained in:
mattias 2008-01-03 02:14:13 +00:00
parent f603c9ff5f
commit c13f4b790d

View File

@ -1,4 +1,3 @@
{ $Id$ }
{ {
/*************************************************************************** /***************************************************************************
codeexplorer.pas codeexplorer.pas
@ -611,14 +610,12 @@ begin
// category mode: put nodes in categories // category mode: put nodes in categories
Category:=cecNone; Category:=cecNone;
//DebugLn(['TCodeExplorerView.CreateNodes AAA1 ',CodeNode.DescAsString]);
if ShowNode if ShowNode
and ((CodeNode.Parent=nil) and ((CodeNode.Parent=nil)
or (CodeNode.Parent.Desc in AllCodeSections) or (CodeNode.Parent.Desc in AllCodeSections)
or (CodeNode.Parent.Parent=nil) or (CodeNode.Parent.Parent=nil)
or (CodeNode.Parent.Parent.Desc in AllCodeSections)) then or (CodeNode.Parent.Parent.Desc in AllCodeSections)) then
begin begin
//DebugLn(['TCodeExplorerView.CreateNodes AAA2 ',CodeNode.DescAsString]);
// top level definition // top level definition
case CodeNode.Desc of case CodeNode.Desc of
ctnUsesSection: Category:=cecUses; ctnUsesSection: Category:=cecUses;
@ -628,7 +625,6 @@ begin
ctnProcedure: Category:=cecProcedures; ctnProcedure: Category:=cecProcedures;
ctnProperty: Category:=cecProperties; ctnProperty: Category:=cecProperties;
end; end;
end;
if Category<>cecNone then begin if Category<>cecNone then begin
ShowNode:=Category in CodeExplorerOptions.Categories; ShowNode:=Category in CodeExplorerOptions.Categories;
if ShowNode then begin if ShowNode then begin
@ -647,6 +643,15 @@ begin
end else begin end else begin
ShowNode:=false; ShowNode:=false;
end; end;
end else if (CodeNode.Parent<>nil)
and (CodeNode.Parent.Desc in (AllClassSections+[ctnRecordType+ctnClassInterface]))
then begin
// show class, interface and record nodes
ShowNode:=true;
end else begin
ShowNode:=false;
end;
//DebugLn(['TCodeExplorerView.CreateNodes ',CodeNode.DescAsString,' ShowNode=',ShowNode,' ShowChilds=',ShowChilds]);
end; end;
if ShowNode then begin if ShowNode then begin