mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-25 12:28:13 +02:00
IDE: codebrowser: hints and jump to node, LCL package: script to create the list of LCL units
git-svn-id: trunk@10714 -
This commit is contained in:
parent
7127d2d4d0
commit
f5b6a2e3ba
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -2845,6 +2845,7 @@ packager/packagedefs.pas svneol=native#text/pascal
|
|||||||
packager/packageeditor.pas svneol=native#text/pascal
|
packager/packageeditor.pas svneol=native#text/pascal
|
||||||
packager/packagelinks.pas svneol=native#text/pascal
|
packager/packagelinks.pas svneol=native#text/pascal
|
||||||
packager/packagesystem.pas svneol=native#text/pascal
|
packager/packagesystem.pas svneol=native#text/pascal
|
||||||
|
packager/pkgfileslcl.inc svneol=native#text/plain
|
||||||
packager/pkggraphexplorer.lfm svneol=native#text/plain
|
packager/pkggraphexplorer.lfm svneol=native#text/plain
|
||||||
packager/pkggraphexplorer.lrs svneol=native#text/plain
|
packager/pkggraphexplorer.lrs svneol=native#text/plain
|
||||||
packager/pkggraphexplorer.pas svneol=native#text/pascal
|
packager/pkggraphexplorer.pas svneol=native#text/pascal
|
||||||
@ -2998,4 +2999,5 @@ tools/lfm_to_lrs.sh svneol=native#text/plain
|
|||||||
tools/runwait.sh -text svneol=native#application/x-sh
|
tools/runwait.sh -text svneol=native#application/x-sh
|
||||||
tools/svn2revisioninc.lpi svneol=native#text/plain
|
tools/svn2revisioninc.lpi svneol=native#text/plain
|
||||||
tools/svn2revisioninc.pas svneol=native#text/plain
|
tools/svn2revisioninc.pas svneol=native#text/plain
|
||||||
|
tools/update_pkgfileslcl_inc.sh svneol=native#text/plain
|
||||||
tools/updatepofiles.pas svneol=native#text/pascal
|
tools/updatepofiles.pas svneol=native#text/pascal
|
||||||
|
@ -124,6 +124,7 @@ object CodeBrowserView: TCodeBrowserView
|
|||||||
ShowHint = True
|
ShowHint = True
|
||||||
ShowRoot = False
|
ShowRoot = False
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
OnMouseDown = BrowseTreeViewMouseDown
|
||||||
OnShowHint = BrowseTreeViewShowHint
|
OnShowHint = BrowseTreeViewShowHint
|
||||||
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoShowButtons, tvoShowLines, tvoToolTips]
|
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoShowButtons, tvoShowLines, tvoToolTips]
|
||||||
end
|
end
|
||||||
|
@ -45,9 +45,10 @@ LazarusResources.Add('TCodeBrowserView','FORMDATA',[
|
|||||||
+#6'Height'#3#138#1#3'Top'#3#150#0#5'Width'#3'z'#2#5'Align'#7#8'alBottom'#7'A'
|
+#6'Height'#3#138#1#3'Top'#3#150#0#5'Width'#3'z'#2#5'Align'#7#8'alBottom'#7'A'
|
||||||
+'nchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17'DefaultItemHeight'
|
+'nchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17'DefaultItemHeight'
|
||||||
+#2#16#6'Images'#7#10'ImageList1'#14'ParentShowHint'#8#8'ShowHint'#9#8'ShowRo'
|
+#2#16#6'Images'#7#10'ImageList1'#14'ParentShowHint'#8#8'ShowHint'#9#8'ShowRo'
|
||||||
+'ot'#8#8'TabOrder'#2#3#10'OnShowHint'#7#22'BrowseTreeViewShowHint'#7'Options'
|
+'ot'#8#8'TabOrder'#2#3#11'OnMouseDown'#7#23'BrowseTreeViewMouseDown'#10'OnSh'
|
||||||
+#11#17'tvoAutoItemHeight'#16'tvoHideSelection'#21'tvoKeepCollapsedNodes'#14
|
+'owHint'#7#22'BrowseTreeViewShowHint'#7'Options'#11#17'tvoAutoItemHeight'#16
|
||||||
+'tvoShowButtons'#12'tvoShowLines'#11'tvoToolTips'#0#0#0#10'TStatusBar'#10'St'
|
+'tvoHideSelection'#21'tvoKeepCollapsedNodes'#14'tvoShowButtons'#12'tvoShowLi'
|
||||||
+'atusBar1'#6'Height'#2#20#3'Top'#3' '#2#5'Width'#3'z'#2#6'Panels'#14#0#0#0#10
|
+'nes'#11'tvoToolTips'#0#0#0#10'TStatusBar'#10'StatusBar1'#6'Height'#2#20#3'T'
|
||||||
+'TImageList'#10'ImageList1'#4'left'#3'*'#1#3'top'#3#196#0#0#0#0
|
+'op'#3' '#2#5'Width'#3'z'#2#6'Panels'#14#0#0#0#10'TImageList'#10'ImageList1'
|
||||||
|
+#4'left'#3'*'#1#3'top'#3#196#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -45,7 +45,7 @@ uses
|
|||||||
CodeAtom, BasicCodeTools, DefineTemplates, CodeTree, CodeCache, CodeToolManager,
|
CodeAtom, BasicCodeTools, DefineTemplates, CodeTree, CodeCache, CodeToolManager,
|
||||||
PascalParserTool, LinkScanner, FileProcs,
|
PascalParserTool, LinkScanner, FileProcs,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
LazConfigStorage, Project,
|
LazConfigStorage, Project, PackageIntf, IDECommands, LazIDEIntf,
|
||||||
// IDE
|
// IDE
|
||||||
PackageSystem, PackageDefs, LazarusIDEStrConsts, IDEOptionDefs,
|
PackageSystem, PackageDefs, LazarusIDEStrConsts, IDEOptionDefs,
|
||||||
EnvironmentOpts;
|
EnvironmentOpts;
|
||||||
@ -61,19 +61,20 @@ type
|
|||||||
private
|
private
|
||||||
FCBUnit: TCodeBrowserUnit;
|
FCBUnit: TCodeBrowserUnit;
|
||||||
FChildNodes: TAvgLvlTree;
|
FChildNodes: TAvgLvlTree;
|
||||||
|
FCodePos: TCodePosition;
|
||||||
|
FDesc: TCodeTreeNodeDesc;
|
||||||
FDescription: string;
|
FDescription: string;
|
||||||
FNode: TCodeTreeNode;
|
|
||||||
FParentNode: TCodeBrowserNode;
|
FParentNode: TCodeBrowserNode;
|
||||||
public
|
public
|
||||||
constructor Create(TheUnit: TCodeBrowserUnit; TheNode: TCodeTreeNode;
|
constructor Create(TheUnit: TCodeBrowserUnit;
|
||||||
TheParent: TCodeBrowserNode;
|
TheParent: TCodeBrowserNode;
|
||||||
const TheDescription: string);
|
const TheDescription: string);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
function AddNode(CTNode: TCodeTreeNode;
|
function AddNode(const Description: string): TCodeBrowserNode;
|
||||||
const Description: string): TCodeBrowserNode;
|
|
||||||
property CBUnit: TCodeBrowserUnit read FCBUnit;
|
property CBUnit: TCodeBrowserUnit read FCBUnit;
|
||||||
property Node: TCodeTreeNode read FNode;
|
property Desc: TCodeTreeNodeDesc read FDesc write FDesc;
|
||||||
|
property CodePos: TCodePosition read FCodePos write FCodePos;
|
||||||
property ParentNode: TCodeBrowserNode read FParentNode;
|
property ParentNode: TCodeBrowserNode read FParentNode;
|
||||||
property ChildNodes: TAvgLvlTree read FChildNodes;
|
property ChildNodes: TAvgLvlTree read FChildNodes;
|
||||||
property Description: string read FDescription;
|
property Description: string read FDescription;
|
||||||
@ -101,8 +102,7 @@ type
|
|||||||
constructor Create(const TheFilename: string);
|
constructor Create(const TheFilename: string);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
function AddNode(CTNode: TCodeTreeNode;
|
function AddNode(const Description: string): TCodeBrowserNode;
|
||||||
const Description: string): TCodeBrowserNode;
|
|
||||||
property Filename: string read FFilename;
|
property Filename: string read FFilename;
|
||||||
property CodeBuffer: TCodeBuffer read FCodeBuffer write SetCodeBuffer;
|
property CodeBuffer: TCodeBuffer read FCodeBuffer write SetCodeBuffer;
|
||||||
property CodeTool: TCodeTool read FCodeTool write SetCodeTool;
|
property CodeTool: TCodeTool read FCodeTool write SetCodeTool;
|
||||||
@ -222,6 +222,8 @@ type
|
|||||||
ScopeGroupBox: TGroupBox;
|
ScopeGroupBox: TGroupBox;
|
||||||
BrowseTreeView: TTreeView;
|
BrowseTreeView: TTreeView;
|
||||||
StatusBar1: TStatusBar;
|
StatusBar1: TStatusBar;
|
||||||
|
procedure BrowseTreeViewMouseDown(Sender: TOBject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
procedure BrowseTreeViewShowHint(Sender: TObject; HintInfo: PHintInfo);
|
procedure BrowseTreeViewShowHint(Sender: TObject; HintInfo: PHintInfo);
|
||||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
@ -243,6 +245,7 @@ type
|
|||||||
FScannedLines: PtrInt;
|
FScannedLines: PtrInt;
|
||||||
FScannedPackages: integer;
|
FScannedPackages: integer;
|
||||||
FScannedUnits: integer;
|
FScannedUnits: integer;
|
||||||
|
FUpdateNeeded: boolean;
|
||||||
FViewRoot: TObject;
|
FViewRoot: TObject;
|
||||||
FWorkingParserRoot: TCodeBrowserUnitList;
|
FWorkingParserRoot: TCodeBrowserUnitList;
|
||||||
fUpdateCount: integer;
|
fUpdateCount: integer;
|
||||||
@ -276,6 +279,7 @@ type
|
|||||||
procedure SetScannedLines(const AValue: PtrInt);
|
procedure SetScannedLines(const AValue: PtrInt);
|
||||||
procedure SetScannedPackages(const AValue: integer);
|
procedure SetScannedPackages(const AValue: integer);
|
||||||
procedure SetScannedUnits(const AValue: integer);
|
procedure SetScannedUnits(const AValue: integer);
|
||||||
|
procedure SetUpdateNeeded(const AValue: boolean);
|
||||||
procedure Work;
|
procedure Work;
|
||||||
procedure WorkGetOptions;
|
procedure WorkGetOptions;
|
||||||
procedure WorkGatherPackages;
|
procedure WorkGatherPackages;
|
||||||
@ -312,6 +316,7 @@ type
|
|||||||
property ScannedLines: PtrInt read FScannedLines write SetScannedLines;
|
property ScannedLines: PtrInt read FScannedLines write SetScannedLines;
|
||||||
property ScannedBytes: PtrInt read FScannedBytes write SetScannedBytes;
|
property ScannedBytes: PtrInt read FScannedBytes write SetScannedBytes;
|
||||||
property ScannedIdentifiers: PtrInt read FScannedIdentifiers write SetScannedIdentifiers;
|
property ScannedIdentifiers: PtrInt read FScannedIdentifiers write SetScannedIdentifiers;
|
||||||
|
property UpdateNeeded: boolean read FUpdateNeeded write SetUpdateNeeded;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -391,7 +396,7 @@ begin
|
|||||||
InitImageList;
|
InitImageList;
|
||||||
LoadOptions;
|
LoadOptions;
|
||||||
|
|
||||||
fStage:=cbwsGetOptions;
|
UpdateNeeded:=true;
|
||||||
Application.AddOnIdleHandler(@OnIdle);
|
Application.AddOnIdleHandler(@OnIdle);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -553,6 +558,14 @@ begin
|
|||||||
FScannedUnits:=AValue;
|
FScannedUnits:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCodeBrowserView.SetUpdateNeeded(const AValue: boolean);
|
||||||
|
begin
|
||||||
|
if FUpdateNeeded=AValue then exit;
|
||||||
|
FUpdateNeeded:=AValue;
|
||||||
|
if FUpdateNeeded then
|
||||||
|
fStage:=cbwsGetOptions;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCodeBrowserView.Work;
|
procedure TCodeBrowserView.Work;
|
||||||
// do some work
|
// do some work
|
||||||
// This is called during OnIdle, so progress in small steps
|
// This is called during OnIdle, so progress in small steps
|
||||||
@ -570,6 +583,7 @@ begin
|
|||||||
cbwsUpdateUnits: WorkUpdateUnits;
|
cbwsUpdateUnits: WorkUpdateUnits;
|
||||||
cbwsUpdateTreeView: WorkUpdateTreeView;
|
cbwsUpdateTreeView: WorkUpdateTreeView;
|
||||||
else
|
else
|
||||||
|
UpdateNeeded:=false;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if ord(OldStage)<ord(cbwsFinished) then begin
|
if ord(OldStage)<ord(cbwsFinished) then begin
|
||||||
@ -580,19 +594,25 @@ end;
|
|||||||
procedure TCodeBrowserView.WorkGetOptions;
|
procedure TCodeBrowserView.WorkGetOptions;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
|
NewLevels: TStringList;
|
||||||
begin
|
begin
|
||||||
DebugLn(['TCodeBrowserView.WorkGetOptions START']);
|
DebugLn(['TCodeBrowserView.WorkGetOptions START']);
|
||||||
Options.WithRequiredPackages:=ScopeWithRequiredPackagesCheckBox.Checked;
|
Options.WithRequiredPackages:=ScopeWithRequiredPackagesCheckBox.Checked;
|
||||||
Options.Scope:=ScopeComboBox.Text;
|
Options.Scope:=ScopeComboBox.Text;
|
||||||
Options.ShowPrivate:=ShowPrivateCheckBox.Checked;
|
Options.ShowPrivate:=ShowPrivateCheckBox.Checked;
|
||||||
Options.ShowProtected:=ShowProtectedCheckBox.Checked;
|
Options.ShowProtected:=ShowProtectedCheckBox.Checked;
|
||||||
Options.Levels.Clear;
|
NewLevels:=TStringList.Create;
|
||||||
for i:=0 to LevelsCheckGroup.Items.Count-1 do
|
for i:=0 to LevelsCheckGroup.Items.Count-1 do
|
||||||
if LevelsCheckGroup.Checked[i] then
|
if LevelsCheckGroup.Checked[i] then
|
||||||
Options.Levels.Add(CodeBrowserLevelNames[TCodeBrowserLevel(i)]);
|
NewLevels.Add(CodeBrowserLevelNames[TCodeBrowserLevel(i)]);
|
||||||
|
Options.Levels:=NewLevels;
|
||||||
|
NewLevels.Free;
|
||||||
|
|
||||||
// this stage finished -> next stage
|
// this stage finished -> next stage
|
||||||
fStage:=cbwsGatherPackages;
|
if UpdateNeeded or Options.Modified then
|
||||||
|
fStage:=cbwsGatherPackages
|
||||||
|
else
|
||||||
|
fStage:=cbwsFinished;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCodeBrowserView.WorkGatherPackages;
|
procedure TCodeBrowserView.WorkGatherPackages;
|
||||||
@ -1240,6 +1260,8 @@ var
|
|||||||
ChildCTNode: TCodeTreeNode;
|
ChildCTNode: TCodeTreeNode;
|
||||||
|
|
||||||
procedure AddChildNode(const ChildDescription: string);
|
procedure AddChildNode(const ChildDescription: string);
|
||||||
|
var
|
||||||
|
NewChildNode: TCodeBrowserNode;
|
||||||
begin
|
begin
|
||||||
//DebugLn(['AddChildNode ',ChildCTNode.DescAsString,' ',ChildDescription]);
|
//DebugLn(['AddChildNode ',ChildCTNode.DescAsString,' ',ChildDescription]);
|
||||||
if (ChildCTNode.Parent.Desc=ctnClassPrivate) and (not ShowPrivate) then
|
if (ChildCTNode.Parent.Desc=ctnClassPrivate) and (not ShowPrivate) then
|
||||||
@ -1247,13 +1269,21 @@ var
|
|||||||
if (ChildCTNode.Parent.Desc=ctnClassProtected) and (not ShowProtected)
|
if (ChildCTNode.Parent.Desc=ctnClassProtected) and (not ShowProtected)
|
||||||
then
|
then
|
||||||
exit;
|
exit;
|
||||||
NewNode.AddNode(ChildCTNode,ChildDescription);
|
NewChildNode:=NewNode.AddNode(ChildDescription);
|
||||||
|
if NewChildNode<>nil then begin
|
||||||
|
NewChildNode.Desc:=ChildCTNode.Desc;
|
||||||
|
Tool.CleanPosToCodePos(ChildCTNode.StartPos,NewChildNode.FCodePos);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
AddUnit;
|
AddUnit;
|
||||||
//DebugLn(['AddIdentifierNode ',CTNode.DescAsString,' Description="',Description,'"']);
|
//DebugLn(['AddIdentifierNode ',CTNode.DescAsString,' Description="',Description,'"']);
|
||||||
NewNode:=TCodeBrowserUnit(DestUnit).AddNode(CTNode,Description);
|
NewNode:=TCodeBrowserUnit(DestUnit).AddNode(Description);
|
||||||
|
NewNode.Desc:=CTNode.Desc;
|
||||||
|
Tool.CleanPosToCodePos(CTNode.StartPos,NewNode.FCodePos);
|
||||||
|
//DebugLn(['AddIdentifierNode Code=',NewNode.FCodePos.Code<>nil,' P=',NewNode.FCodePos.P]);
|
||||||
|
|
||||||
if (CTNode.Desc=ctnTypeDefinition)
|
if (CTNode.Desc=ctnTypeDefinition)
|
||||||
and (CTNode.FirstChild<>nil)
|
and (CTNode.FirstChild<>nil)
|
||||||
and (CTNode.FirstChild.Desc in [ctnClass,ctnClassInterface,ctnRecordType,
|
and (CTNode.FirstChild.Desc in [ctnClass,ctnClassInterface,ctnRecordType,
|
||||||
@ -1289,7 +1319,7 @@ var
|
|||||||
CTNode: TCodeTreeNode;
|
CTNode: TCodeTreeNode;
|
||||||
begin
|
begin
|
||||||
if SrcUnit=nil then exit;
|
if SrcUnit=nil then exit;
|
||||||
DebugLn(['AddUnitNodes SrcUnit.Filename="',SrcUnit.Filename,'"']);
|
//DebugLn(['AddUnitNodes SrcUnit.Filename="',SrcUnit.Filename,'"']);
|
||||||
Tool:=GetCodeTool(SrcUnit);
|
Tool:=GetCodeTool(SrcUnit);
|
||||||
if Tool=nil then exit;
|
if Tool=nil then exit;
|
||||||
if Tool.Tree=nil then exit;
|
if Tool.Tree=nil then exit;
|
||||||
@ -1336,7 +1366,7 @@ var
|
|||||||
NewUnit: TCodeBrowserUnit;
|
NewUnit: TCodeBrowserUnit;
|
||||||
begin
|
begin
|
||||||
if SrcList=nil then exit;
|
if SrcList=nil then exit;
|
||||||
DebugLn(['AddUnits SrcList.Owner="',SrcList.Owner,'" HasUnits=',SrcList.Units<>nil]);
|
//DebugLn(['AddUnits SrcList.Owner="',SrcList.Owner,'" HasUnits=',SrcList.Units<>nil]);
|
||||||
if SrcList.Units<>nil then begin
|
if SrcList.Units<>nil then begin
|
||||||
Node:=SrcList.Units.FindLowest;
|
Node:=SrcList.Units.FindLowest;
|
||||||
NewUnit:=nil;
|
NewUnit:=nil;
|
||||||
@ -1372,7 +1402,7 @@ var
|
|||||||
NewList: TCodeBrowserUnitList;
|
NewList: TCodeBrowserUnitList;
|
||||||
begin
|
begin
|
||||||
if SrcList=nil then exit;
|
if SrcList=nil then exit;
|
||||||
DebugLn(['AddUnitLists SrcList.Owner="',SrcList.Owner,'"']);
|
//DebugLn(['AddUnitLists SrcList.Owner="',SrcList.Owner,'"']);
|
||||||
// create node
|
// create node
|
||||||
if ShowPackages then begin
|
if ShowPackages then begin
|
||||||
if DestParentList=nil then begin
|
if DestParentList=nil then begin
|
||||||
@ -1589,39 +1619,37 @@ begin
|
|||||||
Result:=ImgIDPackage;
|
Result:=ImgIDPackage;
|
||||||
end else if CodeNode is TCodeBrowserNode then begin
|
end else if CodeNode is TCodeBrowserNode then begin
|
||||||
Node:=TCodeBrowserNode(CodeNode);
|
Node:=TCodeBrowserNode(CodeNode);
|
||||||
if Node.Node<>nil then begin
|
case Node.Desc of
|
||||||
case Node.Node.Desc of
|
ctnProgram,ctnLibrary,ctnPackage:
|
||||||
ctnProgram,ctnLibrary,ctnPackage:
|
Result:=ImgIDProgramCode;
|
||||||
Result:=ImgIDProgramCode;
|
ctnUnit:
|
||||||
ctnUnit:
|
Result:=ImgIDUnitCode;
|
||||||
Result:=ImgIDUnitCode;
|
ctnInterface:
|
||||||
ctnInterface:
|
Result:=ImgIDInterfaceSection;
|
||||||
Result:=ImgIDInterfaceSection;
|
ctnImplementation:
|
||||||
ctnImplementation:
|
Result:=ImgIDImplementation;
|
||||||
Result:=ImgIDImplementation;
|
ctnInitialization:
|
||||||
ctnInitialization:
|
Result:=ImgIDInitialization;
|
||||||
Result:=ImgIDInitialization;
|
ctnFinalization:
|
||||||
ctnFinalization:
|
Result:=ImgIDFinalization;
|
||||||
Result:=ImgIDFinalization;
|
ctnTypeSection:
|
||||||
ctnTypeSection:
|
Result:=ImgIDTypeSection;
|
||||||
Result:=ImgIDTypeSection;
|
ctnTypeDefinition:
|
||||||
ctnTypeDefinition:
|
Result:=ImgIDType;
|
||||||
Result:=ImgIDType;
|
ctnVarSection:
|
||||||
ctnVarSection:
|
Result:=ImgIDVarSection;
|
||||||
Result:=ImgIDVarSection;
|
ctnVarDefinition:
|
||||||
ctnVarDefinition:
|
Result:=ImgIDVariable;
|
||||||
Result:=ImgIDVariable;
|
ctnConstSection,ctnResStrSection:
|
||||||
ctnConstSection,ctnResStrSection:
|
Result:=ImgIDConstSection;
|
||||||
Result:=ImgIDConstSection;
|
ctnConstDefinition:
|
||||||
ctnConstDefinition:
|
Result:=ImgIDConst;
|
||||||
Result:=ImgIDConst;
|
ctnClass:
|
||||||
ctnClass:
|
Result:=ImgIDClass;
|
||||||
Result:=ImgIDClass;
|
ctnProcedure:
|
||||||
ctnProcedure:
|
Result:=ImgIDProc;
|
||||||
Result:=ImgIDProc;
|
ctnProperty:
|
||||||
ctnProperty:
|
Result:=ImgIDProperty;
|
||||||
Result:=ImgIDProperty;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1631,10 +1659,12 @@ var
|
|||||||
NodeData: TObject;
|
NodeData: TObject;
|
||||||
CurUnit: TCodeBrowserUnit;
|
CurUnit: TCodeBrowserUnit;
|
||||||
Node: TCodeBrowserNode;
|
Node: TCodeBrowserNode;
|
||||||
|
Line, Column: integer;
|
||||||
begin
|
begin
|
||||||
Result:='';
|
Result:='';
|
||||||
if (TVNode=nil) or (TVNode.Data=nil) then exit;
|
if (TVNode=nil) or (TVNode.Data=nil) then exit;
|
||||||
NodeData:=TObject(TVNode.Data);
|
NodeData:=TObject(TVNode.Data);
|
||||||
|
//DebugLn(['TCodeBrowserView.GetTVNodeHint ',DbgSName(NodeData)]);
|
||||||
if NodeData is TCodeBrowserUnitList then begin
|
if NodeData is TCodeBrowserUnitList then begin
|
||||||
|
|
||||||
end else if NodeData is TCodeBrowserUnit then begin
|
end else if NodeData is TCodeBrowserUnit then begin
|
||||||
@ -1643,8 +1673,11 @@ begin
|
|||||||
Result:=CurUnit.Filename;
|
Result:=CurUnit.Filename;
|
||||||
end else if NodeData is TCodeBrowserNode then begin
|
end else if NodeData is TCodeBrowserNode then begin
|
||||||
Node:=TCodeBrowserNode(NodeData);
|
Node:=TCodeBrowserNode(NodeData);
|
||||||
if Node.Node<>nil then begin
|
if Node.CodePos.Code<>nil then begin
|
||||||
|
Result:=Node.CodePos.Code.Filename;
|
||||||
|
Node.CodePos.Code.AbsoluteToLineCol(Node.CodePos.P,Line,Column);
|
||||||
|
if Line>0 then
|
||||||
|
Result:=Result+' ('+IntToStr(Line)+','+IntToStr(Column)+')';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1671,28 +1704,76 @@ procedure TCodeBrowserView.BrowseTreeViewShowHint(Sender: TObject;
|
|||||||
HintInfo: PHintInfo);
|
HintInfo: PHintInfo);
|
||||||
var
|
var
|
||||||
TVNode: TTreeNode;
|
TVNode: TTreeNode;
|
||||||
NodeData: TObject;
|
HintStr: String;
|
||||||
|
MousePos: TPoint;
|
||||||
begin
|
begin
|
||||||
DebugLn(['TCodeBrowserView.BrowseTreeViewShowHint ']);
|
//DebugLn(['TCodeBrowserView.BrowseTreeViewShowHint ',dbgs(HintInfo^.CursorPos)]);
|
||||||
TVNode:=BrowseTreeView.Selected;
|
HintStr:='';
|
||||||
|
MousePos:=HintInfo^.CursorPos;
|
||||||
|
TVNode:=BrowseTreeView.GetNodeAt(MousePos.X,MousePos.Y);
|
||||||
if TVNode<>nil then begin
|
if TVNode<>nil then begin
|
||||||
NodeData:=TObject(TVNode.Data);
|
HintStr:=GetTVNodeHint(TVNode);
|
||||||
if NodeData<>nil then begin
|
//DebugLn(['TCodeBrowserView.BrowseTreeViewShowHint HintStr="',HintStr,'"']);
|
||||||
|
end;
|
||||||
|
HintInfo^.HintStr:=HintStr;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCodeBrowserView.BrowseTreeViewMouseDown(Sender: TOBject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
var
|
||||||
|
NodeData: TObject;
|
||||||
|
Node: TCodeBrowserNode;
|
||||||
|
CurUnit: TCodeBrowserUnit;
|
||||||
|
Line, Column: integer;
|
||||||
|
TVNode: TTreeNode;
|
||||||
|
List: TCodeBrowserUnitList;
|
||||||
|
APackage: TLazPackage;
|
||||||
|
begin
|
||||||
|
if ssDouble in Shift then begin
|
||||||
|
TVNode:=BrowseTreeView.GetNodeAt(X,Y);
|
||||||
|
if (TVNode=nil) or (TVNode.Data=nil) then exit;
|
||||||
|
NodeData:=TObject(TVNode.Data);
|
||||||
|
if NodeData is TCodeBrowserUnitList then begin
|
||||||
|
List:=TCodeBrowserUnitList(NodeData);
|
||||||
|
DebugLn(['TCodeBrowserView.BrowseTreeViewMouseDown "',List.Owner,'=',CodeBrowserProjectName,'"']);
|
||||||
|
if List.Owner=CodeBrowserProjectName then begin
|
||||||
|
// open project inspector
|
||||||
|
DebugLn(['TCodeBrowserView.BrowseTreeViewMouseDown open project inspector']);
|
||||||
|
ExecuteIDECommand(Self,ecProjectInspector);
|
||||||
|
end else if List.Owner=CodeBrowserIDEName then begin
|
||||||
|
// open the IDE -> already open
|
||||||
|
end else if List.Owner=CodeBrowserHidden then begin
|
||||||
|
// nothing
|
||||||
|
end else begin
|
||||||
|
// open package
|
||||||
|
APackage:=PackageGraph.FindAPackageWithName(List.Owner,nil);
|
||||||
|
if APackage<>nil then begin
|
||||||
|
PackageEditingInterface.DoOpenPackageFile(APackage.Filename,[]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end else if NodeData is TCodeBrowserUnit then begin
|
||||||
|
CurUnit:=TCodeBrowserUnit(NodeData);
|
||||||
|
if CurUnit.Filename<>'' then begin
|
||||||
|
LazarusIDE.DoOpenEditorFile(CurUnit.Filename,-1,[ofOnlyIfExists]);
|
||||||
|
end;
|
||||||
|
end else if NodeData is TCodeBrowserNode then begin
|
||||||
|
Node:=TCodeBrowserNode(NodeData);
|
||||||
|
if (Node.CodePos.Code<>nil)
|
||||||
|
and (Node.CodePos.Code.Filename<>'') then begin
|
||||||
|
Node.CodePos.Code.AbsoluteToLineCol(Node.CodePos.P,Line,Column);
|
||||||
|
LazarusIDE.DoOpenFileAndJumpToPos(Node.CodePos.Code.Filename,
|
||||||
|
Point(Column,Line),-1,-1,[ofOnlyIfExists]);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
// cancel
|
|
||||||
HintInfo^.HintStr:='';
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCodeBrowserNode }
|
{ TCodeBrowserNode }
|
||||||
|
|
||||||
constructor TCodeBrowserNode.Create(TheUnit: TCodeBrowserUnit;
|
constructor TCodeBrowserNode.Create(TheUnit: TCodeBrowserUnit;
|
||||||
TheNode: TCodeTreeNode; TheParent: TCodeBrowserNode;
|
TheParent: TCodeBrowserNode; const TheDescription: string);
|
||||||
const TheDescription: string);
|
|
||||||
begin
|
begin
|
||||||
FCBUnit:=TheUnit;
|
FCBUnit:=TheUnit;
|
||||||
FNode:=TheNode;
|
|
||||||
FParentNode:=TheParent;
|
FParentNode:=TheParent;
|
||||||
FDescription:=TheDescription;
|
FDescription:=TheDescription;
|
||||||
end;
|
end;
|
||||||
@ -1710,10 +1791,9 @@ begin
|
|||||||
FreeAndNil(FChildNodes);
|
FreeAndNil(FChildNodes);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCodeBrowserNode.AddNode(CTNode: TCodeTreeNode;
|
function TCodeBrowserNode.AddNode(const Description: string): TCodeBrowserNode;
|
||||||
const Description: string): TCodeBrowserNode;
|
|
||||||
begin
|
begin
|
||||||
Result:=TCodeBrowserNode.Create(nil,CTNode,Self,Description);
|
Result:=TCodeBrowserNode.Create(nil,Self,Description);
|
||||||
if FChildNodes=nil then
|
if FChildNodes=nil then
|
||||||
FChildNodes:=TAvgLvlTree.Create(@CompareNodeDescriptions);
|
FChildNodes:=TAvgLvlTree.Create(@CompareNodeDescriptions);
|
||||||
FChildNodes.Add(Result);
|
FChildNodes.Add(Result);
|
||||||
@ -1766,10 +1846,9 @@ begin
|
|||||||
FreeAndNil(FChildNodes);
|
FreeAndNil(FChildNodes);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCodeBrowserUnit.AddNode(CTNode: TCodeTreeNode;
|
function TCodeBrowserUnit.AddNode(const Description: string): TCodeBrowserNode;
|
||||||
const Description: string): TCodeBrowserNode;
|
|
||||||
begin
|
begin
|
||||||
Result:=TCodeBrowserNode.Create(Self,CTNode,nil,Description);
|
Result:=TCodeBrowserNode.Create(Self,nil,Description);
|
||||||
if FChildNodes=nil then
|
if FChildNodes=nil then
|
||||||
FChildNodes:=TAvgLvlTree.Create(@CompareNodeDescriptions);
|
FChildNodes:=TAvgLvlTree.Create(@CompareNodeDescriptions);
|
||||||
FChildNodes.Add(Result);
|
FChildNodes.Add(Result);
|
||||||
|
@ -2511,6 +2511,9 @@ begin
|
|||||||
ecViewForms:
|
ecViewForms:
|
||||||
DoViewUnitsAndForms(true);
|
DoViewUnitsAndForms(true);
|
||||||
|
|
||||||
|
ecProjectInspector:
|
||||||
|
DoShowProjectInspector;
|
||||||
|
|
||||||
ecConfigCustomComps:
|
ecConfigCustomComps:
|
||||||
PkgBoss.ShowConfigureCustomComponents;
|
PkgBoss.ShowConfigureCustomComponents;
|
||||||
|
|
||||||
|
@ -1146,7 +1146,7 @@ begin
|
|||||||
Filename:=SetDirSeparators('$(LazarusDir)/lcl/');
|
Filename:=SetDirSeparators('$(LazarusDir)/lcl/');
|
||||||
Version.SetValues(1,0,0,0);
|
Version.SetValues(1,0,0,0);
|
||||||
Author:='Lazarus';
|
Author:='Lazarus';
|
||||||
License:='LGPL-2';
|
License:='modified LGPL-2';
|
||||||
AutoInstall:=pitStatic;
|
AutoInstall:=pitStatic;
|
||||||
AutoUpdate:=pupManually;
|
AutoUpdate:=pupManually;
|
||||||
Description:=lisPkgSysTheLCLLazarusComponentLibraryContainsAllBase;
|
Description:=lisPkgSysTheLCLLazarusComponentLibraryContainsAllBase;
|
||||||
@ -1159,39 +1159,9 @@ begin
|
|||||||
// add requirements
|
// add requirements
|
||||||
AddRequiredDependency(FCLPackage.CreateDependencyWithOwner(Result));
|
AddRequiredDependency(FCLPackage.CreateDependencyWithOwner(Result));
|
||||||
|
|
||||||
// add registering units
|
// register files
|
||||||
AddFile('menus.pp','Menus',pftUnit,[pffHasRegisterProc],cpBase);
|
{$I pkgfileslcl.inc}
|
||||||
AddFile('buttons.pp','Buttons',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('stdctrls.pp','StdCtrls',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('extctrls.pp','ExtCtrls',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('comctrls.pp','ComCtrls',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('maskedit.pp','MaskEdit',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('checklst.pas','CheckLst',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('forms.pp','Forms',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('graphics.pp','Graphics',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('grids.pas','Grids',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('controls.pp','Controls',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('dialogs.pp','Dialogs',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('lazhelphtml.pas','LazHelpHTML',pftUnit,[],cpBase);
|
|
||||||
AddFile('spin.pp','Spin',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('arrow.pp','Arrow',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('calendar.pp','Calendar',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('pairsplitter.pas','PairSplitter',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('extdlgs.pas','ExtDlgs',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('dbctrls.pp','DBCtrls',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('dbgrids.pas','DBGrids',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('editbtn.pas','EditBtn',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('actnlist.pas','ActnList',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('stdactns.pas','StdActns',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('dbactns.pas','DBActns',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('filectrl.pp','FileCtrl',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('xmlpropstorage.pas','XMLPropStorage',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('inipropstorage.pas','IniPropStorage',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('chart.pp','Chart',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('colorbox.pas','ColorBox',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('buttonpanel.pas','ButtonPanel',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('lresources.pp','LResources',pftUnit,[pffHasRegisterProc],cpBase);
|
|
||||||
AddFile('lclstrconsts.pas','LCLStrConsts',pftUnit,[],cpBase);
|
|
||||||
// increase priority by one, so that the LCL components are inserted to the
|
// increase priority by one, so that the LCL components are inserted to the
|
||||||
// left in the palette
|
// left in the palette
|
||||||
for i:=0 to FileCount-1 do
|
for i:=0 to FileCount-1 do
|
||||||
|
110
packager/pkgfileslcl.inc
Normal file
110
packager/pkgfileslcl.inc
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
{%MainUnit packagesystem.pas}
|
||||||
|
// automatically created by tools/update_pkgfileslcl_inc.sh
|
||||||
|
AddFile('actnlist.pas','ActnList',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('alllclunits.pp','AllLCLUnits',pftUnit,[],cpBase);
|
||||||
|
AddFile('arrow.pp','Arrow',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('asyncprocess.pp','AsyncProcess',pftUnit,[],cpBase);
|
||||||
|
AddFile('avglvltree.pas','AvgLvlTree',pftUnit,[],cpBase);
|
||||||
|
AddFile('buttonpanel.pas','ButtonPanel',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('buttons.pp','Buttons',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('calendar.pp','Calendar',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('chart.pp','Chart',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('checklst.pas','CheckLst',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('clipbrd.pp','Clipbrd',pftUnit,[],cpBase);
|
||||||
|
AddFile('clistbox.pp','CListBox',pftUnit,[],cpBase);
|
||||||
|
AddFile('colorbox.pas','ColorBox',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('comctrls.pp','ComCtrls',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('commctrl.pp','CommCtrl',pftUnit,[],cpBase);
|
||||||
|
AddFile('controls.pp','Controls',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('customtimer.pas','CustomTimer',pftUnit,[],cpBase);
|
||||||
|
AddFile('dbactns.pp','DBActns',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('dbctrls.pp','DbCtrls',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('dbgrids.pas','DBGrids',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('defaulttranslator.pas','DefaultTranslator',pftUnit,[],cpBase);
|
||||||
|
AddFile('dialogs.pp','Dialogs',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('dirsel.pas','DirSel',pftUnit,[],cpBase);
|
||||||
|
AddFile('dynamicarray.pas','DynamicArray',pftUnit,[],cpBase);
|
||||||
|
AddFile('dynhasharray.pp','DynHashArray',pftUnit,[],cpBase);
|
||||||
|
AddFile('dynqueue.pas','DynQueue',pftUnit,[],cpBase);
|
||||||
|
AddFile('editbtn.pas','EditBtn',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('extctrls.pp','ExtCtrls',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('extdlgs.pas','ExtDlgs',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('extendedstrings.pas','ExtendedStrings',pftUnit,[],cpBase);
|
||||||
|
AddFile('extgraphics.pas','extgraphics',pftUnit,[],cpBase);
|
||||||
|
AddFile('filectrl.pp','FileCtrl',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('fileutil.pas','FileUtil',pftUnit,[],cpBase);
|
||||||
|
AddFile('forms.pp','Forms',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('fpcadds.pas','FPCAdds',pftUnit,[],cpBase);
|
||||||
|
AddFile('graphics.pp','Graphics',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('graphmath.pp','GraphMath',pftUnit,[],cpBase);
|
||||||
|
AddFile('graphtype.pp','GraphType',pftUnit,[],cpBase);
|
||||||
|
AddFile('grids.pas','Grids',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('helpintfs.pas','HelpIntfs',pftUnit,[],cpBase);
|
||||||
|
AddFile('imglist.pp','ImgList',pftUnit,[],cpBase);
|
||||||
|
AddFile('inipropstorage.pas','IniPropStorage',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('interfacebase.pp','InterfaceBase',pftUnit,[],cpBase);
|
||||||
|
AddFile('intfgraphics.pas','IntfGraphics',pftUnit,[],cpBase);
|
||||||
|
AddFile('lazconfigstorage.pas','LazConfigStorage',pftUnit,[],cpBase);
|
||||||
|
AddFile('lazhelphtml.pas','LazHelpHTML',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('lazhelpintf.pas','LazHelpIntf',pftUnit,[],cpBase);
|
||||||
|
AddFile('lazlinkedlist.pas','LazLinkedList',pftUnit,[],cpBase);
|
||||||
|
AddFile('lclclasses.pp','LCLClasses',pftUnit,[],cpBase);
|
||||||
|
AddFile('lclintf.pas','LCLIntf',pftUnit,[],cpBase);
|
||||||
|
AddFile('lclmemmanager.pas','LCLMemManager',pftUnit,[],cpBase);
|
||||||
|
AddFile('lclmessageglue.pas','LCLMessageGlue',pftUnit,[],cpBase);
|
||||||
|
AddFile('lclproc.pas','LCLProc',pftUnit,[],cpBase);
|
||||||
|
AddFile('lclrescache.pas','LCLResCache',pftUnit,[],cpBase);
|
||||||
|
AddFile('lclstrconsts.pas','LCLStrConsts',pftUnit,[],cpBase);
|
||||||
|
AddFile('lcltype.pp','LCLType',pftUnit,[],cpBase);
|
||||||
|
AddFile('lconv.pas','LConv',pftUnit,[],cpBase);
|
||||||
|
AddFile('ldockctrledit.pas','LDockCtrlEdit',pftUnit,[],cpBase);
|
||||||
|
AddFile('ldockctrl.pas','LDockCtrl',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('ldocktree.pas','LDockTree',pftUnit,[],cpBase);
|
||||||
|
AddFile('lmessages.pp','LMessages',pftUnit,[],cpBase);
|
||||||
|
AddFile('lresources.pp','LResources',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('maps.pp','maps',pftUnit,[],cpBase);
|
||||||
|
AddFile('maskedit.pp','MaskEdit',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('menus.pp','Menus',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('nonwin32/messages.pp','Messages',pftUnit,[],cpBase);
|
||||||
|
AddFile('pairsplitter.pas','PairSplitter',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('postscriptcanvas.pas','PostscriptCanvas',pftUnit,[],cpBase);
|
||||||
|
AddFile('postscriptprinter.pas','PostScriptPrinter',pftUnit,[],cpBase);
|
||||||
|
AddFile('printers.pas','Printers',pftUnit,[],cpBase);
|
||||||
|
AddFile('propertystorage.pas','PropertyStorage',pftUnit,[],cpBase);
|
||||||
|
AddFile('spin.pp','Spin',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('stdactns.pas','StdActns',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('stdctrls.pp','StdCtrls',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
AddFile('stringhashlist.pas','StringHashList',pftUnit,[],cpBase);
|
||||||
|
AddFile('textstrings.pas','TextStrings',pftUnit,[],cpBase);
|
||||||
|
AddFile('toolwin.pp','Toolwin',pftUnit,[],cpBase);
|
||||||
|
AddFile('translations.pas','Translations',pftUnit,[],cpBase);
|
||||||
|
AddFile('utrace.pp','UTrace',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsactnlist.pp','WSActnList',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsarrow.pp','WSArrow',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsbuttons.pp','WSButtons',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wscalendar.pp','WSCalendar',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wschecklst.pp','WSCheckLst',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsclistbox.pp','WSCListBox',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wscomctrls.pp','WSComCtrls',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wscontrols.pp','WSControls',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsdbctrls.pp','WSDbCtrls',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsdbgrids.pp','WSDBGrids',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsdialogs.pp','WSDialogs',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsdirsel.pp','WSDirSel',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wseditbtn.pp','WSEditBtn',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsextctrls.pp','WSExtCtrls',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsextdlgs.pp','WSExtDlgs',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsfilectrl.pp','WSFileCtrl',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsforms.pp','WSForms',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsgrids.pp','WSGrids',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsimglist.pp','WSImgList',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wslclclasses.pp','WSLCLClasses',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsmaskedit.pp','WSMaskEdit',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsmenus.pp','WSMenus',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wspairsplitter.pp','WSPairSplitter',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsproc.pp','WSProc',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsspin.pp','WSSpin',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wsstdctrls.pp','WSStdCtrls',pftUnit,[],cpBase);
|
||||||
|
AddFile('widgetset/wstoolwin.pp','WSToolwin',pftUnit,[],cpBase);
|
||||||
|
AddFile('xmlpropstorage.pas','XMLPropStorage',pftUnit,[pffHasRegisterProc],cpBase);
|
||||||
|
|
47
tools/update_pkgfileslcl_inc.sh
Executable file
47
tools/update_pkgfileslcl_inc.sh
Executable file
@ -0,0 +1,47 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Author: Mattias Gaertner
|
||||||
|
#
|
||||||
|
# Abstract:
|
||||||
|
# Updates the list of files of the LCL package:
|
||||||
|
# lazarus/packager/pkgfileslcl.inc
|
||||||
|
|
||||||
|
#set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# find the lazarus directory
|
||||||
|
PrgPath=$0
|
||||||
|
if [ "${PrgPath:0:1}" != "/" ]; then
|
||||||
|
# path does not start with / => relative
|
||||||
|
PrgPath=$(pwd)/$PrgPath
|
||||||
|
fi
|
||||||
|
LazarusDir=${PrgPath%/tools/*}/
|
||||||
|
|
||||||
|
OutputFile=$LazarusDir"packager/pkgfileslcl.inc"
|
||||||
|
echo "{%MainUnit packagesystem.pas}" > $OutputFile
|
||||||
|
echo "// automatically created by tools/update_pkgfileslcl_inc.sh" >> $OutputFile
|
||||||
|
|
||||||
|
# cd into the lcl directory
|
||||||
|
cd $LazarusDir/lcl
|
||||||
|
|
||||||
|
# scan every LCL .pas/.pp file
|
||||||
|
for file in $(ls -1 *.pp *.pas widgetset/*.pp nonwin32/*.pp); do
|
||||||
|
echo $file
|
||||||
|
# get unit name
|
||||||
|
Unitname=$(egrep -i '^unit .*;' $file | sed -e 's/unit \+//I' -e 's/;.*//')
|
||||||
|
if [ -n "$Unitname" ]; then
|
||||||
|
# check if 'procedure Register;' exists
|
||||||
|
Flags=""
|
||||||
|
if [ -n "$(egrep -i 'procedure register;' $file)" ]; then
|
||||||
|
Flags="pffHasRegisterProc"
|
||||||
|
fi
|
||||||
|
Line="AddFile('"$file"','"$Unitname"',pftUnit,["$Flags"],cpBase);"
|
||||||
|
echo $Line >> $OutputFile
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "" >> $OutputFile
|
||||||
|
|
||||||
|
# end.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user