widget projinspect displays -I, -J and xtra sources

This commit is contained in:
Basile Burg 2014-11-07 04:47:42 +01:00
parent c211a921a6
commit 49ab746c10
2 changed files with 139 additions and 26 deletions

View File

@ -1,29 +1,29 @@
inherited CEProjectInspectWidget: TCEProjectInspectWidget
Left = 1242
Height = 247
Top = 360
Width = 345
Left = 1390
Height = 281
Top = 26
Width = 347
AllowDropFiles = True
Caption = 'Project inspector'
ClientHeight = 247
ClientWidth = 345
ClientHeight = 281
ClientWidth = 347
OnDropFiles = FormDropFiles
inherited Back: TPanel
Height = 247
Width = 345
ClientHeight = 247
ClientWidth = 345
Height = 281
Width = 347
ClientHeight = 281
ClientWidth = 347
inherited Content: TPanel
Height = 247
Width = 345
ClientHeight = 247
ClientWidth = 345
Height = 281
Width = 347
ClientHeight = 281
ClientWidth = 347
PopupMenu = nil
object Tree: TTreeView[0]
Left = 2
Height = 217
Height = 251
Top = 28
Width = 341
Width = 343
Align = alClient
AutoExpand = True
BorderSpacing.Around = 2
@ -38,21 +38,25 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
OnSelectionChanged = TreeSelectionChanged
Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoRightClickSelect, tvoShowButtons, tvoShowLines, tvoToolTips, tvoThemedDraw]
Items.Data = {
F9FFFFFF020002000000000000000000000000000000FFFFFFFF000000000000
F9FFFFFF020005000000000000000000000000000000FFFFFFFF000000000000
0000000C000000536F757263652066696C6573010000000100000001000000FF
FFFFFF0000000000000000000E000000436F6E66696775726174696F6E73
FFFFFF0000000000000000000E000000436F6E66696775726174696F6E730400
00000400000004000000FFFFFFFF00000000000000000007000000496D706F72
7473040000000400000004000000FFFFFFFF0000000000000000000800000049
6E636C75646573000000000000000000000000FFFFFFFF000000000000000000
0D000000457874726120736F7572636573
}
end
object Panel1: TPanel[1]
Left = 2
Height = 24
Top = 2
Width = 341
Width = 343
Align = alTop
BorderSpacing.Around = 2
BevelOuter = bvNone
ClientHeight = 24
ClientWidth = 341
ClientWidth = 343
TabOrder = 1
object btnAddFile: TSpeedButton
Left = 0
@ -192,10 +196,10 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
ShowCaption = False
end
object TreeFilterEdit1: TTreeFilterEdit
Left = 114
Left = 112
Height = 23
Top = 0
Width = 195
Width = 197
ButtonWidth = 28
NumGlyphs = 1
Align = alCustom
@ -308,7 +312,7 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
left = 40
top = 352
Bitmap = {
4C69040000001000000010000000B3B3B1EFB0B0ADFFAEAEACFFAEAEACFFAEAE
4C69060000001000000010000000B3B3B1EFB0B0ADFFAEAEACFFAEAEACFFAEAE
ACFFAFAFACFFAFAFADFFB1B1AFD5B4B4B100B5B5B300B5B5B300B5B5B300B5B5
B300B5B5B300B5B5B300B5B5B300AFAFADFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFEDEDEEFFB3B3B0A4B5B5B300B5B5B300B5B5B300B5B5
@ -436,7 +440,71 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget
FF00FFFFFF000000000000000033000000330000000E7F7D7CFF7F7D7CFF0000
000E000000330000003300000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF000000000000000000000000000000000000000033000000330000
0000000000000000000000000000
00000000000000000000000000004398D2EF3D94D0FF3A92CFFF3A92CFFF3D94
D0FF4197D1E44398D22B4498D2324498D2334498D2334498D2334499D2334499
D337459AD300469AD300469AD3003D94D0FFDCFCFFFFD8F7FFFFD8F7FFFFDBFA
FFFF358ECDFF3991CEFF3A92CFFF3A92CFFF3A92CFFF3A92CFFF3A92CFFF3D94
D0FF4298D2EA469AD300469AD3003B92CFFFD5F7FFFF60D1F9FF61D0F8FFB4EB
FDFFD9F6FFFFDAF8FFFFDAF8FFFFDAF9FFFFDBF9FFFFDAF9FFFFDAFAFFFFDFFE
FFFF3D94D0FF4599D335469AD3003B92CFFFCAF6FFFF69D5F9FF6CD5F9FF6AD4
F9FF69D4F9FF69D5F9FF6AD6FAFF6BD8FBFF6BD9FCFF6BDAFDFF69DAFDFFDAFD
FFFF3C93D0FF367BAA2F469AD3003C92CFFFC0F3FFFF70D9FBFF73DAFBFF74DA
FBFF74DAFBFF74DBFBFF76DEFDFF4FA9DCFF368BCBFF368CCDFF358CCDFF348C
CDFF3890CEFF3D94D0FF4398D2AE3D92CFFFB8F3FFFF77DFFEFF7BE0FEFF7CE1
FEFF7CE1FFFF7DE2FFFF52ABDDFF56BAE9FFDDFAFFFFDEFBFFFFDFFAFFFFDCF9
FFFFD8F9FFFFDCFDFFFF3E94D0FF3E93CFFFB2F6FFFF51ACDEFF358ACAFF358A
CAFF358ACBFF378BCBFF5DBEECFF72DBFFFF74DCFFFF007E2CFF00A06FFF18A0
7FFF8DE3FFFFAEE2FBFF3A8AC2C84095D0FF90DDF8FF44A0D8FFDDFCFFFFDAFA
FFFFDDFBFFFFE5FEFFFF7EE2FFFF83E2FFFF88E5FFFF008135FF74E0D1FF00A4
71FF37AA84FF87C4F3FF3576A8704296D1FF71C4EAFF6CBCE6FFBBF2FFFF76DF
FEFF7EE3FFFF1EA582FF007F2FFF007F32FF008135FF007F36FF81E3D5FF57D8
C1FF00AA73FF128A74FF000000124397D1FF56ACDDFF8EDAF5FFA2EDFFFF84E6
FFFF8EECFFFF007E2FFF94ECDDFF4CE7D2FF4FE7D2FF4DE6D1FF93E8D7FF00C3
97FF5EDFC4FF00B17AFF008A3EA84499D2FF3F94D0FFABFBFFFF9BF3FFFF94F1
FFFF9EF6FFFF008133FF6DE7CDFF00C899FF00C899FF00C899FF00C797FF00C8
98FF00CA9AFF62E6CCFF008946FF4598D0F14398D2FF4094D0FF3E92CFFF4092
D1FF4794DCFF008638FF41E8C0FF00D7A0FF00D7A0FF00D59FFF00D09CFF00D0
9CFF00D39FFF00B981FF007E43BD0000002F29597A5F2655755C2655745C2654
755B27507457007E38B7008946FF008847FF008746FF008342FF00D9A1FF00D8
A0FF00BC80FF007C41B900000022469AD3000000000B0000000A0000000A0000
000A0000000900000021000000330000003300000033008847FF00E4A6FF00BE
80FF007C41B900000021008F4F00469AD300469AD300469AD300469AD300479A
D5004D9BE100008E4100008F4D00008F4F00008E4E00008A4AFF00C684FF007C
41BD00000021008F4F00008F4F00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000033000000330000
0022000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF004398D2B03D94D0FF3A92CFFF3A92CFFF3D94
D0FF4197D1D24398D2004498D2004498D2004498D2004498D2004499D2004499
D300459AD300469AD300469AD3003D94D0FFDCFCFFFFD8F7FFFFD8F7FFFFDBFA
FFFF358ECDFF3991CEFF3A92CFFF3A92CFFF3A92CFFF3A92CFFF3B92CFFF3D94
D0FF4398D2D7469AD300469AD3003B92CFFFD5F7FFFF60D1F9FF61D0F8FFB4EB
FDFFD9F6FFFFDAF8FFFFDAF8FFFFDBF9FFFFDCFAFFFFDCFAFFFFDCFBFFFFE0FF
FFFF3E95D0FF4599D333469AD3003B92CFFFCAF6FFFF69D5F9FF6CD5F9FF6BD5
F9FF69D5F9FF69D5FAFF6AD7FBFF68D4FAFF5EC7F1FF5EC7F2FF5DC8F2FFB4E3
F8FF3D94D0FF3F8FC669469AD3003C92CFFFC0F3FFFF71DAFBFF74DBFBFF75DB
FCFF75DBFCFF76DCFCFF73DAFAFF449CD4FF378CCBFF368CCBFF358CCCFF348D
CCFF3890CEFF3D94D0FF4398D2EB3D92CFFFB9F4FFFF73DBFBFF6BCCF2FF6CCD
F3FF6CCEF3FF6DCEF3FF479CD4FF56BAE9FFDAF8FFFFD7F6FFFFD6F6FFFFD5F6
FFFFD5F7FFFFDBFCFFFF3E94D0FF3E94D0FFABF0FFFF449DD6FF368CCBFF368C
CBFF368CCBFF378BCBFF5CBEEAFF6FD9FBFF6AD6FAFF68D5F9FF67D4F9FF66D4
F9FF82DEFCFFAAE0F6FF3885BCB94095D0FF8AD7F5FF44A1D8FFDDFDFFFFDAFA
FFFFDBFAFFFFDEFAFFFF74DCFCFF76DBFAFF75DAFAFF74DAFAFF74DAFAFF72D9
FAFFA1E8FFFF7CBFE6FF306F9C5E4296D1FF6BBEE8FF6DBDE6FFBBF2FFFF75DE
FDFF77DEFCFF78DEFCFF7BDFFCFF7DDFFCFF7DDFFCFF7DDFFCFF7CDFFCFF80E0
FDFFADF0FFFF4D9DD3FF0000000E4398D2FF4FA6D9FF8EDAF5FFA2EEFFFF82E5
FEFF84E5FEFF84E5FEFF85E6FEFF85E6FEFF85E6FEFF85E6FEFF84E6FEFF96EB
FFFF8CD8F5FF3985BCB84499D2004499D2FF3F94D0FFABFBFFFF9BF3FFFF92F1
FFFF93F1FFFF93F1FFFF93F1FFFF93F1FFFF93F1FFFF93F1FFFF93F1FFFFA6F8
FFFF65B8E3FF31709D5F469AD3004598D1F24398D2FF4094D0FF3E92CFFF3E92
CEFF3F92CEFF3F92CEFF3F92CEFF3F92CEFF3F92CEFF3F92CEFF3F92CEFF3F93
CFFF4194CEF00000000E469AD300000000300000003300000033000000330000
0033000000330000003300000033000000330000003300000033000000330000
00330000002F0000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00
}
end
end

