IDE: codebrowser: started use unit in unit

git-svn-id: trunk@21520 -
This commit is contained in:
mattias 2009-09-01 14:33:50 +00:00
parent 040131af50
commit 5c235ca5a6
4 changed files with 206 additions and 134 deletions

View File

@ -1,7 +1,7 @@
object CodeBrowserView: TCodeBrowserView
Left = 340
Left = 366
Height = 563
Top = 323
Top = 337
Width = 623
ActiveControl = ScopeComboBox
Caption = 'CodeBrowserView'
@ -12,25 +12,25 @@ object CodeBrowserView: TCodeBrowserView
LCLVersion = '0.9.29'
object ScopeGroupBox: TGroupBox
Left = 6
Height = 53
Height = 60
Top = 6
Width = 611
Align = alTop
AutoSize = True
BorderSpacing.Around = 6
Caption = 'ScopeGroupBox'
ClientHeight = 35
ClientHeight = 41
ClientWidth = 607
TabOrder = 0
object ScopeComboBox: TComboBox
AnchorSideLeft.Control = ScopeGroupBox
AnchorSideTop.Control = ScopeGroupBox
Left = 6
Height = 21
Height = 29
Top = 6
Width = 315
BorderSpacing.Around = 6
ItemHeight = 13
ItemHeight = 0
OnEditingDone = ScopeComboBoxEditingDone
OnGetItems = ScopeComboBoxGetItems
TabOrder = 0
@ -42,9 +42,9 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideTop.Control = ScopeComboBox
AnchorSideTop.Side = asrCenter
Left = 327
Height = 17
Top = 8
Width = 204
Height = 22
Top = 9
Width = 269
BorderSpacing.Left = 6
BorderSpacing.Right = 50
Caption = 'ScopeWithRequiredPackagesCheckBox'
@ -52,10 +52,10 @@ object CodeBrowserView: TCodeBrowserView
TabOrder = 1
end
object RescanButton: TButton
Left = 508
Height = 23
Left = 501
Height = 29
Top = 6
Width = 93
Width = 100
Align = alRight
AutoSize = True
BorderSpacing.Around = 6
@ -73,8 +73,8 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 47
Top = 182
Height = 53
Top = 187
Width = 611
Anchors = [akTop, akLeft, akRight]
AutoSize = True
@ -85,7 +85,7 @@ object CodeBrowserView: TCodeBrowserView
ChildSizing.EnlargeHorizontal = crsHomogenousSpaceResize
ChildSizing.ShrinkHorizontal = crsHomogenousSpaceResize
ChildSizing.Layout = cclTopToBottomThenLeftToRight
ClientHeight = 29
ClientHeight = 34
ClientWidth = 607
TabOrder = 1
object ShowPrivateCheckBox: TCheckBox
@ -133,13 +133,13 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideTop.Control = OptionsGroupBox
AnchorSideTop.Side = asrBottom
Left = 0
Height = 285
Top = 235
Height = 276
Top = 246
Width = 623
Align = alBottom
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 6
DefaultItemHeight = 18
DefaultItemHeight = 19
Images = ImageList1
ParentShowHint = False
PopupMenu = PopupMenu1
@ -152,8 +152,8 @@ object CodeBrowserView: TCodeBrowserView
end
object StatusBar1: TStatusBar
Left = 0
Height = 23
Top = 540
Height = 21
Top = 542
Width = 623
Panels = <>
end
@ -164,14 +164,14 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 6
Height = 111
Top = 65
Height = 109
Top = 72
Width = 611
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'LevelsGroupBox'
ClientHeight = 93
ClientHeight = 90
ClientWidth = 607
TabOrder = 3
object PackageFilterBeginsSpeedButton: TSpeedButton
@ -218,7 +218,7 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideRight.Control = UnitFilterContainsSpeedButton
Left = 429
Height = 22
Top = 35
Top = 41
Width = 86
Anchors = [akTop, akRight]
Color = clBtnFace
@ -237,7 +237,7 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideRight.Side = asrBottom
Left = 515
Height = 22
Top = 35
Top = 41
Width = 86
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
@ -256,7 +256,7 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideRight.Control = IdentifierFilterContainsSpeedButton
Left = 429
Height = 22
Top = 64
Top = 74
Width = 86
Anchors = [akTop, akRight]
Color = clBtnFace
@ -275,7 +275,7 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideRight.Side = asrBottom
Left = 515
Height = 22
Top = 64
Top = 74
Width = 86
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
@ -291,9 +291,9 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideTop.Control = PackageFilterEdit
AnchorSideTop.Side = asrCenter
Left = 6
Height = 17
Top = 9
Width = 136
Height = 22
Top = 8
Width = 181
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Caption = 'ShowPackagesCheckBox'
@ -305,9 +305,9 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideTop.Control = UnitFilterEdit
AnchorSideTop.Side = asrCenter
Left = 6
Height = 17
Top = 38
Width = 115
Height = 22
Top = 41
Width = 154
BorderSpacing.Left = 6
Caption = 'ShowUnitsCheckBox'
OnChange = ShowUnitsCheckBoxChange
@ -318,9 +318,9 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideTop.Control = IdentifierFilterEdit
AnchorSideTop.Side = asrCenter
Left = 6
Height = 17
Top = 67
Width = 140
Height = 22
Top = 74
Width = 183
BorderSpacing.Left = 6
BorderSpacing.Bottom = 6
Caption = 'ShowIdentifiersCheckBox'
@ -331,7 +331,7 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideTop.Control = LevelsGroupBox
AnchorSideRight.Control = PackageFilterBeginsSpeedButton
Left = 228
Height = 23
Height = 27
Top = 6
Width = 201
Anchors = [akTop, akRight]
@ -346,8 +346,8 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = UnitFilterBeginsSpeedButton
Left = 228
Height = 23
Top = 35
Height = 27
Top = 39
Width = 201
Anchors = [akTop, akRight]
BorderSpacing.Top = 6
@ -361,8 +361,8 @@ object CodeBrowserView: TCodeBrowserView
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = IdentifierFilterBeginsSpeedButton
Left = 228
Height = 23
Top = 64
Height = 27
Top = 72
Width = 201
Anchors = [akTop, akRight]
BorderSpacing.Top = 6
@ -376,7 +376,7 @@ object CodeBrowserView: TCodeBrowserView
object ProgressBar1: TProgressBar
Left = 0
Height = 20
Top = 520
Top = 522
Width = 623
Align = alBottom
Max = 10000

