Jedi code format: when formating fails, pop up Messages window. Patch by Bruno K

This commit is contained in:
DomingoGP 2024-09-16 21:33:05 +02:00
parent c9260ad82c
commit 43324b497f
3 changed files with 10 additions and 4 deletions

View File

@ -339,6 +339,8 @@ begin
end;
end;
finally
if fcConverter.ConvertError and (IDEMessagesWindow<>nil) then
IDEMessagesWindow.ShowOnTop;
fcConverter.Free;
end;
end;
@ -384,6 +386,8 @@ begin
DiffMergeEditor(srcEditor, outputstr, BlockBegin.Y, BlockEnd.Y);
end;
finally
if fcConverter.ConvertError and (IDEMessagesWindow<>nil) then
IDEMessagesWindow.ShowOnTop;
fcConverter.Free;
end;
end;

View File

@ -382,7 +382,7 @@ begin
begin
lsUnit := psUnit;
if lsUnit = '' then
lsUnit := ExtractFileName(fsFileName);
lsUnit := fsFileName;
fOnStatusMessage(lsUnit, psMessage, peMessageType, piY + fiFirstLineNumber - 1, piX);
end;
end;

View File

@ -35,7 +35,7 @@ interface
uses
Classes, SysUtils,
SrcEditorIntf,
SrcEditorIntf, IDEMsgIntf,
{ local }
Converter, ConvertTypes;
@ -50,7 +50,7 @@ type
fsCurrentUnitName: string;
fiConvertCount: integer;
fOnIncludeFile: TOnIncludeFile;
prOcedure SendStatusMessage(const psUnit, psMessage: string;
procedure SendStatusMessage(const psUnit, psMessage: string;
const peMessageType: TStatusMessageType;
const piY, piX: integer);
@ -129,7 +129,9 @@ begin
WriteToIDE(pciUnit, fcConverter.OutputCode);
SendStatusMessage(pciUnit.FileName, 'Formatted unit', mtProgress, -1, -1);
Inc(fiConvertCount);
end;
end
else if IDEMessagesWindow<>nil then
IDEMessagesWindow.ShowOnTop;
end;
function TEditorConverter.ReadFromIDE(const pcUnit: TSourceEditorInterface): string;