ide, debugger: add other frames to the ide options

git-svn-id: trunk@17690 -
This commit is contained in:
paul 2008-12-05 08:52:28 +00:00
parent 5174c3785e
commit dbb79626c8
14 changed files with 1015 additions and 5 deletions

9
.gitattributes vendored
View File

@ -1596,9 +1596,18 @@ debugger/debugoptionsfrm.pas svneol=native#text/pascal
debugger/evaluatedlg.lfm svneol=native#text/plain
debugger/evaluatedlg.lrs svneol=native#text/pascal
debugger/evaluatedlg.pp svneol=native#text/pascal
debugger/frames/options_debugger_eventlog.lfm svneol=native#text/plain
debugger/frames/options_debugger_eventlog.lrs svneol=native#text/pascal
debugger/frames/options_debugger_eventlog.pas svneol=native#text/pascal
debugger/frames/options_debugger_general.lfm svneol=native#text/plain
debugger/frames/options_debugger_general.lrs svneol=native#text/pascal
debugger/frames/options_debugger_general.pas svneol=native#text/pascal
debugger/frames/options_debugger_language_exceptions.lfm svneol=native#text/plain
debugger/frames/options_debugger_language_exceptions.lrs svneol=native#text/pascal
debugger/frames/options_debugger_language_exceptions.pas svneol=native#text/pascal
debugger/frames/options_debugger_signals.lfm svneol=native#text/plain
debugger/frames/options_debugger_signals.lrs svneol=native#text/pascal
debugger/frames/options_debugger_signals.pas svneol=native#text/pascal
debugger/gdbdebugger.pp svneol=native#text/pascal
debugger/gdbmidebugger.pp svneol=native#text/pascal
debugger/gdbtypeinfo.pp svneol=native#text/pascal

View File

@ -0,0 +1,161 @@
object DebuggerEventLogOptionsFrame: TDebuggerEventLogOptionsFrame
Left = 0
Height = 368
Top = 0
Width = 534
HelpContext = 0
ClientHeight = 368
ClientWidth = 534
Ctl3D = False
TabOrder = 0
Visible = False
DesignLeft = 536
DesignTop = 282
object gbGeneral: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 132
Top = 0
Width = 534
HelpContext = 0
Anchors = [akTop, akLeft, akRight]
Caption = 'General'
ClientHeight = 114
ClientWidth = 530
Ctl3D = False
ParentCtl3D = False
TabOrder = 0
object chkClearLogOnRun: TCheckBox
Left = 4
Height = 19
Top = 5
Width = 102
HelpContext = 0
Caption = 'Clear log on run'
TabOrder = 0
UseOnChange = False
end
object chkLimitLinecount: TCheckBox
Left = 4
Height = 19
Top = 29
Width = 106
HelpContext = 0
Caption = 'Limit linecount to'
TabOrder = 1
UseOnChange = False
end
object seLimitLinecount: TSpinEdit
Left = 46
Height = 20
Top = 54
Width = 82
HelpContext = 0
Enabled = False
TabOrder = 2
end
end
object gbMessages: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = gbGeneral
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 230
Top = 138
Width = 534
HelpContext = 0
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 6
Caption = 'Messages'
ClientHeight = 212
ClientWidth = 530
Ctl3D = False
Enabled = False
ParentCtl3D = False
TabOrder = 1
object chkMessagesBreakpoint: TCheckBox
Left = 4
Height = 19
Top = 5
Width = 77
HelpContext = 0
AllowGrayed = True
Caption = 'Breakpoint'
TabOrder = 0
UseOnChange = False
end
object chkMessagesProcess: TCheckBox
Left = 4
Height = 19
Top = 29
Width = 63
HelpContext = 0
AllowGrayed = True
Caption = 'Process'
TabOrder = 1
UseOnChange = False
end
object chkMessagesThread: TCheckBox
Left = 4
Height = 19
Top = 53
Width = 60
HelpContext = 0
AllowGrayed = True
Caption = 'Thread'
TabOrder = 2
UseOnChange = False
end
object chkMessagesModule: TCheckBox
Left = 4
Height = 19
Top = 77
Width = 60
HelpContext = 0
AllowGrayed = True
Caption = 'Module'
TabOrder = 3
UseOnChange = False
end
object chkMessagesOutput: TCheckBox
Left = 4
Height = 19
Top = 101
Width = 60
HelpContext = 0
AllowGrayed = True
Caption = 'Output'
TabOrder = 4
UseOnChange = False
end
object chkMessagesWindow: TCheckBox
Left = 4
Height = 19
Top = 125
Width = 64
HelpContext = 0
AllowGrayed = True
Caption = 'Window'
TabOrder = 5
UseOnChange = False
end
object chkMessagesInterface: TCheckBox
Left = 4
Height = 19
Top = 149
Width = 71
HelpContext = 0
AllowGrayed = True
Caption = 'Interface'
TabOrder = 6
UseOnChange = False
end
end
end

View File

