IDE: Move TDebuggerOptions to IdeDebugger package

This commit is contained in:
Martin 2022-06-22 15:05:03 +02:00
parent cd4ff05a09
commit 5b625349ee
10 changed files with 54 additions and 27 deletions

View File

@ -37,7 +37,7 @@ uses
GDBMIDebugger,
// IDE
TransferMacros, LazarusIDEStrConsts, PathEditorDlg, IDEProcs, DialogProcs,
InputHistory, EnvironmentOpts, BaseDebugManager, Debugger;
InputHistory, EnvironmentOpts, BaseDebugManager, Debugger, IdeDebuggerOpts;
type

View File

@ -33,7 +33,8 @@ uses
// IdeIntf
IDEOptionsIntf, IDEOptEditorIntf,
// IDE
Debugger, LazarusIDEStrConsts, EnvironmentOpts, BaseDebugManager;
Debugger, IdeDebuggerOpts, LazarusIDEStrConsts, EnvironmentOpts,
BaseDebugManager;
type
{ TDebuggerEventLogOptionsFrame }

View File

@ -34,7 +34,7 @@ uses
IDEOptionsIntf, IDEOptEditorIntf,
// IDE
LazarusIDEStrConsts, PathEditorDlg, IDEProcs,
EnvironmentOpts, BaseDebugManager;
EnvironmentOpts, BaseDebugManager, IdeDebuggerOpts;
type

View File

@ -31,7 +31,7 @@ uses
// IdeIntf
IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf,
// IDE
LazarusIDEStrConsts, Debugger, BaseDebugManager;
LazarusIDEStrConsts, Debugger, IdeDebuggerOpts, BaseDebugManager;
type
{ TDebuggerSignalsOptions }

View File

@ -50,6 +50,7 @@ uses
// DebuggerIntf
DbgIntfBaseTypes, DbgIntfDebuggerBase, DbgIntfPseudoTerminal,
LazDebuggerIntf,
IdeDebuggerOpts,
// IDE
Debugger, SourceMarks, Project, ProjectDefs, LazarusIDEStrConsts;
@ -108,14 +109,6 @@ type
TDbgInitFlag = (difInitForAttach);
TDbgInitFlags = set of TDbgInitFlag;
{ TDebuggerOptions }
TDebuggerOptions = class(TAbstractIDEEnvironmentOptions)
public
class function GetGroupCaption:string; override;
class function GetInstance: TAbstractIDEOptions; override;
end;
TBaseDebugManager = class(TBaseDebugManagerIntf)
protected
FDestroying: boolean;
@ -257,22 +250,9 @@ type
var
DebugBoss: TBaseDebugManager;
DebuggerOptions: TDebuggerOptions = nil;
implementation
{ TDebuggerOptions }
class function TDebuggerOptions.GetGroupCaption: string;
begin
Result := dlgGroupDebugger;
end;
class function TDebuggerOptions.GetInstance: TAbstractIDEOptions;
begin
Result := DebuggerOptions;
end;
initialization
RegisterIDEOptionsGroup(GroupDebugger, TDebuggerOptions);
DebugBoss := nil;

View File

@ -149,7 +149,7 @@ uses
JumpHistoryView, DesktopManager, DiskDiffsDialog,
BuildLazDialog, BuildProfileManager, BuildManager, CheckCompOptsForNewUnitDlg,
MiscOptions, InputHistory, InputhistoryWithSearchOpt, UnitDependencies,
IDEFPCInfo, IDEInfoDlg, IDEInfoNeedBuild, ProcessList, InitialSetupDlgs,
IDEFPCInfo, IDEInfoDlg, IDEInfoNeedBuild, ProcessList, IdeDebuggerOpts, InitialSetupDlgs,
InitialSetupProc, NewDialog, MakeResStrDlg, DialogProcs, FindReplaceDialog,
FindInFilesDlg, CodeExplorer, BuildFileDlg, ProcedureList, ExtractProcDlg,
FindRenameIdentifier, AbstractsMethodsDlg, EmptyMethodsDlg, UnusedUnitsDlg,

View File

@ -69,6 +69,10 @@
<Filename Value="idedebuggerstringconstants.pas"/>
<UnitName Value="IdeDebuggerStringConstants"/>
</Item>
<Item>
<Filename Value="idedebuggeropts.pas"/>
<UnitName Value="IdeDebuggerOpts"/>
</Item>
</Files>
<RequiredPkgs>
<Item>

View File

@ -0,0 +1,41 @@
unit IdeDebuggerOpts;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, IDEOptionsIntf, IdeDebuggerStringConstants;
type
TDebuggerOptions = class(TAbstractIDEEnvironmentOptions)
class function GetGroupCaption:string; override;
class function GetInstance: TAbstractIDEOptions; override;
end;
var
DebuggerOptions: TDebuggerOptions = nil;
implementation
const
DebuggerOptsConfFileName = 'debuggeroptions.xml';
{ TDebuggerOptions }
class function TDebuggerOptions.GetGroupCaption: string;
begin
Result := dlgIdeDbgDebugger;
end;
class function TDebuggerOptions.GetInstance: TAbstractIDEOptions;
begin
Result := DebuggerOptions;
end;
end.

View File

@ -11,7 +11,7 @@ uses
IdeDebuggerBase, Debugger, ProcessDebugger, ProcessList, DebuggerTreeView,
IdeDebuggerUtils, IdeDebuggerWatchResult, IdeDebuggerWatchResPrinter,
IdeDebuggerWatchResUtils, ArrayNavigationFrame, IdeDebuggerStringConstants,
LazarusPackageIntf;
IdeDebuggerOpts, LazarusPackageIntf;
implementation

View File

@ -11,6 +11,7 @@ resourcestring
dlgInspectIndexOfFirstItemToShow = 'Index of first item to show';
dlgInspectAmountOfItemsToShow = 'Amount of items to show';
dlgInspectBoundsDD = 'Bounds: %d .. %d';
dlgIdeDbgDebugger = 'Debugger';
implementation