mirror of https://gitlab.com/basile.b/dexed.git
added basic process input handling to a project running within the IDE and redirected to the IDE
This commit is contained in:
parent
5c64186520
commit
6411f4fd65
|
@ -296,7 +296,7 @@
|
|||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="ce_staticexplorer"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
<Unit24>
|
||||
<Filename Value="..\src\ce_symstring.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="ce_symstring"/>
|
||||
|
@ -306,7 +306,7 @@
|
|||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="ce_synmemo"/>
|
||||
</Unit25>
|
||||
<Unit26>
|
||||
<Unit26>
|
||||
<Filename Value="..\src\ce_tools.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="ce_tools"/>
|
||||
|
|
|
@ -178,7 +178,7 @@ end;
|
|||
procedure TCECdbWidget.cdbOutputToGui;
|
||||
var
|
||||
lst: TStringList;
|
||||
cnt: Integer;
|
||||
str: string;
|
||||
begin
|
||||
if fCdbProc = nil then
|
||||
exit;
|
||||
|
@ -186,8 +186,8 @@ begin
|
|||
lst := TStringList.Create;
|
||||
try
|
||||
processOutputToStrings(fCdbProc, lst);
|
||||
for cnt := 0 to lst.Count-1 do
|
||||
lstCdbOut.AddItem(lst.Strings[cnt], nil);
|
||||
for str in lst do
|
||||
lstCdbOut.AddItem(str, nil);
|
||||
lstCdbOut.Items[lstCdbOut.Items.Count-1].MakeVisible(true);
|
||||
finally
|
||||
lst.Free;
|
||||
|
|
|
@ -274,6 +274,7 @@ type
|
|||
//
|
||||
procedure openFile(const aFilename: string);
|
||||
//
|
||||
property processInput: TCEProcInputWidget read fPrInpWidg;
|
||||
property WidgetList: TCEWidgetList read fWidgList;
|
||||
end;
|
||||
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
inherited CEProcInputWidget: TCEProcInputWidget
|
||||
Left = 1427
|
||||
Left = 868
|
||||
Height = 61
|
||||
Top = 335
|
||||
Width = 481
|
||||
Width = 608
|
||||
Caption = 'Process input'
|
||||
ClientHeight = 61
|
||||
ClientWidth = 481
|
||||
ClientWidth = 608
|
||||
inherited Back: TPanel
|
||||
Height = 61
|
||||
Width = 481
|
||||
Width = 608
|
||||
ClientHeight = 61
|
||||
ClientWidth = 481
|
||||
ClientWidth = 608
|
||||
inherited Content: TPanel
|
||||
Height = 61
|
||||
Width = 481
|
||||
Width = 608
|
||||
ClientHeight = 61
|
||||
ClientWidth = 481
|
||||
ClientWidth = 608
|
||||
object txtInp: TEdit[0]
|
||||
Left = 4
|
||||
Height = 27
|
||||
Top = 30
|
||||
Width = 394
|
||||
Width = 521
|
||||
Align = alClient
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Top = 2
|
||||
|
@ -30,7 +30,7 @@ inherited CEProcInputWidget: TCEProcInputWidget
|
|||
TabOrder = 0
|
||||
end
|
||||
object btnSend: TButton[1]
|
||||
Left = 402
|
||||
Left = 529
|
||||
Height = 27
|
||||
Top = 30
|
||||
Width = 75
|
||||
|
@ -46,7 +46,7 @@ inherited CEProcInputWidget: TCEProcInputWidget
|
|||
Left = 4
|
||||
Height = 22
|
||||
Top = 4
|
||||
Width = 473
|
||||
Width = 600
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 4
|
||||
BorderStyle = sbsSunken
|
||||
|
|
|
@ -74,6 +74,12 @@ end;
|
|||
{$REGION Process input things --------------------------------------------------}
|
||||
procedure TCEProcInputWidget.setProc(const aValue: TProcess);
|
||||
begin
|
||||
// TODO: process list
|
||||
// TODO: each TCESynMemo must have its own runnable TProcess
|
||||
// currently they share the CEMainForm.fRunProc variable.
|
||||
if fProc <> nil then
|
||||
fProc.Terminate(1);
|
||||
|
||||
txtExeName.Caption := 'no process';
|
||||
fProc := nil;
|
||||
if aValue = nil then
|
||||
|
|
|
@ -90,7 +90,7 @@ type
|
|||
implementation
|
||||
|
||||
uses
|
||||
ce_interfaces, controls, dialogs, ce_symstring, ce_libman;
|
||||
ce_interfaces, controls, dialogs, ce_symstring, ce_libman, ce_main;
|
||||
|
||||
constructor TCEProject.create(aOwner: TComponent);
|
||||
begin
|
||||
|
@ -581,6 +581,7 @@ begin
|
|||
if poUsePipes in fRunner.Options then begin
|
||||
fRunner.OnReadData := @runProcOutput;
|
||||
fRunner.OnTerminate := @runProcOutput;
|
||||
CEMainForm.processInput.process := fRunner;
|
||||
end;
|
||||
fRunner.Execute;
|
||||
//
|
||||
|
@ -603,6 +604,10 @@ begin
|
|||
finally
|
||||
lst.Free;
|
||||
end;
|
||||
//
|
||||
if not proc.Active then
|
||||
if CEMainForm.processInput.process = proc then
|
||||
CEMainForm.processInput.process := nil;
|
||||
end;
|
||||
|
||||
procedure TCEProject.compProcOutput(proc: TProcess);
|
||||
|
|
|
@ -22,7 +22,7 @@ type
|
|||
//fShortcut: string;
|
||||
fLogMessager: TCELogMessageSubject;
|
||||
procedure setParameters(const aValue: TStringList);
|
||||
procedure processOUtput(sender: TObject);
|
||||
procedure processOutput(sender: TObject);
|
||||
published
|
||||
property toolAlias: string read fToolAlias write fToolAlias;
|
||||
property options: TProcessOptions read fOpts write fOpts;
|
||||
|
|
Loading…
Reference in New Issue