@ -0,0 +1,46 @@
{ Это - файл ресурсов, автоматически созданный lazarus }
LazarusResources.Add('TDebuggerEventLogOptionsFrame','FORMDATA',[
'TPF0'#29'TDebuggerEventLogOptionsFrame'#28'DebuggerEventLogOptionsFrame'#4'L'
+'eft'#2#0#6'Height'#3'p'#1#3'Top'#2#0#5'Width'#3#22#2#11'HelpContext'#2#0#12
+'ClientHeight'#3'p'#1#11'ClientWidth'#3#22#2#5'Ctl3D'#8#8'TabOrder'#2#0#7'Vi'
+'sible'#8#10'DesignLeft'#3#24#2#9'DesignTop'#3#26#1#0#9'TGroupBox'#9'gbGener'
+'al'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Own'
+'er'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asr'
+'Bottom'#4'Left'#2#0#6'Height'#3#132#0#3'Top'#2#0#5'Width'#3#22#2#11'HelpCon'
+'text'#2#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#7'Caption'#6#7'Gene'
+'ral'#12'ClientHeight'#2'r'#11'ClientWidth'#3#18#2#5'Ctl3D'#8#11'ParentCtl3D'
+#8#8'TabOrder'#2#0#0#9'TCheckBox'#16'chkClearLogOnRun'#4'Left'#2#4#6'Height'
+#2#19#3'Top'#2#5#5'Width'#2'f'#11'HelpContext'#2#0#7'Caption'#6#16'Clear log'
+' on run'#8'TabOrder'#2#0#11'UseOnChange'#8#0#0#9'TCheckBox'#17'chkLimitLine'
+'count'#4'Left'#2#4#6'Height'#2#19#3'Top'#2#29#5'Width'#2'j'#11'HelpContext'
+#2#0#7'Caption'#6#18'Limit linecount to'#8'TabOrder'#2#1#11'UseOnChange'#8#0
+#0#9'TSpinEdit'#16'seLimitLinecount'#4'Left'#2'.'#6'Height'#2#20#3'Top'#2'6'
+#5'Width'#2'R'#11'HelpContext'#2#0#7'Enabled'#8#8'TabOrder'#2#2#0#0#0#9'TGro'
+'upBox'#10'gbMessages'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTo'
+'p.Control'#7#9'gbGeneral'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSi'
+'deRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'Anch'
+'orSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4
+'Left'#2#0#6'Height'#3#230#0#3'Top'#3#138#0#5'Width'#3#22#2#11'HelpContext'#2
+#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17'BorderSpacin'
+'g.Top'#2#6#7'Caption'#6#8'Messages'#12'ClientHeight'#3#212#0#11'ClientWidth'
+#3#18#2#5'Ctl3D'#8#7'Enabled'#8#11'ParentCtl3D'#8#8'TabOrder'#2#1#0#9'TCheck'
+'Box'#21'chkMessagesBreakpoint'#4'Left'#2#4#6'Height'#2#19#3'Top'#2#5#5'Widt'
+'h'#2'M'#11'HelpContext'#2#0#11'AllowGrayed'#9#7'Caption'#6#10'Breakpoint'#8
+'TabOrder'#2#0#11'UseOnChange'#8#0#0#9'TCheckBox'#18'chkMessagesProcess'#4'L'
+'eft'#2#4#6'Height'#2#19#3'Top'#2#29#5'Width'#2'?'#11'HelpContext'#2#0#11'Al'
+'lowGrayed'#9#7'Caption'#6#7'Process'#8'TabOrder'#2#1#11'UseOnChange'#8#0#0#9
+'TCheckBox'#17'chkMessagesThread'#4'Left'#2#4#6'Height'#2#19#3'Top'#2'5'#5'W'
+'idth'#2'<'#11'HelpContext'#2#0#11'AllowGrayed'#9#7'Caption'#6#6'Thread'#8'T'
+'abOrder'#2#2#11'UseOnChange'#8#0#0#9'TCheckBox'#17'chkMessagesModule'#4'Lef'
+'t'#2#4#6'Height'#2#19#3'Top'#2'M'#5'Width'#2'<'#11'HelpContext'#2#0#11'Allo'
+'wGrayed'#9#7'Caption'#6#6'Module'#8'TabOrder'#2#3#11'UseOnChange'#8#0#0#9'T'
+'CheckBox'#17'chkMessagesOutput'#4'Left'#2#4#6'Height'#2#19#3'Top'#2'e'#5'Wi'
+'dth'#2'<'#11'HelpContext'#2#0#11'AllowGrayed'#9#7'Caption'#6#6'Output'#8'Ta'
+'bOrder'#2#4#11'UseOnChange'#8#0#0#9'TCheckBox'#17'chkMessagesWindow'#4'Left'
+#2#4#6'Height'#2#19#3'Top'#2'}'#5'Width'#2'@'#11'HelpContext'#2#0#11'AllowGr'
+'ayed'#9#7'Caption'#6#6'Window'#8'TabOrder'#2#5#11'UseOnChange'#8#0#0#9'TChe'
+'ckBox'#20'chkMessagesInterface'#4'Left'#2#4#6'Height'#2#19#3'Top'#3#149#0#5
+'Width'#2'G'#11'HelpContext'#2#0#11'AllowGrayed'#9#7'Caption'#6#9'Interface'
+#8'TabOrder'#2#6#11'UseOnChange'#8#0#0#0#0
]);

View File

