mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 19:02: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;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
|
if fcConverter.ConvertError and (IDEMessagesWindow<>nil) then
|
||||||
|
IDEMessagesWindow.ShowOnTop;
|
||||||
fcConverter.Free;
|
fcConverter.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -384,6 +386,8 @@ begin
|
|||||||
DiffMergeEditor(srcEditor, outputstr, BlockBegin.Y, BlockEnd.Y);
|
DiffMergeEditor(srcEditor, outputstr, BlockBegin.Y, BlockEnd.Y);
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
|
if fcConverter.ConvertError and (IDEMessagesWindow<>nil) then
|
||||||
|
IDEMessagesWindow.ShowOnTop;
|
||||||
fcConverter.Free;
|
fcConverter.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -382,7 +382,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
lsUnit := psUnit;
|
lsUnit := psUnit;
|
||||||
if lsUnit = '' then
|
if lsUnit = '' then
|
||||||
lsUnit := ExtractFileName(fsFileName);
|
lsUnit := fsFileName;
|
||||||
fOnStatusMessage(lsUnit, psMessage, peMessageType, piY + fiFirstLineNumber - 1, piX);
|
fOnStatusMessage(lsUnit, psMessage, peMessageType, piY + fiFirstLineNumber - 1, piX);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -35,7 +35,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
SrcEditorIntf,
|
SrcEditorIntf, IDEMsgIntf,
|
||||||
{ local }
|
{ local }
|
||||||
Converter, ConvertTypes;
|
Converter, ConvertTypes;
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ type
|
|||||||
fsCurrentUnitName: string;
|
fsCurrentUnitName: string;
|
||||||
fiConvertCount: integer;
|
fiConvertCount: integer;
|
||||||
fOnIncludeFile: TOnIncludeFile;
|
fOnIncludeFile: TOnIncludeFile;
|
||||||
prOcedure SendStatusMessage(const psUnit, psMessage: string;
|
procedure SendStatusMessage(const psUnit, psMessage: string;
|
||||||
const peMessageType: TStatusMessageType;
|
const peMessageType: TStatusMessageType;
|
||||||
const piY, piX: integer);
|
const piY, piX: integer);
|
||||||
|
|
||||||
@ -129,7 +129,9 @@ begin
|
|||||||
WriteToIDE(pciUnit, fcConverter.OutputCode);
|
WriteToIDE(pciUnit, fcConverter.OutputCode);
|
||||||
SendStatusMessage(pciUnit.FileName, 'Formatted unit', mtProgress, -1, -1);
|
SendStatusMessage(pciUnit.FileName, 'Formatted unit', mtProgress, -1, -1);
|
||||||
Inc(fiConvertCount);
|
Inc(fiConvertCount);
|
||||||
end;
|
end
|
||||||
|
else if IDEMessagesWindow<>nil then
|
||||||
|
IDEMessagesWindow.ShowOnTop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEditorConverter.ReadFromIDE(const pcUnit: TSourceEditorInterface): string;
|
function TEditorConverter.ReadFromIDE(const pcUnit: TSourceEditorInterface): string;
|
||||||
|
Loading…
Reference in New Issue
Block a user