diff --git a/.gitattributes b/.gitattributes index f866cb3d51..39a8daddda 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2001,6 +2001,7 @@ components/ideintf/ideimagesintf.pas svneol=native#text/pascal components/ideintf/ideintf.lpk svneol=native#text/plain components/ideintf/ideintf.pas svneol=native#text/plain components/ideintf/idemsgintf.pas svneol=native#text/plain +components/ideintf/ideopteditorintf.pas svneol=native#text/pascal components/ideintf/ideoptionsintf.pas svneol=native#text/pascal components/ideintf/idetextconverter.pas svneol=native#text/plain components/ideintf/ideutils.pas svneol=native#text/plain diff --git a/components/anchordocking/design/registeranchordocking.pas b/components/anchordocking/design/registeranchordocking.pas index 8be7fd893e..b415391788 100644 --- a/components/anchordocking/design/registeranchordocking.pas +++ b/components/anchordocking/design/registeranchordocking.pas @@ -42,7 +42,7 @@ uses // LazUtils LazFileCache, LazFileUtils, // IdeIntf - LCLIntf, IDEWindowIntf, IDEOptionsIntf, LazIDEIntf, + LCLIntf, IDEWindowIntf, IDEOptionsIntf, IDEOptEditorIntf, LazIDEIntf, // AnchorDocking AnchorDockStr, AnchorDocking, AnchorDesktopOptions, AnchorDockOptionsDlg; diff --git a/components/codetools/ide/codymiscoptsframe.pas b/components/codetools/ide/codymiscoptsframe.pas index d63c930e90..1672d4e29c 100644 --- a/components/codetools/ide/codymiscoptsframe.pas +++ b/components/codetools/ide/codymiscoptsframe.pas @@ -5,10 +5,17 @@ unit CodyMiscOptsFrame; interface uses - Classes, SysUtils, FileUtil, DividerBevel, LResources, Forms, Controls, - StdCtrls, ComCtrls, FileProcs, - IDEOptionsIntf, LazIDEIntf, - CodyOpts, CodyIdentifiersDlg, CodyStrConsts; + Classes, SysUtils, + // LazUtils + FileUtil, + // LCL + LResources, Forms, Controls, StdCtrls, ComCtrls, + // LazControls + DividerBevel, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, LazIDEIntf, + // CodeTools + FileProcs, CodyOpts, CodyIdentifiersDlg, CodyStrConsts; type { TCodyMiscOptionsFrame } diff --git a/components/codetools/ide/codyregistration.pas b/components/codetools/ide/codyregistration.pas index 3f690b1ffa..65d2c30546 100644 --- a/components/codetools/ide/codyregistration.pas +++ b/components/codetools/ide/codyregistration.pas @@ -30,10 +30,16 @@ unit CodyRegistration; interface uses - Classes, SysUtils, LazUTF8, LResources, LCLProc, Controls, Forms, - MenuIntf, IDEWindowIntf, SrcEditorIntf, IDEOptionsIntf, ProjectIntf, - IDECommands, NewIDEWndDlg, - CodeToolManager, + Classes, SysUtils, + // LazUtils + LazUTF8, + // LCL + LResources, LCLProc, Controls, Forms, + // IdeIntf + MenuIntf, IDEWindowIntf, SrcEditorIntf, IDEOptionsIntf, IDEOptEditorIntf, + ProjectIntf, IDECommands, + // CodeTools + NewIDEWndDlg, CodeToolManager, CodyStrConsts, CodyUtils, CodyCtrls, CodyOpts, PPUListDlg, AddAssignMethodDlg, AddWithBlockDlg, CodyFindOverloads, {$IFDEF EnableCodyExperiments} diff --git a/components/education/educomppalette.pas b/components/education/educomppalette.pas index e69efbc106..fdc16d278a 100644 --- a/components/education/educomppalette.pas +++ b/components/education/educomppalette.pas @@ -25,7 +25,7 @@ uses // LazUtils LazConfigStorage, AvgLvlTree, // IdeIntf - FormEditingIntf, IDEOptionsIntf, ComponentReg, IDEImagesIntf, + FormEditingIntf, IDEOptionsIntf, IDEOptEditorIntf, ComponentReg, IDEImagesIntf, // Education EduOptions; diff --git a/components/education/eduenvoptsframe.pas b/components/education/eduenvoptsframe.pas index 01ed78f811..08f578c8a9 100644 --- a/components/education/eduenvoptsframe.pas +++ b/components/education/eduenvoptsframe.pas @@ -18,9 +18,14 @@ unit EduEnvOptsFrame; interface uses - Classes, SysUtils, LCLProc, FileUtil, LResources, Forms, Controls, Graphics, - Dialogs, ExtCtrls, StdCtrls, - LazConfigStorage, IDEOptionsIntf, IDEImagesIntf, LazIDEIntf, + Classes, SysUtils, + // LazUtils + LazConfigStorage, + // LCL + LCLProc, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, LazIDEIntf, + // Education EduOptions; const diff --git a/components/education/edumenu.pas b/components/education/edumenu.pas index 4715cad60b..1d90c86688 100644 --- a/components/education/edumenu.pas +++ b/components/education/edumenu.pas @@ -24,7 +24,7 @@ uses // LazUtils AvgLvlTree, LazConfigStorage, // IdeIntf - IDEOptionsIntf, MenuIntf, IDEImagesIntf, + IDEOptionsIntf, IDEOptEditorIntf, MenuIntf, IDEImagesIntf, // Education EduOptions; diff --git a/components/education/edunewprogram.pas b/components/education/edunewprogram.pas index f9e77eb0bf..1baa93432b 100644 --- a/components/education/edunewprogram.pas +++ b/components/education/edunewprogram.pas @@ -19,10 +19,20 @@ unit EduNewProgram; interface uses - Classes, LCLProc, SysUtils, FileUtil, LResources, Forms, StdCtrls, ExtCtrls, - SynEdit, SynHighlighterPas, BasicCodeTools, ComCtrls, Dialogs, Controls, - LazConfigStorage, IDEOptionsIntf, MenuIntf, IDEImagesIntf, LazIDEIntf, - IDEDialogs, ProjectIntf, IDECommands, EduOptions; + Classes, SysUtils, + // LazUtils + FileUtil, LazConfigStorage, + // LCL + LCLProc, LResources, Forms, Controls, StdCtrls, ExtCtrls, ComCtrls, Dialogs, + // SynEdit + SynEdit, SynHighlighterPas, + // CodeTools + BasicCodeTools, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, MenuIntf, IDEImagesIntf, LazIDEIntf, ProjectIntf, + IDECommands, IDEDialogs, + // Education + EduOptions; const FileDescNameSingleFileProgram = 'Single file program for education'; diff --git a/components/education/eduoipages.pas b/components/education/eduoipages.pas index a87b0dae3d..584f023ae9 100644 --- a/components/education/eduoipages.pas +++ b/components/education/eduoipages.pas @@ -18,8 +18,14 @@ unit EduOIPages; interface uses - Classes, Forms, LCLProc, StdCtrls, ExtCtrls, LazConfigStorage, - ObjectInspector, ObjInspStrConsts, IDEOptionsIntf, FormEditingIntf, + Classes, + // LCL + LCLProc, Forms, StdCtrls, ExtCtrls, + // LazUtils + LazConfigStorage, + // IdeIntf + ObjectInspector, ObjInspStrConsts, IDEOptionsIntf, IDEOptEditorIntf, FormEditingIntf, + // Education EduOptions; type diff --git a/components/education/edupkgsystem.pas b/components/education/edupkgsystem.pas index 7554e09325..96292cf46b 100644 --- a/components/education/edupkgsystem.pas +++ b/components/education/edupkgsystem.pas @@ -18,8 +18,15 @@ unit EduPkgSystem; interface uses - Classes, SysUtils, FileUtil, LResources, Forms, Controls, StdCtrls, EduOptions, - LazConfigStorage, IDEOptionsIntf; + SysUtils, + // LCL + LResources, Forms, Controls, StdCtrls, + // LazUtils + LazConfigStorage, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // Education + EduOptions; type diff --git a/components/education/edupropsevents.pas b/components/education/edupropsevents.pas index 3198a3e194..d7cc46bef9 100644 --- a/components/education/edupropsevents.pas +++ b/components/education/edupropsevents.pas @@ -18,8 +18,15 @@ unit EduPropsEvents; interface uses - Classes, LResources, Forms, StdCtrls, ExtCtrls, LazConfigStorage, IDEOptionsIntf, EduOptions, - ObjectInspector; + Classes, + // LCL + LResources, Forms, StdCtrls, ExtCtrls, + // LazUtils + LazConfigStorage, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // Education + EduOptions; type diff --git a/components/education/eduspeedbuttons.pas b/components/education/eduspeedbuttons.pas index 6cdb9b1a1c..4b5ba43777 100644 --- a/components/education/eduspeedbuttons.pas +++ b/components/education/eduspeedbuttons.pas @@ -25,7 +25,7 @@ uses // LazUtils LazConfigStorage, AvgLvlTree, // IdeIntf - IDEOptionsIntf, LazIDEIntf, IDEImagesIntf, + IDEOptionsIntf, IDEOptEditorIntf, LazIDEIntf, IDEImagesIntf, // Education EduOptions; diff --git a/components/externhelp/externhelpfrm.pas b/components/externhelp/externhelpfrm.pas index bd76257771..131e049eb4 100644 --- a/components/externhelp/externhelpfrm.pas +++ b/components/externhelp/externhelpfrm.pas @@ -35,10 +35,15 @@ unit ExternHelpFrm; interface uses - Classes, SysUtils, LCLProc, FileUtil, LResources, Forms, Controls, Graphics, - Dialogs, LazConfigStorage, LazFileUtils, ComCtrls, Buttons, StdCtrls, - ExtCtrls, ButtonPanel, LazHelpIntf, PackageIntf, MacroIntf, IDEOptionsIntf, - LazIDEIntf, BaseIDEIntf, IDEDialogs, HelpIntfs, IDEImagesIntf, SrcEditorIntf; + Classes, SysUtils, + // LazUtils + FileUtil, LazFileUtils, LazConfigStorage, + // LCL + LCLProc, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls, Buttons, StdCtrls, + ExtCtrls, ButtonPanel, HelpIntfs, + // IdeIntf + LazHelpIntf, PackageIntf, MacroIntf, IDEOptionsIntf, IDEOptEditorIntf, + LazIDEIntf, BaseIDEIntf, IDEDialogs, IDEImagesIntf, SrcEditorIntf; const ExternHelpConfigVersion = 1; diff --git a/components/ideintf/ideopteditorintf.pas b/components/ideintf/ideopteditorintf.pas new file mode 100644 index 0000000000..3836ac6d58 --- /dev/null +++ b/components/ideintf/ideopteditorintf.pas @@ -0,0 +1,629 @@ +{ + *************************************************************************** + * * + * 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 . You can also * + * obtain it by writing to the Free Software Foundation, * + * Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1335, USA. * + * * + *************************************************************************** +} +unit IDEOptEditorIntf; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, + // LCL + LCLProc, Controls, Buttons, Forms, StdCtrls, Graphics, ComCtrls, Grids, + // LazUtils + Laz2_XMLCfg, LazMethodList, + // IdeIntf + IDEOptionsIntf, EditorSyntaxHighlighterDef; + +type + // forward + TAbstractOptionsEditorDialog = class; + + // Original font styles, used by filter. + + TDefaultFont = class + FStyles: TFontStyles; // FColor: TColor; + constructor Create(AStyles: TFontStyles); + end; + TDefaultFontList = TStringList; + + TIDEEditorOptions = class(TAbstractIDEEnvironmentOptions) + protected + function GetTabPosition: TTabPosition; virtual; abstract; + public + // read-only access to options needed by external packages. + // feel free to extend when needed + function ExtensionToLazSyntaxHighlighter(Ext: String): TLazSyntaxHighlighter; virtual; abstract; + property TabPosition: TTabPosition read GetTabPosition; + end; + + { TAbstractIDEOptionsEditor base frame class for all options frames (global, project and packages) } + + PIDEOptionsEditorRec = ^TIDEOptionsEditorRec; + PIDEOptionsGroupRec = ^TIDEOptionsGroupRec; + + TAbstractIDEOptionsEditor = class(TFrame) + private + FOnChange: TNotifyEvent; + FOnLoadIDEOptions: TOnLoadIDEOptions; + FOnSaveIDEOptions: TOnSaveIDEOptions; + FRec: PIDEOptionsEditorRec; + FGroupRec: PIDEOptionsGroupRec; + FDefaultFonts: TDefaultFontList; + protected + procedure DoOnChange; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function Check: Boolean; virtual; + function GetTitle: String; virtual; abstract; + procedure Setup(ADialog: TAbstractOptionsEditorDialog); virtual; abstract; + procedure ReadSettings(AOptions: TAbstractIDEOptions); virtual; abstract; // options to gui + procedure WriteSettings(AOptions: TAbstractIDEOptions); virtual; abstract; // gui to options + procedure RestoreSettings({%H-}AOptions: TAbstractIDEOptions); virtual;// user cancelled dialog -> restore any changes + class function SupportedOptionsClass: TAbstractIDEOptionsClass; virtual; abstract; + class function DefaultCollapseChildNodes: Boolean; virtual; + function FindOptionControl(AClass: TControlClass): TControl; + procedure RememberDefaultStyles; + function ContainsTextInCaption(AText: string): Boolean; + + property OnLoadIDEOptions: TOnLoadIDEOptions read FOnLoadIDEOptions write FOnLoadIDEOptions; + property OnSaveIDEOptions: TOnSaveIDEOptions read FOnSaveIDEOptions write FOnSaveIDEOptions; + property OnChange: TNotifyEvent read FOnChange write FOnChange; + property Rec: PIDEOptionsEditorRec read FRec write FRec; + property GroupRec: PIDEOptionsGroupRec read FGroupRec write FGroupRec; + end; + TAbstractIDEOptionsEditorClass = class of TAbstractIDEOptionsEditor; + + TIDEOptionsEditorRec = record + Index: Integer; + Parent: Integer; + EditorClass: TAbstractIDEOptionsEditorClass; + Collapsed, DefaultCollapsed: Boolean; + end; + + { TIDEOptionsEditorList } + + TIDEOptionsEditorList = class(TList) + private + function GetItem(AIndex: Integer): PIDEOptionsEditorRec; + procedure SetItem(AIndex: Integer; const AValue: PIDEOptionsEditorRec); + protected + procedure Notify(Ptr: Pointer; Action: TListNotification); override; + function GetByIndex(AIndex: Integer): PIDEOptionsEditorRec; + public + procedure Resort; + function Add(AEditorClass: TAbstractIDEOptionsEditorClass; AIndex, AParent: Integer): PIDEOptionsEditorRec; reintroduce; + property Items[AIndex: Integer]: PIDEOptionsEditorRec read GetItem write SetItem; default; + end; + + TIDEOptionsGroupRec = record + Index: Integer; + GroupClass: TAbstractIDEOptionsClass; + Items: TIDEOptionsEditorList; + Collapsed, DefaultCollapsed: Boolean; + end; + + { TIDEOptionsGroupList } + + TIDEOptionsGroupList = class(TList) + private + FLastSelected: PIDEOptionsEditorRec; + function GetItem(Position: Integer): PIDEOptionsGroupRec; + procedure SetItem(Position: Integer; const AValue: PIDEOptionsGroupRec); + protected + procedure Notify(Ptr: Pointer; Action: TListNotification); override; + public + procedure Resort; + procedure DoAfterWrite(Restore: boolean); + function GetByIndex(AIndex: Integer): PIDEOptionsGroupRec; + function GetByGroupClass(AGroupClass: TAbstractIDEOptionsClass): PIDEOptionsGroupRec; + function Add(AGroupIndex: Integer; AGroupClass: TAbstractIDEOptionsClass): PIDEOptionsGroupRec; reintroduce; + property Items[Position: Integer]: PIDEOptionsGroupRec read GetItem write SetItem; default; + property LastSelected: PIDEOptionsEditorRec read FLastSelected write FLastSelected; + end; + + TAbstractOptionsEditorDialog = class(TForm) + public + function AddButton: TBitBtn; virtual; abstract; + procedure AddButtonSeparator; virtual; abstract; + function AddControl(AControlClass: TControlClass): TControl; virtual; abstract; reintroduce; + function FindEditor(AEditor: TAbstractIDEOptionsEditorClass): TAbstractIDEOptionsEditor; virtual; abstract; + function FindEditor(const IDEOptionsEditorClassName: string): TAbstractIDEOptionsEditor; virtual; abstract; + function FindEditor(GroupIndex, AIndex: integer): TAbstractIDEOptionsEditor; virtual; abstract; + function FindEditorClass(GroupIndex, AIndex: integer): TAbstractIDEOptionsEditorClass; virtual; abstract; + procedure OpenEditor(AEditor: TAbstractIDEOptionsEditorClass); virtual; abstract; + procedure OpenEditor(GroupIndex, AIndex: integer); virtual; abstract; + function ResetFilter: Boolean; virtual; abstract; + procedure UpdateBuildModeGUI; virtual; abstract; + end; + +function GetFreeIDEOptionsGroupIndex(AStartIndex: Integer): Integer; +function GetFreeIDEOptionsIndex(AGroupIndex: Integer; AStartIndex: Integer): Integer; +function RegisterIDEOptionsGroup(AGroupIndex: Integer; + AGroupClass: TAbstractIDEOptionsClass; + FindFreeIndex: boolean = true): PIDEOptionsGroupRec; +function RegisterIDEOptionsEditor(AGroupIndex: Integer; + AEditorClass: TAbstractIDEOptionsEditorClass; + AIndex: Integer; AParent: Integer = NoParent; + AutoCreateGroup: boolean = false): PIDEOptionsEditorRec; + +function IDEEditorGroups: TIDEOptionsGroupList; + +var + IDEEditorOptions: TIDEEditorOptions; + +const + // Font style used by filter + MatchFontStyle: TFontStyles = [fsBold, fsItalic]; // Color = clFuchsia; + + +implementation + +var + FIDEEditorGroups: TIDEOptionsGroupList; + +function IDEEditorGroups: TIDEOptionsGroupList; +begin + if FIDEEditorGroups = nil then + FIDEEditorGroups := TIDEOptionsGroupList.Create; + Result := FIDEEditorGroups; +end; + +function RegisterIDEOptionsGroup(AGroupIndex: Integer; + AGroupClass: TAbstractIDEOptionsClass; FindFreeIndex: boolean): PIDEOptionsGroupRec; +begin + if FindFreeIndex then + AGroupIndex:=GetFreeIDEOptionsGroupIndex(AGroupIndex); + Result:=IDEEditorGroups.Add(AGroupIndex, AGroupClass); +end; + +function RegisterIDEOptionsEditor(AGroupIndex: Integer; + AEditorClass: TAbstractIDEOptionsEditorClass; AIndex: Integer; + AParent: Integer; AutoCreateGroup: boolean): PIDEOptionsEditorRec; +var + Rec: PIDEOptionsGroupRec; +begin + Rec := IDEEditorGroups.GetByIndex(AGroupIndex); + if Rec = nil then + begin + if not AutoCreateGroup then + raise Exception.Create('RegisterIDEOptionsEditor: missing Group'); + Rec := RegisterIDEOptionsGroup(AGroupIndex, nil); + end; + + if Rec^.Items = nil then + Rec^.Items := TIDEOptionsEditorList.Create; + Result:=Rec^.Items.Add(AEditorClass, AIndex, AParent); +end; + +function GetFreeIDEOptionsGroupIndex(AStartIndex: Integer): Integer; +var + I: Integer; +begin + for I := AStartIndex to High(Integer) do + if IDEEditorGroups.GetByIndex(I) = nil then + Exit(I); + Result := -1; +end; + +function GetFreeIDEOptionsIndex(AGroupIndex: Integer; AStartIndex: Integer): Integer; +var + Rec: PIDEOptionsGroupRec; + I: Integer; +begin + Result := -1; // -1 = error + Rec := IDEEditorGroups.GetByIndex(AGroupIndex); + if Rec = nil then + Exit; + + for I := AStartIndex to High(Integer) do + if Rec^.Items.GetByIndex(I) = nil then + Exit(I); +end; + +function GroupListCompare(Item1, Item2: Pointer): Integer; +var + Rec1: PIDEOptionsGroupRec absolute Item1; + Rec2: PIDEOptionsGroupRec absolute Item2; +begin + if Rec1^.Index < Rec2^.Index then + Result := -1 + else + if Rec1^.Index > Rec2^.Index then + Result := 1 + else + Result := 0; +end; + +function OptionsListCompare(Item1, Item2: Pointer): Integer; +var + Rec1: PIDEOptionsEditorRec absolute Item1; + Rec2: PIDEOptionsEditorRec absolute Item2; +begin + if Rec1^.Index < Rec2^.Index then + Result := -1 + else + if Rec1^.Index > Rec2^.Index then + Result := 1 + else + Result := 0; +end; + +{ TDefaultFont } + +constructor TDefaultFont.Create(AStyles: TFontStyles); +begin + FStyles:=AStyles; +end; + +{ TAbstractIDEOptionsEditor } + +constructor TAbstractIDEOptionsEditor.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FDefaultFonts:=nil; +end; + +destructor TAbstractIDEOptionsEditor.Destroy; +var + i: Integer; +begin + if Assigned(FDefaultFonts) then begin + for i := 0 to FDefaultFonts.Count-1 do + FDefaultFonts.Objects[i].Free; + FDefaultFonts.Free; + end; + inherited Destroy; +end; + +procedure TAbstractIDEOptionsEditor.DoOnChange; +begin + if Assigned(FOnChange) then + FOnChange(self); +end; + +function TAbstractIDEOptionsEditor.Check: Boolean; +begin + Result := True; +end; + +procedure TAbstractIDEOptionsEditor.RestoreSettings(AOptions: TAbstractIDEOptions); +begin + +end; + +class function TAbstractIDEOptionsEditor.DefaultCollapseChildNodes: Boolean; +begin + Result := False; +end; + +function TAbstractIDEOptionsEditor.FindOptionControl(AClass: TControlClass): TControl; + + function Search(AControl: TControl): TControl; + var + i: Integer; + AWinControl: TWinControl; + begin + if AControl is AClass then + exit(AControl); + // Search child controls inside this one. + if AControl is TWinControl then begin + AWinControl:=TWinControl(AControl); + for i:=0 to AWinControl.ControlCount-1 do begin + Result:=Search(AWinControl.Controls[i]); // Recursive call. + if Result<>nil then exit; + end; + end; + Result:=nil; + end; + +begin + Result:=Search(GetParentForm(Self)); +end; + +procedure TAbstractIDEOptionsEditor.RememberDefaultStyles; +// Store original font styles of controls to a map so the filter can restore them. + + procedure Search(AControl: TControl); + var + i: Integer; + AWinControl: TWinControl; + begin + // Store only if there is any style defined + if AControl.Font.Style <> [] then begin + Assert(AControl.Font.Style<>MatchFontStyle, 'Do not use the same font style that filter uses.'); + FDefaultFonts.AddObject(AControl.Name, TDefaultFont.Create(AControl.Font.Style)); + end; + // Search child controls inside this one. + if AControl is TWinControl then begin + AWinControl:=TWinControl(AControl); + for i:=0 to AWinControl.ControlCount-1 do + Search(AWinControl.Controls[i]); // Recursive call. + end; + end; + +begin + if FDefaultFonts=nil then begin + FDefaultFonts:=TDefaultFontList.Create; + Search(Self); + FDefaultFonts.Sorted:=True; + end; +end; + +function TAbstractIDEOptionsEditor.ContainsTextInCaption(AText: string): Boolean; +var + LowerText: String; + + function SearchComboBox({%H-}AControl: TCustomComboBox): Boolean; + begin + Result:=False; // ToDo... + end; + + function SearchListBox(AControl: TCustomListBox): Boolean; + var + i: Integer; + begin + Result:=False; + for i := 0 to AControl.Items.Count-1 do begin + if Pos(LowerText, LowerCase(AControl.Items[i]))>0 then begin + //if Length(LowerText)>2 then + // DebugLn('TAbstractIDEOptionsEditor.ContainsTextInCaption: Searching "', + // LowerText, '", Found "', AControl.Items[i], '", in ListBox ', AControl.Name); + // ToDo: Indicate found item somehow. + Result:=True; + end; + end; + end; + + function SearchListView({%H-}AControl: TCustomListView): Boolean; + begin + Result:=False; // ToDo... + end; + + function SearchTreeView({%H-}AControl: TCustomTreeView): Boolean; + begin + Result:=False; // ToDo... + end; + + function SearchStringGrid({%H-}AControl: TCustomStringGrid): Boolean; + begin + Result:=False; // ToDo... + end; + + function SearchMemo({%H-}AControl: TCustomMemo): Boolean; + begin + Result:=False; // Memo.Caption returns all the lines, skip. + end; + + function Search(AControl: TControl): Boolean; + var + i: Integer; + AWinControl: TWinControl; + DefStyle: TFontStyles; + begin + Result:=False; + if AControl.Visible then begin + // *** First find matches in different controls *** + // TSynEdit can't be used here in IdeOptionsIntf ! + //if AControl is TSynEdit then Found:=SearchSynEdit(AControl) + if AControl is TCustomComboBox then + Result:=SearchComboBox(TCustomComboBox(AControl)) + else if AControl is TCustomListBox then + Result:=SearchListBox(TCustomListBox(AControl)) + else if AControl is TCustomListView then + Result:=SearchListView(TCustomListView(AControl)) + else if AControl is TCustomTreeView then + Result:=SearchTreeView(TCustomTreeView(AControl)) + else if AControl is TCustomStringGrid then + Result:=SearchStringGrid(TCustomStringGrid(AControl)) + else if AControl is TCustomMemo then + Result:=SearchMemo(TCustomMemo(AControl)) + else begin + Result:=Pos(LowerText, LowerCase(AControl.Caption))>0; + // Indicate the match + if Result then + AControl.Font.Style:=MatchFontStyle + // or, remove the indication. + else if AControl.Font.Style=MatchFontStyle then begin + DefStyle:=[]; + if FDefaultFonts.Find(AControl.Name, i) then + DefStyle:=TDefaultFont(FDefaultFonts.Objects[i]).FStyles; + AControl.Font.Style:=DefStyle; + end; + end; + end; + + // Check child controls inside this one. + if AControl is TWinControl then begin + AWinControl:=TWinControl(AControl); + for i:=0 to AWinControl.ControlCount-1 do + if Search(AWinControl.Controls[i]) then // Recursive call + Result:=True; + end; + end; + +begin + LowerText:=LowerCase(AText); + Result:=Search(Self); +end; + +{ TIDEOptionsEditorList } + +function TIDEOptionsEditorList.GetItem(AIndex: Integer): PIDEOptionsEditorRec; +begin + Result := PIDEOptionsEditorRec(inherited Get(AIndex)); +end; + +procedure TIDEOptionsEditorList.SetItem(AIndex: Integer; const AValue: PIDEOptionsEditorRec); +begin + inherited Put(AIndex, AValue); +end; + +procedure TIDEOptionsEditorList.Notify(Ptr: Pointer; Action: TListNotification); +begin + if Action = lnDeleted then + Dispose(PIDEOptionsEditorRec(Ptr)); + inherited Notify(Ptr, Action); +end; + +function TIDEOptionsEditorList.GetByIndex(AIndex: Integer): PIDEOptionsEditorRec; +var + i: integer; +begin + Result := nil; + for i := 0 to Count - 1 do + if Items[i]^.Index = AIndex then + begin + Result := Items[i]; + break; + end; +end; + +procedure TIDEOptionsEditorList.Resort; +begin + Sort(@OptionsListCompare); +end; + +function TIDEOptionsEditorList.Add(AEditorClass: TAbstractIDEOptionsEditorClass; + AIndex, AParent: Integer): PIDEOptionsEditorRec; +begin + repeat + Result := GetByIndex(AIndex); + if Result = nil then break; + inc(AIndex); + until false; + New(Result); + Result^.Index := AIndex; + Result^.Parent := AParent; + Result^.Collapsed := AEditorClass.DefaultCollapseChildNodes; + Result^.DefaultCollapsed := AEditorClass.DefaultCollapseChildNodes; + inherited Add(Result); + + Result^.EditorClass := AEditorClass; +end; + +{ TIDEOptionsGroupList } + +function TIDEOptionsGroupList.GetItem(Position: Integer): PIDEOptionsGroupRec; +begin + Result := PIDEOptionsGroupRec(inherited Get(Position)); +end; + +procedure TIDEOptionsGroupList.SetItem(Position: Integer; + const AValue: PIDEOptionsGroupRec); +begin + inherited Put(Position, AValue); +end; + +procedure TIDEOptionsGroupList.Notify(Ptr: Pointer; Action: TListNotification); +begin + if Action = lnDeleted then + begin + PIDEOptionsGroupRec(Ptr)^.Items.Free; + Dispose(PIDEOptionsGroupRec(Ptr)); + end; + inherited Notify(Ptr, Action); +end; + +function TIDEOptionsGroupList.GetByIndex(AIndex: Integer): PIDEOptionsGroupRec; +var + i: integer; +begin + Result := nil; + for i := 0 to Count - 1 do + if Items[i]^.Index = AIndex then + begin + Result := Items[i]; + break; + end; +end; + +function TIDEOptionsGroupList.GetByGroupClass( + AGroupClass: TAbstractIDEOptionsClass): PIDEOptionsGroupRec; +var + i: Integer; +begin + for i:=0 to Count-1 do + begin + Result:=Items[i]; + if Result^.GroupClass=AGroupClass then exit; + end; + Result:=nil; +end; + +procedure TIDEOptionsGroupList.Resort; +var + i: integer; +begin + Sort(@GroupListCompare); + for i := 0 to Count - 1 do + if Items[i]^.Items <> nil then + Items[i]^.Items.Resort; +end; + +procedure TIDEOptionsGroupList.DoAfterWrite(Restore: boolean); +var + i: integer; + Rec: PIDEOptionsGroupRec; + Instance: TAbstractIDEOptions; +begin + for i := 0 to Count - 1 do + begin + Rec := Items[i]; + if Rec^.Items <> nil then + begin + if Rec^.GroupClass <> nil then + begin + Instance := Rec^.GroupClass.GetInstance; + if Instance <> nil then + Instance.DoAfterWrite(Restore); + end; + end; + end; +end; + +function TIDEOptionsGroupList.Add(AGroupIndex: Integer; + AGroupClass: TAbstractIDEOptionsClass): PIDEOptionsGroupRec; +begin + Result := GetByIndex(AGroupIndex); + if Result = nil then + begin + New(Result); + Result^.Index := AGroupIndex; + Result^.Items := nil; + Result^.Collapsed := False; + Result^.DefaultCollapsed := False; + inherited Add(Result); + end; + + Result^.GroupClass := AGroupClass; +end; + + +initialization + FIDEEditorGroups := nil; + +finalization + FreeAndNil(FIDEEditorGroups); + +end. + diff --git a/components/ideintf/ideoptionsintf.pas b/components/ideintf/ideoptionsintf.pas index 4318a07417..320e57cd21 100644 --- a/components/ideintf/ideoptionsintf.pas +++ b/components/ideintf/ideoptionsintf.pas @@ -26,30 +26,13 @@ interface uses Classes, SysUtils, - // LCL - LCLProc, Controls, Buttons, Forms, StdCtrls, Graphics, ComCtrls, Grids, // LazUtils - Laz2_XMLCfg, LazMethodList, - // IdeIntf - EditorSyntaxHighlighterDef; + Laz2_XMLCfg, LazMethodList; const NoParent = -1; type - // forward - TAbstractOptionsEditorDialog = class; - - // Original font styles, used by filter. - - { TDefaultFont } - - TDefaultFont = class - FStyles: TFontStyles; // FColor: TColor; - constructor Create(AStyles: TFontStyles); - end; - TDefaultFontList = TStringList; - TIDEOptionsHandler = ( iohBeforeRead, iohAfterRead, @@ -123,6 +106,9 @@ type TAbstractIDEEnvironmentOptions = class(TAbstractIDEOptions); TAbstractIDEHelpOptions = class(TAbstractIDEEnvironmentOptions); + TOnLoadIDEOptions = procedure(Sender: TObject; AOptions: TAbstractIDEOptions) of object; + TOnSaveIDEOptions = procedure(Sender: TObject; AOptions: TAbstractIDEOptions) of object; + TOnAddToRecent = procedure(Sender: TObject; AFileName: string; var AAllow: Boolean) of object; TIDERecentHandler = (irhOpenFiles, irhProjectFiles, irhPackageFiles); @@ -155,140 +141,10 @@ type procedure RemoveHandlerAddToRecentPackageFiles(Handler: TOnAddToRecent); end; - TIDEEditorOptions = class(TAbstractIDEEnvironmentOptions) - protected - function GetTabPosition: TTabPosition; virtual; abstract; - public - // read-only access to options needed by external packages. - // feel free to extend when needed - function ExtensionToLazSyntaxHighlighter(Ext: String): TLazSyntaxHighlighter; virtual; abstract; - property TabPosition: TTabPosition read GetTabPosition; - end; - - TOnLoadIDEOptions = procedure(Sender: TObject; AOptions: TAbstractIDEOptions) of object; - TOnSaveIDEOptions = procedure(Sender: TObject; AOptions: TAbstractIDEOptions) of object; - - { TAbstractIDEOptionsEditor base frame class for all options frames (global, project and packages) } - - PIDEOptionsEditorRec = ^TIDEOptionsEditorRec; - PIDEOptionsGroupRec = ^TIDEOptionsGroupRec; - - TAbstractIDEOptionsEditor = class(TFrame) - private - FOnChange: TNotifyEvent; - FOnLoadIDEOptions: TOnLoadIDEOptions; - FOnSaveIDEOptions: TOnSaveIDEOptions; - FRec: PIDEOptionsEditorRec; - FGroupRec: PIDEOptionsGroupRec; - FDefaultFonts: TDefaultFontList; - protected - procedure DoOnChange; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function Check: Boolean; virtual; - function GetTitle: String; virtual; abstract; - procedure Setup(ADialog: TAbstractOptionsEditorDialog); virtual; abstract; - procedure ReadSettings(AOptions: TAbstractIDEOptions); virtual; abstract; // options to gui - procedure WriteSettings(AOptions: TAbstractIDEOptions); virtual; abstract; // gui to options - procedure RestoreSettings({%H-}AOptions: TAbstractIDEOptions); virtual;// user cancelled dialog -> restore any changes - class function SupportedOptionsClass: TAbstractIDEOptionsClass; virtual; abstract; - class function DefaultCollapseChildNodes: Boolean; virtual; - function FindOptionControl(AClass: TControlClass): TControl; - procedure RememberDefaultStyles; - function ContainsTextInCaption(AText: string): Boolean; - - property OnLoadIDEOptions: TOnLoadIDEOptions read FOnLoadIDEOptions write FOnLoadIDEOptions; - property OnSaveIDEOptions: TOnSaveIDEOptions read FOnSaveIDEOptions write FOnSaveIDEOptions; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - property Rec: PIDEOptionsEditorRec read FRec write FRec; - property GroupRec: PIDEOptionsGroupRec read FGroupRec write FGroupRec; - end; - TAbstractIDEOptionsEditorClass = class of TAbstractIDEOptionsEditor; - - TIDEOptionsEditorRec = record - Index: Integer; - Parent: Integer; - EditorClass: TAbstractIDEOptionsEditorClass; - Collapsed, DefaultCollapsed: Boolean; - end; - - { TIDEOptionsEditorList } - - TIDEOptionsEditorList = class(TList) - private - function GetItem(AIndex: Integer): PIDEOptionsEditorRec; - procedure SetItem(AIndex: Integer; const AValue: PIDEOptionsEditorRec); - protected - procedure Notify(Ptr: Pointer; Action: TListNotification); override; - function GetByIndex(AIndex: Integer): PIDEOptionsEditorRec; - public - procedure Resort; - function Add(AEditorClass: TAbstractIDEOptionsEditorClass; AIndex, AParent: Integer): PIDEOptionsEditorRec; reintroduce; - property Items[AIndex: Integer]: PIDEOptionsEditorRec read GetItem write SetItem; default; - end; - - TIDEOptionsGroupRec = record - Index: Integer; - GroupClass: TAbstractIDEOptionsClass; - Items: TIDEOptionsEditorList; - Collapsed, DefaultCollapsed: Boolean; - end; - - { TIDEOptionsGroupList } - - TIDEOptionsGroupList = class(TList) - private - FLastSelected: PIDEOptionsEditorRec; - function GetItem(Position: Integer): PIDEOptionsGroupRec; - procedure SetItem(Position: Integer; const AValue: PIDEOptionsGroupRec); - protected - procedure Notify(Ptr: Pointer; Action: TListNotification); override; - public - procedure Resort; - procedure DoAfterWrite(Restore: boolean); - function GetByIndex(AIndex: Integer): PIDEOptionsGroupRec; - function GetByGroupClass(AGroupClass: TAbstractIDEOptionsClass): PIDEOptionsGroupRec; - function Add(AGroupIndex: Integer; AGroupClass: TAbstractIDEOptionsClass): PIDEOptionsGroupRec; reintroduce; - property Items[Position: Integer]: PIDEOptionsGroupRec read GetItem write SetItem; default; - property LastSelected: PIDEOptionsEditorRec read FLastSelected write FLastSelected; - end; - - TAbstractOptionsEditorDialog = class(TForm) - public - function AddButton: TBitBtn; virtual; abstract; - procedure AddButtonSeparator; virtual; abstract; - function AddControl(AControlClass: TControlClass): TControl; virtual; abstract; reintroduce; - function FindEditor(AEditor: TAbstractIDEOptionsEditorClass): TAbstractIDEOptionsEditor; virtual; abstract; - function FindEditor(const IDEOptionsEditorClassName: string): TAbstractIDEOptionsEditor; virtual; abstract; - function FindEditor(GroupIndex, AIndex: integer): TAbstractIDEOptionsEditor; virtual; abstract; - function FindEditorClass(GroupIndex, AIndex: integer): TAbstractIDEOptionsEditorClass; virtual; abstract; - procedure OpenEditor(AEditor: TAbstractIDEOptionsEditorClass); virtual; abstract; - procedure OpenEditor(GroupIndex, AIndex: integer); virtual; abstract; - function ResetFilter: Boolean; virtual; abstract; - procedure UpdateBuildModeGUI; virtual; abstract; - end; - -function GetFreeIDEOptionsGroupIndex(AStartIndex: Integer): Integer; -function GetFreeIDEOptionsIndex(AGroupIndex: Integer; AStartIndex: Integer): Integer; -function RegisterIDEOptionsGroup(AGroupIndex: Integer; - AGroupClass: TAbstractIDEOptionsClass; - FindFreeIndex: boolean = true): PIDEOptionsGroupRec; -function RegisterIDEOptionsEditor(AGroupIndex: Integer; - AEditorClass: TAbstractIDEOptionsEditorClass; - AIndex: Integer; AParent: Integer = NoParent; - AutoCreateGroup: boolean = false): PIDEOptionsEditorRec; - -function IDEEditorGroups: TIDEOptionsGroupList; - var IDEEnvironmentOptions: TIDEEnvironmentOptions; - IDEEditorOptions: TIDEEditorOptions; const - // Font style used by filter - MatchFontStyle: TFontStyles = [fsBold, fsItalic]; // Color = clFuchsia; - // predefined environment options groups GroupEnvironment = 100; EnvOptionsFiles = 100; @@ -385,96 +241,6 @@ var implementation -var - FIDEEditorGroups: TIDEOptionsGroupList; - -function IDEEditorGroups: TIDEOptionsGroupList; -begin - if FIDEEditorGroups = nil then - FIDEEditorGroups := TIDEOptionsGroupList.Create; - Result := FIDEEditorGroups; -end; - -function RegisterIDEOptionsGroup(AGroupIndex: Integer; - AGroupClass: TAbstractIDEOptionsClass; FindFreeIndex: boolean): PIDEOptionsGroupRec; -begin - if FindFreeIndex then - AGroupIndex:=GetFreeIDEOptionsGroupIndex(AGroupIndex); - Result:=IDEEditorGroups.Add(AGroupIndex, AGroupClass); -end; - -function RegisterIDEOptionsEditor(AGroupIndex: Integer; - AEditorClass: TAbstractIDEOptionsEditorClass; AIndex: Integer; - AParent: Integer; AutoCreateGroup: boolean): PIDEOptionsEditorRec; -var - Rec: PIDEOptionsGroupRec; -begin - Rec := IDEEditorGroups.GetByIndex(AGroupIndex); - if Rec = nil then - begin - if not AutoCreateGroup then - raise Exception.Create('RegisterIDEOptionsEditor: missing Group'); - Rec := RegisterIDEOptionsGroup(AGroupIndex, nil); - end; - - if Rec^.Items = nil then - Rec^.Items := TIDEOptionsEditorList.Create; - Result:=Rec^.Items.Add(AEditorClass, AIndex, AParent); -end; - -function GetFreeIDEOptionsGroupIndex(AStartIndex: Integer): Integer; -var - I: Integer; -begin - for I := AStartIndex to High(Integer) do - if IDEEditorGroups.GetByIndex(I) = nil then - Exit(I); - Result := -1; -end; - -function GetFreeIDEOptionsIndex(AGroupIndex: Integer; AStartIndex: Integer): Integer; -var - Rec: PIDEOptionsGroupRec; - I: Integer; -begin - Result := -1; // -1 = error - Rec := IDEEditorGroups.GetByIndex(AGroupIndex); - if Rec = nil then - Exit; - - for I := AStartIndex to High(Integer) do - if Rec^.Items.GetByIndex(I) = nil then - Exit(I); -end; - -function GroupListCompare(Item1, Item2: Pointer): Integer; -var - Rec1: PIDEOptionsGroupRec absolute Item1; - Rec2: PIDEOptionsGroupRec absolute Item2; -begin - if Rec1^.Index < Rec2^.Index then - Result := -1 - else - if Rec1^.Index > Rec2^.Index then - Result := 1 - else - Result := 0; -end; - -function OptionsListCompare(Item1, Item2: Pointer): Integer; -var - Rec1: PIDEOptionsEditorRec absolute Item1; - Rec2: PIDEOptionsEditorRec absolute Item2; -begin - if Rec1^.Index < Rec2^.Index then - Result := -1 - else - if Rec1^.Index > Rec2^.Index then - Result := 1 - else - Result := 0; -end; - { TIDEEnvironmentOptions } constructor TIDEEnvironmentOptions.Create; @@ -571,356 +337,6 @@ begin inherited Create; end; -{ TDefaultFont } - -constructor TDefaultFont.Create(AStyles: TFontStyles); -begin - FStyles:=AStyles; -end; - -{ TAbstractIDEOptionsEditor } - -constructor TAbstractIDEOptionsEditor.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FDefaultFonts:=nil; -end; - -destructor TAbstractIDEOptionsEditor.Destroy; -var - i: Integer; -begin - if Assigned(FDefaultFonts) then begin - for i := 0 to FDefaultFonts.Count-1 do - FDefaultFonts.Objects[i].Free; - FDefaultFonts.Free; - end; - inherited Destroy; -end; - -procedure TAbstractIDEOptionsEditor.DoOnChange; -begin - if Assigned(FOnChange) then - FOnChange(self); -end; - -function TAbstractIDEOptionsEditor.Check: Boolean; -begin - Result := True; -end; - -procedure TAbstractIDEOptionsEditor.RestoreSettings(AOptions: TAbstractIDEOptions); -begin - -end; - -class function TAbstractIDEOptionsEditor.DefaultCollapseChildNodes: Boolean; -begin - Result := False; -end; - -function TAbstractIDEOptionsEditor.FindOptionControl(AClass: TControlClass): TControl; - - function Search(AControl: TControl): TControl; - var - i: Integer; - AWinControl: TWinControl; - begin - if AControl is AClass then - exit(AControl); - // Search child controls inside this one. - if AControl is TWinControl then begin - AWinControl:=TWinControl(AControl); - for i:=0 to AWinControl.ControlCount-1 do begin - Result:=Search(AWinControl.Controls[i]); // Recursive call. - if Result<>nil then exit; - end; - end; - Result:=nil; - end; - -begin - Result:=Search(GetParentForm(Self)); -end; - -procedure TAbstractIDEOptionsEditor.RememberDefaultStyles; -// Store original font styles of controls to a map so the filter can restore them. - - procedure Search(AControl: TControl); - var - i: Integer; - AWinControl: TWinControl; - begin - // Store only if there is any style defined - if AControl.Font.Style <> [] then begin - Assert(AControl.Font.Style<>MatchFontStyle, 'Do not use the same font style that filter uses.'); - FDefaultFonts.AddObject(AControl.Name, TDefaultFont.Create(AControl.Font.Style)); - end; - // Search child controls inside this one. - if AControl is TWinControl then begin - AWinControl:=TWinControl(AControl); - for i:=0 to AWinControl.ControlCount-1 do - Search(AWinControl.Controls[i]); // Recursive call. - end; - end; - -begin - if FDefaultFonts=nil then begin - FDefaultFonts:=TDefaultFontList.Create; - Search(Self); - FDefaultFonts.Sorted:=True; - end; -end; - -function TAbstractIDEOptionsEditor.ContainsTextInCaption(AText: string): Boolean; -var - LowerText: String; - - function SearchComboBox({%H-}AControl: TCustomComboBox): Boolean; - begin - Result:=False; // ToDo... - end; - - function SearchListBox(AControl: TCustomListBox): Boolean; - var - i: Integer; - begin - Result:=False; - for i := 0 to AControl.Items.Count-1 do begin - if Pos(LowerText, LowerCase(AControl.Items[i]))>0 then begin - //if Length(LowerText)>2 then - // DebugLn('TAbstractIDEOptionsEditor.ContainsTextInCaption: Searching "', - // LowerText, '", Found "', AControl.Items[i], '", in ListBox ', AControl.Name); - // ToDo: Indicate found item somehow. - Result:=True; - end; - end; - end; - - function SearchListView({%H-}AControl: TCustomListView): Boolean; - begin - Result:=False; // ToDo... - end; - - function SearchTreeView({%H-}AControl: TCustomTreeView): Boolean; - begin - Result:=False; // ToDo... - end; - - function SearchStringGrid({%H-}AControl: TCustomStringGrid): Boolean; - begin - Result:=False; // ToDo... - end; - - function SearchMemo({%H-}AControl: TCustomMemo): Boolean; - begin - Result:=False; // Memo.Caption returns all the lines, skip. - end; - - function Search(AControl: TControl): Boolean; - var - i: Integer; - AWinControl: TWinControl; - DefStyle: TFontStyles; - begin - Result:=False; - if AControl.Visible then begin - // *** First find matches in different controls *** - // TSynEdit can't be used here in IdeOptionsIntf ! - //if AControl is TSynEdit then Found:=SearchSynEdit(AControl) - if AControl is TCustomComboBox then - Result:=SearchComboBox(TCustomComboBox(AControl)) - else if AControl is TCustomListBox then - Result:=SearchListBox(TCustomListBox(AControl)) - else if AControl is TCustomListView then - Result:=SearchListView(TCustomListView(AControl)) - else if AControl is TCustomTreeView then - Result:=SearchTreeView(TCustomTreeView(AControl)) - else if AControl is TCustomStringGrid then - Result:=SearchStringGrid(TCustomStringGrid(AControl)) - else if AControl is TCustomMemo then - Result:=SearchMemo(TCustomMemo(AControl)) - else begin - Result:=Pos(LowerText, LowerCase(AControl.Caption))>0; - // Indicate the match - if Result then - AControl.Font.Style:=MatchFontStyle - // or, remove the indication. - else if AControl.Font.Style=MatchFontStyle then begin - DefStyle:=[]; - if FDefaultFonts.Find(AControl.Name, i) then - DefStyle:=TDefaultFont(FDefaultFonts.Objects[i]).FStyles; - AControl.Font.Style:=DefStyle; - end; - end; - end; - - // Check child controls inside this one. - if AControl is TWinControl then begin - AWinControl:=TWinControl(AControl); - for i:=0 to AWinControl.ControlCount-1 do - if Search(AWinControl.Controls[i]) then // Recursive call - Result:=True; - end; - end; - -begin - LowerText:=LowerCase(AText); - Result:=Search(Self); -end; - -{ TIDEOptionsEditorList } - -function TIDEOptionsEditorList.GetItem(AIndex: Integer): PIDEOptionsEditorRec; -begin - Result := PIDEOptionsEditorRec(inherited Get(AIndex)); -end; - -procedure TIDEOptionsEditorList.SetItem(AIndex: Integer; const AValue: PIDEOptionsEditorRec); -begin - inherited Put(AIndex, AValue); -end; - -procedure TIDEOptionsEditorList.Notify(Ptr: Pointer; Action: TListNotification); -begin - if Action = lnDeleted then - Dispose(PIDEOptionsEditorRec(Ptr)); - inherited Notify(Ptr, Action); -end; - -function TIDEOptionsEditorList.GetByIndex(AIndex: Integer): PIDEOptionsEditorRec; -var - i: integer; -begin - Result := nil; - for i := 0 to Count - 1 do - if Items[i]^.Index = AIndex then - begin - Result := Items[i]; - break; - end; -end; - -procedure TIDEOptionsEditorList.Resort; -begin - Sort(@OptionsListCompare); -end; - -function TIDEOptionsEditorList.Add(AEditorClass: TAbstractIDEOptionsEditorClass; - AIndex, AParent: Integer): PIDEOptionsEditorRec; -begin - repeat - Result := GetByIndex(AIndex); - if Result = nil then break; - inc(AIndex); - until false; - New(Result); - Result^.Index := AIndex; - Result^.Parent := AParent; - Result^.Collapsed := AEditorClass.DefaultCollapseChildNodes; - Result^.DefaultCollapsed := AEditorClass.DefaultCollapseChildNodes; - inherited Add(Result); - - Result^.EditorClass := AEditorClass; -end; - -{ TIDEOptionsGroupList } - -function TIDEOptionsGroupList.GetItem(Position: Integer): PIDEOptionsGroupRec; -begin - Result := PIDEOptionsGroupRec(inherited Get(Position)); -end; - -procedure TIDEOptionsGroupList.SetItem(Position: Integer; - const AValue: PIDEOptionsGroupRec); -begin - inherited Put(Position, AValue); -end; - -procedure TIDEOptionsGroupList.Notify(Ptr: Pointer; Action: TListNotification); -begin - if Action = lnDeleted then - begin - PIDEOptionsGroupRec(Ptr)^.Items.Free; - Dispose(PIDEOptionsGroupRec(Ptr)); - end; - inherited Notify(Ptr, Action); -end; - -function TIDEOptionsGroupList.GetByIndex(AIndex: Integer): PIDEOptionsGroupRec; -var - i: integer; -begin - Result := nil; - for i := 0 to Count - 1 do - if Items[i]^.Index = AIndex then - begin - Result := Items[i]; - break; - end; -end; - -function TIDEOptionsGroupList.GetByGroupClass( - AGroupClass: TAbstractIDEOptionsClass): PIDEOptionsGroupRec; -var - i: Integer; -begin - for i:=0 to Count-1 do - begin - Result:=Items[i]; - if Result^.GroupClass=AGroupClass then exit; - end; - Result:=nil; -end; - -procedure TIDEOptionsGroupList.Resort; -var - i: integer; -begin - Sort(@GroupListCompare); - for i := 0 to Count - 1 do - if Items[i]^.Items <> nil then - Items[i]^.Items.Resort; -end; - -procedure TIDEOptionsGroupList.DoAfterWrite(Restore: boolean); -var - i: integer; - Rec: PIDEOptionsGroupRec; - Instance: TAbstractIDEOptions; -begin - for i := 0 to Count - 1 do - begin - Rec := Items[i]; - if Rec^.Items <> nil then - begin - if Rec^.GroupClass <> nil then - begin - Instance := Rec^.GroupClass.GetInstance; - if Instance <> nil then - Instance.DoAfterWrite(Restore); - end; - end; - end; -end; - -function TIDEOptionsGroupList.Add(AGroupIndex: Integer; - AGroupClass: TAbstractIDEOptionsClass): PIDEOptionsGroupRec; -begin - Result := GetByIndex(AGroupIndex); - if Result = nil then - begin - New(Result); - Result^.Index := AGroupIndex; - Result^.Items := nil; - Result^.Collapsed := False; - Result^.DefaultCollapsed := False; - inherited Add(Result); - end; - - Result^.GroupClass := AGroupClass; -end; - { TAbstractIDEOptions } constructor TAbstractIDEOptions.Create; @@ -1039,9 +455,4 @@ begin fHandlers[iohDestroy].Remove(TMethod(Handler)); end; -initialization - FIDEEditorGroups := nil; - -finalization - FreeAndNil(FIDEEditorGroups); end. diff --git a/components/ideintf/lazideintf.pas b/components/ideintf/lazideintf.pas index 1777f361ab..8558e183a3 100644 --- a/components/ideintf/lazideintf.pas +++ b/components/ideintf/lazideintf.pas @@ -22,8 +22,8 @@ uses // LazUtils LazMethodList, // IdeIntf - PropEdits, IDEOptionsIntf, CompOptsIntf, ProjectIntf, IDEExternToolIntf, - SrcEditorIntf, IDEWindowIntf; + PropEdits, IDEOptionsIntf, IDEOptEditorIntf, CompOptsIntf, ProjectIntf, + IDEExternToolIntf, SrcEditorIntf, IDEWindowIntf; type TIDEDirective = ( diff --git a/components/jcf2/Settings/JcfSettings.pas b/components/jcf2/Settings/JcfSettings.pas index 204ec5f920..a8ff205005 100644 --- a/components/jcf2/Settings/JcfSettings.pas +++ b/components/jcf2/Settings/JcfSettings.pas @@ -40,7 +40,7 @@ uses SetComments, SetCaps, SetWordList, SetAlign, SetReplace, SetUses, SetPreProcessor, SettingsStream, SetTransform, SetAsm, - JcfVersionConsts, IDEOptionsIntf; + JcfVersionConsts, IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frAnyCapsSettings.pas b/components/jcf2/Ui/Settings/frAnyCapsSettings.pas index d74b07f407..27951e548d 100644 --- a/components/jcf2/Ui/Settings/frAnyCapsSettings.pas +++ b/components/jcf2/Ui/Settings/frAnyCapsSettings.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frAsm.pas b/components/jcf2/Ui/Settings/frAsm.pas index ab401a077a..97c87dfb45 100644 --- a/components/jcf2/Ui/Settings/frAsm.pas +++ b/components/jcf2/Ui/Settings/frAsm.pas @@ -31,7 +31,7 @@ interface uses SysUtils, StdCtrls, ExtCtrls, Spin, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frBlankLines.pas b/components/jcf2/Ui/Settings/frBlankLines.pas index 5e30484538..b5b9286ed9 100644 --- a/components/jcf2/Ui/Settings/frBlankLines.pas +++ b/components/jcf2/Ui/Settings/frBlankLines.pas @@ -29,8 +29,9 @@ unit frBlankLines; interface uses - Classes, Math, StdCtrls, Spin, - IDEOptionsIntf; + Classes, Math, + StdCtrls, Spin, + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frClarify.pas b/components/jcf2/Ui/Settings/frClarify.pas index 5d653a09df..8b924a855e 100644 --- a/components/jcf2/Ui/Settings/frClarify.pas +++ b/components/jcf2/Ui/Settings/frClarify.pas @@ -30,8 +30,9 @@ unit frClarify; interface uses - Classes, StdCtrls, ExtCtrls, - IDEOptionsIntf; + Classes, + StdCtrls, ExtCtrls, + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frClarifyAlign.pas b/components/jcf2/Ui/Settings/frClarifyAlign.pas index 97c7a67587..ea91dfb29d 100644 --- a/components/jcf2/Ui/Settings/frClarifyAlign.pas +++ b/components/jcf2/Ui/Settings/frClarifyAlign.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, Spin, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frClarifyBlocks.pas b/components/jcf2/Ui/Settings/frClarifyBlocks.pas index 931597f98d..6fe1e0c267 100644 --- a/components/jcf2/Ui/Settings/frClarifyBlocks.pas +++ b/components/jcf2/Ui/Settings/frClarifyBlocks.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, ExtCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frClarifyCaseBlocks.pas b/components/jcf2/Ui/Settings/frClarifyCaseBlocks.pas index d987c3ce5e..c9e12f8037 100644 --- a/components/jcf2/Ui/Settings/frClarifyCaseBlocks.pas +++ b/components/jcf2/Ui/Settings/frClarifyCaseBlocks.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, ExtCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frClarifyIndent.pas b/components/jcf2/Ui/Settings/frClarifyIndent.pas index 3b97ce7cfc..a02b0fd673 100644 --- a/components/jcf2/Ui/Settings/frClarifyIndent.pas +++ b/components/jcf2/Ui/Settings/frClarifyIndent.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, Spin, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frClarifyLongLineBreaker.pas b/components/jcf2/Ui/Settings/frClarifyLongLineBreaker.pas index 1bc27b2166..7071e507fe 100644 --- a/components/jcf2/Ui/Settings/frClarifyLongLineBreaker.pas +++ b/components/jcf2/Ui/Settings/frClarifyLongLineBreaker.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, ExtCtrls, Spin, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frClarifyReturns.pas b/components/jcf2/Ui/Settings/frClarifyReturns.pas index 95aa953309..163b1af9cb 100644 --- a/components/jcf2/Ui/Settings/frClarifyReturns.pas +++ b/components/jcf2/Ui/Settings/frClarifyReturns.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, ExtCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frClarifySpaces.pas b/components/jcf2/Ui/Settings/frClarifySpaces.pas index 782a8432fe..7eb724b6a2 100644 --- a/components/jcf2/Ui/Settings/frClarifySpaces.pas +++ b/components/jcf2/Ui/Settings/frClarifySpaces.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, ExtCtrls, Spin, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frComments.pas b/components/jcf2/Ui/Settings/frComments.pas index 0a4bdde644..717fad451e 100644 --- a/components/jcf2/Ui/Settings/frComments.pas +++ b/components/jcf2/Ui/Settings/frComments.pas @@ -31,7 +31,7 @@ interface uses StdCtrls, Classes, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frCompilerDirectReturns.pas b/components/jcf2/Ui/Settings/frCompilerDirectReturns.pas index 219fcd9d29..79786658fb 100644 --- a/components/jcf2/Ui/Settings/frCompilerDirectReturns.pas +++ b/components/jcf2/Ui/Settings/frCompilerDirectReturns.pas @@ -31,7 +31,7 @@ interface uses Classes, Graphics, Controls, Forms, StdCtrls, ExtCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frFiles.pas b/components/jcf2/Ui/Settings/frFiles.pas index e79a847101..2f5f6d7aff 100644 --- a/components/jcf2/Ui/Settings/frFiles.pas +++ b/components/jcf2/Ui/Settings/frFiles.pas @@ -30,10 +30,9 @@ unit frFiles; interface uses - { delphi } - SysUtils, Classes, Controls, Forms, StdCtrls, Graphics, - { lazarus } - IDEOptionsIntf, dialogs; + SysUtils, + Controls, StdCtrls, Graphics, Dialogs, + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frIdentifierCapsSettings.pas b/components/jcf2/Ui/Settings/frIdentifierCapsSettings.pas index c67d1bdde4..b2a5e07aca 100644 --- a/components/jcf2/Ui/Settings/frIdentifierCapsSettings.pas +++ b/components/jcf2/Ui/Settings/frIdentifierCapsSettings.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frNotIdentifierCapsSettings.pas b/components/jcf2/Ui/Settings/frNotIdentifierCapsSettings.pas index 6a8c962757..25b3f6a24e 100644 --- a/components/jcf2/Ui/Settings/frNotIdentifierCapsSettings.pas +++ b/components/jcf2/Ui/Settings/frNotIdentifierCapsSettings.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frObfuscateSettings.pas b/components/jcf2/Ui/Settings/frObfuscateSettings.pas index 1e50be7736..7efac6917b 100644 --- a/components/jcf2/Ui/Settings/frObfuscateSettings.pas +++ b/components/jcf2/Ui/Settings/frObfuscateSettings.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, ExtCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type { TfObfuscateSettings } diff --git a/components/jcf2/Ui/Settings/frPreProcessor.pas b/components/jcf2/Ui/Settings/frPreProcessor.pas index 802ce2e72d..c198584ed0 100644 --- a/components/jcf2/Ui/Settings/frPreProcessor.pas +++ b/components/jcf2/Ui/Settings/frPreProcessor.pas @@ -31,7 +31,8 @@ interface { preprocessor symbols } uses - Classes, StdCtrls, IDEOptionsIntf; + Classes, StdCtrls, + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frReplace.pas b/components/jcf2/Ui/Settings/frReplace.pas index 5dd6955f24..65ba89f47b 100644 --- a/components/jcf2/Ui/Settings/frReplace.pas +++ b/components/jcf2/Ui/Settings/frReplace.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frReservedCapsSettings.pas b/components/jcf2/Ui/Settings/frReservedCapsSettings.pas index 29d100c054..80aa74c2ae 100644 --- a/components/jcf2/Ui/Settings/frReservedCapsSettings.pas +++ b/components/jcf2/Ui/Settings/frReservedCapsSettings.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, ExtCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frTransform.pas b/components/jcf2/Ui/Settings/frTransform.pas index 5adb74268f..a9d9412bc5 100644 --- a/components/jcf2/Ui/Settings/frTransform.pas +++ b/components/jcf2/Ui/Settings/frTransform.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, ExtCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frUnitCaps.pas b/components/jcf2/Ui/Settings/frUnitCaps.pas index 0a791c7e0a..731b75dcca 100644 --- a/components/jcf2/Ui/Settings/frUnitCaps.pas +++ b/components/jcf2/Ui/Settings/frUnitCaps.pas @@ -30,7 +30,7 @@ interface uses Classes, Controls, Forms, StdCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frUses.pas b/components/jcf2/Ui/Settings/frUses.pas index ffd6039c6b..7317d2099b 100644 --- a/components/jcf2/Ui/Settings/frUses.pas +++ b/components/jcf2/Ui/Settings/frUses.pas @@ -31,7 +31,7 @@ interface uses Classes, StdCtrls, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/jcf2/Ui/Settings/frWarnings.pas b/components/jcf2/Ui/Settings/frWarnings.pas index 8e8607d98a..ee71b02bac 100644 --- a/components/jcf2/Ui/Settings/frWarnings.pas +++ b/components/jcf2/Ui/Settings/frWarnings.pas @@ -31,7 +31,7 @@ interface uses StdCtrls, Classes, - IDEOptionsIntf; + IDEOptionsIntf, IDEOptEditorIntf; type diff --git a/components/macroscript/emsideoptions.pas b/components/macroscript/emsideoptions.pas index d7aecabe7d..7a012c8695 100644 --- a/components/macroscript/emsideoptions.pas +++ b/components/macroscript/emsideoptions.pas @@ -5,8 +5,13 @@ unit EMSIdeOptions; interface uses - Classes, SysUtils, FileUtil, Forms, Controls, StdCtrls, IDEOptionsIntf, - SrcEditorIntf, EMScriptMacro, EMSStrings; + SysUtils, + // LCL + StdCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, SrcEditorIntf, + // MacroScript + EMScriptMacro, EMSStrings; type diff --git a/components/macroscript/registerems.pas b/components/macroscript/registerems.pas index 9a4da85375..efab5b4fe3 100644 --- a/components/macroscript/registerems.pas +++ b/components/macroscript/registerems.pas @@ -5,8 +5,13 @@ unit RegisterEMS; interface uses - Classes, SysUtils, SrcEditorIntf, IDEOptionsIntf, EMScriptMacro, EMSSelfTest, - EMSIdeOptions, EMSStrings, Dialogs; + Classes, SysUtils, + // LCL + Dialogs, + // IdeIntf + SrcEditorIntf, IDEOptionsIntf, IDEOptEditorIntf, + // MacroScript + EMScriptMacro, EMSSelfTest, EMSIdeOptions, EMSStrings; procedure Register; diff --git a/components/packagetabs/packagetabs_impl.pas b/components/packagetabs/packagetabs_impl.pas index 77cc153b3c..540902a346 100644 --- a/components/packagetabs/packagetabs_impl.pas +++ b/components/packagetabs/packagetabs_impl.pas @@ -30,10 +30,17 @@ unit packagetabs_impl; interface uses - Classes, SysUtils, Types, Contnrs, Controls, SrcEditorIntf, StdCtrls, Buttons, - ComCtrls, Forms, LazFileUtils, PackageIntf, Graphics, Menus, LazIDEIntf, - ExtCtrls, IDEImagesIntf, Laz2_XMLCfg, IDECommands, LCLIntf, - IDEOptionsIntf, ProjectIntf, packagetabsstr, Clipbrd, LCLProc; + Classes, SysUtils, Types, Contnrs, + // LCL + LCLProc, LCLIntf, Forms, Controls, StdCtrls, Buttons, ComCtrls, ExtCtrls, + Graphics, Menus, Clipbrd, + // LazUtils + LazFileUtils, Laz2_XMLCfg, + // IdeIntf + SrcEditorIntf, PackageIntf, LazIDEIntf, IDEImagesIntf, IDECommands, + IDEOptEditorIntf, ProjectIntf, + // PackageTabs + packagetabsstr; type TPackageTabButton = class(TSpeedButton) @@ -589,8 +596,7 @@ end; { TPackageTabPanel } -constructor TPackageTabPanel.Create(AParentWindow: TSourceEditorWindowInterface - ); +constructor TPackageTabPanel.Create(AParentWindow: TSourceEditorWindowInterface); begin inherited Create(nil); diff --git a/components/pas2js/pjsdsgnoptsframe.pas b/components/pas2js/pjsdsgnoptsframe.pas index 99edb8b2d0..0fbf0166f3 100644 --- a/components/pas2js/pjsdsgnoptsframe.pas +++ b/components/pas2js/pjsdsgnoptsframe.pas @@ -16,7 +16,7 @@ uses // LazUtils LazFileCache, LazFileUtils, // IdeIntf - IDEOptionsIntf, IDEUtils, + IDEOptionsIntf, IDEOptEditorIntf, IDEUtils, // Pas2Js PJSDsgnOptions; diff --git a/components/pas2js/pjsdsgnregister.pas b/components/pas2js/pjsdsgnregister.pas index 25bbed5372..894a8ec50e 100644 --- a/components/pas2js/pjsdsgnregister.pas +++ b/components/pas2js/pjsdsgnregister.pas @@ -5,8 +5,15 @@ unit PJSDsgnRegister; interface uses - Classes, SysUtils, Forms, Controls, ProjectIntf, CompOptsIntf, LazIDEIntf, IDEOptionsIntf, - PJSDsgnOptions, PJSDsgnOptsFrame, LazLoggerBase; + Classes, SysUtils, + // LCL + Forms, Controls, + // LazUtils + LazLoggerBase, + // IdeIntf + ProjectIntf, CompOptsIntf, LazIDEIntf, IDEOptionsIntf, IDEOptEditorIntf, + // Pas2js + PJSDsgnOptions, PJSDsgnOptsFrame; const ProjDescNamePas2JSWebApp = 'Web Application'; diff --git a/components/pas2js/pjsprojectoptions.pp b/components/pas2js/pjsprojectoptions.pp index a605b08dfd..1f6c91e501 100644 --- a/components/pas2js/pjsprojectoptions.pp +++ b/components/pas2js/pjsprojectoptions.pp @@ -5,8 +5,13 @@ unit pjsprojectoptions; interface uses - Classes, SysUtils, Forms, Controls, StdCtrls, ExtCtrls, Spin, projectintf, - CompOptsIntf, IDEOptionsIntf, LazLoggerBase; + Classes, SysUtils, + // LCL + StdCtrls, Spin, + // LazUtils + LazLoggerBase, + // IdeIntf + LazIDEIntf, ProjectIntf, CompOptsIntf, IDEOptionsIntf, IDEOptEditorIntf; type @@ -54,7 +59,7 @@ Procedure SetDefaultNodeJSCompileOptions(CompOpts: TLazCompilerOptions); implementation -uses ideintf, lazideintf, pjsdsgnoptions, pjscontroller; +uses pjsdsgnoptions, pjscontroller; Procedure ResetRunParams(RunParams : TAbstractRunParamsOptionsMode); diff --git a/converter/convertdelphi.pas b/converter/convertdelphi.pas index ad9f578cd4..30117ccea9 100644 --- a/converter/convertdelphi.pas +++ b/converter/convertdelphi.pas @@ -41,12 +41,11 @@ uses // LazUtils LConvEncoding, FileUtil, LazFileUtils, LazUTF8, LazUTF8Classes, AvgLvlTree, // IDEIntf - ComponentReg, IDEDialogs, - LazIDEIntf, PackageIntf, ProjectIntf, IDEExternToolIntf, IDEOptionsIntf, + ComponentReg, IDEDialogs, LazIDEIntf, PackageIntf, ProjectIntf, + IDEExternToolIntf, IDEOptEditorIntf, // IDE - IDEProcs, DialogProcs, CompilerOptions, - ProjPackCommon, Project, ProjectDefs, PackageDefs, PackageSystem, PackageEditor, - BasePkgManager, LazarusIDEStrConsts, ProjectDescriptors, + IDEProcs, DialogProcs, CompilerOptions, ProjPackCommon, Project, ProjectDescriptors, + PackageDefs, PackageSystem, PackageEditor, BasePkgManager, LazarusIDEStrConsts, // Converter ConverterTypes, ConvertSettings, ConvCodeTool, MissingUnits, MissingPropertiesDlg, UsedUnits; diff --git a/debugger/frames/debugger_eventlog_options.pas b/debugger/frames/debugger_eventlog_options.pas index 2fb2777d35..39787ef880 100644 --- a/debugger/frames/debugger_eventlog_options.pas +++ b/debugger/frames/debugger_eventlog_options.pas @@ -25,9 +25,15 @@ unit debugger_eventlog_options; interface uses - Classes, SysUtils, FileUtil, Graphics, Forms, StdCtrls, Spin, CheckLst, - ComCtrls, LCLType, LCLIntf, ColorBox, Debugger, LazarusIDEStrConsts, - IDEOptionsIntf, DbgIntfDebuggerBase, EnvironmentOpts, BaseDebugManager; + Classes, SysUtils, + // LCL + LCLType, LCLIntf, Forms, StdCtrls, Spin, CheckLst, ComCtrls, ColorBox, Graphics, + // DebuggerIntf + DbgIntfDebuggerBase, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + Debugger, LazarusIDEStrConsts, EnvironmentOpts, BaseDebugManager; type { TDebuggerEventLogOptionsFrame } diff --git a/debugger/frames/debugger_general_options.pas b/debugger/frames/debugger_general_options.pas index 4ed2739698..2d977b4bca 100644 --- a/debugger/frames/debugger_general_options.pas +++ b/debugger/frames/debugger_general_options.pas @@ -25,11 +25,18 @@ unit debugger_general_options; interface uses - Classes, SysUtils, TypInfo, Forms, Controls, StdCtrls, - ExtCtrls, Buttons, Dialogs, LCLProc, FileUtil, LazFileUtils, LazFileCache, PropEdits, - ObjectInspector, TransferMacros, LazarusIDEStrConsts, IDEOptionsIntf, IDEUtils, - DbgIntfDebuggerBase, PathEditorDlg, InputHistory, IDEProcs, DialogProcs, - EnvironmentOpts, BaseDebugManager, Debugger; + Classes, SysUtils, TypInfo, + // LCL + Forms, Controls, StdCtrls, ExtCtrls, Buttons, Dialogs, LCLProc, + // LazUtils + FileUtil, LazFileUtils, LazFileCache, + // DebuggerIntf + DbgIntfDebuggerBase, + // IdeIntf + PropEdits, ObjectInspector, IDEOptionsIntf, IDEOptEditorIntf, IDEUtils, + // IDE + TransferMacros, LazarusIDEStrConsts, PathEditorDlg, IDEProcs, DialogProcs, + InputHistory, EnvironmentOpts, BaseDebugManager, Debugger; type diff --git a/debugger/frames/debugger_language_exceptions_options.pas b/debugger/frames/debugger_language_exceptions_options.pas index 9d3525f309..e859534a3b 100644 --- a/debugger/frames/debugger_language_exceptions_options.pas +++ b/debugger/frames/debugger_language_exceptions_options.pas @@ -25,9 +25,13 @@ unit debugger_language_exceptions_options; interface uses - Classes, SysUtils, FileUtil, Forms, Controls, StdCtrls, CheckLst, - Buttons, Dialogs, - LazarusIDEStrConsts, IDEImagesIntf, IDEOptionsIntf, Debugger, BaseDebugManager; + Classes, SysUtils, + // LCL + Forms, Controls, StdCtrls, CheckLst, Buttons, Dialogs, + // IdeIntf + IDEImagesIntf, IDEOptionsIntf, IDEOptEditorIntf, + // IDE + LazarusIDEStrConsts, Debugger, BaseDebugManager; type diff --git a/debugger/frames/debugger_signals_options.pas b/debugger/frames/debugger_signals_options.pas index 6ad56e2f59..c7827bb5c7 100644 --- a/debugger/frames/debugger_signals_options.pas +++ b/debugger/frames/debugger_signals_options.pas @@ -25,9 +25,13 @@ unit debugger_signals_options; interface uses - Classes, SysUtils, FileUtil, Forms, StdCtrls, Menus, - ComCtrls, Buttons, - LazarusIDEStrConsts, IDEOptionsIntf, IDEImagesIntf, Debugger, BaseDebugManager; + Classes, SysUtils, + // LCL + Forms, StdCtrls, Menus, ComCtrls, Buttons, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, + // IDE + LazarusIDEStrConsts, Debugger, BaseDebugManager; type { TDebuggerSignalsOptions } diff --git a/examples/idehelp/myidehelp.pas b/examples/idehelp/myidehelp.pas index 317c0198a1..3b7b48624e 100644 --- a/examples/idehelp/myidehelp.pas +++ b/examples/idehelp/myidehelp.pas @@ -44,8 +44,13 @@ unit MyIDEHelp; interface uses - Classes, SysUtils, LCLProc, Dialogs, ComCtrls, StdCtrls, ExtCtrls, IDEDialogs, - LazConfigStorage, LazHelpIntf, HelpIntfs, IDEHelpIntf, IDEOptionsIntf, BaseIDEIntf; + Classes, SysUtils, + // LCL + LCLProc, Dialogs, ComCtrls, StdCtrls, ExtCtrls, LazHelpIntf, HelpIntfs, + // LazUtils + LazConfigStorage, + // IdeIntf + IDEDialogs, IDEHelpIntf, IDEOptionsIntf, IDEOptEditorIntf, BaseIDEIntf; const MyHelpConfigFilename = 'demo_myidehelp.xml'; diff --git a/ide/basedebugmanager.pas b/ide/basedebugmanager.pas index 004f1c0862..791667761b 100644 --- a/ide/basedebugmanager.pas +++ b/ide/basedebugmanager.pas @@ -40,8 +40,17 @@ uses {$IFDEF IDE_MEM_CHECK} MemCheck, {$ENDIF} - Classes, SysUtils, Forms, Project, SourceMarks, DbgIntfBaseTypes, DbgIntfDebuggerBase, - Debugger, ProjectDefs, IDEOptionsIntf, LazarusIDEStrConsts, Laz2_XMLCfg; + Classes, SysUtils, + // LCL + Forms, + // LazUtils + Laz2_XMLCfg, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // DebuggerIntf + DbgIntfBaseTypes, DbgIntfDebuggerBase, + // IDE + Debugger, SourceMarks, Project, ProjectDefs, LazarusIDEStrConsts; type TDebugDialogType = ( diff --git a/ide/codeexplopts.pas b/ide/codeexplopts.pas index c05fb10685..08c0613e87 100644 --- a/ide/codeexplopts.pas +++ b/ide/codeexplopts.pas @@ -43,7 +43,7 @@ uses // LazUtils AvgLvlTree, Laz2_XMLCfg, LazFileUtils, LazFileCache, // IDEIntf - IDEOptionsIntf, + IDEOptionsIntf, IDEOptEditorIntf, // IDE LazConf, IDEProcs, LazarusIDEStrConsts; diff --git a/ide/codetoolsoptions.pas b/ide/codetoolsoptions.pas index aa9a5d4a84..a1d54dd624 100644 --- a/ide/codetoolsoptions.pas +++ b/ide/codetoolsoptions.pas @@ -35,9 +35,17 @@ unit CodeToolsOptions; interface uses - Classes, SysUtils, LazConf, LazFileUtils, Laz2_XMLCfg, LazUTF8, LazUTF8Classes, - LazFileCache, LclProc, LCLType, CodeToolManager, DefineTemplates, SourceChanger, - IDEOptionsIntf, MacroIntf, LazarusIDEStrConsts, IDEProcs; + Classes, SysUtils, + // LazUtils + LazFileUtils, Laz2_XMLCfg, LazUTF8, LazUTF8Classes, LazFileCache, + // LCL + LCLProc, LCLType, + // CodeTools + CodeToolManager, DefineTemplates, SourceChanger, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, MacroIntf, + // IDE + LazConf, LazarusIDEStrConsts, IDEProcs; const DefaultIndentationFilename = 'laz_indentation.pas'; // in directory GetPrimaryConfigPath diff --git a/ide/customformeditor.pp b/ide/customformeditor.pp index 68dffa1227..6bd431424f 100644 --- a/ide/customformeditor.pp +++ b/ide/customformeditor.pp @@ -49,7 +49,7 @@ uses CodeCache, CodeTree, CodeToolManager, FindDeclarationTool, // IDEIntf PropEdits, PropEditUtils, ObjectInspector, FormEditingIntf, ComponentReg, - UnitResources, IDEOptionsIntf, IDEDialogs, ComponentEditors, + UnitResources, IDEOptEditorIntf, IDEDialogs, ComponentEditors, // IDE LazarusIDEStrConsts, EditorOptions, EnvironmentOpts, IDEProcs, Project, MainIntf, PackageDefs, diff --git a/ide/editoroptions.pp b/ide/editoroptions.pp index eda2172c0e..d5e8f95871 100644 --- a/ide/editoroptions.pp +++ b/ide/editoroptions.pp @@ -65,7 +65,8 @@ uses // codetools LinkScanner, CodeToolManager, // IDEIntf - IDECommands, SrcEditorIntf, IDEOptionsIntf, IDEDialogs, EditorSyntaxHighlighterDef, + IDECommands, SrcEditorIntf, IDEOptionsIntf, IDEOptEditorIntf, IDEDialogs, + EditorSyntaxHighlighterDef, // IDE SourceMarks, LazarusIDEStrConsts, IDEProcs, KeyMapping, LazConf; diff --git a/ide/environmentopts.pp b/ide/environmentopts.pp index 787a2275e9..1b60dfbefc 100644 --- a/ide/environmentopts.pp +++ b/ide/environmentopts.pp @@ -45,7 +45,7 @@ uses // CodeTools FileProcs, SourceChanger, CodeCompletionTool, // IDEIntf - ProjectIntf, ObjectInspector, IDEWindowIntf, IDEOptionsIntf, + ProjectIntf, ObjectInspector, IDEWindowIntf, IDEOptionsIntf, IDEOptEditorIntf, ComponentReg, IDEExternToolIntf, MacroDefIntf, SrcEditorIntf, // DebuggerIntf DbgIntfDebuggerBase, diff --git a/ide/frames/atom_checkboxes_options.pas b/ide/frames/atom_checkboxes_options.pas index 00d17422bd..d093244c1b 100644 --- a/ide/frames/atom_checkboxes_options.pas +++ b/ide/frames/atom_checkboxes_options.pas @@ -25,7 +25,13 @@ unit atom_checkboxes_options; interface uses - Classes, IDEOptionsIntf, SourceChanger, StdCtrls; + Classes, + // LCL + StdCtrls, + // CodeTools + SourceChanger, + // IdeIntf + IDEOptEditorIntf; type { TCodetoolsAtomCheckboxesOptionsFrame } diff --git a/ide/frames/backup_options.pas b/ide/frames/backup_options.pas index 188a6dc9e0..abcc2b889b 100644 --- a/ide/frames/backup_options.pas +++ b/ide/frames/backup_options.pas @@ -25,8 +25,13 @@ unit Backup_Options; interface uses - Classes, SysUtils, FileUtil, Forms, StdCtrls, ExtCtrls, - EnvironmentOpts, LazarusIDEStrConsts, IDEProcs, IDEOptionsIntf, IDEUtils; + SysUtils, + // LCL + StdCtrls, ExtCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEUtils, + // IDE + EnvironmentOpts, LazarusIDEStrConsts, IDEProcs; type diff --git a/ide/frames/codeexplorer_categories_options.pas b/ide/frames/codeexplorer_categories_options.pas index b71f34a50a..43172efa62 100644 --- a/ide/frames/codeexplorer_categories_options.pas +++ b/ide/frames/codeexplorer_categories_options.pas @@ -25,8 +25,13 @@ unit codeexplorer_categories_options; interface uses - Classes, SysUtils, FileUtil, Forms, ExtCtrls, - IDEOptionsIntf, LazarusIDEStrConsts, CodeExplOpts; + SysUtils, + // LCL + ExtCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + LazarusIDEStrConsts, CodeExplOpts; type diff --git a/ide/frames/codeexplorer_update_options.pas b/ide/frames/codeexplorer_update_options.pas index 527feaf4a8..6badf61014 100644 --- a/ide/frames/codeexplorer_update_options.pas +++ b/ide/frames/codeexplorer_update_options.pas @@ -25,8 +25,13 @@ unit codeexplorer_update_options; interface uses - Classes, SysUtils, FileUtil, Forms, ExtCtrls, StdCtrls, - IDEOptionsIntf, LazarusIDEStrConsts, CodeExplOpts; + SysUtils, + // LCL + Forms, ExtCtrls, StdCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + LazarusIDEStrConsts, CodeExplOpts; type diff --git a/ide/frames/codeobserver_options.pas b/ide/frames/codeobserver_options.pas index c926adfaaf..3bcda9bfce 100644 --- a/ide/frames/codeobserver_options.pas +++ b/ide/frames/codeobserver_options.pas @@ -25,8 +25,13 @@ unit codeobserver_options; interface uses - Classes, Graphics, SysUtils, FileUtil, Forms, - IDEOptionsIntf, LazarusIDEStrConsts, CodeExplOpts, ExtCtrls, Spin, StdCtrls; + Classes, SysUtils, + // LCL + Forms, Graphics, ExtCtrls, Spin, StdCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + LazarusIDEStrConsts, CodeExplOpts; type diff --git a/ide/frames/codetools_classcompletion_options.pas b/ide/frames/codetools_classcompletion_options.pas index 74d75d0a40..7167c04cbc 100644 --- a/ide/frames/codetools_classcompletion_options.pas +++ b/ide/frames/codetools_classcompletion_options.pas @@ -25,8 +25,15 @@ unit codetools_classcompletion_options; interface uses - Classes, SysUtils, FileUtil, Forms, ExtCtrls, StdCtrls, Buttons, Dialogs, - SourceChanger, CodeToolsOptions, LazarusIDEStrConsts, IDEOptionsIntf; + SysUtils, + // LCL + Forms, ExtCtrls, StdCtrls, Dialogs, + // CodeTools + SourceChanger, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + CodeToolsOptions, LazarusIDEStrConsts; type diff --git a/ide/frames/codetools_codecreation_options.pas b/ide/frames/codetools_codecreation_options.pas index 345f395a34..c4de203582 100644 --- a/ide/frames/codetools_codecreation_options.pas +++ b/ide/frames/codetools_codecreation_options.pas @@ -25,8 +25,17 @@ unit codetools_codecreation_options; interface uses - Classes, SysUtils, FileUtil, Forms, ExtCtrls, StdCtrls, Dialogs, EditBtn, - SourceChanger, CodeToolsOptions, LazarusIDEStrConsts, IDEOptionsIntf; + SysUtils, + // LazUtils + FileUtil, + // LCL + StdCtrls, Dialogs, EditBtn, + // CodeTools + SourceChanger, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + CodeToolsOptions, LazarusIDEStrConsts; type diff --git a/ide/frames/codetools_general_options.pas b/ide/frames/codetools_general_options.pas index f88312d6ee..924f7cb4dd 100644 --- a/ide/frames/codetools_general_options.pas +++ b/ide/frames/codetools_general_options.pas @@ -25,9 +25,13 @@ unit codetools_general_options; interface uses - Classes, SysUtils, FileUtil, Forms, Controls, StdCtrls, Buttons, - Dialogs, ExtCtrls, Graphics, EditBtn, Spin, - CodeToolsOptions, LazarusIDEStrConsts, IDEOptionsIntf; + SysUtils, + // LCL + Forms, StdCtrls, Dialogs, Graphics, EditBtn, Spin, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + CodeToolsOptions, LazarusIDEStrConsts; type diff --git a/ide/frames/codetools_identifiercompletion_options.pas b/ide/frames/codetools_identifiercompletion_options.pas index 481f0b6f59..92b8f5c258 100644 --- a/ide/frames/codetools_identifiercompletion_options.pas +++ b/ide/frames/codetools_identifiercompletion_options.pas @@ -25,8 +25,15 @@ unit codetools_identifiercompletion_options; interface uses - Classes, SysUtils, FileUtil, Forms, StdCtrls, - CodeToolsOptions, LazarusIDEStrConsts, IDEOptionsIntf, DividerBevel; + SysUtils, + // LCL + Forms, StdCtrls, + // LazControls + DividerBevel, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + CodeToolsOptions, LazarusIDEStrConsts; type diff --git a/ide/frames/codetools_linesplitting_options.pas b/ide/frames/codetools_linesplitting_options.pas index 9887e23ecf..35797e6c0b 100644 --- a/ide/frames/codetools_linesplitting_options.pas +++ b/ide/frames/codetools_linesplitting_options.pas @@ -25,8 +25,17 @@ unit codetools_linesplitting_options; interface uses - Classes, SysUtils, LCLProc, Forms, StdCtrls, SynEdit, - SourceChanger, IDEOptionsIntf, EditorOptions, atom_checkboxes_options; + Classes, SysUtils, + // LCL + StdCtrls, + // CodeTools + SourceChanger, + // SynEdit + SynEdit, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + EditorOptions, atom_checkboxes_options; type { TCodetoolsLineSplittingOptionsFrame } diff --git a/ide/frames/codetools_space_options.pas b/ide/frames/codetools_space_options.pas index a7415f2068..75dcb78260 100644 --- a/ide/frames/codetools_space_options.pas +++ b/ide/frames/codetools_space_options.pas @@ -25,8 +25,17 @@ unit codetools_space_options; interface uses - Classes, SysUtils, Forms, StdCtrls, SynEdit, - SourceChanger, IDEOptionsIntf, EditorOptions, atom_checkboxes_options; + Classes, SysUtils, + // LCL + StdCtrls, + // CodeTools + SourceChanger, + // SynEdit + SynEdit, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + EditorOptions, atom_checkboxes_options; type diff --git a/ide/frames/codetools_wordpolicy_options.pas b/ide/frames/codetools_wordpolicy_options.pas index ec608e5868..db8352958d 100644 --- a/ide/frames/codetools_wordpolicy_options.pas +++ b/ide/frames/codetools_wordpolicy_options.pas @@ -25,8 +25,15 @@ unit codetools_wordpolicy_options; interface uses - Classes, SysUtils, FileUtil, Forms, ExtCtrls, StdCtrls, - SourceChanger, CodeToolsOptions, LazarusIDEStrConsts, IDEOptionsIntf; + SysUtils, + // LCL + ExtCtrls, StdCtrls, + // CodeTools + SourceChanger, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + CodeToolsOptions, LazarusIDEStrConsts; type diff --git a/ide/frames/compiler_buildmacro_options.pas b/ide/frames/compiler_buildmacro_options.pas index be7caf1d0f..64b7c95ad7 100644 --- a/ide/frames/compiler_buildmacro_options.pas +++ b/ide/frames/compiler_buildmacro_options.pas @@ -27,11 +27,15 @@ unit Compiler_BuildMacro_Options; interface uses - Classes, SysUtils, Controls, Forms, StdCtrls, Buttons, ExtCtrls, Dialogs, - ComCtrls, + Classes, SysUtils, + // LCL + Controls, Forms, StdCtrls, Buttons, ExtCtrls, Dialogs, ComCtrls, + // CodeTools KeywordFuncLists, CodeToolsCfgScript, - IDEImagesIntf, IDEOptionsIntf, MacroIntf, CompOptsIntf, - CompilerOptions, IDEDialogs, LazarusIDEStrConsts, PackageDefs; + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, CompOptsIntf, MacroIntf, IDEImagesIntf, IDEDialogs, + // IDE + CompilerOptions, LazarusIDEStrConsts, PackageDefs; type TCBMNodeType = ( diff --git a/ide/frames/compiler_codegen_options.pas b/ide/frames/compiler_codegen_options.pas index 1181c83638..d7c4711882 100644 --- a/ide/frames/compiler_codegen_options.pas +++ b/ide/frames/compiler_codegen_options.pas @@ -5,8 +5,13 @@ unit compiler_codegen_options; interface uses - SysUtils, StdCtrls, IDEOptionsIntf, CompilerOptions, PackageDefs, - LazarusIDEStrConsts; + SysUtils, + // LCL + StdCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + CompilerOptions, LazarusIDEStrConsts; type diff --git a/ide/frames/compiler_compilation_options.pas b/ide/frames/compiler_compilation_options.pas index 690d06d813..2ec5daff20 100644 --- a/ide/frames/compiler_compilation_options.pas +++ b/ide/frames/compiler_compilation_options.pas @@ -5,15 +5,17 @@ unit compiler_compilation_options; interface uses - // RTL + FCL + LCL + // RTL + FCL Classes, sysutils, + // LCL Controls, StdCtrls, Dialogs, ComboEx, // CodeTools FileProcs, DefineTemplates, CodeToolManager, LinkScanner, // LazUtils FileUtil, LazFileUtils, // IDEIntf - IDEOptionsIntf, CompOptsIntf, IDEDialogs, IDEUtils, IDEExternToolIntf, + IDEOptionsIntf, IDEOptEditorIntf, CompOptsIntf, IDEExternToolIntf, + IDEDialogs, IDEUtils, // IDE Project, CompilerOptions, PackageDefs, LazarusIDEStrConsts, EnvironmentOpts, LazConf, IDEProcs, DialogProcs, InputHistory, InitialSetupProc; diff --git a/ide/frames/compiler_config_target.pas b/ide/frames/compiler_config_target.pas index bc90ae73d5..084b30b9a0 100644 --- a/ide/frames/compiler_config_target.pas +++ b/ide/frames/compiler_config_target.pas @@ -28,10 +28,18 @@ unit compiler_config_target; interface uses - Classes, SysUtils, strutils, Controls, Dialogs, Graphics, StdCtrls, - LCLProc, LazFileUtils, DefineTemplates, IDEOptionsIntf, MacroIntf, - IDEDialogs, CompilerOptions, LazarusIDEStrConsts, - TransferMacros, PackageDefs, Project, compiler_parsing_options; + Classes, SysUtils, strutils, + // LCL + LCLProc, Controls, Dialogs, Graphics, StdCtrls, + // LazUtils + LazFileUtils, + // CodeTools + DefineTemplates, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, MacroIntf, IDEDialogs, + // IDE + CompilerOptions, LazarusIDEStrConsts, TransferMacros, PackageDefs, Project, + compiler_parsing_options; type diff --git a/ide/frames/compiler_debugging_options.pas b/ide/frames/compiler_debugging_options.pas index df5d421007..b3ee33351f 100644 --- a/ide/frames/compiler_debugging_options.pas +++ b/ide/frames/compiler_debugging_options.pas @@ -5,8 +5,14 @@ unit compiler_debugging_options; interface uses - StdCtrls, IDEOptionsIntf, CompilerOptions, CompOptsIntf, LazLoggerBase, - LazarusIDEStrConsts; + // LCL + StdCtrls, + // LazUtils + LazLoggerBase, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, CompOptsIntf, + // IDE + CompilerOptions, LazarusIDEStrConsts; type diff --git a/ide/frames/compiler_messages_options.pas b/ide/frames/compiler_messages_options.pas index 5f4c682137..a9726186b2 100644 --- a/ide/frames/compiler_messages_options.pas +++ b/ide/frames/compiler_messages_options.pas @@ -5,10 +5,20 @@ unit compiler_messages_options; interface uses - Classes, SysUtils, FileUtil, LazFileCache, LazLoggerBase, ListFilterEdit, - StdCtrls, CheckLst, Dialogs, IDEOptionsIntf, IDEExternToolIntf, - IDEDialogs, CompOptsIntf, IDEImagesIntf, CodeToolsFPCMsgs, CompilerOptions, - LazarusIDEStrConsts, etFPCMsgParser; + Classes, SysUtils, + // LCL + StdCtrls, CheckLst, Dialogs, + // LazUtils + FileUtil, LazFileCache, LazLoggerBase, + // LazControls + ListFilterEdit, + // CodeTools + CodeToolsFPCMsgs, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEExternToolIntf, CompOptsIntf, IDEImagesIntf, + IDEDialogs, + // IDE + CompilerOptions, LazarusIDEStrConsts, etFPCMsgParser; type diff --git a/ide/frames/compiler_modematrix.pas b/ide/frames/compiler_modematrix.pas index 9318214e6d..9dc1f959a7 100644 --- a/ide/frames/compiler_modematrix.pas +++ b/ide/frames/compiler_modematrix.pas @@ -35,10 +35,20 @@ unit Compiler_ModeMatrix; interface uses - Classes, SysUtils, types, LazLoggerBase, LazUTF8, Controls, Graphics, ComCtrls, - Menus, LCLProc, IDEOptionsIntf, IDEImagesIntf, CompOptsIntf, EnvironmentOpts, - PackageSystem, PackageDefs, Project, LazarusIDEStrConsts, TransferMacros, - ModeMatrixOpts, ModeMatrixCtrl, compiler_config_target; + //Classes, SysUtils, types, LazLoggerBase, LazUTF8, Controls, Graphics, ComCtrls, + //Menus, LCLProc, IDEOptionsIntf, IDEImagesIntf, CompOptsIntf, EnvironmentOpts, + //PackageSystem, PackageDefs, Project, LazarusIDEStrConsts, TransferMacros, + //ModeMatrixOpts, ModeMatrixCtrl, compiler_config_target; + Classes, SysUtils, types, + // LazUtils + LazLoggerBase, LazUTF8, + // LCL + LCLProc, Controls, Graphics, ComCtrls, Menus, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, CompOptsIntf, + // IDE + EnvironmentOpts, PackageSystem, PackageDefs, Project, LazarusIDEStrConsts, + TransferMacros, ModeMatrixOpts, ModeMatrixCtrl, compiler_config_target; type diff --git a/ide/frames/compiler_other_options.pas b/ide/frames/compiler_other_options.pas index b9dc264243..20f1b1a89a 100644 --- a/ide/frames/compiler_other_options.pas +++ b/ide/frames/compiler_other_options.pas @@ -36,7 +36,7 @@ uses // Codetools CodeToolsCfgScript, KeywordFuncLists, // IdeIntf - IDEOptionsIntf, CompOptsIntf, IDECommands, + IDEOptionsIntf, IDEOptEditorIntf, CompOptsIntf, IDECommands, // SynEdit SynEdit, SynEditKeyCmds, SynCompletion, // IDE diff --git a/ide/frames/compiler_parsing_options.pas b/ide/frames/compiler_parsing_options.pas index 9fb3b7a730..b775e23063 100644 --- a/ide/frames/compiler_parsing_options.pas +++ b/ide/frames/compiler_parsing_options.pas @@ -5,8 +5,15 @@ unit compiler_parsing_options; interface uses - ExtCtrls, StdCtrls, SysUtils, IDEOptionsIntf, CompilerOptions, - LinkScanner, PackageDefs, LazarusIDEStrConsts; + SysUtils, + // LCL + ExtCtrls, StdCtrls, + // CodeTools + LinkScanner, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + CompilerOptions, PackageDefs, LazarusIDEStrConsts; type diff --git a/ide/frames/compiler_path_options.pas b/ide/frames/compiler_path_options.pas index 5c1929179a..2c82e84f5a 100644 --- a/ide/frames/compiler_path_options.pas +++ b/ide/frames/compiler_path_options.pas @@ -5,11 +5,16 @@ unit compiler_path_options; interface uses - Classes, SysUtils, LCLProc, LazFileUtils, LazFileCache, Controls, Dialogs, - Buttons, StdCtrls, LCLType, IDEOptionsIntf, MacroIntf, IDEDialogs, - CompOptsIntf, Project, CompilerOptions, LazarusIDEStrConsts, IDEImagesIntf, - PathEditorDlg, IDEProcs, CheckCompilerOpts, ShowCompilerOpts, - ImExportCompilerOpts; + Classes, SysUtils, + // LCL + LCLProc, LCLType,Controls, Dialogs, Buttons, StdCtrls, + // LazUtils + LazFileUtils, LazFileCache, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, MacroIntf, CompOptsIntf, IDEImagesIntf, IDEDialogs, + // IDE + Project, CompilerOptions, LazarusIDEStrConsts, PathEditorDlg, IDEProcs, + CheckCompilerOpts, ShowCompilerOpts, ImExportCompilerOpts; type diff --git a/ide/frames/compiler_verbosity_options.pas b/ide/frames/compiler_verbosity_options.pas index 49f143d4ae..151ed77d4d 100644 --- a/ide/frames/compiler_verbosity_options.pas +++ b/ide/frames/compiler_verbosity_options.pas @@ -5,8 +5,13 @@ unit compiler_verbosity_options; interface uses - SysUtils, ExtCtrls, StdCtrls, IDEOptionsIntf, CompilerOptions, - LazarusIDEStrConsts; + SysUtils, + // LCL + ExtCtrls, StdCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + CompilerOptions, LazarusIDEStrConsts; type diff --git a/ide/frames/componentpalette_options.pas b/ide/frames/componentpalette_options.pas index e87e5ef6d0..155d52c023 100644 --- a/ide/frames/componentpalette_options.pas +++ b/ide/frames/componentpalette_options.pas @@ -25,11 +25,18 @@ unit ComponentPalette_Options; interface uses - Classes, SysUtils, Graphics, Forms, Controls, StdCtrls, Dialogs, Buttons, - ComCtrls, ExtCtrls, FileUtil, LCLProc, LCLType, Menus, IDEProcs, Laz2_XMLCfg, - EnvironmentOpts, LazarusIDEStrConsts, IDEOptionsIntf, - IDEImagesIntf, DividerBevel, ComponentReg, FormEditingIntf, IDEOptionDefs, - PackageDefs, ImgList; + Classes, SysUtils, + // LCL + LCLProc, LCLType, Forms, Controls, StdCtrls, ComCtrls, ExtCtrls, + Dialogs, Buttons, Menus, Graphics, + // LazControls + DividerBevel, + // LazUtils + FileUtil, Laz2_XMLCfg, ImgList, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, FormEditingIntf, ComponentReg, + // IDE + IDEProcs, EnvironmentOpts, LazarusIDEStrConsts, IDEOptionDefs, PackageDefs; type diff --git a/ide/frames/desktop_options.pas b/ide/frames/desktop_options.pas index 03db38de00..b5e81abdb4 100644 --- a/ide/frames/desktop_options.pas +++ b/ide/frames/desktop_options.pas @@ -25,9 +25,17 @@ unit desktop_options; interface uses - Classes, SysUtils, FileUtil, Forms, StdCtrls, Dialogs, LCLProc, ExtCtrls, - Buttons, EnvironmentOpts, LazarusIDEStrConsts, IDETranslations, InputHistory, - IDEProcs, IDEOptionsIntf, IDEWindowIntf, IDEUtils, DividerBevel; + Classes, SysUtils, + // LazUtils + FileUtil, + // LCL + Forms, StdCtrls, Dialogs, LCLProc, ExtCtrls, + // LazControls + DividerBevel, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEWindowIntf, IDEUtils, + // IDE + EnvironmentOpts, LazarusIDEStrConsts, IDETranslations, InputHistory, IDEProcs; type diff --git a/ide/frames/editor_codefolding_options.pas b/ide/frames/editor_codefolding_options.pas index 99f2305174..ca5a1ed764 100644 --- a/ide/frames/editor_codefolding_options.pas +++ b/ide/frames/editor_codefolding_options.pas @@ -27,13 +27,11 @@ interface uses Classes, SysUtils, // LCL - LCLType, Forms, StdCtrls, ExtCtrls, Graphics, Controls, CheckLst, Buttons, - // LazUtils - FileUtil, + LCLType, Forms, StdCtrls, ExtCtrls, Graphics, CheckLst, // IdeIntf - EditorSyntaxHighlighterDef, IDEOptionsIntf, + EditorSyntaxHighlighterDef, IDEOptionsIntf, IDEOptEditorIntf, // SynEdit - SynEditHighlighter, SynEditHighlighterFoldBase, + SynEditHighlighterFoldBase, // IDE EditorOptions, LazarusIDEStrConsts; diff --git a/ide/frames/editor_codetools_options.pas b/ide/frames/editor_codetools_options.pas index 80a3cf9de2..2dc8a660ca 100644 --- a/ide/frames/editor_codetools_options.pas +++ b/ide/frames/editor_codetools_options.pas @@ -25,10 +25,15 @@ unit editor_codetools_options; interface uses - Classes, StdCtrls, ComCtrls, Graphics, sysutils, - EditorOptions, LazarusIDEStrConsts, IDEOptionsIntf, ExtCtrls, - editor_color_options, editor_general_options, - SynEdit, SynCompletion, LCLType; + sysutils, + // LCL + StdCtrls, ComCtrls, ExtCtrls, + // SynEdit + SynCompletion, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + EditorOptions, LazarusIDEStrConsts; type { TEditorCodetoolsOptionsFrame } diff --git a/ide/frames/editor_color_options.pas b/ide/frames/editor_color_options.pas index a28a11bf6f..49d51d830d 100644 --- a/ide/frames/editor_color_options.pas +++ b/ide/frames/editor_color_options.pas @@ -37,7 +37,7 @@ uses SynEditTypes, SynGutterChanges, SynEditMouseCmds, SynEditHighlighter, SynColorAttribEditor, // IdeIntf - IDEOptionsIntf, IDEImagesIntf, IDEUtils, + IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, IDEUtils, // IDE EditorOptions, editor_general_options, LazarusIDEStrConsts, IDEProcs, LazConf, SourceMarks; diff --git a/ide/frames/editor_display_options.pas b/ide/frames/editor_display_options.pas index e80a2bd7d7..86e21e7435 100644 --- a/ide/frames/editor_display_options.pas +++ b/ide/frames/editor_display_options.pas @@ -25,11 +25,16 @@ unit editor_display_options; interface uses - Classes, SysUtils, Graphics, Dialogs, StdCtrls, Spin, LCLType, Controls, LCLProc, SynEdit, - SynEditMouseCmds, EditorOptions, LazarusIDEStrConsts, IDEOptionsIntf, - IDEUtils, editor_general_options, editor_color_options, IDEProcs, - SynGutterLineNumber, SynGutterLineOverview, SynGutter, SourceSynEditor, - SourceMarks; + Classes, SysUtils, + // LCL + Graphics, Dialogs, StdCtrls, Spin, LCLType, Controls, LCLProc, + // SynEdit + SynEdit, SynEditMouseCmds, SynGutterLineNumber, SynGutterLineOverview, SynGutter, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEUtils, + // IDE + EditorOptions, LazarusIDEStrConsts, editor_general_options, editor_color_options, + IDEProcs, SourceSynEditor, SourceMarks; type { TEditorDisplayOptionsFrame } diff --git a/ide/frames/editor_dividerdraw_options.pas b/ide/frames/editor_dividerdraw_options.pas index beb18727c9..9aabb3ec5f 100644 --- a/ide/frames/editor_dividerdraw_options.pas +++ b/ide/frames/editor_dividerdraw_options.pas @@ -29,7 +29,7 @@ uses // LCL StdCtrls, ExtCtrls, Graphics, Spin, ColorBox, CheckLst, LCLType, // IdeIntf - EditorSyntaxHighlighterDef, IDEOptionsIntf, + EditorSyntaxHighlighterDef, IDEOptionsIntf, IDEOptEditorIntf, // SynEdit SynEditHighlighter, // IDE diff --git a/ide/frames/editor_general_misc_options.pas b/ide/frames/editor_general_misc_options.pas index e5d960725c..67ac7b4c06 100644 --- a/ide/frames/editor_general_misc_options.pas +++ b/ide/frames/editor_general_misc_options.pas @@ -31,9 +31,14 @@ unit editor_general_misc_options; interface uses - LCLProc, StdCtrls, SynEdit, ExtCtrls, EditorOptions, - LazarusIDEStrConsts, IDEProcs, IDEOptionsIntf, editor_general_options, - SynEditTextTrimmer; + // LCL + LCLProc, StdCtrls, ExtCtrls, + // SynEdit + SynEdit, SynEditTextTrimmer, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + EditorOptions, LazarusIDEStrConsts, IDEProcs, editor_general_options; type { TEditorGeneralMiscOptionsFrame } diff --git a/ide/frames/editor_general_options.pas b/ide/frames/editor_general_options.pas index 4278d3e6a3..57b18a4d0a 100644 --- a/ide/frames/editor_general_options.pas +++ b/ide/frames/editor_general_options.pas @@ -25,9 +25,20 @@ unit editor_general_options; interface uses - Classes, SysUtils, math, LCLProc, LCLType, StdCtrls, Controls, ExtCtrls, - Graphics, EditorOptions, LazarusIDEStrConsts, IDEProcs, IDEOptionsIntf, - IDEUtils, SynEdit, SynHighlighterPas, SynPluginMultiCaret, DividerBevel; + //Classes, SysUtils, math, LCLProc, LCLType, StdCtrls, Controls, ExtCtrls, + //Graphics, EditorOptions, LazarusIDEStrConsts, IDEProcs, IDEOptionsIntf, + //IDEUtils, SynEdit, SynHighlighterPas, SynPluginMultiCaret, DividerBevel; + Classes, SysUtils, math, + // LCL + LCLProc, LCLType, StdCtrls, Controls, ExtCtrls, Graphics, + // LazControls + DividerBevel, + // SynEdit + SynEdit, SynHighlighterPas, SynPluginMultiCaret, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEUtils, + // IDE + EditorOptions, LazarusIDEStrConsts, IDEProcs; type TPreviewEditor = TSynEdit; diff --git a/ide/frames/editor_indent_options.pas b/ide/frames/editor_indent_options.pas index e064f7db1a..9f1b17312e 100644 --- a/ide/frames/editor_indent_options.pas +++ b/ide/frames/editor_indent_options.pas @@ -25,11 +25,18 @@ unit editor_indent_options; interface uses - Classes, SysUtils, LCLProc, LCLType, StdCtrls, Controls, ExtCtrls, Graphics, - Forms, ComCtrls, Spin, EditorOptions, LazarusIDEStrConsts, IDEProcs, - KeyMapping, editor_keymapping_options, editor_general_options, IDEOptionsIntf, - IDEUtils, SynEdit, SynBeautifier, SynHighlighterPas, SynEditKeyCmds, - DividerBevel; + Classes, SysUtils, + // LCL + LCLProc, LCLType, StdCtrls, Controls, ExtCtrls, Graphics, ComCtrls, Spin, + // LazControls + DividerBevel, + // SynEdit + SynEdit, SynBeautifier, SynHighlighterPas, SynEditKeyCmds, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEUtils, + // IDE + EditorOptions, LazarusIDEStrConsts, IDEProcs, KeyMapping, + editor_keymapping_options, editor_general_options; type TPreviewEditor = TSynEdit; diff --git a/ide/frames/editor_keymapping_options.pas b/ide/frames/editor_keymapping_options.pas index 94a2def38b..a3db578ddb 100644 --- a/ide/frames/editor_keymapping_options.pas +++ b/ide/frames/editor_keymapping_options.pas @@ -25,11 +25,17 @@ unit editor_keymapping_options; interface uses - Classes, SysUtils, FileUtil, TreeFilterEdit, Forms, StdCtrls, ComCtrls, - Controls, Dialogs, LCLType, LazUTF8, Menus, Buttons, Clipbrd, EditorOptions, - LazarusIDEStrConsts, IDEOptionsIntf, IDEImagesIntf, editor_general_options, - KeymapSchemeDlg, KeyMapping, IDECommands, KeyMapShortCutDlg, SrcEditorIntf, - EditBtn, ExtCtrls; + Classes, SysUtils, + // LCL + Forms, StdCtrls, ComCtrls, Controls, Dialogs, LCLType, LazUTF8, Menus, Buttons, + Clipbrd, EditBtn, ExtCtrls, + // LazControls + TreeFilterEdit, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, SrcEditorIntf, + // IDE + EditorOptions, LazarusIDEStrConsts, editor_general_options, + KeymapSchemeDlg, KeyMapping, IDECommands, KeyMapShortCutDlg; type diff --git a/ide/frames/editor_markup_options.pas b/ide/frames/editor_markup_options.pas index 7f4f4219ef..be72dfe746 100644 --- a/ide/frames/editor_markup_options.pas +++ b/ide/frames/editor_markup_options.pas @@ -27,13 +27,13 @@ interface uses Classes, sysutils, // LCL - LCLType, CheckLst, Controls, StdCtrls, ComCtrls, Graphics, Spin, ExtCtrls, + LCLType, CheckLst, Controls, StdCtrls, ComCtrls, Graphics, Spin, // LazControls DividerBevel, // IDEIntf - EditorSyntaxHighlighterDef, IDEOptionsIntf, + EditorSyntaxHighlighterDef, IDEOptionsIntf, IDEOptEditorIntf, // SynEdit - SynEdit, SynCompletion, SynHighlighterPas, SynEditKeyCmds, SynEditHighlighterFoldBase, + SynEdit, SynHighlighterPas, SynEditKeyCmds, SynEditHighlighterFoldBase, // IDE EditorOptions, LazarusIDEStrConsts, SourceMarks, SynEditMarkupBracket, editor_color_options, editor_general_options, editor_keymapping_options, diff --git a/ide/frames/editor_markup_userdefined.pas b/ide/frames/editor_markup_userdefined.pas index b280ef4c6a..66a65e1a94 100644 --- a/ide/frames/editor_markup_userdefined.pas +++ b/ide/frames/editor_markup_userdefined.pas @@ -5,13 +5,21 @@ unit editor_markup_userdefined; interface uses - Classes, StdCtrls, ComCtrls, Graphics, sysutils, math, EditorOptions, + Classes, sysutils, math, + // LCL + LCLType, StdCtrls, ComCtrls, Graphics, EditorOptions, Spin, ExtCtrls, + Menus, Grids, Controls, Dialogs, Buttons, + // LazControls + DividerBevel, + // LazUtils + LazLoggerBase, + // SynEdit + SynEditKeyCmds, SynEditMarkupHighAll, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDECommands, IDEDialogs, + // IDE LazarusIDEStrConsts, SynColorAttribEditor, KeyMapping, KeyMapShortCutDlg, - IDEOptionsIntf, IDECommands, IDEDialogs, Spin, ExtCtrls, - editor_color_options, editor_general_options, editor_keymapping_options, - SynEdit, SynCompletion, SynHighlighterPas, SynEditKeyCmds, - SynEditMarkupHighAll, DividerBevel, LazLoggerBase, LCLType, Menus, Grids, - Controls, Dialogs, Buttons; + editor_keymapping_options; type diff --git a/ide/frames/editor_mouseaction_options.pas b/ide/frames/editor_mouseaction_options.pas index 37ea88f790..deef306a3b 100644 --- a/ide/frames/editor_mouseaction_options.pas +++ b/ide/frames/editor_mouseaction_options.pas @@ -25,8 +25,17 @@ unit editor_mouseaction_options; interface uses - math, sysutils, EditorOptions, LazarusIDEStrConsts, IDEOptionsIntf, SynEdit, DividerBevel, StdCtrls, - ExtCtrls, Classes, LCLProc, editor_mouseaction_options_advanced, Controls, Forms, ComCtrls; + sysutils, math, + // LCL + LCLProc, StdCtrls, ExtCtrls, Classes, Forms, ComCtrls, + // LazControls + DividerBevel, + // SynEdit + SynEdit, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + EditorOptions, LazarusIDEStrConsts, editor_mouseaction_options_advanced; type diff --git a/ide/frames/editor_mouseaction_options_advanced.pas b/ide/frames/editor_mouseaction_options_advanced.pas index d694c0f179..fe2002db60 100644 --- a/ide/frames/editor_mouseaction_options_advanced.pas +++ b/ide/frames/editor_mouseaction_options_advanced.pas @@ -25,10 +25,17 @@ unit editor_mouseaction_options_advanced; interface uses - EditorOptions, LazarusIDEStrConsts, IDEOptionsIntf, sysutils, StdCtrls, - ExtCtrls, Classes, Controls, Grids, ComCtrls, Dialogs, - SynEditMouseCmds, Laz2_XMLCfg, MouseActionDialog, math, KeyMapping, - IDEImagesIntf, IDEDialogs, LazUTF8, FileUtil; + Classes, sysutils, math, + // LCL + StdCtrls, ExtCtrls, Controls, Grids, ComCtrls, Dialogs, + // LazUtils + Laz2_XMLCfg, LazUTF8, FileUtil, + // SynEdit + SynEditMouseCmds, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, IDEDialogs, + // IDE + EditorOptions, LazarusIDEStrConsts, MouseActionDialog, KeyMapping; type diff --git a/ide/frames/editor_multiwindow_options.pas b/ide/frames/editor_multiwindow_options.pas index 34cb0b03a3..f269bf2446 100644 --- a/ide/frames/editor_multiwindow_options.pas +++ b/ide/frames/editor_multiwindow_options.pas @@ -25,8 +25,13 @@ unit editor_multiwindow_options; interface uses - Classes, SysUtils, StdCtrls, ExtCtrls, LCLType, EditorOptions, LazarusIDEStrConsts, - SourceEditor, IDEOptionsIntf, CheckLst, ComCtrls; + Classes, SysUtils, + // LCL + LCLType, StdCtrls, ExtCtrls, CheckLst, ComCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + EditorOptions, LazarusIDEStrConsts, SourceEditor; type diff --git a/ide/frames/editortoolbar_options.pas b/ide/frames/editortoolbar_options.pas index 6f0e4688d4..e3e761aa5d 100644 --- a/ide/frames/editortoolbar_options.pas +++ b/ide/frames/editortoolbar_options.pas @@ -28,9 +28,15 @@ unit editortoolbar_options; interface uses - Classes, SysUtils, ExtCtrls, Buttons, Controls, StdCtrls, DividerBevel, - LazarusIDEStrConsts, LCLProc, IDEOptionsIntf, EnvironmentOpts, - EditorToolbarStatic, ToolbarConfig; + Classes, SysUtils, + // LCL + LCLProc, ExtCtrls, Buttons, Controls, StdCtrls, + // LazControls + DividerBevel, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + LazarusIDEStrConsts, EnvironmentOpts, EditorToolbarStatic, ToolbarConfig; type diff --git a/ide/frames/env_file_filters.pas b/ide/frames/env_file_filters.pas index ad7b24b1f1..58aa543601 100644 --- a/ide/frames/env_file_filters.pas +++ b/ide/frames/env_file_filters.pas @@ -5,9 +5,14 @@ unit env_file_filters; interface uses - Classes, SysUtils, LazFileUtils, LResources, Forms, Grids, Dialogs, Controls, - LCLProc, LCLType, Menus, StdCtrls, LazConfigStorage, - IDEOptionsIntf, BaseIDEIntf, IDEDialogs, + Classes, SysUtils, + // LazUtils + LazFileUtils, LazConfigStorage, + // LCL + LCLProc, LCLType, LResources, Forms, Grids, Dialogs, Controls, StdCtrls, Menus, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, BaseIDEIntf, IDEDialogs, + // IDE EnvironmentOpts, IDEOptionDefs, LazarusIDEStrConsts; const diff --git a/ide/frames/files_options.pas b/ide/frames/files_options.pas index 505ebc7961..493ae50050 100644 --- a/ide/frames/files_options.pas +++ b/ide/frames/files_options.pas @@ -29,10 +29,19 @@ unit files_options; interface uses - SysUtils, StdCtrls, Dialogs, Controls, Spin, FileUtil, LazFileUtils, - EnvironmentOpts, CodeToolManager, DefineTemplates, IDEOptionsIntf, IDEDialogs, - LazarusIDEStrConsts, InputHistory, LazConf, IDEProcs, - IDEUtils, InitialSetupProc, DialogProcs; + SysUtils, + // LCL + StdCtrls, Dialogs, Controls, Spin, + // LazUtils + FileUtil, LazFileUtils, + // IDE + EnvironmentOpts, + // CodeTools + CodeToolManager, DefineTemplates, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEDialogs, IDEUtils, + // IDE + LazarusIDEStrConsts, InputHistory, LazConf, IDEProcs, DialogProcs, InitialSetupProc; type diff --git a/ide/frames/formed_options.pas b/ide/frames/formed_options.pas index e7b642bcb6..a1191ba83b 100644 --- a/ide/frames/formed_options.pas +++ b/ide/frames/formed_options.pas @@ -25,8 +25,13 @@ unit formed_options; interface uses - Classes, SysUtils, FileUtil, Graphics, Forms, StdCtrls, Dialogs, Spin, - ColorBox, EnvironmentOpts, LazarusIDEStrConsts, IDEProcs, IDEOptionsIntf; + Classes, SysUtils, + // LCL + Graphics, Forms, StdCtrls, Dialogs, Spin, ColorBox, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + EnvironmentOpts, LazarusIDEStrConsts, IDEProcs; type TDesignerColor = ( diff --git a/ide/frames/fpdoc_options.pas b/ide/frames/fpdoc_options.pas index 15d6977ed9..2f164f7d82 100644 --- a/ide/frames/fpdoc_options.pas +++ b/ide/frames/fpdoc_options.pas @@ -25,8 +25,13 @@ unit fpdoc_options; interface uses - Classes, SysUtils, FileUtil, Forms, Dialogs, StdCtrls, EditBtn, - EnvironmentOpts, LazarusIDEStrConsts, IDEProcs, IDEOptionsIntf; + SysUtils, + // LCL + Dialogs, StdCtrls, EditBtn, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + EnvironmentOpts, LazarusIDEStrConsts, IDEProcs; type diff --git a/ide/frames/help_general_options.pas b/ide/frames/help_general_options.pas index edffc76339..031354f157 100644 --- a/ide/frames/help_general_options.pas +++ b/ide/frames/help_general_options.pas @@ -5,9 +5,13 @@ unit help_general_options; interface uses - Classes, SysUtils, FileUtil, Forms, Controls, StdCtrls, ExtCtrls, EditBtn, - IDEOptionsIntf, HelpOptions, LazarusIDEStrConsts, EnvironmentOpts, - ObjectInspector, LazHelpIntf; + Classes, SysUtils, + // LCL + Forms, Controls, StdCtrls, ExtCtrls, EditBtn, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, ObjectInspector, LazHelpIntf, + // IDE + HelpOptions, LazarusIDEStrConsts, EnvironmentOpts; type diff --git a/ide/frames/idecoolbar_options.pas b/ide/frames/idecoolbar_options.pas index 7697036881..3ad7a8bc29 100644 --- a/ide/frames/idecoolbar_options.pas +++ b/ide/frames/idecoolbar_options.pas @@ -34,7 +34,7 @@ uses // LazControls DividerBevel, // IDEIntf - IDEOptionsIntf, + IDEOptionsIntf, IDEOptEditorIntf, // IDE LazarusIDEStrConsts, EnvironmentOpts, IdeCoolbarData; diff --git a/ide/frames/msgwnd_options.pas b/ide/frames/msgwnd_options.pas index 730bc22ccd..46077aeeff 100644 --- a/ide/frames/msgwnd_options.pas +++ b/ide/frames/msgwnd_options.pas @@ -30,10 +30,17 @@ unit MsgWnd_Options; interface uses - Classes, SysUtils, FileUtil, LazLoggerBase, SynEdit, Forms, - Controls, Graphics, Dialogs, StdCtrls, ColorBox, ExtCtrls, Spin, ComCtrls, - IDEOptionsIntf, IDEExternToolIntf, - LazarusIDEStrConsts, EnvironmentOpts, editor_general_options, EditorOptions; + Classes, SysUtils, + // LazUtils + FileUtil, LazLoggerBase, + // LCL + Forms, Controls, Graphics, Dialogs, StdCtrls, ColorBox, ExtCtrls, Spin, ComCtrls, + // SynEdit + SynEdit, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEExternToolIntf, + // IDE + LazarusIDEStrConsts, EnvironmentOpts, EditorOptions, editor_general_options; type diff --git a/ide/frames/naming_options.pas b/ide/frames/naming_options.pas index 58a1613aa8..604fc29383 100644 --- a/ide/frames/naming_options.pas +++ b/ide/frames/naming_options.pas @@ -25,8 +25,13 @@ unit naming_options; interface uses - Classes, SysUtils, FileUtil, Forms, ExtCtrls, StdCtrls, - EnvironmentOpts, LazarusIDEStrConsts, IDEOptionsIntf; + SysUtils, + // LCL + Forms, ExtCtrls, StdCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + EnvironmentOpts, LazarusIDEStrConsts; type diff --git a/ide/frames/oi_options.pas b/ide/frames/oi_options.pas index 2f04704d66..966088cbf8 100644 --- a/ide/frames/oi_options.pas +++ b/ide/frames/oi_options.pas @@ -28,9 +28,13 @@ unit OI_options; interface uses - Classes, SysUtils, FileUtil, Forms, StdCtrls, Dialogs, Spin, LCLProc, - ObjectInspector, LazarusIDEStrConsts, EnvironmentOpts, IDEOptionsIntf, - ColorBox, Graphics; + Classes, SysUtils, + // LCL + LCLProc, Forms, StdCtrls, Dialogs, Spin, ColorBox, Graphics, + // IdeIntf + ObjectInspector, IDEOptionsIntf, IDEOptEditorIntf, + // IDE + LazarusIDEStrConsts, EnvironmentOpts; type TOIColor = ( diff --git a/ide/frames/project_application_options.pas b/ide/frames/project_application_options.pas index f14bc25873..5fd4d917a3 100644 --- a/ide/frames/project_application_options.pas +++ b/ide/frames/project_application_options.pas @@ -5,10 +5,19 @@ unit project_application_options; interface uses - Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Graphics, Dialogs, - ExtCtrls, StdCtrls, Buttons, ComCtrls, ExtDlgs, Math, LCLType, IDEOptionsIntf, - LazIDEIntf, IDEImagesIntf, IDEDialogs, DividerBevel, Project, LazarusIDEStrConsts, - EnvironmentOpts, ApplicationBundle, ProjectIcon, W32Manifest, CompilerOptions; + Classes, SysUtils, Math, + // LazUtils + FileUtil, + // LCL + LCLProc, LCLType, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, Buttons, + ComCtrls, ExtDlgs, + // LazControls + DividerBevel, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, LazIDEIntf, IDEImagesIntf, IDEDialogs, + // IDE + LazarusIDEStrConsts, Project, ProjectIcon, CompilerOptions, + ApplicationBundle, W32Manifest; type diff --git a/ide/frames/project_forms_options.pas b/ide/frames/project_forms_options.pas index fc00bcc49a..740cc84294 100644 --- a/ide/frames/project_forms_options.pas +++ b/ide/frames/project_forms_options.pas @@ -5,9 +5,13 @@ unit project_forms_options; interface uses - Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, - StdCtrls, Buttons, IDEOptionsIntf, PackageDefs, ProjectIntf, Project, - LazarusIDEStrConsts, IDEImagesIntf, CodeToolManager; + Classes, SysUtils, + // LCL + Forms, Controls, Graphics, Dialogs, StdCtrls, Buttons, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, ProjectIntf, IDEImagesIntf, + // IDE + PackageDefs, Project, LazarusIDEStrConsts; type diff --git a/ide/frames/project_i18n_options.pas b/ide/frames/project_i18n_options.pas index bde1ad4993..e57a664c5f 100644 --- a/ide/frames/project_i18n_options.pas +++ b/ide/frames/project_i18n_options.pas @@ -5,8 +5,15 @@ unit project_i18n_options; interface uses - StdCtrls, EditBtn, ExtCtrls, LazFileUtils, Project, IDEOptionsIntf, - LazarusIDEStrConsts, IDEDialogs, IDEImagesIntf, Classes, Graphics; + Classes, + // LCL + StdCtrls, EditBtn, ExtCtrls, Graphics, + // LazUtils + LazFileUtils, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, IDEDialogs, + // IDE + Project, LazarusIDEStrConsts; type diff --git a/ide/frames/project_lazdoc_options.pas b/ide/frames/project_lazdoc_options.pas index 16d8bdea94..fd77814b44 100644 --- a/ide/frames/project_lazdoc_options.pas +++ b/ide/frames/project_lazdoc_options.pas @@ -5,9 +5,13 @@ unit project_lazdoc_options; interface uses - Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, - Buttons, EditBtn, Project, IDEOptionsIntf, LazarusIDEStrConsts, IDEProcs, - IDEImagesIntf, CodeHelp; + SysUtils, + // LCL + Forms, Dialogs, StdCtrls, Buttons, EditBtn, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, + // IDE + Project, LazarusIDEStrConsts, IDEProcs, CodeHelp; type diff --git a/ide/frames/project_misc_options.pas b/ide/frames/project_misc_options.pas index 74d6a6ad8a..a8eacbfabe 100644 --- a/ide/frames/project_misc_options.pas +++ b/ide/frames/project_misc_options.pas @@ -5,9 +5,14 @@ unit project_misc_options; interface uses - Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Graphics, Dialogs, - ExtCtrls, StdCtrls, - ProjectIntf, IDEOptionsIntf, + SysUtils, + // LCL + LCLProc, Forms, Dialogs, ExtCtrls, StdCtrls, + // LazUtils + FileUtil, + // IdeIntf + ProjectIntf, IDEOptionsIntf, IDEOptEditorIntf, + // IDE IDEProcs, Project, LazarusIDEStrConsts; type diff --git a/ide/frames/project_resources_options.pas b/ide/frames/project_resources_options.pas index f856d734b7..e5e32e59a5 100644 --- a/ide/frames/project_resources_options.pas +++ b/ide/frames/project_resources_options.pas @@ -7,9 +7,15 @@ unit project_resources_options; interface uses - Classes, SysUtils, Graphics, Controls, ComCtrls, Dialogs, LCLType, - FileUtil, LazFileUtils, LazUTF8, IDEOptionsIntf, IDEImagesIntf, IDEDialogs, Project, - ProjectUserResources, LCLStrConsts, StdCtrls, LazarusIDEStrConsts; + Classes, SysUtils, + // LCL + LCLType, LCLStrConsts, Controls, ComCtrls, StdCtrls, Dialogs, Graphics, + // LazUtils + FileUtil, LazFileUtils, LazUTF8, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, IDEDialogs, + // IDE + Project, ProjectUserResources, LazarusIDEStrConsts; type diff --git a/ide/frames/project_save_options.pas b/ide/frames/project_save_options.pas index 3069fc9770..5e4562b5ae 100644 --- a/ide/frames/project_save_options.pas +++ b/ide/frames/project_save_options.pas @@ -5,9 +5,15 @@ unit project_save_options; interface uses - Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, - StdCtrls, ExtCtrls, Project, IDEOptionsIntf, ProjectIntf, LCLProc, IDEProcs, - LazarusIDEStrConsts; + SysUtils, + // LazUtils + FileUtil, + // LCL + LCLProc, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, ProjectIntf, + // IDE + Project, IDEProcs, LazarusIDEStrConsts; type diff --git a/ide/frames/project_versioninfo_options.pas b/ide/frames/project_versioninfo_options.pas index 1acf4c0cf3..60e3773ef9 100644 --- a/ide/frames/project_versioninfo_options.pas +++ b/ide/frames/project_versioninfo_options.pas @@ -5,9 +5,15 @@ unit project_versioninfo_options; interface uses - Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, - Spin, Buttons, Grids, CheckLst, LazUTF8, - Project, IDEOptionsIntf, LazarusIDEStrConsts, W32VersionInfo; + Classes, SysUtils, + // LCL + Forms, Dialogs, StdCtrls, Spin, Grids, CheckLst, + // LazUtils + LazUTF8, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + Project, LazarusIDEStrConsts, W32VersionInfo; type diff --git a/ide/frames/window_options.pas b/ide/frames/window_options.pas index 5773b0b474..ac69f24d62 100644 --- a/ide/frames/window_options.pas +++ b/ide/frames/window_options.pas @@ -25,10 +25,15 @@ unit window_options; interface uses - Classes, SysUtils, FileUtil, Forms, Controls, StdCtrls, ExtCtrls, - LCLProc, ObjectInspector, IDEOptionsIntf, - IDEWindowIntf, DividerBevel, EnvironmentOpts, IDEOptionDefs, InterfaceBase, - LazarusIDEStrConsts; + SysUtils, + // LCL + Forms, StdCtrls, InterfaceBase, + // LazControls + DividerBevel, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + EnvironmentOpts, LazarusIDEStrConsts; type { TWindowOptionsFrame } diff --git a/ide/helpoptions.pas b/ide/helpoptions.pas index f25b8830b0..de3aebff71 100644 --- a/ide/helpoptions.pas +++ b/ide/helpoptions.pas @@ -35,9 +35,15 @@ unit HelpOptions; interface uses - Classes, SysUtils, LCLProc, LazFileUtils, Laz2_XMLCfg, LazFileCache, - LazHelpIntf, IDEOptionsIntf, MacroIntf, LazConf, - LazarusIDEStrConsts, IDEOptionDefs; + Classes, SysUtils, + // LCL + LCLProc, + // LazUtils + LazFileUtils, Laz2_XMLCfg, LazFileCache, + // IdeIntf + LazHelpIntf, IDEOptionsIntf, IDEOptEditorIntf, MacroIntf, + // IDE + LazarusIDEStrConsts, IDEOptionDefs, LazConf; type { THelpOptions } diff --git a/ide/ideoptionsdlg.pas b/ide/ideoptionsdlg.pas index 54ef53400d..a268773a15 100644 --- a/ide/ideoptionsdlg.pas +++ b/ide/ideoptionsdlg.pas @@ -30,12 +30,15 @@ unit IDEOptionsDlg; interface uses - Classes, SysUtils, LCLProc, - LCLType, Controls, Forms, ComCtrls, Buttons, ButtonPanel, ExtCtrls, StdCtrls, - Dialogs, TreeFilterEdit, + Classes, SysUtils, + // LCL + LCLProc, LCLType, Controls, Forms, ComCtrls, Buttons, ButtonPanel, + ExtCtrls, StdCtrls, Dialogs, + // LazControls + TreeFilterEdit, // IdeIntf - IDEWindowIntf, IDEOptionsIntf, IDECommands, IDEHelpIntf, ProjectIntf, - IDEImagesIntf, + IDEWindowIntf, IDEOptionsIntf, IDEOptEditorIntf, IDECommands, IDEHelpIntf, + ProjectIntf, IDEImagesIntf, // IDE EnvironmentOpts, EditorOptions, BuildModesManager, Compiler_ModeMatrix, Project, LazarusIDEStrConsts, diff --git a/ide/imexportcompileropts.pas b/ide/imexportcompileropts.pas index 17f2ffa1c1..4028e8b286 100644 --- a/ide/imexportcompileropts.pas +++ b/ide/imexportcompileropts.pas @@ -32,9 +32,15 @@ unit ImExportCompilerOpts; interface uses - SysUtils, Forms, Controls, Dialogs, StdCtrls, Buttons, ExtCtrls, ButtonPanel, - IDEProcs, FileUtil, LazFileUtils, Laz2_XMLCfg, LCLType, LazarusIDEStrConsts, - IDEOptionsIntf, IDEImagesIntf, InputHistory, Project, CompilerOptions; + SysUtils, + // LCL + LCLType, Forms, Controls, Dialogs, StdCtrls, Buttons, ExtCtrls, ButtonPanel, + // LazUtils + FileUtil, LazFileUtils, Laz2_XMLCfg, + // IdeIntf + IDEOptEditorIntf, IDEImagesIntf, + // IDE + IDEProcs, LazarusIDEStrConsts, InputHistory, Project, CompilerOptions; type { TImExportCompOptsDlg } diff --git a/ide/main.pp b/ide/main.pp index bcd57a6cfd..f2c87d2a4f 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -80,7 +80,7 @@ uses MacroIntf, IDECommands, IDEWindowIntf, ComponentReg, SrcEditorIntf, NewItemIntf, IDEExternToolIntf, IDEMsgIntf, PackageIntf, ProjectIntf, CompOptsIntf, MenuIntf, LazIDEIntf, IDEDialogs, - IDEOptionsIntf, IDEImagesIntf, ComponentEditors, ToolBarIntf, + IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, ComponentEditors, ToolBarIntf, // protocol IDEProtocol, // compile diff --git a/ide/project.pp b/ide/project.pp index be504e2af2..4af7828a95 100644 --- a/ide/project.pp +++ b/ide/project.pp @@ -59,7 +59,7 @@ uses // IDEIntf PropEdits, UnitResources, EditorSyntaxHighlighterDef, CompOptsIntf, ProjectIntf, MacroIntf, MacroDefIntf, SrcEditorIntf, - IDEOptionsIntf, IDEDialogs, LazIDEIntf, PackageIntf, + IDEOptionsIntf, IDEOptEditorIntf, IDEDialogs, LazIDEIntf, PackageIntf, // IDE CompOptsModes, ProjectResources, LazConf, ProjectIcon, IDECmdLine, IDEProcs, CompilerOptions, RunParamsOpts, ModeMatrixOpts, diff --git a/packager/frames/package_description_options.pas b/packager/frames/package_description_options.pas index 73506c4ab3..3d295835d2 100644 --- a/packager/frames/package_description_options.pas +++ b/packager/frames/package_description_options.pas @@ -9,7 +9,7 @@ uses // LCL Forms, Controls, StdCtrls, Spin, LCLProc, // IdeIntf - PackageDependencyIntf, IDEOptionsIntf, + PackageDependencyIntf, IDEOptionsIntf, IDEOptEditorIntf, // IDE LazarusIDEStrConsts, PackageDefs, PackageSystem, BrokenDependenciesDlg; diff --git a/packager/frames/package_i18n_options.pas b/packager/frames/package_i18n_options.pas index f3baed4805..c029c39294 100644 --- a/packager/frames/package_i18n_options.pas +++ b/packager/frames/package_i18n_options.pas @@ -5,9 +5,15 @@ unit package_i18n_options; interface uses - Classes, SysUtils, FileUtil, Forms, Controls, StdCtrls, EditBtn, - IDEOptionsIntf, LazarusIDEStrConsts, PackageDefs, IDEDialogs, - IDEImagesIntf; + SysUtils, + // LazUtils + FileUtil, + // LCL + Forms, StdCtrls, EditBtn, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, IDEDialogs, + // IDE + LazarusIDEStrConsts, PackageDefs; type diff --git a/packager/frames/package_integration_options.pas b/packager/frames/package_integration_options.pas index b7d2dee00e..8333382dc8 100644 --- a/packager/frames/package_integration_options.pas +++ b/packager/frames/package_integration_options.pas @@ -5,9 +5,15 @@ unit package_integration_options; interface uses - Classes, SysUtils, Forms, Controls, ExtCtrls, StdCtrls, Dialogs, - LazFileUtils, IDEOptionsIntf, MacroIntf, PackageIntf, - LazarusIDEStrConsts, PackageDefs, PathEditorDlg, IDEProcs, CodeHelp; + Classes, SysUtils, + // LCL + Forms, Controls, ExtCtrls, StdCtrls, Dialogs, + // LazUtils + LazFileUtils, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, MacroIntf, PackageIntf, + // IDE + PackageDefs, LazarusIDEStrConsts, PathEditorDlg, IDEProcs, CodeHelp; type diff --git a/packager/frames/package_provides_options.pas b/packager/frames/package_provides_options.pas index e62bc6fcde..f4857cc269 100644 --- a/packager/frames/package_provides_options.pas +++ b/packager/frames/package_provides_options.pas @@ -5,8 +5,13 @@ unit Package_Provides_Options; interface uses - Classes, SysUtils, FileUtil, Forms, Controls, StdCtrls, - IDEOptionsIntf, LazarusIDEStrConsts, PackageDefs; + SysUtils, + // LCL + StdCtrls, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, + // IDE + LazarusIDEStrConsts, PackageDefs; type diff --git a/packager/frames/package_usage_options.pas b/packager/frames/package_usage_options.pas index 5eefc61863..18c846d2e1 100644 --- a/packager/frames/package_usage_options.pas +++ b/packager/frames/package_usage_options.pas @@ -5,9 +5,15 @@ unit Package_Usage_Options; interface uses - SysUtils, LazFileUtils, Forms, Controls, StdCtrls, Dialogs, - PathEditorDlg, IDEOptionsIntf, MacroIntf, - LazarusIDEStrConsts, IDEProcs, PackageDefs; + SysUtils, + // LazUtils + LazFileUtils, + // LCL + Forms, Controls, StdCtrls, Dialogs, + // IdeIntf + IDEOptionsIntf, IDEOptEditorIntf, MacroIntf, + // IDE + PathEditorDlg, LazarusIDEStrConsts, IDEProcs, PackageDefs; type diff --git a/packager/packagedefs.pas b/packager/packagedefs.pas index a1a711e8dd..34fba75019 100644 --- a/packager/packagedefs.pas +++ b/packager/packagedefs.pas @@ -46,7 +46,7 @@ uses // LazUtils LazFileUtils, LazFileCache, LazUTF8, AvgLvlTree, // IDEIntf - PropEdits, LazIDEIntf, MacroIntf, MacroDefIntf, IDEOptionsIntf, + PropEdits, LazIDEIntf, MacroIntf, MacroDefIntf, IDEOptionsIntf, IDEOptEditorIntf, PackageDependencyIntf, PackageIntf, IDEDialogs, ComponentReg, IDEImagesIntf, // IDE EditDefineTree, CompilerOptions, CompOptsModes, IDEOptionDefs, ProjPackCommon,