messages: quickfix items in src

git-svn-id: trunk@45290 -
This commit is contained in:
mattias 2014-06-01 18:24:20 +00:00
parent 213a34d083
commit f71773d3f0
3 changed files with 10 additions and 17 deletions

View File

@ -446,7 +446,7 @@ type
DeleteOld: boolean);
procedure ApplySrcChanges(Changes: TETSingleSrcChanges);
procedure ApplyMultiSrcChanges(Changes: TETMultiSrcChanges);
procedure SourceEditorPopup(aSrcEdit: TSourceEditorInterface);
procedure SourceEditorPopup(MarkLine: TSynEditMarkLine);
// message lines
procedure SelectMsgLine(Msg: TMessageLine; DoScroll: boolean);
@ -3742,21 +3742,13 @@ begin
ApplySrcChanges(TETSingleSrcChanges(Node.Data));
end;
procedure TMessagesFrame.SourceEditorPopup(aSrcEdit: TSourceEditorInterface);
procedure TMessagesFrame.SourceEditorPopup(MarkLine: TSynEditMarkLine);
var
LineCol: TPoint;
aSynEdit: TSynEdit;
MarkLine: TSynEditMarkLine;
i: Integer;
Mark: TETMark;
begin
//debugln(['TMessagesFrame.SourceEditorPopup ']);
// get all marks of the current source editor line
aSynEdit:=TSynEdit(aSrcEdit.EditorControl);
if not (aSynEdit is TSynEdit) then exit;
LineCol:=aSrcEdit.CursorScreenXY;
if LineCol.Y>aSynEdit.Lines.Count then exit;
MarkLine:=aSynEdit.Marks.Line[LineCol.Y];
if MarkLine=nil then exit;
IDEQuickFixes.ClearLines;
for i:=0 to MarkLine.Count-1 do begin

View File

@ -33,8 +33,8 @@ interface
uses
Classes, SysUtils, FileUtil, IDEMsgIntf, IDEImagesIntf, IDEExternToolIntf,
LazIDEIntf, SrcEditorIntf, Forms, Controls, Graphics, Dialogs, LCLProc,
etMessageFrame, etSrcEditMarks, etQuickFixes;
LazIDEIntf, SrcEditorIntf, SynEditMarks, Forms, Controls, Graphics, Dialogs,
LCLProc, etMessageFrame, etSrcEditMarks, etQuickFixes;
type
@ -76,7 +76,7 @@ type
const ViewCaption: string=''): TMessageLine; override;
// misc
procedure SourceEditorPopup(aSrcEdit: TSourceEditorInterface);
procedure SourceEditorPopup(MarkLine: TSynEditMarkLine);
// options
procedure ApplyIDEOptions;
@ -156,9 +156,9 @@ begin
LineNumber,Column,ViewCaption);
end;
procedure TMessagesView.SourceEditorPopup(aSrcEdit: TSourceEditorInterface);
procedure TMessagesView.SourceEditorPopup(MarkLine: TSynEditMarkLine);
begin
MessagesFrame1.SourceEditorPopup(aSrcEdit);
MessagesFrame1.SourceEditorPopup(MarkLine);
end;
procedure TMessagesView.Clear;

View File

@ -6409,8 +6409,9 @@ begin
FreeMem(Marks);
end;
{$IFDEF EnableNewExtTools}
if MessagesView<>nil then
MessagesView.SourceEditorPopup(ASrcEdit);
if (EditorCaret.Y<=EditorComp.Lines.Count)
and (MessagesView<>nil) then
MessagesView.SourceEditorPopup(EditorComp.Marks.Line[EditorCaret.Y]);
{$ENDIF}
end;