mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-26 19:43:48 +02:00
LazLogger: IdeLogger
git-svn-id: trunk@35331 -
This commit is contained in:
parent
78ca2e4f3b
commit
6963a31c27
5
.gitattributes
vendored
5
.gitattributes
vendored
@ -10,6 +10,10 @@ components/IdeInspector/ideinspector.lpk svneol=native#text/xml
|
||||
components/IdeInspector/ideinspector.pas svneol=native#text/pascal
|
||||
components/IdeInspector/maininspector.lfm svneol=native#text/plain
|
||||
components/IdeInspector/maininspector.pas svneol=native#text/pascal
|
||||
components/IdeLazLogger/idelazlogger.lpk svneol=native#text/pascal
|
||||
components/IdeLazLogger/idelazlogger.pas svneol=native#text/pascal
|
||||
components/IdeLazLogger/idelogger.lfm svneol=native#text/pascal
|
||||
components/IdeLazLogger/idelogger.pas svneol=native#text/pascal
|
||||
components/README.txt svneol=native#text/plain
|
||||
components/aggpas/Agg2DDemo.dpr svneol=native#text/plain
|
||||
components/aggpas/aa_demo.dpr svneol=native#text/plain
|
||||
@ -6068,6 +6072,7 @@ packager/globallinks/lazcustforms-1.lpl svneol=native#text/plain
|
||||
packager/globallinks/lazdaemon-0.9.9.lpl svneol=native#text/plain
|
||||
packager/globallinks/lazdatadict-0.lpl svneol=native#text/plain
|
||||
packager/globallinks/lazdbexport-1.lpl svneol=native#text/plain
|
||||
packager/globallinks/lazidelogger-1v0.lpl svneol=native#text/plain
|
||||
packager/globallinks/lazmouseandkeyinput-0.1.lpl svneol=native#text/plain
|
||||
packager/globallinks/lazmrumenu-1.lpl svneol=native#text/plain
|
||||
packager/globallinks/lazopenglcontext-0.0.1.lpl svneol=native#text/plain
|
||||
|
43
components/IdeLazLogger/idelazlogger.lpk
Normal file
43
components/IdeLazLogger/idelazlogger.lpk
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="IdeLazLogger"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<MsgFileName Value=""/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Version Major="1"/>
|
||||
<Files Count="1">
|
||||
<Item1>
|
||||
<Filename Value="idelogger.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="idelogger"/>
|
||||
</Item1>
|
||||
</Files>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
21
components/IdeLazLogger/idelazlogger.pas
Normal file
21
components/IdeLazLogger/idelazlogger.pas
Normal file
@ -0,0 +1,21 @@
|
||||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit IdeLazLogger;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
idelogger, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('idelogger', @idelogger.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('IdeLazLogger', @Register);
|
||||
end.
|
61
components/IdeLazLogger/idelogger.lfm
Normal file
61
components/IdeLazLogger/idelogger.lfm
Normal file
@ -0,0 +1,61 @@
|
||||
object IdeLoggerForm: TIdeLoggerForm
|
||||
Left = 371
|
||||
Height = 240
|
||||
Top = 285
|
||||
Width = 320
|
||||
Caption = 'IdeLoggerForm'
|
||||
ClientHeight = 240
|
||||
ClientWidth = 320
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
LCLVersion = '0.9.31'
|
||||
object PageControl1: TPageControl
|
||||
Left = 0
|
||||
Height = 194
|
||||
Top = 0
|
||||
Width = 320
|
||||
ActivePage = TabSheet1
|
||||
Align = alClient
|
||||
ShowTabs = False
|
||||
TabIndex = 0
|
||||
TabOrder = 0
|
||||
object TabSheet1: TTabSheet
|
||||
Caption = 'TabSheet1'
|
||||
ClientHeight = 186
|
||||
ClientWidth = 312
|
||||
object CheckLogGroups: TCheckListBox
|
||||
Left = 0
|
||||
Height = 186
|
||||
Top = 0
|
||||
Width = 312
|
||||
Align = alClient
|
||||
ItemHeight = 0
|
||||
OnClickCheck = CheckLogGroupsClickCheck
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
object ButtonPanel1: TButtonPanel
|
||||
Left = 6
|
||||
Height = 34
|
||||
Top = 200
|
||||
Width = 308
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
OKButton.OnClick = OKButtonClick
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.Caption = '&Apply'
|
||||
HelpButton.DefaultCaption = False
|
||||
HelpButton.Enabled = False
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.Caption = '&Apply'
|
||||
CloseButton.DefaultCaption = False
|
||||
CloseButton.Enabled = False
|
||||
CloseButton.OnClick = CloseButtonClick
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.DefaultCaption = True
|
||||
CancelButton.OnClick = CancelButtonClick
|
||||
TabOrder = 1
|
||||
ShowButtons = [pbOK, pbCancel, pbClose]
|
||||
end
|
||||
end
|
120
components/IdeLazLogger/idelogger.pas
Normal file
120
components/IdeLazLogger/idelogger.pas
Normal file
@ -0,0 +1,120 @@
|
||||
unit idelogger;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, ButtonPanel,
|
||||
Buttons, CheckLst, IDEIntf, MenuIntf, LazLogger;
|
||||
|
||||
type
|
||||
|
||||
{ TIdeLoggerForm }
|
||||
|
||||
TIdeLoggerForm = class(TForm)
|
||||
ButtonPanel1: TButtonPanel;
|
||||
CheckLogGroups: TCheckListBox;
|
||||
PageControl1: TPageControl;
|
||||
TabSheet1: TTabSheet;
|
||||
procedure CancelButtonClick(Sender: TObject);
|
||||
procedure CheckLogGroupsClickCheck(Sender: TObject);
|
||||
procedure CloseButtonClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure OKButtonClick(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
procedure DoApply;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
IdeLoggerForm: TIdeLoggerForm;
|
||||
|
||||
resourcestring
|
||||
IdeLoggerMenuCaption = 'Logging ...';
|
||||
IdeLoggerCaption = 'Logging';
|
||||
IdeLoggerApply = '&Apply';
|
||||
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TIdeLoggerForm }
|
||||
|
||||
procedure TIdeLoggerForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
ButtonPanel1.CloseButton.Caption := IdeLoggerApply;
|
||||
ButtonPanel1.CloseButton.Kind := bkCustom;
|
||||
ButtonPanel1.CloseButton.OnClick := @CloseButtonClick;
|
||||
Caption := IdeLoggerCaption;
|
||||
end;
|
||||
|
||||
procedure TIdeLoggerForm.CloseButtonClick(Sender: TObject);
|
||||
begin
|
||||
DoApply;
|
||||
end;
|
||||
|
||||
procedure TIdeLoggerForm.CheckLogGroupsClickCheck(Sender: TObject);
|
||||
begin
|
||||
ButtonPanel1.CloseButton.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TIdeLoggerForm.CancelButtonClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TIdeLoggerForm.FormShow(Sender: TObject);
|
||||
var
|
||||
i, j: Integer;
|
||||
e: PLazLoggerLogGroup;
|
||||
begin
|
||||
CheckLogGroups.Clear;
|
||||
for i := 0 to DebugLogger.LogGroupList.Count - 1 do begin
|
||||
e := DebugLogger.LogGroupList[i];
|
||||
if lgfAddedByParamParser in e^.Flags then continue;
|
||||
j := CheckLogGroups.Items.Add(DebugLogger.LogGroupList[i]^.ConfigName);
|
||||
CheckLogGroups.Checked[j] := e^.Enabled;
|
||||
end;
|
||||
ButtonPanel1.CloseButton.Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TIdeLoggerForm.OKButtonClick(Sender: TObject);
|
||||
begin
|
||||
DoApply;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TIdeLoggerForm.DoApply;
|
||||
var
|
||||
i, j: Integer;
|
||||
e: PLazLoggerLogGroup;
|
||||
begin
|
||||
for i := 0 to DebugLogger.LogGroupList.Count - 1 do begin
|
||||
e := DebugLogger.LogGroupList[i];
|
||||
if lgfAddedByParamParser in e^.Flags then continue;
|
||||
j := CheckLogGroups.Items.IndexOf(e^.ConfigName);
|
||||
if (j >= 0) then
|
||||
e^.Enabled := CheckLogGroups.Checked[j];
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure IDELoggerMenuClicked(Sender: TObject);
|
||||
begin
|
||||
IdeLoggerForm.Show;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
IdeLoggerForm := TIdeLoggerForm.Create(Application);
|
||||
RegisterIDEMenuCommand(itmSecondaryTools, 'mnuIdeLogger', IdeLoggerMenuCaption, nil,
|
||||
@IDELoggerMenuClicked);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
1
packager/globallinks/lazidelogger-1v0.lpl
Normal file
1
packager/globallinks/lazidelogger-1v0.lpl
Normal file
@ -0,0 +1 @@
|
||||
$(LazarusDir)/components/lazidelogger/lazidelogger.lpk
|
Loading…
Reference in New Issue
Block a user