mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 17:39:22 +02:00
IDE: ide internals: show list of external tools
git-svn-id: trunk@52116 -
This commit is contained in:
parent
9e0eaa8431
commit
24ec659920
@ -10,20 +10,20 @@ object IDEInfoDialog: TIDEInfoDialog
|
|||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.5'
|
LCLVersion = '1.7'
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 403
|
Height = 404
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 688
|
Width = 688
|
||||||
ActivePage = HelpTabSheet
|
ActivePage = ExtToolTabSheet
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
TabIndex = 2
|
TabIndex = 3
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object GeneralTabSheet: TTabSheet
|
object GeneralTabSheet: TTabSheet
|
||||||
Caption = 'General'
|
Caption = 'General'
|
||||||
ClientHeight = 372
|
ClientHeight = 375
|
||||||
ClientWidth = 684
|
ClientWidth = 684
|
||||||
object GeneralMemo: TMemo
|
object GeneralMemo: TMemo
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -41,7 +41,7 @@ object IDEInfoDialog: TIDEInfoDialog
|
|||||||
end
|
end
|
||||||
object ModifiedTabSheet: TTabSheet
|
object ModifiedTabSheet: TTabSheet
|
||||||
Caption = 'Modified'
|
Caption = 'Modified'
|
||||||
ClientHeight = 372
|
ClientHeight = 375
|
||||||
ClientWidth = 684
|
ClientWidth = 684
|
||||||
object ModifiedMemo: TMemo
|
object ModifiedMemo: TMemo
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -58,11 +58,11 @@ object IDEInfoDialog: TIDEInfoDialog
|
|||||||
end
|
end
|
||||||
object HelpTabSheet: TTabSheet
|
object HelpTabSheet: TTabSheet
|
||||||
Caption = 'Help'
|
Caption = 'Help'
|
||||||
ClientHeight = 372
|
ClientHeight = 375
|
||||||
ClientWidth = 684
|
ClientWidth = 684
|
||||||
object HelpMemo: TMemo
|
object HelpMemo: TMemo
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 372
|
Height = 375
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 684
|
Width = 684
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@ -73,11 +73,27 @@ object IDEInfoDialog: TIDEInfoDialog
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object ExtToolTabSheet: TTabSheet
|
||||||
|
Caption = 'External Tools'
|
||||||
|
ClientHeight = 375
|
||||||
|
ClientWidth = 684
|
||||||
|
object ExtToolMemo: TMemo
|
||||||
|
Left = 0
|
||||||
|
Height = 375
|
||||||
|
Top = 0
|
||||||
|
Width = 684
|
||||||
|
Align = alClient
|
||||||
|
Lines.Strings = (
|
||||||
|
'ExtToolMemo'
|
||||||
|
)
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object ButtonPanel1: TButtonPanel
|
object ButtonPanel1: TButtonPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 29
|
Height = 28
|
||||||
Top = 415
|
Top = 416
|
||||||
Width = 688
|
Width = 688
|
||||||
OKButton.Name = 'OKButton'
|
OKButton.Name = 'OKButton'
|
||||||
OKButton.DefaultCaption = True
|
OKButton.DefaultCaption = True
|
||||||
|
@ -30,9 +30,11 @@ unit IDEInfoDlg;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls,
|
Classes, SysUtils, LazFileUtils, LazUTF8,
|
||||||
LCLProc, LazFileUtils, LazUTF8, IDEHelpIntf, IDEWindowIntf, LazIDEIntf,
|
CodeToolManager, DefineTemplates,
|
||||||
LazHelpIntf, LazHelpHTML, ButtonPanel, DefineTemplates, CodeToolManager,
|
Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls,
|
||||||
|
LCLProc, ButtonPanel, LazHelpHTML, LazHelpIntf,
|
||||||
|
IDEHelpIntf, IDEWindowIntf, LazIDEIntf, IDEExternToolIntf,
|
||||||
EnvironmentOpts, AboutFrm, LazConf, LazarusIDEStrConsts, Project,
|
EnvironmentOpts, AboutFrm, LazConf, LazarusIDEStrConsts, Project,
|
||||||
SourceEditor, InitialSetupProc, PackageSystem, PackageDefs;
|
SourceEditor, InitialSetupProc, PackageSystem, PackageDefs;
|
||||||
|
|
||||||
@ -42,6 +44,7 @@ type
|
|||||||
|
|
||||||
TIDEInfoDialog = class(TForm)
|
TIDEInfoDialog = class(TForm)
|
||||||
ButtonPanel1: TButtonPanel;
|
ButtonPanel1: TButtonPanel;
|
||||||
|
ExtToolMemo: TMemo;
|
||||||
GeneralMemo: TMemo;
|
GeneralMemo: TMemo;
|
||||||
HelpMemo: TMemo;
|
HelpMemo: TMemo;
|
||||||
ModifiedMemo: TMemo;
|
ModifiedMemo: TMemo;
|
||||||
@ -49,6 +52,7 @@ type
|
|||||||
GeneralTabSheet: TTabSheet;
|
GeneralTabSheet: TTabSheet;
|
||||||
ModifiedTabSheet: TTabSheet;
|
ModifiedTabSheet: TTabSheet;
|
||||||
HelpTabSheet: TTabSheet;
|
HelpTabSheet: TTabSheet;
|
||||||
|
ExtToolTabSheet: TTabSheet;
|
||||||
procedure FormClose(Sender: TObject; var {%H-}CloseAction: TCloseAction);
|
procedure FormClose(Sender: TObject; var {%H-}CloseAction: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
@ -66,10 +70,13 @@ type
|
|||||||
procedure GatherHelpViewers(sl: TStrings);
|
procedure GatherHelpViewers(sl: TStrings);
|
||||||
procedure GatherHelpDB(Prefix: string; const HelpDB: THelpDatabase; const sl: TStrings);
|
procedure GatherHelpDB(Prefix: string; const HelpDB: THelpDatabase; const sl: TStrings);
|
||||||
procedure GatherHelpViewer(Prefix: string; const Viewer: THelpViewer; const sl: TStrings);
|
procedure GatherHelpViewer(Prefix: string; const Viewer: THelpViewer; const sl: TStrings);
|
||||||
|
// external tools
|
||||||
|
procedure GatherExternalTools(sl: TStrings);
|
||||||
public
|
public
|
||||||
procedure UpdateGeneralMemo;
|
procedure UpdateGeneralMemo;
|
||||||
procedure UpdateModifiedMemo;
|
procedure UpdateModifiedMemo;
|
||||||
procedure UpdateHelpMemo;
|
procedure UpdateHelpMemo;
|
||||||
|
procedure UpdateExternalTools;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -103,6 +110,7 @@ begin
|
|||||||
UpdateGeneralMemo;
|
UpdateGeneralMemo;
|
||||||
UpdateModifiedMemo;
|
UpdateModifiedMemo;
|
||||||
UpdateHelpMemo;
|
UpdateHelpMemo;
|
||||||
|
UpdateExternalTools;
|
||||||
PageControl1.PageIndex:=0;
|
PageControl1.PageIndex:=0;
|
||||||
IDEDialogLayoutList.ApplyLayout(Self);
|
IDEDialogLayoutList.ApplyLayout(Self);
|
||||||
end;
|
end;
|
||||||
@ -192,6 +200,43 @@ begin
|
|||||||
sl.Add('');
|
sl.Add('');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TIDEInfoDialog.GatherExternalTools(sl: TStrings);
|
||||||
|
var
|
||||||
|
i, j: Integer;
|
||||||
|
Tool: TAbstractExternalTool;
|
||||||
|
View: TExtToolView;
|
||||||
|
Parser: TExtToolParser;
|
||||||
|
begin
|
||||||
|
sl.Add('External Tools: '+IntToStr(ExternalToolList.Count));
|
||||||
|
for i:=0 to ExternalToolList.Count-1 do begin
|
||||||
|
Tool:=ExternalToolList[i];
|
||||||
|
sl.Add('Tool '+IntToStr(i)+'/'+IntToStr(ExternalToolList.Count)
|
||||||
|
+' ParserCount='+IntToStr(Tool.ParserCount)+' ViewCount='+IntToStr(Tool.ViewCount));
|
||||||
|
sl.Add(' Stage='+dbgs(Tool.Stage));
|
||||||
|
sl.Add(' Process.Active='+dbgs(Tool.Process.Active));
|
||||||
|
sl.Add(' Process.Executable='+AnsiQuotedStr(Tool.Process.Executable,'"'));
|
||||||
|
sl.Add(' Process.CurrentDirectory='+AnsiQuotedStr(Tool.Process.CurrentDirectory,'"'));
|
||||||
|
sl.Add(' Process.Running='+dbgs(Tool.Process.Running));
|
||||||
|
sl.Add(' CmdLineParams='+AnsiQuotedStr(Tool.CmdLineParams,'"'));
|
||||||
|
sl.Add(' ErrorMessage='+AnsiQuotedStr(Tool.ErrorMessage,'"'));
|
||||||
|
sl.Add(' ExitStatus='+IntToStr(Tool.ExitStatus));
|
||||||
|
sl.Add(' Terminated='+dbgs(Tool.Terminated));
|
||||||
|
sl.Add(' ReadStdOutBeforeErr='+dbgs(Tool.ReadStdOutBeforeErr));
|
||||||
|
sl.Add(' WorkerDirectory='+AnsiQuotedStr(Tool.WorkerDirectory,'"'));
|
||||||
|
|
||||||
|
for j:=0 to Tool.ViewCount-1 do begin
|
||||||
|
Parser:=Tool.Parsers[j];
|
||||||
|
sl.Add(' Parser '+IntToStr(j)+'/'+IntToStr(Tool.ParserCount)+' '+Parser.ClassName);
|
||||||
|
end;
|
||||||
|
|
||||||
|
for j:=0 to Tool.ViewCount-1 do begin
|
||||||
|
View:=Tool.Views[j];
|
||||||
|
sl.Add(' View '+IntToStr(j)+'/'+IntToStr(Tool.ViewCount)+' '+AnsiQuotedStr(View.Caption,'"'));
|
||||||
|
end;
|
||||||
|
sl.Add('');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TIDEInfoDialog.GatherIDEVersion(sl: TStrings);
|
procedure TIDEInfoDialog.GatherIDEVersion(sl: TStrings);
|
||||||
begin
|
begin
|
||||||
sl.Add('Lazarus version: '+GetLazarusVersionString);
|
sl.Add('Lazarus version: '+GetLazarusVersionString);
|
||||||
@ -439,5 +484,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TIDEInfoDialog.UpdateExternalTools;
|
||||||
|
var
|
||||||
|
sl: TStringList;
|
||||||
|
begin
|
||||||
|
sl:=TStringList.Create;
|
||||||
|
try
|
||||||
|
GatherExternalTools(sl);
|
||||||
|
ExtToolMemo.Lines.Assign(sl);
|
||||||
|
finally
|
||||||
|
sl.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user