@ -0,0 +1,103 @@
{
***************************************************************************
* *
* This source is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This code is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* A copy of the GNU General Public License is available on the World *
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
* obtain it by writing to the Free Software Foundation, *
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
***************************************************************************
}
unit options_debugger_eventlog;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, StdCtrls, Spin,
LazarusIDEStrConsts, IDEOptionsIntf;
type
{ TDebuggerEventLogOptionsFrame }
TDebuggerEventLogOptionsFrame = class(TAbstractIDEOptionsEditor)
chkClearLogOnRun: TCheckBox;
chkLimitLinecount: TCheckBox;
chkMessagesBreakpoint: TCheckBox;
chkMessagesInterface: TCheckBox;
chkMessagesModule: TCheckBox;
chkMessagesOutput: TCheckBox;
chkMessagesProcess: TCheckBox;
chkMessagesThread: TCheckBox;
chkMessagesWindow: TCheckBox;
gbGeneral: TGroupBox;
gbMessages: TGroupBox;
seLimitLinecount: TSpinEdit;
private
{ private declarations }
public
function GetTitle: String; override;
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
end;
implementation
{ TDebuggerEventLogOptionsFrame }
function TDebuggerEventLogOptionsFrame.GetTitle: String;
begin
Result := lisDebugOptionsFrmEventLog;
end;
procedure TDebuggerEventLogOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
begin
gbGeneral.Caption := lisMenuInsertGeneral;
chkClearLogOnRun.Caption := lisDebugOptionsFrmClearLogOnRun;
chkLimitLinecount.Caption := lisDebugOptionsFrmLimitLinecountTo;
gbMessages.Caption := lisMenuViewMessages;
chkMessagesBreakpoint.Caption := lisDebugOptionsFrmBreakpoint;
chkMessagesProcess.Caption := lisDebugOptionsFrmProcess;
chkMessagesThread.Caption := lisDebugOptionsFrmThread;
chkMessagesModule.Caption := lisDebugOptionsFrmModule;
chkMessagesOutput.Caption := lisDebugOptionsFrmOutput;
chkMessagesWindow.Caption := lisDebugOptionsFrmWindow;
chkMessagesInterface.Caption := lisDebugOptionsFrmInterface;
end;
procedure TDebuggerEventLogOptionsFrame.ReadSettings(
AOptions: TAbstractIDEOptions);
begin
// todo
end;
procedure TDebuggerEventLogOptionsFrame.WriteSettings(
AOptions: TAbstractIDEOptions);
begin
// todo
end;
class function TDebuggerEventLogOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin
Result := nil; // currently dont know
end;
initialization
{$I options_debugger_eventlog.lrs}
RegisterIDEOptionsEditor(GroupDebugger, TDebuggerEventLogOptionsFrame, DbgOptionsEventLog);
end.

View File

@ -0,0 +1,104 @@
object DebuggerLanguageExceptionsOptions: TDebuggerLanguageExceptionsOptions
Left = 0
Height = 421
Top = 0
Width = 448
HelpContext = 0
ClientHeight = 421
ClientWidth = 448
Ctl3D = False
TabOrder = 0
Visible = False
DesignLeft = 342
DesignTop = 203
object bgIgnoreExceptions: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = chkBreakOnException
Left = 0
Height = 396
Top = 0
Width = 448
HelpContext = 0
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Bottom = 6
Caption = 'Ignore these exceptions'
ClientHeight = 378
ClientWidth = 444
Ctl3D = False
ParentCtl3D = False
TabOrder = 0
object clbExceptions: TCheckListBox
AnchorSideLeft.Control = bgIgnoreExceptions
AnchorSideTop.Control = bgIgnoreExceptions
AnchorSideRight.Control = bgIgnoreExceptions
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = cmdExceptionAdd
Left = 6
Height = 337
Top = 6
Width = 432
HelpContext = 0
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
ItemHeight = 0
TabOrder = 0
TopIndex = 0
end
object cmdExceptionAdd: TBitBtn
AnchorSideRight.Control = cmdExceptionRemove
AnchorSideBottom.Control = bgIgnoreExceptions
AnchorSideBottom.Side = asrBottom
Left = 282
Height = 23
Top = 349
Width = 75
HelpContext = 0
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Add'
Constraints.MinWidth = 75
NumGlyphs = 0
OnClick = cmdExceptionAddClick
TabOrder = 1
end
object cmdExceptionRemove: TBitBtn
AnchorSideRight.Control = bgIgnoreExceptions
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = bgIgnoreExceptions
AnchorSideBottom.Side = asrBottom
Left = 363
Height = 23
Top = 349
Width = 75
HelpContext = 0
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Remove'
Constraints.MinWidth = 75
Enabled = False
NumGlyphs = 0
OnClick = cmdExceptionRemoveClick
TabOrder = 2
end
end
object chkBreakOnException: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 19
Top = 402
Width = 163
HelpContext = 0
AllowGrayed = True
Anchors = [akLeft, akBottom]
Caption = 'Break on Lazarus Exceptions'
TabOrder = 1
UseOnChange = False
end
end

View File

