Jedi code format: when formating fails, pop up Messages window improved, Issue #41146. Based on patch by Bruno K.

This commit is contained in:
DomingoGP 2024-09-17 18:51:32 +02:00
parent e5159ea7a2
commit 7a0867281e
2 changed files with 11 additions and 4 deletions

View File

@ -80,6 +80,8 @@ type
procedure DoRegistrySettings(Sender: TObject);
procedure DoFormatSettings(Sender: TObject);
procedure DoAbout(Sender: TObject);
class procedure ShowIdeMessages;
end;
@ -340,7 +342,7 @@ begin
end;
finally
if fcConverter.ConvertError and (IDEMessagesWindow<>nil) then
IDEMessagesWindow.ShowOnTop;
ShowIdeMessages;
fcConverter.Free;
end;
end;
@ -387,7 +389,7 @@ begin
end;
finally
if fcConverter.ConvertError and (IDEMessagesWindow<>nil) then
IDEMessagesWindow.ShowOnTop;
ShowIdeMessages;
fcConverter.Free;
end;
end;
@ -404,6 +406,11 @@ begin
end;
end;
class procedure TJcfIdeMain.ShowIdeMessages;
begin
LazarusIDE.DoShowMessagesView({PutOnTop} True);
end;
procedure TJcfIdeMain.DoRegistrySettings(Sender: TObject);
var
lcAbout: TfmRegistrySettings;

View File

@ -85,7 +85,7 @@ implementation
uses
{ local }
JcfLog, JcfRegistrySettings, diffmerge, jcfbaseConsts;
JcfLog, JcfRegistrySettings, diffmerge, jcfbaseConsts, JcfIdeMain;
constructor TEditorConverter.Create;
begin
@ -131,7 +131,7 @@ begin
Inc(fiConvertCount);
end
else if IDEMessagesWindow<>nil then
IDEMessagesWindow.ShowOnTop;
TJcfIdeMain.ShowIdeMessages;
end;
function TEditorConverter.ReadFromIDE(const pcUnit: TSourceEditorInterface): string;