mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 07:39:28 +01:00
ide: rename "Debug Events" to "Event Log", simplify Event log form - remove checkgroup - this options can be set in the options dialog, workaround listview column autosize
git-svn-id: trunk@24775 -
This commit is contained in:
parent
ffee9b5bd4
commit
7693e5163a
@ -1,62 +1,28 @@
|
|||||||
inherited DbgEventsForm: TDbgEventsForm
|
inherited DbgEventsForm: TDbgEventsForm
|
||||||
Left = 514
|
Left = 514
|
||||||
Height = 348
|
Height = 208
|
||||||
Top = 228
|
Top = 368
|
||||||
Width = 577
|
Width = 577
|
||||||
ActiveControl = ckgFilter.CheckBox0
|
ClientHeight = 208
|
||||||
ClientHeight = 348
|
|
||||||
ClientWidth = 577
|
ClientWidth = 577
|
||||||
object ckgFilter: TCheckGroup[0]
|
object lstFilteredEvents: TListView[0]
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 48
|
Height = 208
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 577
|
Width = 577
|
||||||
Align = alTop
|
|
||||||
AutoFill = True
|
|
||||||
AutoSize = True
|
|
||||||
ChildSizing.LeftRightSpacing = 6
|
|
||||||
ChildSizing.TopBottomSpacing = 1
|
|
||||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
|
||||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
|
||||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
|
||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
|
||||||
ChildSizing.Layout = cclTopToBottomThenLeftToRight
|
|
||||||
ChildSizing.ControlsPerLine = 2
|
|
||||||
Color = clForm
|
|
||||||
ColumnLayout = clVerticalThenHorizontal
|
|
||||||
Columns = 4
|
|
||||||
Items.Strings = (
|
|
||||||
'Breakpoint'
|
|
||||||
'Process'
|
|
||||||
'Thread'
|
|
||||||
'Module'
|
|
||||||
'Output'
|
|
||||||
'Window'
|
|
||||||
'Debugger'
|
|
||||||
)
|
|
||||||
OnItemClick = ckgFilterItemClick
|
|
||||||
ParentColor = False
|
|
||||||
TabOrder = 0
|
|
||||||
Data = {
|
|
||||||
0700000002020202020202
|
|
||||||
}
|
|
||||||
end
|
|
||||||
object lstFilteredEvents: TListView[1]
|
|
||||||
Left = 0
|
|
||||||
Height = 300
|
|
||||||
Top = 48
|
|
||||||
Width = 577
|
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
|
Width = 100
|
||||||
end>
|
end>
|
||||||
ItemIndex = -1
|
ItemIndex = -1
|
||||||
ShowColumnHeaders = False
|
ShowColumnHeaders = False
|
||||||
SmallImages = imlMain
|
SmallImages = imlMain
|
||||||
TabOrder = 1
|
TabOrder = 0
|
||||||
ViewStyle = vsReport
|
ViewStyle = vsReport
|
||||||
|
OnResize = lstFilteredEventsResize
|
||||||
end
|
end
|
||||||
object imlMain: TImageList[2]
|
object imlMain: TImageList[1]
|
||||||
left = 199
|
left = 199
|
||||||
top = 232
|
top = 232
|
||||||
Bitmap = {
|
Bitmap = {
|
||||||
|
|||||||
@ -37,15 +37,12 @@ uses
|
|||||||
Debugger, DebuggerDlg, LazarusIDEStrConsts, EnvironmentOpts;
|
Debugger, DebuggerDlg, LazarusIDEStrConsts, EnvironmentOpts;
|
||||||
|
|
||||||
type
|
type
|
||||||
TDBGEventCategories = set of TDBGEventCategory;
|
|
||||||
|
|
||||||
{ TDbgEventsForm }
|
{ TDbgEventsForm }
|
||||||
|
|
||||||
TDbgEventsForm = class(TDebuggerDlg)
|
TDbgEventsForm = class(TDebuggerDlg)
|
||||||
ckgFilter: TCheckGroup;
|
|
||||||
imlMain: TImageList;
|
imlMain: TImageList;
|
||||||
lstFilteredEvents: TListView;
|
lstFilteredEvents: TListView;
|
||||||
procedure ckgFilterItemClick(Sender: TObject; Index: integer);
|
procedure lstFilteredEventsResize(Sender: TObject);
|
||||||
private
|
private
|
||||||
FEvents: TStringList;
|
FEvents: TStringList;
|
||||||
FFilter: TDBGEventCategories;
|
FFilter: TDBGEventCategories;
|
||||||
@ -53,8 +50,8 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure SetEvents(const AEvents: TStrings; const AFilter: TDBGEventCategories);
|
procedure SetEvents(const AEvents: TStrings);
|
||||||
procedure GetEvents(const AResultEvents: TStrings; var AResultFilter: TDBGEventCategories);
|
procedure GetEvents(const AResultEvents: TStrings);
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
procedure AddEvent(const ACategory: TDBGEventCategory; const AText: String);
|
procedure AddEvent(const ACategory: TDBGEventCategory; const AText: String);
|
||||||
end;
|
end;
|
||||||
@ -65,13 +62,10 @@ implementation
|
|||||||
|
|
||||||
{ TDbgEventsForm }
|
{ TDbgEventsForm }
|
||||||
|
|
||||||
procedure TDbgEventsForm.ckgFilterItemClick(Sender: TObject; Index: integer);
|
procedure TDbgEventsForm.lstFilteredEventsResize(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ckgFilter.Checked[Index] then
|
// workaround: ListColumn.AutoSize does not work properly
|
||||||
Include(FFilter, TDBGEventCategory(Index))
|
lstFilteredEvents.Column[0].Width := lstFilteredEvents.ClientWidth;
|
||||||
else
|
|
||||||
Exclude(FFilter, TDBGEventCategory(Index));
|
|
||||||
UpdateFilteredList;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDbgEventsForm.UpdateFilteredList;
|
procedure TDbgEventsForm.UpdateFilteredList;
|
||||||
@ -116,25 +110,35 @@ begin
|
|||||||
lstFilteredEvents.Items[lstFilteredEvents.Items.Count -1].MakeVisible(False);
|
lstFilteredEvents.Items[lstFilteredEvents.Items.Count -1].MakeVisible(False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDbgEventsForm.SetEvents(const AEvents: TStrings; const AFilter: TDBGEventCategories);
|
procedure TDbgEventsForm.SetEvents(const AEvents: TStrings);
|
||||||
var
|
|
||||||
i: TDBGEventCategory;
|
|
||||||
begin
|
begin
|
||||||
if AEvents <> nil then
|
if AEvents <> nil then
|
||||||
FEvents.Assign(AEvents)
|
FEvents.Assign(AEvents)
|
||||||
else
|
else
|
||||||
FEvents.Clear;
|
FEvents.Clear;
|
||||||
FFilter := AFilter;
|
|
||||||
for i := Low(TDBGEventCategory) to High(TDBGEventCategory) do
|
FFilter := [];
|
||||||
ckgFilter.Checked[Ord(i)] := i in FFilter;
|
if EnvironmentOptions.DebuggerEventLogShowBreakpoint then
|
||||||
|
Include(FFilter, ecBreakpoint);
|
||||||
|
if EnvironmentOptions.DebuggerEventLogShowProcess then
|
||||||
|
Include(FFilter, ecProcess);
|
||||||
|
if EnvironmentOptions.DebuggerEventLogShowThread then
|
||||||
|
Include(FFilter, ecThread);
|
||||||
|
if EnvironmentOptions.DebuggerEventLogShowModule then
|
||||||
|
Include(FFilter, ecModule);
|
||||||
|
if EnvironmentOptions.DebuggerEventLogShowOutput then
|
||||||
|
Include(FFilter, ecOutput);
|
||||||
|
if EnvironmentOptions.DebuggerEventLogShowWindow then
|
||||||
|
Include(FFilter, ecWindow);
|
||||||
|
if EnvironmentOptions.DebuggerEventLogShowDebugger then
|
||||||
|
Include(FFilter, ecDebugger);
|
||||||
|
|
||||||
UpdateFilteredList;
|
UpdateFilteredList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDbgEventsForm.GetEvents(const AResultEvents: TStrings;
|
procedure TDbgEventsForm.GetEvents(const AResultEvents: TStrings);
|
||||||
var AResultFilter: TDBGEventCategories);
|
|
||||||
begin
|
begin
|
||||||
AResultEvents.Assign(FEvents);
|
AResultEvents.Assign(FEvents);
|
||||||
AResultFilter := FFilter;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDbgEventsForm.Clear;
|
procedure TDbgEventsForm.Clear;
|
||||||
@ -148,14 +152,6 @@ begin
|
|||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
Caption := lisMenuViewDebugEvents;
|
Caption := lisMenuViewDebugEvents;
|
||||||
FEvents := TStringList.Create;
|
FEvents := TStringList.Create;
|
||||||
ckgFilter.Items.Clear;
|
|
||||||
ckgFilter.Items.Add(lisDebugOptionsFrmBreakpoint);
|
|
||||||
ckgFilter.Items.Add(lisDebugOptionsFrmProcess);
|
|
||||||
ckgFilter.Items.Add(lisDebugOptionsFrmThread);
|
|
||||||
ckgFilter.Items.Add(lisDebugOptionsFrmModule);
|
|
||||||
ckgFilter.Items.Add(lisDebugOptionsFrmOutput);
|
|
||||||
ckgFilter.Items.Add(lisDebugOptionsFrmWindow);
|
|
||||||
ckgFilter.Items.Add(lisDebugOptionsFrmDebugger);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TDbgEventsForm.Destroy;
|
destructor TDbgEventsForm.Destroy;
|
||||||
|
|||||||
@ -1231,6 +1231,7 @@ type
|
|||||||
ecOutput, // DebugOutput calls
|
ecOutput, // DebugOutput calls
|
||||||
ecWindow,
|
ecWindow,
|
||||||
ecDebugger); // debugger errors and warnings
|
ecDebugger); // debugger errors and warnings
|
||||||
|
TDBGEventCategories = set of TDBGEventCategory;
|
||||||
|
|
||||||
TDBGEventNotify = procedure(Sender: TObject; const ACategory: TDBGEventCategory;
|
TDBGEventNotify = procedure(Sender: TObject; const ACategory: TDBGEventCategory;
|
||||||
const AText: String) of object;
|
const AText: String) of object;
|
||||||
|
|||||||
@ -111,9 +111,6 @@ type
|
|||||||
// here are all choices stored
|
// here are all choices stored
|
||||||
FUserSourceFiles: TStringList;
|
FUserSourceFiles: TStringList;
|
||||||
|
|
||||||
// Filter events that are show in the event log
|
|
||||||
FEventsFilter: set of TDBGEventCategory;
|
|
||||||
|
|
||||||
// when the debug output log is not open, store the debug log internally
|
// when the debug output log is not open, store the debug log internally
|
||||||
FHiddenDebugOutputLog: TStringList;
|
FHiddenDebugOutputLog: TStringList;
|
||||||
FHiddenDebugEventsLog: TStringList;
|
FHiddenDebugEventsLog: TStringList;
|
||||||
@ -1742,7 +1739,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if FHiddenDebugEventsLog=nil then
|
if FHiddenDebugEventsLog=nil then
|
||||||
FHiddenDebugEventsLog:=TStringList.Create;
|
FHiddenDebugEventsLog:=TStringList.Create;
|
||||||
TDbgEventsForm(FDialogs[ddtEvents]).GetEvents(FHiddenDebugEventsLog, FEventsFilter);
|
TDbgEventsForm(FDialogs[ddtEvents]).GetEvents(FHiddenDebugEventsLog);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
FDialogs[DlgType]:=nil;
|
FDialogs[DlgType]:=nil;
|
||||||
@ -1818,7 +1815,7 @@ var
|
|||||||
TheDialog: TDbgEventsForm;
|
TheDialog: TDbgEventsForm;
|
||||||
begin
|
begin
|
||||||
TheDialog := TDbgEventsForm(FDialogs[ddtEvents]);
|
TheDialog := TDbgEventsForm(FDialogs[ddtEvents]);
|
||||||
TheDialog.SetEvents(FHiddenDebugEventsLog, FEventsFilter);
|
TheDialog.SetEvents(FHiddenDebugEventsLog);
|
||||||
if FHiddenDebugEventsLog <> nil then
|
if FHiddenDebugEventsLog <> nil then
|
||||||
FreeAndNil(FHiddenDebugEventsLog);
|
FreeAndNil(FHiddenDebugEventsLog);
|
||||||
end;
|
end;
|
||||||
@ -1923,22 +1920,6 @@ begin
|
|||||||
FRunTimer.Interval := 1;
|
FRunTimer.Interval := 1;
|
||||||
FRunTimer.OnTimer := @OnRunTimer;
|
FRunTimer.OnTimer := @OnRunTimer;
|
||||||
|
|
||||||
FEventsFilter := [];
|
|
||||||
if EnvironmentOptions.DebuggerEventLogShowBreakpoint then
|
|
||||||
Include(FEventsFilter, ecBreakpoint);
|
|
||||||
if EnvironmentOptions.DebuggerEventLogShowProcess then
|
|
||||||
Include(FEventsFilter, ecProcess);
|
|
||||||
if EnvironmentOptions.DebuggerEventLogShowThread then
|
|
||||||
Include(FEventsFilter, ecThread);
|
|
||||||
if EnvironmentOptions.DebuggerEventLogShowModule then
|
|
||||||
Include(FEventsFilter, ecModule);
|
|
||||||
if EnvironmentOptions.DebuggerEventLogShowOutput then
|
|
||||||
Include(FEventsFilter, ecOutput);
|
|
||||||
if EnvironmentOptions.DebuggerEventLogShowWindow then
|
|
||||||
Include(FEventsFilter, ecWindow);
|
|
||||||
if EnvironmentOptions.DebuggerEventLogShowDebugger then
|
|
||||||
Include(FEventsFilter, ecDebugger);
|
|
||||||
|
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -2773,7 +2773,7 @@ begin
|
|||||||
ecToggleRegisters);
|
ecToggleRegisters);
|
||||||
AddDefault(C, 'Toggle view Assembler', lisKMToggleViewAssembler,
|
AddDefault(C, 'Toggle view Assembler', lisKMToggleViewAssembler,
|
||||||
ecToggleAssembler);
|
ecToggleAssembler);
|
||||||
AddDefault(C, 'Toggle view Debug Events', lisKMToggleViewDebugEvents, ecToggleDebugEvents);
|
AddDefault(C, 'Toggle view Event Log', lisKMToggleViewDebugEvents, ecToggleDebugEvents);
|
||||||
AddDefault(C, 'Toggle view Debugger Output', lisKMToggleViewDebuggerOutput,
|
AddDefault(C, 'Toggle view Debugger Output', lisKMToggleViewDebuggerOutput,
|
||||||
ecToggleDebuggerOut);
|
ecToggleDebuggerOut);
|
||||||
AddDefault(C, 'View Units', lisHintViewUnits, ecViewUnits);
|
AddDefault(C, 'View Units', lisHintViewUnits, ecViewUnits);
|
||||||
|
|||||||
@ -301,7 +301,7 @@ resourcestring
|
|||||||
lisMenuViewCallStack = 'Call Stack';
|
lisMenuViewCallStack = 'Call Stack';
|
||||||
lisMenuViewAssembler = 'Assembler';
|
lisMenuViewAssembler = 'Assembler';
|
||||||
lisMenuViewDebugOutput = 'Debug output';
|
lisMenuViewDebugOutput = 'Debug output';
|
||||||
lisMenuViewDebugEvents = 'Debug events';
|
lisMenuViewDebugEvents = 'Event Log';
|
||||||
lisMenuIDEInternals = 'IDE internals';
|
lisMenuIDEInternals = 'IDE internals';
|
||||||
lisMenuPackageLinks = 'Package links ...';
|
lisMenuPackageLinks = 'Package links ...';
|
||||||
|
|
||||||
@ -2515,7 +2515,7 @@ resourcestring
|
|||||||
lisKMToggleViewCallStack = 'Toggle view Call Stack';
|
lisKMToggleViewCallStack = 'Toggle view Call Stack';
|
||||||
lisKMToggleViewRegisters = 'Toggle view Registers';
|
lisKMToggleViewRegisters = 'Toggle view Registers';
|
||||||
lisKMToggleViewAssembler = 'Toggle view Assembler';
|
lisKMToggleViewAssembler = 'Toggle view Assembler';
|
||||||
lisKMToggleViewDebugEvents = 'Toggle view Debug Events';
|
lisKMToggleViewDebugEvents = 'Toggle view Debuger Event Log';
|
||||||
lisKMToggleViewDebuggerOutput = 'Toggle view Debugger Output';
|
lisKMToggleViewDebuggerOutput = 'Toggle view Debugger Output';
|
||||||
srkmCatProjectMenu = 'Project menu commands';
|
srkmCatProjectMenu = 'Project menu commands';
|
||||||
lisKMNewProject = 'New project';
|
lisKMNewProject = 'New project';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user