@ -0,0 +1,40 @@
{ Это - файл ресурсов, автоматически созданный lazarus }
LazarusResources.Add('TDebuggerLanguageExceptionsOptions','FORMDATA',[
'TPF0"TDebuggerLanguageExceptionsOptions!DebuggerLanguageExceptionsOptions'#4
+'Left'#2#0#6'Height'#3#165#1#3'Top'#2#0#5'Width'#3#192#1#11'HelpContext'#2#0
+#12'ClientHeight'#3#165#1#11'ClientWidth'#3#192#1#5'Ctl3D'#8#8'TabOrder'#2#0
+#7'Visible'#8#10'DesignLeft'#3'V'#1#9'DesignTop'#3#203#0#0#9'TGroupBox'#18'b'
+'gIgnoreExceptions'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.C'
+'ontrol'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRigh'
+'t.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#19'chkBreakOnExceptio'
+'n'#4'Left'#2#0#6'Height'#3#140#1#3'Top'#2#0#5'Width'#3#192#1#11'HelpContext'
+#2#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpac'
+'ing.Bottom'#2#6#7'Caption'#6#23'Ignore these exceptions'#12'ClientHeight'#3
+'z'#1#11'ClientWidth'#3#188#1#5'Ctl3D'#8#11'ParentCtl3D'#8#8'TabOrder'#2#0#0
+#13'TCheckListBox'#13'clbExceptions'#22'AnchorSideLeft.Control'#7#18'bgIgnor'
+'eExceptions'#21'AnchorSideTop.Control'#7#18'bgIgnoreExceptions'#23'AnchorSi'
+'deRight.Control'#7#18'bgIgnoreExceptions'#20'AnchorSideRight.Side'#7#9'asrB'
+'ottom'#24'AnchorSideBottom.Control'#7#15'cmdExceptionAdd'#4'Left'#2#6#6'Hei'
+'ght'#3'Q'#1#3'Top'#2#6#5'Width'#3#176#1#11'HelpContext'#2#0#7'Anchors'#11#5
+'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#10'I'
+'temHeight'#2#0#8'TabOrder'#2#0#8'TopIndex'#2#0#0#0#7'TBitBtn'#15'cmdExcepti'
+'onAdd'#23'AnchorSideRight.Control'#7#18'cmdExceptionRemove'#24'AnchorSideBo'
+'ttom.Control'#7#18'bgIgnoreExceptions'#21'AnchorSideBottom.Side'#7#9'asrBot'
+'tom'#4'Left'#3#26#1#6'Height'#2#23#3'Top'#3']'#1#5'Width'#2'K'#11'HelpConte'
+'xt'#2#0#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpaci'
+'ng.Around'#2#6#7'Caption'#6#3'Add'#20'Constraints.MinWidth'#2'K'#9'NumGlyph'
+'s'#2#0#7'OnClick'#7#20'cmdExceptionAddClick'#8'TabOrder'#2#1#0#0#7'TBitBtn'
+#18'cmdExceptionRemove'#23'AnchorSideRight.Control'#7#18'bgIgnoreExceptions'
+#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#18'b'
+'gIgnoreExceptions'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3'k'#1#6
+'Height'#2#23#3'Top'#3']'#1#5'Width'#2'K'#11'HelpContext'#2#0#7'Anchors'#11#7
+'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'
+#6#6'Remove'#20'Constraints.MinWidth'#2'K'#7'Enabled'#8#9'NumGlyphs'#2#0#7'O'
+'nClick'#7#23'cmdExceptionRemoveClick'#8'TabOrder'#2#2#0#0#0#9'TCheckBox'#19
+'chkBreakOnException'#22'AnchorSideLeft.Control'#7#5'Owner'#24'AnchorSideBot'
+'tom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#0
+#6'Height'#2#19#3'Top'#3#146#1#5'Width'#3#163#0#11'HelpContext'#2#0#11'Allow'
+'Grayed'#9#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#27'Break on La'
+'zarus Exceptions'#8'TabOrder'#2#1#11'UseOnChange'#8#0#0#0
]);

View File

