mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 23:39:40 +02:00
IDE: show compiling resource lines when error on compiling resources
git-svn-id: trunk@36891 -
This commit is contained in:
parent
a7e8b21e34
commit
641a01066f
@ -148,6 +148,7 @@ type
|
|||||||
procedure DoAddFilteredLine(const s: string; OriginalIndex: integer = -1);
|
procedure DoAddFilteredLine(const s: string; OriginalIndex: integer = -1);
|
||||||
procedure DoAddLastLinkerMessages(SkipLastLine: boolean);
|
procedure DoAddLastLinkerMessages(SkipLastLine: boolean);
|
||||||
procedure DoAddLastAssemblerMessages;
|
procedure DoAddLastAssemblerMessages;
|
||||||
|
procedure DoAddLastCompilingResourceMessages;
|
||||||
function GetCurrentMessageParts: TStrings;
|
function GetCurrentMessageParts: TStrings;
|
||||||
function GetScanners(Index: integer): TIDEMsgScanner;
|
function GetScanners(Index: integer): TIDEMsgScanner;
|
||||||
function GetScannerCount: integer;
|
function GetScannerCount: integer;
|
||||||
@ -691,6 +692,7 @@ function TOutputFilter.ReadFPCompilerLine(const s: string): boolean;
|
|||||||
}
|
}
|
||||||
const
|
const
|
||||||
AsmError = 'Error while assembling';
|
AsmError = 'Error while assembling';
|
||||||
|
CompResError = 'Error while compiling resources';
|
||||||
var i, j, FilenameEndPos: integer;
|
var i, j, FilenameEndPos: integer;
|
||||||
MsgTypeName, Filename, Msg: string;
|
MsgTypeName, Filename, Msg: string;
|
||||||
MsgType: TFPCErrorType;
|
MsgType: TFPCErrorType;
|
||||||
@ -1177,6 +1179,9 @@ begin
|
|||||||
end
|
end
|
||||||
else if copy(s,j+2,length(AsmError))=AsmError then begin
|
else if copy(s,j+2,length(AsmError))=AsmError then begin
|
||||||
DoAddLastAssemblerMessages;
|
DoAddLastAssemblerMessages;
|
||||||
|
end else if copy(s,MessageStartPos,length(CompResError))=CompResError
|
||||||
|
then begin
|
||||||
|
DoAddLastCompilingResourceMessages;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1361,6 +1366,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TOutputFilter.DoAddLastCompilingResourceMessages;
|
||||||
|
const CompResMsg = 'Compiling resource ';
|
||||||
|
var i: integer;
|
||||||
|
begin
|
||||||
|
// read back to 'Compiling resource ' message
|
||||||
|
i:=fOutput.Count-1;
|
||||||
|
while (i>=0) and (LeftStr(fOutput[i].Msg,length(CompResMsg))<>CompResMsg) do
|
||||||
|
dec(i);
|
||||||
|
if i<0 then exit;
|
||||||
|
while (i<fOutput.Count-1) and (LeftStr(fOutput[i].Msg,length(CompResMsg))=CompResMsg)
|
||||||
|
do begin
|
||||||
|
DoAddFilteredLine(fOutput[i].Msg,i);
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TOutputFilter.GetCurrentMessageParts: TStrings;
|
function TOutputFilter.GetCurrentMessageParts: TStrings;
|
||||||
var
|
var
|
||||||
Cnt: LongInt;
|
Cnt: LongInt;
|
||||||
|
Loading…
Reference in New Issue
Block a user