IDE: fpc message parser: hide status message compiling module

git-svn-id: trunk@45175 -
This commit is contained in:
mattias 2014-05-25 18:19:34 +00:00
parent ec07f96b0c
commit b9c7913104
2 changed files with 22 additions and 14 deletions

View File

@ -179,6 +179,7 @@ type
procedure InitReading; override; // called if process started, before first line (worker thread)
procedure Done; override; // called after process stopped (worker thread)
procedure ReadLine(Line: string; OutputIndex: integer; var Handled: boolean); override;
procedure AddMsgLine(MsgLine: TMessageLine); override;
procedure ImproveMessages(aSynchronized: boolean); override;
function GetFPCMsgIDPattern(MsgID: integer): string; override;
class function IsSubTool(const SubTool: string): boolean; override;
@ -1199,8 +1200,6 @@ begin
MsgLine.SubTool:=SubToolFPC;
MsgLine.Msg:=p;
MsgLine.TranslatedMsg:=TranslatedMsg;
if IsMsgID(MsgLine,FPCMsgIDThereWereErrorsCompiling,fMsgItemThereWereErrorsCompiling) then
MsgLine.Urgency:=mluVerbose;
AddMsgLine(MsgLine);
end;
@ -2127,6 +2126,13 @@ begin
Handled:=false;
end;
procedure TIDEFPCParser.AddMsgLine(MsgLine: TMessageLine);
begin
if IsMsgID(MsgLine,FPCMsgIDThereWereErrorsCompiling,fMsgItemThereWereErrorsCompiling) then
MsgLine.Urgency:=mluVerbose;
inherited AddMsgLine(MsgLine);
end;
function TIDEFPCParser.LongenFilename(MsgLine: TMessageLine; aFilename: string
): string;
var

View File

@ -1090,19 +1090,21 @@ begin
// apply pending src changes
OldUpdateSortedSrcPos:=Lines.UpdateSortedSrcPos;
Lines.UpdateSortedSrcPos:=false;
try
for i:=OldLineCount to Lines.Count-1 do begin
MsgLine:=Lines[i];
//debugln(['TLMsgWndView.FetchAllPending ',i,' ',MsgLine.Msg]);
Line:=MsgLine.Line;
Col:=MsgLine.Column;
FPendingChanges.AdaptCaret(MsgLine.GetFullFilename,Line,Col,
mlfLeftToken in MsgLine.Flags);
MsgLine.SetSourcePosition(MsgLine.Filename,Line,Col);
if FPendingChanges.Count>0 then begin
Lines.UpdateSortedSrcPos:=false;
try
for i:=OldLineCount to Lines.Count-1 do begin
MsgLine:=Lines[i];
//debugln(['TLMsgWndView.FetchAllPending ',i,' ',MsgLine.Msg]);
Line:=MsgLine.Line;
Col:=MsgLine.Column;
FPendingChanges.AdaptCaret(MsgLine.GetFullFilename,Line,Col,
mlfLeftToken in MsgLine.Flags);
MsgLine.SetSourcePosition(MsgLine.Filename,Line,Col);
end;
finally
Lines.UpdateSortedSrcPos:=OldUpdateSortedSrcPos;
end;
finally
Lines.UpdateSortedSrcPos:=OldUpdateSortedSrcPos;
end;
end;