@ -0,0 +1,193 @@
{
***************************************************************************
* *
* This source is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This code is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* A copy of the GNU General Public License is available on the World *
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
* obtain it by writing to the Free Software Foundation, *
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
***************************************************************************
}
unit options_debugger_language_exceptions;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, StdCtrls, CheckLst,
Buttons, Dialogs,
LazarusIDEStrConsts, IDEOptionsIntf, Debugger, BaseDebugManager;
type
{ TDebuggerLanguageExceptionsOptions }
TDebuggerLanguageExceptionsOptions = class(TAbstractIDEOptionsEditor)
bgIgnoreExceptions: TGroupBox;
chkBreakOnException: TCheckBox;
clbExceptions: TCheckListBox;
cmdExceptionAdd: TBitBtn;
cmdExceptionRemove: TBitBtn;
procedure cmdExceptionAddClick(Sender: TObject);
procedure cmdExceptionRemoveClick(Sender: TObject);
private
FExceptionDeleteList: TStringList;
procedure AddExceptionLine(const AException: TIDEException; AName: String);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function GetTitle: String; override;
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
end;
implementation
{ TDebuggerLanguageExceptionsOptions }
procedure TDebuggerLanguageExceptionsOptions.cmdExceptionAddClick(
Sender: TObject);
var
idx: Integer;
S: String;
begin
if not InputQuery('Add Exception', 'Enter the name of the exception', S)
then Exit;
if clbExceptions.Items.IndexOf(S) = -1
then begin
idx := FExceptionDeleteList.IndexOf(S);
if idx = -1
then begin
AddExceptionLine(nil, S);
end
else begin
AddExceptionLine(TIDEException(FExceptionDeleteList.Objects[idx]), S);
FExceptionDeleteList.Delete(idx);
end;
end
else begin
MessageDlg('Duplicate Exception name', mtError, [mbOK], 0);
end;
end;
procedure TDebuggerLanguageExceptionsOptions.cmdExceptionRemoveClick(
Sender: TObject);
var
idx: Integer;
obj: TObject;
begin
idx := clbExceptions.ItemIndex;
if idx <> -1
then begin
obj := clbExceptions.Items.Objects[idx];
if obj <> nil
then FExceptionDeleteList.AddObject(clbExceptions.Items[idx], obj);
clbExceptions.Items.Delete(idx);
end;
cmdExceptionRemove.Enabled := clbExceptions.ItemIndex <> -1;
end;
procedure TDebuggerLanguageExceptionsOptions.AddExceptionLine(
const AException: TIDEException; AName: String);
var
idx: Integer;
begin
if (AName = '') and (AException <> nil)
then AName := AException.Name;
if AName = '' then Exit;
idx := clbExceptions.Items.AddObject(AName, AException);
clbExceptions.Checked[idx] := (AException = nil) or AException.Enabled;
end;
constructor TDebuggerLanguageExceptionsOptions.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FExceptionDeleteList := TStringList.Create;
FExceptionDeleteList.Sorted := True;
end;
destructor TDebuggerLanguageExceptionsOptions.Destroy;
begin
FreeAndNil(FExceptionDeleteList);
inherited Destroy;
end;
function TDebuggerLanguageExceptionsOptions.GetTitle: String;
begin
Result := lisDebugOptionsFrmLanguageExceptions;
end;
procedure TDebuggerLanguageExceptionsOptions.Setup(
ADialog: TAbstractOptionsEditorDialog);
begin
bgIgnoreExceptions.Caption := lisDebugOptionsFrmIgnoreTheseExceptions;
cmdExceptionRemove.Caption := lisExtToolRemove;
cmdExceptionAdd.Caption := lisCodeTemplAdd;
cmdExceptionRemove.LoadGlyphFromLazarusResource('laz_delete');
cmdExceptionAdd.LoadGlyphFromLazarusResource('laz_add');
chkBreakOnException.Caption := lisDebugOptionsFrmBreakOnLazarusExceptions;
end;
procedure TDebuggerLanguageExceptionsOptions.ReadSettings(
AOptions: TAbstractIDEOptions);
var
n: integer;
begin
for n := 0 to DebugBoss.Exceptions.Count - 1 do
AddExceptionLine(DebugBoss.Exceptions[n], '');
end;
procedure TDebuggerLanguageExceptionsOptions.WriteSettings(
AOptions: TAbstractIDEOptions);
var
n: integer;
ie: TIDEException;
begin
for n := 0 to FExceptionDeleteList.Count - 1 do
FExceptionDeleteList.Objects[n].Free;
for n := 0 to clbExceptions.Items.Count - 1 do
begin
ie := TIDEException(clbExceptions.Items.Objects[n]);
if ie = nil
then begin
ie := DebugBoss.Exceptions.Add(clbExceptions.Items[n]);
ie.Enabled := clbExceptions.Checked[n];
end
else begin
ie.BeginUpdate;
try
ie.Name := clbExceptions.Items[n];
ie.Enabled := clbExceptions.Checked[n];
finally
ie.EndUpdate;
end;
end;
end;
end;
class function TDebuggerLanguageExceptionsOptions.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin
Result := nil;
end;
initialization
{$I options_debugger_language_exceptions.lrs}
RegisterIDEOptionsEditor(GroupDebugger, TDebuggerLanguageExceptionsOptions, DbgOptionsLanguageExceptions);
end.

View File