View File

@ -36,6 +36,8 @@ type
fActSelConf: TAction;
fProject: TCEProject;
fFileNode, fConfNode: TTreeNode;
fImpsNode, fInclNode: TTreeNode;
fXtraNode: TTreeNode;
procedure actUpdate(sender: TObject);
procedure TreeDblClick(sender: TObject);
procedure actOpenFileExecute(sender: TObject);
@ -74,6 +76,9 @@ begin
Tree.OnDblClick := @TreeDblClick;
fFileNode := Tree.Items[0];
fConfNode := Tree.Items[1];
fImpsNode := Tree.Items[2];
fInclNode := Tree.Items[3];
fXtraNode := Tree.Items[4];
//
Tree.PopupMenu := contextMenu;
//
@ -280,20 +285,25 @@ end;
procedure TCEProjectInspectWidget.UpdateByEvent;
var
src, conf: string;
src, fold, conf: string;
lst: TStringList;
itm: TTreeNode;
i: NativeInt;
begin
fConfNode.DeleteChildren;
fFileNode.DeleteChildren;
fImpsNode.DeleteChildren;
fInclNode.DeleteChildren;
fXtraNode.DeleteChildren;
if fProject = nil then exit;
//
// display main sources
for src in fProject.Sources do
begin
itm := Tree.Items.AddChild(fFileNode, src);
itm.ImageIndex := 2;
itm.SelectedIndex := 2;
end;
// display configurations
for i := 0 to fProject.OptionsCollection.Count-1 do
begin
conf := fProject.configuration[i].name;
@ -302,6 +312,41 @@ begin
itm.ImageIndex := 3;
itm.SelectedIndex:= 3;
end;
// display Imports (-J)
for fold in FProject.currentConfiguration.pathsOptions.Imports do
begin
itm := Tree.Items.AddChild(fImpsNode, shortenPath(fold));
itm.ImageIndex := 5;
itm.SelectedIndex := 5;
end;
fImpsNode.Collapse(false);
// display Includes (-I)
for fold in FProject.currentConfiguration.pathsOptions.Includes do
begin
itm := Tree.Items.AddChild(fInclNode, shortenPath(fold));
itm.ImageIndex := 5;
itm.SelectedIndex := 5;
end;
fInclNode.Collapse(false);
// display extra sources (external .lib, *.a, *.d)
for src in FProject.currentConfiguration.pathsOptions.Sources do
begin
lst := TStringList.Create;
try
if listAsteriskPath(src, lst) then for src in lst do begin
itm := Tree.Items.AddChild(fXtraNode, shortenPath(src));
itm.ImageIndex := 2;
itm.SelectedIndex := 2;
end else begin
itm := Tree.Items.AddChild(fXtraNode, shortenPath(src));
itm.ImageIndex := 2;
itm.SelectedIndex := 2;
end;
finally
lst.Free;
end;
end;
fXtraNode.Collapse(false);
end;
end.