mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 14:29:31 +02:00
Jedi code format: when formating fails, pop up Messages window. Patch by Bruno K
This commit is contained in:
parent
c9260ad82c
commit
43324b497f
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user