@ -0,0 +1,145 @@
inherited DebuggerSignalsOptions: TDebuggerSignalsOptions
Height = 431
Width = 450
ClientHeight = 431
ClientWidth = 450
Visible = False
DesignLeft = 331
DesignTop = 147
object gbSignals: TGroupBox[0]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 431
Top = 0
Width = 450
HelpContext = 0
Anchors = [akTop, akLeft, akRight, akBottom]
Caption = 'Signals'
ClientHeight = 413
ClientWidth = 446
Ctl3D = False
ParentCtl3D = False
TabOrder = 0
object lvSignals: TListView
AnchorSideLeft.Control = gbSignals
AnchorSideTop.Control = gbSignals
AnchorSideRight.Control = gbSignals
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = cmdSignalAdd
Left = 6
Height = 372
Top = 6
Width = 434
HelpContext = 0
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
Columns = <
item
AutoSize = False
Caption = 'Name'
Width = 200
end
item
AutoSize = False
Caption = 'ID'
end
item
AutoSize = False
Caption = 'Handled by'
Width = 75
end
item
AutoSize = False
Caption = 'Resume'
Width = 107
end>
PopupMenu = popSignal
SortColumn = 0
SortType = stNone
TabOrder = 0
ViewStyle = vsReport
end
object cmdSignalRemove: TBitBtn
AnchorSideRight.Control = gbSignals
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = gbSignals
AnchorSideBottom.Side = asrBottom
Left = 365
Height = 23
Top = 384
Width = 75
HelpContext = 0
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Remove'
Constraints.MinWidth = 75
Enabled = False
NumGlyphs = 0
TabOrder = 1
end
object cmdSignalAdd: TBitBtn
AnchorSideRight.Control = cmdSignalRemove
AnchorSideBottom.Control = gbSignals
AnchorSideBottom.Side = asrBottom
Left = 284
Height = 23
Top = 384
Width = 75
HelpContext = 0
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Add'
Constraints.MinWidth = 75
NumGlyphs = 0
TabOrder = 2
end
end
object popSignal: TPopupMenu[1]
left = 36
top = 403
object mnuHandledByProgram: TMenuItem
AutoCheck = True
Caption = 'Handled by Program'
GroupIndex = 1
RadioItem = True
RightJustify = False
ShowAlwaysCheckable = False
end
object mnuiHandledByDebugger: TMenuItem
AutoCheck = True
Caption = 'Handled by Debugger'
GroupIndex = 1
RadioItem = True
RightJustify = False
ShowAlwaysCheckable = False
end
object N1: TMenuItem
Caption = '-'
RightJustify = False
ShowAlwaysCheckable = False
end
object mnuResumeHandled: TMenuItem
AutoCheck = True
Caption = 'Resume Handled'
GroupIndex = 2
RadioItem = True
RightJustify = False
ShowAlwaysCheckable = False
end
object mnuResumeUnhandled: TMenuItem
AutoCheck = True
Caption = 'Resume Unhandled'
GroupIndex = 2
RadioItem = True
RightJustify = False
ShowAlwaysCheckable = False
end
end
end

View File

@ -0,0 +1,47 @@
{ Это - файл ресурсов, автоматически созданный lazarus }
LazarusResources.Add('TDebuggerSignalsOptions','FORMDATA',[
'TPF0'#241#23'TDebuggerSignalsOptions'#22'DebuggerSignalsOptions'#6'Height'#3
+#175#1#5'Width'#3#194#1#12'ClientHeight'#3#175#1#11'ClientWidth'#3#194#1#7'V'
+'isible'#8#10'DesignLeft'#3'K'#1#9'DesignTop'#3#147#0#0#242#2#0#9'TGroupBox'
+#9'gbSignals'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'
+#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7
+#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Si'
+'de'#7#9'asrBottom'#4'Left'#2#0#6'Height'#3#175#1#3'Top'#2#0#5'Width'#3#194#1
+#11'HelpContext'#2#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'
+#0#7'Caption'#6#7'Signals'#12'ClientHeight'#3#157#1#11'ClientWidth'#3#190#1#5
+'Ctl3D'#8#11'ParentCtl3D'#8#8'TabOrder'#2#0#0#9'TListView'#9'lvSignals'#22'A'
+'nchorSideLeft.Control'#7#9'gbSignals'#21'AnchorSideTop.Control'#7#9'gbSigna'
+'ls'#23'AnchorSideRight.Control'#7#9'gbSignals'#20'AnchorSideRight.Side'#7#9
+'asrBottom'#24'AnchorSideBottom.Control'#7#12'cmdSignalAdd'#4'Left'#2#6#6'He'
+'ight'#3't'#1#3'Top'#2#6#5'Width'#3#178#1#11'HelpContext'#2#0#7'Anchors'#11#5
+'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#7'Co'
+'lumns'#14#1#8'AutoSize'#8#7'Caption'#6#4'Name'#5'Width'#3#200#0#0#1#8'AutoS'
+'ize'#8#7'Caption'#6#2'ID'#0#1#8'AutoSize'#8#7'Caption'#6#10'Handled by'#5'W'
+'idth'#2'K'#0#1#8'AutoSize'#8#7'Caption'#6#6'Resume'#5'Width'#2'k'#0#0#9'Pop'
+'upMenu'#7#9'popSignal'#10'SortColumn'#2#0#8'SortType'#7#6'stNone'#8'TabOrde'
+'r'#2#0#9'ViewStyle'#7#8'vsReport'#0#0#7'TBitBtn'#15'cmdSignalRemove'#23'Anc'
+'horSideRight.Control'#7#9'gbSignals'#20'AnchorSideRight.Side'#7#9'asrBottom'
+#24'AnchorSideBottom.Control'#7#9'gbSignals'#21'AnchorSideBottom.Side'#7#9'a'
+'srBottom'#4'Left'#3'm'#1#6'Height'#2#23#3'Top'#3#128#1#5'Width'#2'K'#11'Hel'
+'pContext'#2#0#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'Borde'
+'rSpacing.Around'#2#6#7'Caption'#6#6'Remove'#20'Constraints.MinWidth'#2'K'#7
+'Enabled'#8#9'NumGlyphs'#2#0#8'TabOrder'#2#1#0#0#7'TBitBtn'#12'cmdSignalAdd'
+#23'AnchorSideRight.Control'#7#15'cmdSignalRemove'#24'AnchorSideBottom.Contr'
+'ol'#7#9'gbSignals'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#28#1#6
+'Height'#2#23#3'Top'#3#128#1#5'Width'#2'K'#11'HelpContext'#2#0#7'Anchors'#11
+#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Capti'
+'on'#6#3'Add'#20'Constraints.MinWidth'#2'K'#9'NumGlyphs'#2#0#8'TabOrder'#2#2
+#0#0#0#242#2#1#10'TPopupMenu'#9'popSignal'#4'left'#2'$'#3'top'#3#147#1#0#9'T'
+'MenuItem'#19'mnuHandledByProgram'#9'AutoCheck'#9#7'Caption'#6#18'Handled by'
+' Program'#10'GroupIndex'#2#1#9'RadioItem'#9#12'RightJustify'#8#19'ShowAlway'
+'sCheckable'#8#0#0#9'TMenuItem'#21'mnuiHandledByDebugger'#9'AutoCheck'#9#7'C'
+'aption'#6#19'Handled by Debugger'#10'GroupIndex'#2#1#9'RadioItem'#9#12'Righ'
+'tJustify'#8#19'ShowAlwaysCheckable'#8#0#0#9'TMenuItem'#2'N1'#7'Caption'#6#1
+'-'#12'RightJustify'#8#19'ShowAlwaysCheckable'#8#0#0#9'TMenuItem'#16'mnuResu'
+'meHandled'#9'AutoCheck'#9#7'Caption'#6#14'Resume Handled'#10'GroupIndex'#2#2
+#9'RadioItem'#9#12'RightJustify'#8#19'ShowAlwaysCheckable'#8#0#0#9'TMenuItem'
+#18'mnuResumeUnhandled'#9'AutoCheck'#9#7'Caption'#6#16'Resume Unhandled'#10
+'GroupIndex'#2#2#9'RadioItem'#9#12'RightJustify'#8#19'ShowAlwaysCheckable'#8
+#0#0#0#0
]);

