mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 17:49:14 +02:00
IDE: codeexplorer: showing class, interface and record sub nodes in category mode
git-svn-id: trunk@13602 -
This commit is contained in:
parent
f603c9ff5f
commit
c13f4b790d
@ -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,25 +625,33 @@ 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
|
if fCategoryNodes[Category]=nil then begin
|
||||||
if fCategoryNodes[Category]=nil then begin
|
NodeData:=TViewNodeData.Create(CodeNode.Parent);
|
||||||
NodeData:=TViewNodeData.Create(CodeNode.Parent);
|
NodeText:=CodeExplorerLocalizedString(Category);
|
||||||
NodeText:=CodeExplorerLocalizedString(Category);
|
NodeImageIndex:=GetCodeNodeImage(ACodeTool,CodeNode.Parent);
|
||||||
NodeImageIndex:=GetCodeNodeImage(ACodeTool,CodeNode.Parent);
|
fCategoryNodes[Category]:=CodeTreeview.Items.AddChildObject(nil,
|
||||||
fCategoryNodes[Category]:=CodeTreeview.Items.AddChildObject(nil,
|
NodeText,NodeData);
|
||||||
NodeText,NodeData);
|
fCategoryNodes[Category].ImageIndex:=NodeImageIndex;
|
||||||
fCategoryNodes[Category].ImageIndex:=NodeImageIndex;
|
fCategoryNodes[Category].SelectedIndex:=NodeImageIndex;
|
||||||
fCategoryNodes[Category].SelectedIndex:=NodeImageIndex;
|
end;
|
||||||
|
ParentViewNode:=fCategoryNodes[Category];
|
||||||
|
InFrontViewNode:=nil;
|
||||||
end;
|
end;
|
||||||
ParentViewNode:=fCategoryNodes[Category];
|
end else begin
|
||||||
InFrontViewNode:=nil;
|
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
|
end else begin
|
||||||
ShowNode:=false;
|
ShowNode:=false;
|
||||||
end;
|
end;
|
||||||
|
//DebugLn(['TCodeExplorerView.CreateNodes ',CodeNode.DescAsString,' ShowNode=',ShowNode,' ShowChilds=',ShowChilds]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if ShowNode then begin
|
if ShowNode then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user