From 0fb8976945d79b48ea0be8cfc2bafc08b3e9ac51 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 11 May 2011 08:36:42 +0000 Subject: [PATCH] ide: add dummy debugger options class make filtering IDE options work git-svn-id: trunk@30679 - --- debugger/frames/debugger_eventlog_options.pas | 8 ++++---- debugger/frames/debugger_general_options.pas | 8 ++++---- debugger/frames/debugger_language_exceptions_options.pas | 2 +- debugger/frames/debugger_signals_options.pas | 2 +- ide/basedebugmanager.pas | 3 ++- ide/main.pp | 3 +++ 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/debugger/frames/debugger_eventlog_options.pas b/debugger/frames/debugger_eventlog_options.pas index f492e3033a..21e63ced37 100644 --- a/debugger/frames/debugger_eventlog_options.pas +++ b/debugger/frames/debugger_eventlog_options.pas @@ -27,7 +27,7 @@ interface uses Classes, SysUtils, FileUtil, Graphics, Forms, StdCtrls, Spin, CheckLst, ComCtrls, LCLType, LCLIntf, ColorBox, Debugger, LazarusIDEStrConsts, - IDEOptionsIntf, EnvironmentOpts; + IDEOptionsIntf, EnvironmentOpts, BaseDebugManager; type { TDebuggerEventLogOptionsFrame } @@ -235,7 +235,7 @@ procedure TDebuggerEventLogOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptio var EventType: TDBGEventType; begin - with AOptions as TEnvironmentOptions do + with EnvironmentOptions do begin chkClearLogOnRun.Checked := DebuggerEventLogClearOnRun; chkLimitLinecount.Checked := DebuggerEventLogCheckLineLimit; @@ -264,7 +264,7 @@ procedure TDebuggerEventLogOptionsFrame.WriteSettings(AOptions: TAbstractIDEOpti var EventType: TDBGEventType; begin - with AOptions as TEnvironmentOptions do + with EnvironmentOptions do begin DebuggerEventLogClearOnRun := chkClearLogOnRun.Checked; DebuggerEventLogCheckLineLimit := chkLimitLinecount.Checked; @@ -284,7 +284,7 @@ end; class function TDebuggerEventLogOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; begin - Result := TEnvironmentOptions; + Result := TDebuggerOptions; end; initialization diff --git a/debugger/frames/debugger_general_options.pas b/debugger/frames/debugger_general_options.pas index 4d4ce8a7ef..c4c9504fff 100644 --- a/debugger/frames/debugger_general_options.pas +++ b/debugger/frames/debugger_general_options.pas @@ -312,9 +312,9 @@ end; procedure TDebuggerGeneralOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions); begin ClearDbgProperties; - with AOptions as TEnvironmentOptions do + with EnvironmentOptions do begin - TEnvironmentOptions(AOptions).ObjectInspectorOptions.AssignTo(PropertyGrid); + ObjectInspectorOptions.AssignTo(PropertyGrid); FOldDebuggerPathAndParams := DebuggerFilename; cmbDebuggerPath.Text := FOldDebuggerPathAndParams; FetchDebuggerClass; @@ -326,7 +326,7 @@ procedure TDebuggerGeneralOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptio var i: Integer; begin - with AOptions as TEnvironmentOptions do + with EnvironmentOptions do begin DebuggerFilename := cmbDebuggerPath.Text; DebuggerFileHistory.Assign(cmbDebuggerPath.Items); @@ -346,7 +346,7 @@ end; class function TDebuggerGeneralOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; begin - Result := TEnvironmentOptions; + Result := TDebuggerOptions; end; initialization diff --git a/debugger/frames/debugger_language_exceptions_options.pas b/debugger/frames/debugger_language_exceptions_options.pas index 4fec339bef..82200d9b59 100644 --- a/debugger/frames/debugger_language_exceptions_options.pas +++ b/debugger/frames/debugger_language_exceptions_options.pas @@ -195,7 +195,7 @@ end; class function TDebuggerLanguageExceptionsOptions.SupportedOptionsClass: TAbstractIDEOptionsClass; begin - Result := nil; + Result := TDebuggerOptions; end; initialization diff --git a/debugger/frames/debugger_signals_options.pas b/debugger/frames/debugger_signals_options.pas index e896013245..5809015b9d 100644 --- a/debugger/frames/debugger_signals_options.pas +++ b/debugger/frames/debugger_signals_options.pas @@ -113,7 +113,7 @@ end; class function TDebuggerSignalsOptions.SupportedOptionsClass: TAbstractIDEOptionsClass; begin - Result := nil; + Result := TDebuggerOptions; end; initialization diff --git a/ide/basedebugmanager.pas b/ide/basedebugmanager.pas index ac2803d932..fd9120c535 100644 --- a/ide/basedebugmanager.pas +++ b/ide/basedebugmanager.pas @@ -188,6 +188,7 @@ procedure RegisterDebugger(const ADebuggerClass: TDebuggerClass); var DebugBoss: TBaseDebugManager; + DebuggerOptions: TDebuggerOptions = nil; implementation @@ -231,7 +232,7 @@ end; class function TDebuggerOptions.GetInstance: TAbstractIDEOptions; begin - Result := nil; + Result := DebuggerOptions; end; initialization diff --git a/ide/main.pp b/ide/main.pp index b258e8d160..e742b6c06a 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -1305,6 +1305,8 @@ begin CodeExplorerOptions.OnAfterWrite := @DoCodeExplorerOptionsAfterWrite; CodeExplorerOptions.Load; + DebuggerOptions := TDebuggerOptions.Create; + MainBuildBoss.SetupInputHistories; CompileProgress.SetEnabled(EnvironmentOptions.ShowCompileDialog); @@ -1511,6 +1513,7 @@ begin FreeThenNil(CodeExplorerOptions); FreeThenNil(MiscellaneousOptions); FreeThenNil(EditorOpts); + FreeThenNil(DebuggerOptions); IDEWindowCreators.OnShowForm:=nil; FreeThenNil(EnvironmentOptions); FreeThenNil(IDECommandScopes);