View File

@ -0,0 +1,120 @@
{
***************************************************************************
* *
* This source is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This code is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* A copy of the GNU General Public License is available on the World *
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
* obtain it by writing to the Free Software Foundation, *
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
***************************************************************************
}
unit options_debugger_signals;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, StdCtrls, Menus,
ComCtrls, Buttons,
LazarusIDEStrConsts, IDEOptionsIntf, Debugger, BaseDebugManager;
type
{ TDebuggerSignalsOptions }
TDebuggerSignalsOptions = class(TAbstractIDEOptionsEditor)
cmdSignalAdd: TBitBtn;
cmdSignalRemove: TBitBtn;
gbSignals: TGroupBox;
lvSignals: TListView;
mnuHandledByProgram: TMenuItem;
mnuiHandledByDebugger: TMenuItem;
mnuResumeHandled: TMenuItem;
mnuResumeUnhandled: TMenuItem;
N1: TMenuItem;
popSignal: TPopupMenu;
private
procedure AddSignalLine(const ASignal: TIDESignal);
public
function GetTitle: String; override;
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
end;
implementation
const
HANDLEDBY_CAPTION: array [Boolean] of String = ('Program', 'Debugger');
RESUME_CAPTION: array[Boolean] of String = ('Unhandled', 'Handled');
{ TDebuggerSignalsOptions }
procedure TDebuggerSignalsOptions.AddSignalLine(const ASignal: TIDESignal);
var
Item: TListItem;
begin
Item := lvSignals.Items.Add;
Item.Caption := ASignal.Name;
Item.SubItems.Add(IntToStr(ASignal.ID));
Item.SubItems.Add(HANDLEDBY_CAPTION[ASignal.HandledByDebugger]);
Item.SubItems.Add(RESUME_CAPTION[ASignal.ResumeHandled]);
Item.Data := ASignal;
end;
function TDebuggerSignalsOptions.GetTitle: String;
begin
Result := lisDebugOptionsFrmOSExceptions;
end;
procedure TDebuggerSignalsOptions.Setup(ADialog: TAbstractOptionsEditorDialog);
begin
gbSignals.Caption := lisDebugOptionsFrmSignals;
lvSignals.Column[0].Caption := lisDebugOptionsFrmName;
lvSignals.Column[1].Caption := lisDebugOptionsFrmID;
lvSignals.Column[2].Caption := lisDebugOptionsFrmHandledBy;
lvSignals.Column[3].Caption := lisDebugOptionsFrmResume;
cmdSignalAdd.Caption := lisCodeTemplAdd;
cmdSignalRemove.Caption := lisExtToolRemove;
cmdSignalAdd.LoadGlyphFromLazarusResource('laz_add');
cmdSignalRemove.LoadGlyphFromLazarusResource('laz_delete');
mnuHandledByProgram.Caption := lisDebugOptionsFrmHandledByProgram;
mnuiHandledByDebugger.Caption := lisDebugOptionsFrmHandledByDebugger;
mnuResumeHandled.Caption := lisDebugOptionsFrmResumeHandled;
mnuResumeUnhandled.Caption := lisDebugOptionsFrmResumeUnhandled;
end;
procedure TDebuggerSignalsOptions.ReadSettings(AOptions: TAbstractIDEOptions);
var
n: integer;
begin
for n := 0 to DebugBoss.Signals.Count - 1 do
AddSignalLine(DebugBoss.Signals[n]);
end;
procedure TDebuggerSignalsOptions.WriteSettings(AOptions: TAbstractIDEOptions);
begin
// todo
end;
class function TDebuggerSignalsOptions.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin
Result := nil;
end;
initialization
{$I options_debugger_signals.lrs}
RegisterIDEOptionsEditor(GroupDebugger, TDebuggerSignalsOptions, DbgOptionsSignals);
end.

