mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 02:38:03 +02:00
git-svn-id: trunk@20985 -
This commit is contained in:
parent
e97576c1c7
commit
80312b5794
@ -53,6 +53,13 @@ type
|
||||
);
|
||||
TDebugManagerStates = set of TDebugManagerState;
|
||||
|
||||
{ TDebuggerOptions }
|
||||
|
||||
TDebuggerOptions = class(TAbstractIDEOptions)
|
||||
public
|
||||
class function GetGroupCaption:string; override;
|
||||
end;
|
||||
|
||||
TBaseDebugManager = class(TComponent)
|
||||
private
|
||||
function GetDebuggerClass(const AIndex: Integer): TDebuggerClass;
|
||||
@ -170,8 +177,15 @@ begin
|
||||
Result := TDebuggerClass(MDebuggerClasses.Objects[AIndex]);
|
||||
end;
|
||||
|
||||
{ TDebuggerOptions }
|
||||
|
||||
class function TDebuggerOptions.GetGroupCaption: string;
|
||||
begin
|
||||
Result := dlgGroupDebugger;
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterIDEOptionsGroup(GroupDebugger, dlgGroupDebugger);
|
||||
RegisterIDEOptionsGroup(GroupDebugger, TDebuggerOptions);
|
||||
DebugBoss := nil;
|
||||
MDebuggerClasses := TStringList.Create;
|
||||
MDebuggerClasses.Sorted := True;
|
||||
|
@ -152,6 +152,8 @@ type
|
||||
procedure SetObserveCharConst(const AValue: boolean);
|
||||
procedure SetObserverCategories(const AValue: TCEObserverCategories);
|
||||
procedure SetRefresh(const AValue: TCodeExplorerRefresh);
|
||||
public
|
||||
class function GetGroupCaption:string; override;
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
@ -400,6 +402,11 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
class function TCodeExplorerOptions.GetGroupCaption: string;
|
||||
begin
|
||||
Result := dlgGroupCodeExplorer;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerOptions.Clear;
|
||||
begin
|
||||
IncreaseChangeStep;
|
||||
@ -830,6 +837,6 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterIDEOptionsGroup(GroupCodeExplorer, dlgGroupCodeExplorer);
|
||||
RegisterIDEOptionsGroup(GroupCodeExplorer, TCodeExplorerOptions);
|
||||
end.
|
||||
|
||||
|
@ -90,6 +90,8 @@ type
|
||||
FUsesInsertPolicy: TUsesInsertPolicy;
|
||||
|
||||
procedure SetFilename(const AValue: string);
|
||||
public
|
||||
class function GetGroupCaption:string; override;
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
@ -276,6 +278,11 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
class function TCodeToolsOptions.GetGroupCaption: string;
|
||||
begin
|
||||
Result := dlgGroupCodetools;
|
||||
end;
|
||||
|
||||
procedure TCodeToolsOptions.Load;
|
||||
var
|
||||
XMLConfig: TXMLConfig;
|
||||
@ -742,6 +749,6 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterIDEOptionsGroup(GroupCodetools, dlgGroupCodetools);
|
||||
RegisterIDEOptionsGroup(GroupCodetools, TCodeToolsOptions);
|
||||
end.
|
||||
|
||||
|
@ -726,6 +726,8 @@ type
|
||||
// Code Folding
|
||||
FUseCodeFolding: Boolean;
|
||||
|
||||
public
|
||||
class function GetGroupCaption:string; override;
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
@ -2536,6 +2538,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TEditorOptions.GetGroupCaption: string;
|
||||
begin
|
||||
Result := dlgGroupEditor;
|
||||
end;
|
||||
|
||||
function TEditorOptions.GetSynEditOptionName(SynOption: TSynEditorOption
|
||||
): string;
|
||||
begin
|
||||
@ -3547,7 +3554,7 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterIDEOptionsGroup(GroupEditor, dlgGroupEditor);
|
||||
RegisterIDEOptionsGroup(GroupEditor, TEditorOptions);
|
||||
// register all built-in color schemes
|
||||
ColorSchemeFactory.RegisterScheme(DEFAULT_COLOR_SCHEME.Name, DEFAULT_COLOR_SCHEME);
|
||||
ColorSchemeFactory.RegisterScheme(TWILIGHT_COLOR_SCHEME.Name, TWILIGHT_COLOR_SCHEME);
|
||||
|
@ -268,6 +268,8 @@ type
|
||||
function GetXMLCfg(CleanConfig: boolean): TXMLConfig;
|
||||
procedure FileUpdated;
|
||||
procedure SetTestBuildDirectory(const AValue: string);
|
||||
public
|
||||
class function GetGroupCaption:string; override;
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
@ -732,6 +734,11 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
class function TEnvironmentOptions.GetGroupCaption: string;
|
||||
begin
|
||||
Result := dlgGroupEnvironment;
|
||||
end;
|
||||
|
||||
procedure TEnvironmentOptions.SetLazarusDefaultFilename;
|
||||
var
|
||||
ConfFileName: string;
|
||||
@ -1512,6 +1519,6 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterIDEOptionsGroup(GroupEnvironment, dlgGroupEnvironment);
|
||||
RegisterIDEOptionsGroup(GroupEnvironment, TEnvironmentOptions);
|
||||
end.
|
||||
|
||||
|
@ -49,6 +49,8 @@ type
|
||||
FFPCDocsHTMLDirectory: string;
|
||||
procedure SetFPCDocsHTMLDirectory(const AValue: string);
|
||||
procedure SetFilename(const AValue: string);
|
||||
public
|
||||
class function GetGroupCaption:string; override;
|
||||
public
|
||||
constructor Create;
|
||||
procedure Clear;
|
||||
@ -93,6 +95,11 @@ begin
|
||||
Clear;
|
||||
end;
|
||||
|
||||
class function THelpOptions.GetGroupCaption: string;
|
||||
begin
|
||||
Result := dlgGroupHelp;
|
||||
end;
|
||||
|
||||
procedure THelpOptions.Clear;
|
||||
begin
|
||||
FFPCDocsHTMLDirectory := '';
|
||||
@ -216,6 +223,6 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterIDEOptionsGroup(GroupHelp, dlgGroupHelp);
|
||||
RegisterIDEOptionsGroup(GroupHelp, THelpOptions);
|
||||
end.
|
||||
|
||||
|
@ -266,6 +266,7 @@ var
|
||||
GroupNode, ItemNode, ItemParent: TTreeNode;
|
||||
i, j: integer;
|
||||
Rec: PIDEOptionsGroupRec;
|
||||
ACaption: string;
|
||||
begin
|
||||
IDEEditorGroups.Resort;
|
||||
|
||||
@ -274,7 +275,11 @@ begin
|
||||
Rec := IDEEditorGroups[i];
|
||||
if Rec^.Items <> nil then
|
||||
begin
|
||||
GroupNode := CategoryTree.Items.AddChild(nil, Rec^.Caption);
|
||||
if Rec^.GroupClass<>nil then
|
||||
ACaption := Rec^.GroupClass.GetGroupCaption
|
||||
else
|
||||
ACaption := format('g<%d>',[i]);
|
||||
GroupNode := CategoryTree.Items.AddChild(nil, ACaption);
|
||||
for j := 0 to Rec^.Items.Count - 1 do
|
||||
begin
|
||||
Instance := Rec^.Items[j]^.EditorClass.Create(Self);
|
||||
|
@ -36,6 +36,8 @@ type
|
||||
|
||||
// types
|
||||
TAbstractIDEOptions = class(TPersistent)
|
||||
public
|
||||
class function GetGroupCaption:string; virtual; abstract;
|
||||
end;
|
||||
TAbstractIDEOptionsClass = class of TAbstractIDEOptions;
|
||||
|
||||
@ -85,7 +87,7 @@ type
|
||||
|
||||
TIDEOptionsGroupRec = record
|
||||
Index: Integer;
|
||||
Caption: String;
|
||||
GroupClass: TAbstractIDEOptionsClass;
|
||||
Items: TIDEOptionsEditorList;
|
||||
end;
|
||||
PIDEOptionsGroupRec = ^TIDEOptionsGroupRec;
|
||||
@ -101,7 +103,7 @@ type
|
||||
function GetByIndex(AIndex: Integer): PIDEOptionsGroupRec;
|
||||
public
|
||||
procedure Resort;
|
||||
procedure Add(AGroupIndex: Integer; ACaption: String); reintroduce;
|
||||
procedure Add(AGroupIndex: Integer; AGroupClass: TAbstractIDEOptionsClass); reintroduce;
|
||||
property Items[AIndex: Integer]: PIDEOptionsGroupRec read GetItem write SetItem; default;
|
||||
end;
|
||||
|
||||
@ -110,7 +112,7 @@ type
|
||||
function FindEditor(AEditor: TAbstractIDEOptionsEditorClass): TAbstractIDEOptionsEditor; virtual; abstract;
|
||||
end;
|
||||
|
||||
procedure RegisterIDEOptionsGroup(AGroupIndex: Integer; ACaption: String);
|
||||
procedure RegisterIDEOptionsGroup(AGroupIndex: Integer; AGroupClass: TAbstractIDEOptionsClass);
|
||||
procedure RegisterIDEOptionsEditor(AGroupIndex: Integer; AEditorClass: TAbstractIDEOptionsEditorClass; AIndex: Integer; AParent: Integer = NoParent);
|
||||
|
||||
function IDEEditorGroups: TIDEOptionsGroupList;
|
||||
@ -174,9 +176,9 @@ begin
|
||||
Result := FIDEEditorGroups;
|
||||
end;
|
||||
|
||||
procedure RegisterIDEOptionsGroup(AGroupIndex: Integer; ACaption: String);
|
||||
procedure RegisterIDEOptionsGroup(AGroupIndex: Integer; AGroupClass:TAbstractIDEOptionsClass);
|
||||
begin
|
||||
IDEEditorGroups.Add(AGroupIndex, ACaption);
|
||||
IDEEditorGroups.Add(AGroupIndex, AGroupClass);
|
||||
end;
|
||||
|
||||
procedure RegisterIDEOptionsEditor(AGroupIndex: Integer; AEditorClass: TAbstractIDEOptionsEditorClass; AIndex: Integer; AParent: Integer = NoParent);
|
||||
@ -186,7 +188,7 @@ begin
|
||||
Rec := IDEEditorGroups.GetByIndex(AGroupIndex);
|
||||
if Rec = nil then
|
||||
begin
|
||||
RegisterIDEOptionsGroup(AGroupIndex, IntToStr(AGroupIndex));
|
||||
RegisterIDEOptionsGroup(AGroupIndex, nil);
|
||||
Rec := IDEEditorGroups.GetByIndex(AGroupIndex);
|
||||
end;
|
||||
|
||||
@ -332,7 +334,7 @@ begin
|
||||
Items[i]^.Items.Resort;
|
||||
end;
|
||||
|
||||
procedure TIDEOptionsGroupList.Add(AGroupIndex: Integer; ACaption: String);
|
||||
procedure TIDEOptionsGroupList.Add(AGroupIndex: Integer; AGroupClass: TAbstractIDEOptionsClass);
|
||||
var
|
||||
Rec: PIDEOptionsGroupRec;
|
||||
begin
|
||||
@ -345,7 +347,7 @@ begin
|
||||
inherited Add(Rec);
|
||||
end;
|
||||
|
||||
Rec^.Caption := ACaption;
|
||||
Rec^.GroupClass := AGroupClass;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
Loading…
Reference in New Issue
Block a user