mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 01:19:29 +02:00
fixed message jumping
git-svn-id: trunk@4963 -
This commit is contained in:
parent
79edaaaf23
commit
642d5809ae
@ -31,9 +31,9 @@ unit DebugOptionsFrm;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
Classes, SysUtils, TypInfo, LResources, Forms, Controls, Graphics, Dialogs,
|
||||||
StdCtrls, Buttons, ComCtrls, Menus, Spin, CheckLst,
|
ExtCtrls, StdCtrls, Buttons, ComCtrls, Menus, Spin, CheckLst,
|
||||||
ObjectInspector, LazarusIDEStrConsts, FileProcs, InputHistory,
|
PropEdits, ObjectInspector, LazarusIDEStrConsts, FileProcs, InputHistory,
|
||||||
EnvironmentOpts, BaseDebugManager, Debugger, DBGUtils;
|
EnvironmentOpts, BaseDebugManager, Debugger, DBGUtils;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -80,6 +80,7 @@ type
|
|||||||
pgEventLog: TPAGE;
|
pgEventLog: TPAGE;
|
||||||
pgGeneral: TPAGE;
|
pgGeneral: TPAGE;
|
||||||
popSignal: TPOPUPMENU;
|
popSignal: TPOPUPMENU;
|
||||||
|
PropertyGrid: TOIPropertyGrid;
|
||||||
procedure DebuggerOptionsFormCREATE(Sender: TObject);
|
procedure DebuggerOptionsFormCREATE(Sender: TObject);
|
||||||
procedure DebuggerOptionsFormDESTROY(Sender: TObject);
|
procedure DebuggerOptionsFormDESTROY(Sender: TObject);
|
||||||
procedure clbExceptionsCLICK (Sender: TObject );
|
procedure clbExceptionsCLICK (Sender: TObject );
|
||||||
@ -89,10 +90,12 @@ type
|
|||||||
procedure cmdOKCLICK (Sender: TObject );
|
procedure cmdOKCLICK (Sender: TObject );
|
||||||
procedure cmdOpenDebuggerPathCLICK(Sender: TObject);
|
procedure cmdOpenDebuggerPathCLICK(Sender: TObject);
|
||||||
private
|
private
|
||||||
|
ThePropertyEditorHook: TPropertyEditorHook;
|
||||||
FExceptionDeleteList: TStringList;
|
FExceptionDeleteList: TStringList;
|
||||||
FOldDebuggerPathAndParams: string;
|
FOldDebuggerPathAndParams: string;
|
||||||
FDebuggerSpecificComponents: TList;
|
FDebuggerSpecificComponents: TList;
|
||||||
FCurDebuggerClass: TDebuggerClass; // currently shown debugger class
|
FCurDebuggerClass: TDebuggerClass; // currently shown debugger class
|
||||||
|
FCurDebuggerObject: TDebugger; // currently shown debugger object
|
||||||
procedure AddExceptionLine(const AException: TIDEException; AName: String);
|
procedure AddExceptionLine(const AException: TIDEException; AName: String);
|
||||||
procedure AddSignalLine(const ASignal: TIDESignal);
|
procedure AddSignalLine(const ASignal: TIDESignal);
|
||||||
procedure FetchDebuggerClass;
|
procedure FetchDebuggerClass;
|
||||||
@ -188,7 +191,16 @@ procedure TDebuggerOptionsForm.FetchDebuggerSpecificOptions;
|
|||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
AMemo: TMemo;
|
AMemo: TMemo;
|
||||||
|
//var
|
||||||
|
// Selection: TComponentSelectionList;
|
||||||
begin
|
begin
|
||||||
|
{ThePropertyEditorHook.LookupRoot:=FCurDebuggerObject;
|
||||||
|
Selection:=TComponentSelectionList.Create;
|
||||||
|
if FCurDebuggerObject<>nil then
|
||||||
|
Selection.Add(AComponent);
|
||||||
|
PropertyGrid.Selections:=Selection;
|
||||||
|
Selection.Free;}
|
||||||
|
|
||||||
// clear debugger specific options components
|
// clear debugger specific options components
|
||||||
if FDebuggerSpecificComponents=nil then
|
if FDebuggerSpecificComponents=nil then
|
||||||
FDebuggerSpecificComponents:=TList.Create;
|
FDebuggerSpecificComponents:=TList.Create;
|
||||||
@ -239,6 +251,14 @@ begin
|
|||||||
if FCurDebuggerClass = AClass then Exit;
|
if FCurDebuggerClass = AClass then Exit;
|
||||||
FCurDebuggerClass := AClass;
|
FCurDebuggerClass := AClass;
|
||||||
FetchDebuggerSpecificOptions;
|
FetchDebuggerSpecificOptions;
|
||||||
|
// destroy, replace or destroy Debugger instance
|
||||||
|
if (FCurDebuggerObject<>nil)
|
||||||
|
and ((FCurDebuggerClass=nil)
|
||||||
|
or (not (FCurDebuggerObject is FCurDebuggerClass)))
|
||||||
|
then
|
||||||
|
FreeAndNil(FCurDebuggerObject);
|
||||||
|
if (FCurDebuggerObject=nil) and (FCurDebuggerClass<>nil) then
|
||||||
|
FCurDebuggerObject:=FCurDebuggerClass.Create('');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDebuggerOptionsForm.clbExceptionsCLICK (Sender: TObject );
|
procedure TDebuggerOptionsForm.clbExceptionsCLICK (Sender: TObject );
|
||||||
@ -371,6 +391,22 @@ begin
|
|||||||
AddSignalLine(DebugBoss.Signals[n]);
|
AddSignalLine(DebugBoss.Signals[n]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// create the PropertyEditorHook (the interface to the properties)
|
||||||
|
ThePropertyEditorHook:=TPropertyEditorHook.Create;
|
||||||
|
// create the PropertyGrid
|
||||||
|
PropertyGrid:=TOIPropertyGrid.CreateWithParams(Self,ThePropertyEditorHook
|
||||||
|
,[tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkSet{, tkMethod}
|
||||||
|
, tkSString, tkLString, tkAString, tkWString, tkVariant
|
||||||
|
{, tkArray, tkRecord, tkInterface}, tkClass, tkObject, tkWChar, tkBool
|
||||||
|
, tkInt64, tkQWord],
|
||||||
|
25);
|
||||||
|
with PropertyGrid do begin
|
||||||
|
Name:='PropertyGrid';
|
||||||
|
Parent:=gbDebuggerSpecific;
|
||||||
|
Align:=alClient;
|
||||||
|
SplitterX:=120;
|
||||||
|
end;
|
||||||
|
|
||||||
FetchDebuggerClass;
|
FetchDebuggerClass;
|
||||||
|
|
||||||
// Fix designtime changes
|
// Fix designtime changes
|
||||||
@ -381,6 +417,7 @@ procedure TDebuggerOptionsForm.DebuggerOptionsFormDESTROY(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
FreeAndNil(FDebuggerSpecificComponents);
|
FreeAndNil(FDebuggerSpecificComponents);
|
||||||
FreeAndNil(FExceptionDeleteList);
|
FreeAndNil(FExceptionDeleteList);
|
||||||
|
FreeAndNil(FCurDebuggerObject);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -7436,9 +7436,9 @@ begin
|
|||||||
// search relevant message (first error, first fatal)
|
// search relevant message (first error, first fatal)
|
||||||
Index:=0;
|
Index:=0;
|
||||||
while (Index<MaxMessages) do begin
|
while (Index<MaxMessages) do begin
|
||||||
|
CurMsg:=MessagesView.VisibleItems[Index].Msg;
|
||||||
if (TheOutputFilter.GetSourcePosition(
|
if (TheOutputFilter.GetSourcePosition(
|
||||||
MessagesView.VisibleItems[Index].Msg,
|
CurMsg,Filename,CaretXY,MsgType)) then
|
||||||
Filename,CaretXY,MsgType)) then
|
|
||||||
begin
|
begin
|
||||||
if MsgType in [etError,etFatal,etPanic] then break;
|
if MsgType in [etError,etFatal,etPanic] then break;
|
||||||
end;
|
end;
|
||||||
@ -10235,6 +10235,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.688 2003/12/26 15:55:38 mattias
|
||||||
|
fixed message jumping
|
||||||
|
|
||||||
Revision 1.687 2003/12/26 12:36:31 mattias
|
Revision 1.687 2003/12/26 12:36:31 mattias
|
||||||
started a posteriori message filtering
|
started a posteriori message filtering
|
||||||
|
|
||||||
|
@ -319,8 +319,8 @@ begin
|
|||||||
RaiseException('TMessagesView.GetVisibleMessageAt');
|
RaiseException('TMessagesView.GetVisibleMessageAt');
|
||||||
if (FItems.Count<=Index) then
|
if (FItems.Count<=Index) then
|
||||||
RaiseException('TMessagesView.GetVisibleMessageAt');
|
RaiseException('TMessagesView.GetVisibleMessageAt');
|
||||||
Msg:=Items[Index].Msg;
|
Msg:=VisibleItems[Index].Msg;
|
||||||
MsgDirectory:=Items[Index].Directory;
|
MsgDirectory:=VisibleItems[Index].Directory;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMessagesView.BeginBlock;
|
procedure TMessagesView.BeginBlock;
|
||||||
|
@ -298,8 +298,8 @@ type
|
|||||||
procedure SetBounds(aLeft,aTop,aWidth,aHeight:integer); override;
|
procedure SetBounds(aLeft,aTop,aWidth,aHeight:integer); override;
|
||||||
procedure Paint; override;
|
procedure Paint; override;
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
constructor CreateWithParams(AnOwner:TComponent;
|
constructor CreateWithParams(AnOwner: TComponent;
|
||||||
APropertyEditorHook:TPropertyEditorHook; TypeFilter:TTypeKinds;
|
APropertyEditorHook: TPropertyEditorHook; TypeFilter: TTypeKinds;
|
||||||
DefItemHeight: integer);
|
DefItemHeight: integer);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function ConsistencyCheck: integer;
|
function ConsistencyCheck: integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user