View File

@ -144,6 +144,8 @@ begin
end;
procedure TIDEOptionsDialog.ReadSettings(AOptions: TAbstractIDEOptions);
var
ClassTypeForCompare: TClass;
procedure Traverse(Node: TTreeNode);
begin
@ -151,7 +153,7 @@ procedure TIDEOptionsDialog.ReadSettings(AOptions: TAbstractIDEOptions);
begin
if Node.Data <> nil then
with TAbstractIDEOptionsEditor(Node.Data) do
if SupportedOptionsClass = AOptions.ClassType then
if SupportedOptionsClass = ClassTypeForCompare then
ReadSettings(AOptions);
Traverse(Node.GetFirstChild);
Traverse(Node.GetNextSibling);
@ -159,10 +161,17 @@ procedure TIDEOptionsDialog.ReadSettings(AOptions: TAbstractIDEOptions);
end;
begin
if AOptions <> nil then
ClassTypeForCompare := AOptions.ClassType
else
ClassTypeForCompare := nil;
Traverse(CategoryTree.Items.GetFirstNode);
end;
procedure TIDEOptionsDialog.WriteSettings(AOptions: TAbstractIDEOptions);
var
ClassTypeForCompare: TClass;
procedure Traverse(Node: TTreeNode);
begin
@ -170,7 +179,7 @@ procedure TIDEOptionsDialog.WriteSettings(AOptions: TAbstractIDEOptions);
begin
if Node.Data <> nil then
with TAbstractIDEOptionsEditor(Node.Data) do
if SupportedOptionsClass = AOptions.ClassType then
if SupportedOptionsClass = ClassTypeForCompare then
WriteSettings(AOptions);
Traverse(Node.GetFirstChild);
Traverse(Node.GetNextSibling);
@ -178,6 +187,11 @@ procedure TIDEOptionsDialog.WriteSettings(AOptions: TAbstractIDEOptions);
end;
begin
if AOptions <> nil then
ClassTypeForCompare := AOptions.ClassType
else
ClassTypeForCompare := nil;
Traverse(CategoryTree.Items.GetFirstNode);
end;

View File

@ -41,7 +41,7 @@
<PackageName Value="SynEdit"/>
</Item4>
</RequiredPackages>
<Units Count="25">
<Units Count="28">
<Unit0>
<Filename Value="lazarus.pp"/>
<IsPartOfProject Value="True"/>
@ -241,6 +241,30 @@
<ResourceFilename Value="..\debugger\frames\options_debugger_general.lrs"/>
<UnitName Value="options_debugger_general"/>
</Unit24>
<Unit25>
<Filename Value="..\debugger\frames\options_debugger_eventlog.pas"/>
<ComponentName Value="DebuggerEventLogOptionsFrame"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Frame"/>
<ResourceFilename Value="..\debugger\frames\options_debugger_eventlog.lrs"/>
<UnitName Value="options_debugger_eventlog"/>
</Unit25>
<Unit26>
<Filename Value="..\debugger\frames\options_debugger_language_exceptions.pas"/>
<ComponentName Value="DebuggerLanguageExceptionsOptions"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Frame"/>
<ResourceFilename Value="..\debugger\frames\options_debugger_language_exceptions.lrs"/>
<UnitName Value="options_debugger_language_exceptions"/>
</Unit26>
<Unit27>
<Filename Value="..\debugger\frames\options_debugger_signals.pas"/>
<ComponentName Value="DebuggerSignalsOptions"/>
<IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Frame"/>
<ResourceFilename Value="..\debugger\frames\options_debugger_signals.lrs"/>
<UnitName Value="options_debugger_signals"/>
</Unit27>
</Units>
</ProjectOptions>
<CompilerOptions>

View File

@ -135,7 +135,8 @@ uses
options_codetools_general, options_codetools_codecreation,
options_codetools_wordpolicy, options_codetools_linesplitting,
options_codetools_space, options_codetools_identifiercompletion,
options_debugger_general;
options_debugger_general, options_debugger_eventlog,
options_debugger_language_exceptions, options_debugger_signals;
type
TIDEProjectItem =
@ -4048,6 +4049,8 @@ begin
ReadSettings(EditorOpts);
// load settings from CodetoolsOption to IDEOptionsDialog
ReadSettings(CodeToolsOpts);
// load other settings that does not belong to any group
ReadSettings(nil);
end;
if IDEOptionsDialog.ShowModal = mrOk then
begin
@ -4060,6 +4063,7 @@ begin
IDEOptionsDialog.WriteSettings(EnvironmentOptions);
IDEOptionsDialog.WriteSettings(EditorOpts);
IDEOptionsDialog.WriteSettings(CodeToolsOpts);
IDEOptionsDialog.WriteSettings(nil);
ShowCompileDialog := EnvironmentOptions.ShowCompileDialog;
UpdateDefaultPascalFileExtensions;

View File

@ -148,7 +148,7 @@ const
DbgOptionsGeneral = 100;
DbgOptionsEventLog = 200;
DbgOptionsLanguageExceptions = 300;
DbgOptionsOsExceptions = 400;
DbgOptionsSignals = 400;
implementation
var