View File

@ -1,38 +1,38 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TCodeBrowserView','FORMDATA',[
'TPF0'#16'TCodeBrowserView'#15'CodeBrowserView'#4'Left'#3'T'#1#6'Height'#3'3'
+#2#3'Top'#3'C'#1#5'Width'#3'o'#2#13'ActiveControl'#7#13'ScopeComboBox'#7'Cap'
'TPF0'#16'TCodeBrowserView'#15'CodeBrowserView'#4'Left'#3'n'#1#6'Height'#3'3'
+#2#3'Top'#3'Q'#1#5'Width'#3'o'#2#13'ActiveControl'#7#13'ScopeComboBox'#7'Cap'
+'tion'#6#15'CodeBrowserView'#12'ClientHeight'#3'3'#2#11'ClientWidth'#3'o'#2#8
+'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#10'LCLVersion'#6#6
+'0.9.29'#0#9'TGroupBox'#13'ScopeGroupBox'#4'Left'#2#6#6'Height'#2'5'#3'Top'#2
+'0.9.29'#0#9'TGroupBox'#13'ScopeGroupBox'#4'Left'#2#6#6'Height'#2'<'#3'Top'#2
+#6#5'Width'#3'c'#2#5'Align'#7#5'alTop'#8'AutoSize'#9#20'BorderSpacing.Around'
+#2#6#7'Caption'#6#13'ScopeGroupBox'#12'ClientHeight'#2'#'#11'ClientWidth'#3
+#2#6#7'Caption'#6#13'ScopeGroupBox'#12'ClientHeight'#2')'#11'ClientWidth'#3
+'_'#2#8'TabOrder'#2#0#0#9'TComboBox'#13'ScopeComboBox'#22'AnchorSideLeft.Con'
+'trol'#7#13'ScopeGroupBox'#21'AnchorSideTop.Control'#7#13'ScopeGroupBox'#4'L'
+'eft'#2#6#6'Height'#2#21#3'Top'#2#6#5'Width'#3';'#1#20'BorderSpacing.Around'
+#2#6#10'ItemHeight'#2#13#13'OnEditingDone'#7#24'ScopeComboBoxEditingDone'#10
+'eft'#2#6#6'Height'#2#29#3'Top'#2#6#5'Width'#3';'#1#20'BorderSpacing.Around'
+#2#6#10'ItemHeight'#2#0#13'OnEditingDone'#7#24'ScopeComboBoxEditingDone'#10
+'OnGetItems'#7#21'ScopeComboBoxGetItems'#8'TabOrder'#2#0#4'Text'#6#13'ScopeC'
+'omboBox'#0#0#9'TCheckBox!ScopeWithRequiredPackagesCheckBox'#22'AnchorSideLe'
+'ft.Control'#7#13'ScopeComboBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'A'
+'nchorSideTop.Control'#7#13'ScopeComboBox'#18'AnchorSideTop.Side'#7#9'asrCen'
+'ter'#4'Left'#3'G'#1#6'Height'#2#17#3'Top'#2#8#5'Width'#3#204#0#18'BorderSpa'
+'cing.Left'#2#6#19'BorderSpacing.Right'#2'2'#7'Caption'#6'!ScopeWithRequired'
+'PackagesCheckBox'#8'OnChange'#7'''ScopeWithRequiredPackagesCheckBoxChange'#8
+'TabOrder'#2#1#0#0#7'TButton'#12'RescanButton'#4'Left'#3#252#1#6'Height'#2#23
+#3'Top'#2#6#5'Width'#2']'#5'Align'#7#7'alRight'#8'AutoSize'#9#20'BorderSpaci'
+'ter'#4'Left'#3'G'#1#6'Height'#2#22#3'Top'#2#9#5'Width'#3#13#1#18'BorderSpac'
+'ing.Left'#2#6#19'BorderSpacing.Right'#2'2'#7'Caption'#6'!ScopeWithRequiredP'
+'ackagesCheckBox'#8'OnChange'#7'''ScopeWithRequiredPackagesCheckBoxChange'#8
+'TabOrder'#2#1#0#0#7'TButton'#12'RescanButton'#4'Left'#3#245#1#6'Height'#2#29
+#3'Top'#2#6#5'Width'#2'd'#5'Align'#7#7'alRight'#8'AutoSize'#9#20'BorderSpaci'
+'ng.Around'#2#6#7'Caption'#6#12'RescanButton'#20'Constraints.MinWidth'#2'<'#7
+'OnClick'#7#17'RescanButtonClick'#8'TabOrder'#2#2#0#0#0#9'TGroupBox'#15'Opti'
+'onsGroupBox'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'
+#7#14'LevelsGroupBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRig'
+'ht.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#21'AnchorSid'
+'eBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2'/'#3'Top'#3#182#0#5'Wi'
+'eBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2'5'#3'Top'#3#187#0#5'Wi'
+'dth'#3'c'#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#18
+'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#19'BorderSpacing.Right'#2
+#6#7'Caption'#6#15'OptionsGroupBox'#29'ChildSizing.EnlargeHorizontal'#7#24'c'
+'rsHomogenousSpaceResize'#28'ChildSizing.ShrinkHorizontal'#7#24'crsHomogenou'
+'sSpaceResize'#18'ChildSizing.Layout'#7#29'cclTopToBottomThenLeftToRight'#12
+'ClientHeight'#2#29#11'ClientWidth'#3'_'#2#8'TabOrder'#2#1#0#9'TCheckBox'#19
+'ClientHeight'#2'"'#11'ClientWidth'#3'_'#2#8'TabOrder'#2#1#0#9'TCheckBox'#19
+'ShowPrivateCheckBox'#22'AnchorSideLeft.Control'#7#15'OptionsGroupBox'#21'An'
+'chorSideTop.Control'#7#15'OptionsGroupBox'#4'Left'#2#6#6'Height'#2#22#3'Top'
+#2#6#5'Width'#3#165#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#7
@ -49,21 +49,21 @@ LazarusResources.Add('TCodeBrowserView','FORMDATA',[
+'g.Around'#2#6#7'Caption'#6#22'ShowEmptyNodesCheckBox'#13'OnEditingDone'#7#25
+'ShowPrivateCheckBoxChange'#8'TabOrder'#2#2#0#0#0#9'TTreeView'#14'BrowseTree'
+'View'#21'AnchorSideTop.Control'#7#15'OptionsGroupBox'#18'AnchorSideTop.Side'
+#7#9'asrBottom'#4'Left'#2#0#6'Height'#3#29#1#3'Top'#3#235#0#5'Width'#3'o'#2#5
+#7#9'asrBottom'#4'Left'#2#0#6'Height'#3#20#1#3'Top'#3#246#0#5'Width'#3'o'#2#5
+'Align'#7#8'alBottom'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'
+#0#17'BorderSpacing.Top'#2#6#17'DefaultItemHeight'#2#18#6'Images'#7#10'Image'
+#0#17'BorderSpacing.Top'#2#6#17'DefaultItemHeight'#2#19#6'Images'#7#10'Image'
+'List1'#14'ParentShowHint'#8#9'PopupMenu'#7#10'PopupMenu1'#8'ReadOnly'#9#8'S'
+'howHint'#9#8'TabOrder'#2#2#11'OnMouseDown'#7#23'BrowseTreeViewMouseDown'#10
+'OnShowHint'#7#22'BrowseTreeViewShowHint'#7'Options'#11#17'tvoAutoItemHeight'
+#16'tvoHideSelection'#21'tvoKeepCollapsedNodes'#11'tvoReadOnly'#14'tvoShowBu'
+'ttons'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'#0#0#0#10'TStatusBar'
+#10'StatusBar1'#4'Left'#2#0#6'Height'#2#23#3'Top'#3#28#2#5'Width'#3'o'#2#6'P'
+#10'StatusBar1'#4'Left'#2#0#6'Height'#2#21#3'Top'#3#30#2#5'Width'#3'o'#2#6'P'
+'anels'#14#0#0#0#9'TGroupBox'#14'LevelsGroupBox'#22'AnchorSideLeft.Control'#7
+#5'Owner'#21'AnchorSideTop.Control'#7#13'ScopeGroupBox'#18'AnchorSideTop.Sid'
+'e'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight'
+'.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2'o'#3'Top'#2'A'#5'Width'#3'c'#2
+'.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2'm'#3'Top'#2'H'#5'Width'#3'c'#2
+#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#20'BorderSpacin'
+'g.Around'#2#6#7'Caption'#6#14'LevelsGroupBox'#12'ClientHeight'#2']'#11'Clie'
+'g.Around'#2#6#7'Caption'#6#14'LevelsGroupBox'#12'ClientHeight'#2'Z'#11'Clie'
+'ntWidth'#3'_'#2#8'TabOrder'#2#3#0#12'TSpeedButton'#30'PackageFilterBeginsSp'
,'eedButton'#22'AnchorSideLeft.Control'#7#17'PackageFilterEdit'#19'AnchorSide'
+'Left.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#17'PackageFilterEdit'
@ -82,7 +82,7 @@ LazarusResources.Add('TCodeBrowserView','FORMDATA',[
+'AnchorSideLeft.Control'#7#14'UnitFilterEdit'#19'AnchorSideLeft.Side'#7#9'as'
+'rBottom'#21'AnchorSideTop.Control'#7#14'UnitFilterEdit'#18'AnchorSideTop.Si'
+'de'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#29'UnitFilterContainsSpeed'
+'Button'#4'Left'#3#173#1#6'Height'#2#22#3'Top'#2'#'#5'Width'#2'V'#7'Anchors'
+'Button'#4'Left'#3#173#1#6'Height'#2#22#3'Top'#2')'#5'Width'#2'V'#7'Anchors'
+#11#5'akTop'#7'akRight'#0#5'Color'#7#9'clBtnFace'#10'GroupIndex'#2#2#9'NumGl'
+'yphs'#2#0#7'OnClick'#7#28'PackageFilterEditEditingDone'#8'ShowHint'#9#14'Pa'
+'rentShowHint'#8#0#0#12'TSpeedButton'#29'UnitFilterContainsSpeedButton'#22'A'
@ -90,14 +90,14 @@ LazarusResources.Add('TCodeBrowserView','FORMDATA',[
+'Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#14'UnitFilterEdit'#18'Anch'
+'orSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#14'LevelsGroup'
+'Box'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#3#2#6'Height'#2#22#3
+'Top'#2'#'#5'Width'#2'V'#7'Anchors'#11#5'akTop'#7'akRight'#0#19'BorderSpacin'
+'Top'#2')'#5'Width'#2'V'#7'Anchors'#11#5'akTop'#7'akRight'#0#19'BorderSpacin'
+'g.Right'#2#6#5'Color'#7#9'clBtnFace'#10'GroupIndex'#2#2#9'NumGlyphs'#2#0#7
+'OnClick'#7#28'PackageFilterEditEditingDone'#8'ShowHint'#9#14'ParentShowHint'
+#8#0#0#12'TSpeedButton!IdentifierFilterBeginsSpeedButton'#22'AnchorSideLeft.'
+'Control'#7#20'IdentifierFilterEdit'#19'AnchorSideLeft.Side'#7#9'asrBottom'
+#21'AnchorSideTop.Control'#7#20'IdentifierFilterEdit'#18'AnchorSideTop.Side'
+#7#9'asrCenter'#23'AnchorSideRight.Control'#7'#IdentifierFilterContainsSpeed'
+'Button'#4'Left'#3#173#1#6'Height'#2#22#3'Top'#2'@'#5'Width'#2'V'#7'Anchors'
+'Button'#4'Left'#3#173#1#6'Height'#2#22#3'Top'#2'J'#5'Width'#2'V'#7'Anchors'
+#11#5'akTop'#7'akRight'#0#5'Color'#7#9'clBtnFace'#10'GroupIndex'#2#3#9'NumGl'
+'yphs'#2#0#7'OnClick'#7#28'PackageFilterEditEditingDone'#8'ShowHint'#9#14'Pa'
+'rentShowHint'#8#0#0#12'TSpeedButton#IdentifierFilterContainsSpeedButton'#22
@ -105,71 +105,71 @@ LazarusResources.Add('TCodeBrowserView','FORMDATA',[
+'Left.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#20'IdentifierFilterEd'
+'it'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#14
+'LevelsGroupBox'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#3#2#6'Hei'
+'ght'#2#22#3'Top'#2'@'#5'Width'#2'V'#7'Anchors'#11#5'akTop'#7'akRight'#0#19
+'ght'#2#22#3'Top'#2'J'#5'Width'#2'V'#7'Anchors'#11#5'akTop'#7'akRight'#0#19
+'BorderSpacing.Right'#2#6#5'Color'#7#9'clBtnFace'#10'GroupIndex'#2#3#9'NumGl'
+'yphs'#2#0#7'OnClick'#7#28'PackageFilterEditEditingDone'#8'ShowHint'#9#14'Pa'
+'rentShowHint'#8#0#0#9'TCheckBox'#20'ShowPackagesCheckBox'#22'AnchorSideLeft'
+'.Control'#7#14'LevelsGroupBox'#21'AnchorSideTop.Control'#7#17'PackageFilter'
+'Edit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#17#3'To'
+'p'#2#9#5'Width'#3#136#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6
+'Edit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#22#3'To'
+'p'#2#8#5'Width'#3#181#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6
+#7'Caption'#6#20'ShowPackagesCheckBox'#8'OnChange'#7#26'ShowPackagesCheckBox'
+'Change'#8'TabOrder'#2#0#0#0#9'TCheckBox'#17'ShowUnitsCheckBox'#22'AnchorSid'
+'eLeft.Control'#7#14'LevelsGroupBox'#21'AnchorSideTop.Control'#7#14'UnitFilt'
+'erEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#17#3
+'Top'#2'&'#5'Width'#2's'#18'BorderSpacing.Left'#2#6#7'Caption'#6#17'ShowUnit'
+'sCheckBox'#8'OnChange'#7#23'ShowUnitsCheckBoxChange'#8'TabOrder'#2#1#0#0#9
+'TCheckBox'#23'ShowIdentifiersCheckBox'#22'AnchorSideLeft.Control'#7#14'Leve'
+'lsGroupBox'#21'AnchorSideTop.Control'#7#20'IdentifierFilterEdit'#18'AnchorS'
+'ideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#17#3'Top'#2'C'#5'Width'
+#3#140#0#18'BorderSpacing.Left'#2#6#20'BorderSpacing.Bottom'#2#6#7'Caption'#6
+#23'ShowIdentifiersCheckBox'#8'OnChange'#7#29'ShowIdentifiersCheckBoxChange'
+#8'TabOrder'#2#2#0#0#5'TEdit'#17'PackageFilterEdit'#21'AnchorSideTop.Control'
+#7#14'LevelsGroupBox'#23'AnchorSideRight.Control'#7#30'PackageFilterBeginsSp'
+'eedButton'#4'Left'#3#228#0#6'Height'#2#23#3'Top'#2#6#5'Width'#3#201#0#7'Anc'
+'hors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2#6#8'OnChange'#7#23'P'
+'ackageFilterEditChange'#13'OnEditingDone'#7#28'PackageFilterEditEditingDone'
+#8'TabOrder'#2#3#4'Text'#6#17'PackageFilterEdit'#0#0#5'TEdit'#14'UnitFilterE'
,'dit'#21'AnchorSideTop.Control'#7#17'PackageFilterEdit'#18'AnchorSideTop.Sid'
+'e'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#27'UnitFilterBeginsSpeedBut'
+'ton'#4'Left'#3#228#0#6'Height'#2#23#3'Top'#2'#'#5'Width'#3#201#0#7'Anchors'
+#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2#6#8'OnChange'#7#23'Package'
+'FilterEditChange'#13'OnEditingDone'#7#28'PackageFilterEditEditingDone'#8'Ta'
+'bOrder'#2#4#4'Text'#6#14'UnitFilterEdit'#0#0#5'TEdit'#20'IdentifierFilterEd'
+'it'#21'AnchorSideTop.Control'#7#14'UnitFilterEdit'#18'AnchorSideTop.Side'#7
+#9'asrBottom'#23'AnchorSideRight.Control'#7'!IdentifierFilterBeginsSpeedButt'
+'on'#4'Left'#3#228#0#6'Height'#2#23#3'Top'#2'@'#5'Width'#3#201#0#7'Anchors'
+#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2#6#20'BorderSpacing.Bottom'
+#2#6#8'OnChange'#7#23'PackageFilterEditChange'#13'OnEditingDone'#7#28'Packag'
+'eFilterEditEditingDone'#8'TabOrder'#2#5#4'Text'#6#20'IdentifierFilterEdit'#0
+#0#0#12'TProgressBar'#12'ProgressBar1'#4'Left'#2#0#6'Height'#2#20#3'Top'#3#8
+#2#5'Width'#3'o'#2#5'Align'#7#8'alBottom'#3'Max'#3#16''''#8'TabOrder'#2#5#0#0
+#10'TImageList'#10'ImageList1'#6'Height'#2#18#5'Width'#2#18#4'left'#3'*'#1#3
+'top'#3'@'#1#0#0#10'TPopupMenu'#10'PopupMenu1'#7'OnPopup'#7#15'PopupMenu1Pop'
+'up'#4'left'#3#248#0#3'top'#3'@'#1#0#9'TMenuItem'#12'OpenMenuItem'#7'Caption'
+#6#12'OpenMenuItem'#7'OnClick'#7#17'OpenMenuItemClick'#0#0#9'TMenuItem'#23'C'
+'opyDescriptionMenuItem'#7'Caption'#6#23'CopyDescriptionMenuItem'#7'OnClick'
+#7#28'CopyDescriptionMenuItemClick'#0#0#9'TMenuItem'#22'CopyIdentifierMenuIt'
+'em'#7'Caption'#6#22'CopyIdentifierMenuItem'#7'OnClick'#7#27'CopyIdentifierM'
+'enuItemClick'#0#0#9'TMenuItem'#21'CopySeparatorMenuItem'#7'Caption'#6#1'-'#0
+#0#9'TMenuItem'#23'AddPkgToProjectMenuItem'#7'Caption'#6#23'AddPkgToProjectM'
+'enuItem'#7'OnClick'#7#28'AddPkgToProjectMenuItemClick'#0#0#9'TMenuItem'#23
+'AddPkgToCurUnitMenuItem'#7'Caption'#6#23'AddPkgToCurUnitMenuItem'#7'OnClick'
+#7#28'AddPkgToCurUnitMenuItemClick'#0#0#9'TMenuItem'#20'UseSeparatorMenuItem'
+#7'Caption'#6#1'-'#0#0#9'TMenuItem'#25'ExpandAllPackagesMenuItem'#7'Caption'
+#6#25'ExpandAllPackagesMenuItem'#7'OnClick'#7#30'ExpandAllPackagesMenuItemCl'
+'ick'#0#0#9'TMenuItem'#27'CollapseAllPackagesMenuItem'#7'Caption'#6#27'Colla'
+'pseAllPackagesMenuItem'#7'OnClick'#7' CollapseAllPackagesMenuItemClick'#0#0
+#9'TMenuItem'#28'AllPackagesSeparatorMenuItem'#7'Caption'#6#1'-'#0#0#9'TMenu'
+'Item'#22'ExpandAllUnitsMenuItem'#7'Caption'#6#22'ExpandAllUnitsMenuItem'#7
+'OnClick'#7#27'ExpandAllUnitsMenuItemClick'#0#0#9'TMenuItem'#24'CollapseAllU'
+'nitsMenuItem'#7'Caption'#6#24'CollapseAllUnitsMenuItem'#7'OnClick'#7#29'Col'
+'lapseAllUnitsMenuItemClick'#0#0#9'TMenuItem'#25'AllUnitsSeparatorMenuItem'#7
+'Caption'#6#1'-'#0#0#9'TMenuItem'#24'ExpandAllClassesMenuItem'#7'Caption'#6
+#24'ExpandAllClassesMenuItem'#7'OnClick'#7#29'ExpandAllClassesMenuItemClick'
+#0#0#9'TMenuItem'#26'CollapseAllClassesMenuItem'#7'Caption'#6#26'CollapseAll'
+'ClassesMenuItem'#7'OnClick'#7#31'CollapseAllClassesMenuItemClick'#0#0#9'TMe'
+'nuItem'#27'AllClassesSeparatorMenuItem'#7'Caption'#6#1'-'#0#0#9'TMenuItem'
+#14'ExportMenuItem'#7'Caption'#6#14'ExportMenuItem'#7'OnClick'#7#19'ExportMe'
+'nuItemClick'#0#0#0#10'TIdleTimer'#10'IdleTimer1'#7'OnTimer'#7#15'IdleTimer1'
+'Timer'#4'left'#3'^'#1#3'top'#3'@'#1#0#0#0
+'erEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#22#3
+'Top'#2')'#5'Width'#3#154#0#18'BorderSpacing.Left'#2#6#7'Caption'#6#17'ShowU'
+'nitsCheckBox'#8'OnChange'#7#23'ShowUnitsCheckBoxChange'#8'TabOrder'#2#1#0#0
+#9'TCheckBox'#23'ShowIdentifiersCheckBox'#22'AnchorSideLeft.Control'#7#14'Le'
+'velsGroupBox'#21'AnchorSideTop.Control'#7#20'IdentifierFilterEdit'#18'Ancho'
+'rSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#22#3'Top'#2'J'#5'Widt'
+'h'#3#183#0#18'BorderSpacing.Left'#2#6#20'BorderSpacing.Bottom'#2#6#7'Captio'
+'n'#6#23'ShowIdentifiersCheckBox'#8'OnChange'#7#29'ShowIdentifiersCheckBoxCh'
+'ange'#8'TabOrder'#2#2#0#0#5'TEdit'#17'PackageFilterEdit'#21'AnchorSideTop.C'
+'ontrol'#7#14'LevelsGroupBox'#23'AnchorSideRight.Control'#7#30'PackageFilter'
+'BeginsSpeedButton'#4'Left'#3#228#0#6'Height'#2#27#3'Top'#2#6#5'Width'#3#201
+#0#7'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2#6#8'OnChange'
+#7#23'PackageFilterEditChange'#13'OnEditingDone'#7#28'PackageFilterEditEditi'
+'ngDone'#8'TabOrder'#2#3#4'Text'#6#17'PackageFilterEdit'#0#0#5'TEdit'#14'Uni'
,'tFilterEdit'#21'AnchorSideTop.Control'#7#17'PackageFilterEdit'#18'AnchorSid'
+'eTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#27'UnitFilterBegins'
+'SpeedButton'#4'Left'#3#228#0#6'Height'#2#27#3'Top'#2''''#5'Width'#3#201#0#7
+'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2#6#8'OnChange'#7#23
+'PackageFilterEditChange'#13'OnEditingDone'#7#28'PackageFilterEditEditingDon'
+'e'#8'TabOrder'#2#4#4'Text'#6#14'UnitFilterEdit'#0#0#5'TEdit'#20'IdentifierF'
+'ilterEdit'#21'AnchorSideTop.Control'#7#14'UnitFilterEdit'#18'AnchorSideTop.'
+'Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7'!IdentifierFilterBeginsS'
+'peedButton'#4'Left'#3#228#0#6'Height'#2#27#3'Top'#2'H'#5'Width'#3#201#0#7'A'
+'nchors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2#6#20'BorderSpacing'
+'.Bottom'#2#6#8'OnChange'#7#23'PackageFilterEditChange'#13'OnEditingDone'#7
+#28'PackageFilterEditEditingDone'#8'TabOrder'#2#5#4'Text'#6#20'IdentifierFil'
+'terEdit'#0#0#0#12'TProgressBar'#12'ProgressBar1'#4'Left'#2#0#6'Height'#2#20
+#3'Top'#3#10#2#5'Width'#3'o'#2#5'Align'#7#8'alBottom'#3'Max'#3#16''''#8'TabO'
+'rder'#2#5#0#0#10'TImageList'#10'ImageList1'#6'Height'#2#18#5'Width'#2#18#4
+'left'#3'*'#1#3'top'#3'@'#1#0#0#10'TPopupMenu'#10'PopupMenu1'#7'OnPopup'#7#15
+'PopupMenu1Popup'#4'left'#3#248#0#3'top'#3'@'#1#0#9'TMenuItem'#12'OpenMenuIt'
+'em'#7'Caption'#6#12'OpenMenuItem'#7'OnClick'#7#17'OpenMenuItemClick'#0#0#9
+'TMenuItem'#23'CopyDescriptionMenuItem'#7'Caption'#6#23'CopyDescriptionMenuI'
+'tem'#7'OnClick'#7#28'CopyDescriptionMenuItemClick'#0#0#9'TMenuItem'#22'Copy'
+'IdentifierMenuItem'#7'Caption'#6#22'CopyIdentifierMenuItem'#7'OnClick'#7#27
+'CopyIdentifierMenuItemClick'#0#0#9'TMenuItem'#21'CopySeparatorMenuItem'#7'C'
+'aption'#6#1'-'#0#0#9'TMenuItem'#23'AddPkgToProjectMenuItem'#7'Caption'#6#23
+'AddPkgToProjectMenuItem'#7'OnClick'#7#28'AddPkgToProjectMenuItemClick'#0#0#9
+'TMenuItem'#23'AddPkgToCurUnitMenuItem'#7'Caption'#6#23'AddPkgToCurUnitMenuI'
+'tem'#7'OnClick'#7#28'AddPkgToCurUnitMenuItemClick'#0#0#9'TMenuItem'#20'UseS'
+'eparatorMenuItem'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#25'ExpandAllPackagesMe'
+'nuItem'#7'Caption'#6#25'ExpandAllPackagesMenuItem'#7'OnClick'#7#30'ExpandAl'
+'lPackagesMenuItemClick'#0#0#9'TMenuItem'#27'CollapseAllPackagesMenuItem'#7
+'Caption'#6#27'CollapseAllPackagesMenuItem'#7'OnClick'#7' CollapseAllPackage'
+'sMenuItemClick'#0#0#9'TMenuItem'#28'AllPackagesSeparatorMenuItem'#7'Caption'
+#6#1'-'#0#0#9'TMenuItem'#22'ExpandAllUnitsMenuItem'#7'Caption'#6#22'ExpandAl'
+'lUnitsMenuItem'#7'OnClick'#7#27'ExpandAllUnitsMenuItemClick'#0#0#9'TMenuIte'
+'m'#24'CollapseAllUnitsMenuItem'#7'Caption'#6#24'CollapseAllUnitsMenuItem'#7
+'OnClick'#7#29'CollapseAllUnitsMenuItemClick'#0#0#9'TMenuItem'#25'AllUnitsSe'
+'paratorMenuItem'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#24'ExpandAllClassesMenu'
+'Item'#7'Caption'#6#24'ExpandAllClassesMenuItem'#7'OnClick'#7#29'ExpandAllCl'
+'assesMenuItemClick'#0#0#9'TMenuItem'#26'CollapseAllClassesMenuItem'#7'Capti'
+'on'#6#26'CollapseAllClassesMenuItem'#7'OnClick'#7#31'CollapseAllClassesMenu'
+'ItemClick'#0#0#9'TMenuItem'#27'AllClassesSeparatorMenuItem'#7'Caption'#6#1
+'-'#0#0#9'TMenuItem'#14'ExportMenuItem'#7'Caption'#6#14'ExportMenuItem'#7'On'
+'Click'#7#19'ExportMenuItemClick'#0#0#0#10'TIdleTimer'#10'IdleTimer1'#7'OnTi'
+'mer'#7#15'IdleTimer1Timer'#4'left'#3'^'#1#3'top'#3'@'#1#0#0#0
]);

View File

@ -45,7 +45,7 @@ interface
uses
Classes, SysUtils, LCLProc, LResources, Forms, Controls, Graphics, Dialogs,
Clipbrd, LCLIntf, AVL_Tree, StdCtrls, ExtCtrls, ComCtrls, Buttons,
Clipbrd, LCLIntf, AVL_Tree, StdCtrls, ExtCtrls, ComCtrls, Buttons, Menus,
// codetools
CodeAtom, BasicCodeTools, DefineTemplates, CodeTree, CodeCache,
CodeToolManager, PascalParserTool, LinkScanner, FileProcs, CodeIndex,
@ -55,7 +55,7 @@ uses
IDECommands, LazIDEIntf, DialogProcs,
// IDE
PackageSystem, PackageDefs, LazarusIDEStrConsts, IDEOptionDefs,
BasePkgManager, AddToProjectDlg, EnvironmentOpts, Menus;
BasePkgManager, AddToProjectDlg, EnvironmentOpts;
type
@ -172,6 +172,7 @@ type
AllPackagesSeparatorMenuItem: TMenuItem;
AllUnitsSeparatorMenuItem: TMenuItem;
BrowseTreeView: TTreeView;
AddUnitToCurUnitMenuItem: TMenuItem;
RescanButton: TButton;
IdleTimer1: TIdleTimer;
AddPkgToProjectMenuItem: TMenuItem;
@ -214,6 +215,7 @@ type
UnitFilterEdit: TEdit;
procedure AddPkgToCurUnitMenuItemClick(Sender: TObject);
procedure AddPkgToProjectMenuItemClick(Sender: TObject);
procedure AddUnitToCurUnitMenuItemClick(Sender: TObject);
procedure BrowseTreeViewMouseDown(Sender: TOBject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure BrowseTreeViewShowHint(Sender: TObject; HintInfo: PHintInfo);
@ -322,6 +324,8 @@ type
procedure CopyNode(TVNode: TTreeNode; NodeType: TCopyNodeType);
procedure InvalidateStage(AStage: TCodeBrowserWorkStage);
function GetSelectedPackage: TLazPackage;
function GetCurUnitInSrcEditor(out FileOwner: TObject;
out Filename: string): boolean;
function GetCurPackageInSrcEditor: TLazPackage;
procedure OpenTVNode(TVNode: TTreeNode);
public
@ -416,8 +420,9 @@ begin
CollapseAllClassesMenuItem.Caption:=lisCollapseAllClasses;
ExportMenuItem.Caption:=lisExport;
OpenMenuItem.Caption:=lisHintOpen;
AddPkgToProjectMenuItem.Caption:=lisAddPackageDependencyToProject;
AddPkgToCurUnitMenuItem.Caption:=lisAddPackageDependencyToActiveUnit;
// AddPkgToProjectMenuItem.Caption: see PopupMenu1Popup
// AddPkgToCurUnitMenuItem.Caption: see PopupMenu1Popup
// AddUnitToCurUnitMenuItem.Caption: see PopupMenu1Popup
PackageFilterBeginsSpeedButton.Caption:=lisBegins;
PackageFilterBeginsSpeedButton.Hint:=lisPackageNameBeginsWith;
@ -477,6 +482,12 @@ var
APackage: TLazPackage;
EnableAddPkgToCurUnit: Boolean;
TargetPackage: TLazPackage;
EnableUnitToCurUnit: Boolean;
CurUnit: TCodeBrowserUnit;
SrcEditUnitOwner: TObject;
SrcEditUnitFilename: string;
CurUnitName: String;
SrcEditUnitName: String;
begin
ExpandAllPackagesMenuItem.Visible:=Options.HasLevel(cblPackages);
CollapseAllPackagesMenuItem.Visible:=ExpandAllPackagesMenuItem.Visible;
@ -496,14 +507,23 @@ begin
Node:=TObject(TVNode.Data);
EnableAddPkgToProject:=false;
EnableAddPkgToCurUnit:=false;
EnableUnitToCurUnit:=false;
if Node<>nil then begin
if Node is TCodeBrowserNode then
Identifier:=TCodeBrowserNode(Node).Identifier
else
Identifier:='';
APackage:=nil;
if Node is TCodeBrowserUnitList then begin
UnitList:=nil;
CurUnit:=nil;
TargetPackage:=nil;
if Node is TCodeBrowserUnit then begin
CurUnit:=TCodeBrowserUnit(Node);
UnitList:=CurUnit.UnitList;
end else if Node is TCodeBrowserUnitList then begin
UnitList:=TCodeBrowserUnitList(Node);
end;
if UnitList<>nil then begin
if UnitList.Owner=CodeBrowserProjectName then begin
// project
end else if UnitList.Owner=CodeBrowserIDEName then begin
@ -517,7 +537,7 @@ begin
// check if package can be added to project
if Project1.FindDependencyByName(APackage.Name)=nil then begin
EnableAddPkgToProject:=true;
AddPkgToProjectMenuItem.Caption:=Format(lisAddPackageToProject, [
AddPkgToProjectMenuItem.Caption:=Format(lisUsePackageInProject, [
APackage.Name]);
end;
// check if package can be added to package of src editor unit
@ -527,9 +547,20 @@ begin
and (TargetPackage.FindDependencyByName(APackage.Name)=nil) then begin
EnableAddPkgToCurUnit:=true;
AddPkgToCurUnitMenuItem.Caption:=Format(
lisAddPackageToPackage, [APackage.Name,
lisUsePackageInPackage, [APackage.Name,
TargetPackage.Name]);
end;
// check if unit can be added to project/package
GetCurUnitInSrcEditor(SrcEditUnitOwner,SrcEditUnitFilename);
if (CurUnit<>nil) and (SrcEditUnitOwner<>nil) then begin
CurUnitName:=ExtractFileNameOnly(CurUnit.Filename);
SrcEditUnitName:=ExtractFileNameOnly(SrcEditUnitFilename);
if SysUtils.CompareText(CurUnitName,SrcEditUnitName)<>0 then begin
EnableUnitToCurUnit:=true;
AddUnitToCurUnitMenuItem.Caption:=
Format(lisUseUnitInUnit, [CurUnitName, SrcEditUnitName]);
end;
end;
end;
end;
end;
@ -540,17 +571,27 @@ begin
CopyDescriptionMenuItem.Visible:=true;
CopyIdentifierMenuItem.Visible:=Identifier<>'';
CopySeparatorMenuItem.Visible:=true;
AddUnitToCurUnitMenuItem.Enabled:=EnableUnitToCurUnit;
AddUnitToCurUnitMenuItem.Visible:=true;
if not EnableUnitToCurUnit then
AddUnitToCurUnitMenuItem.Caption:=lisPkgMangUseUnit;
AddPkgToProjectMenuItem.Enabled:=EnableAddPkgToProject;
AddPkgToProjectMenuItem.Visible:=true;
if not EnableAddPkgToProject then
AddPkgToProjectMenuItem.Caption:=lisUsePackageInProject2;
AddPkgToCurUnitMenuItem.Enabled:=EnableAddPkgToCurUnit;
AddPkgToCurUnitMenuItem.Visible:=true;
if not EnableAddPkgToCurUnit then
AddPkgToCurUnitMenuItem.Caption:=lisUsePackageInPackage2;
end else begin
OpenMenuItem.Visible:=false;
CopyDescriptionMenuItem.Visible:=false;
CopyIdentifierMenuItem.Visible:=false;
CopySeparatorMenuItem.Visible:=false;
AddUnitToCurUnitMenuItem.Visible:=false;
AddPkgToProjectMenuItem.Visible:=false;
AddPkgToCurUnitMenuItem.Visible:=false;
UseSeparatorMenuItem.Visible:=false;
end;
end;
@ -2252,6 +2293,31 @@ begin
Result:=PackageGraph.FindAPackageWithName(UnitList.Owner,nil);
end;
function TCodeBrowserView.GetCurUnitInSrcEditor(out FileOwner: TObject; out
Filename: string): boolean;
var
SrcEdit: TSourceEditorInterface;
Code: TCodeBuffer;
Owners: TFPList;
begin
FileOwner:=nil;
Filename:='';
Result:=false;
SrcEdit:=SourceEditorWindow.ActiveEditor;
if SrcEdit=nil then exit;
Code:=CodeToolBoss.GetMainCode(TCodeBuffer(SrcEdit.CodeToolsBuffer));
if Code=nil then exit;
Owners:=PkgBoss.GetOwnersOfUnit(Code.FileName);
try
if (Owners=nil) or (Owners.Count=0) then exit;
FileOwner:=TObject(Owners[0]);
Filename:=Code.Filename;
Result:=true;
finally
Owners.Free;
end;
end;
function TCodeBrowserView.GetCurPackageInSrcEditor: TLazPackage;
var
SrcEdit: TSourceEditorInterface;
@ -2478,6 +2544,11 @@ begin
PkgBoss.AddProjectDependency(Project1,APackage);
end;
procedure TCodeBrowserView.AddUnitToCurUnitMenuItemClick(Sender: TObject);
begin
end;
procedure TCodeBrowserView.AddPkgToCurUnitMenuItemClick(Sender: TObject);
var
APackage: TLazPackage;

View File

@ -1859,7 +1859,6 @@ resourcestring
lisCollapseAllClasses = 'Collapse all classes';
lisExport = 'Export ...';
lisBegins = 'begins';
lisAddPackageDependencyToProject = 'Add package dependency to project';
lisIdentifierBeginsWith = 'Identifier begins with ...';
lisUnitNameBeginsWith = 'Unit name begins with ...';
lisPackageNameBeginsWith = 'Package name begins with ...';
@ -4465,10 +4464,12 @@ resourcestring
lisInsertPrintShortTag = 'Insert PrintShort tag';
lisAutomaticallyInvokeAfterPoint = 'Automatically invoke after point';
lisShowEmptyUnitsPackages = 'Show empty units/packages';
lisAddPackageDependencyToActiveUnit = 'Add package dependency to active unit';
lisAddPackageToProject = 'Add package %s to project';
lisAddPackageToPackage = 'Add package %s to package %s';
lisUsePackageInProject = 'Use package %s in project';
lisUsePackageInPackage = 'Use package %s in package %s';
lisRescan = 'Rescan';
lisUseUnitInUnit = 'Use unit %s in unit %s';
lisUsePackageInProject2 = 'Use package in project';
lisUsePackageInPackage2 = 'Use package in package';
implementation