mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 18:20:00 +02:00
ide, ideintf: move code explorer options to the generic IDE options dialog
git-svn-id: trunk@19481 -
This commit is contained in:
parent
debe100889
commit
e14b61c2fd
8
.gitattributes
vendored
8
.gitattributes
vendored
@ -2513,8 +2513,6 @@ ide/codebrowser.lfm svneol=native#text/plain
|
||||
ide/codebrowser.lrs svneol=native#text/plain
|
||||
ide/codebrowser.pas svneol=native#text/plain
|
||||
ide/codecontextform.pas svneol=native#text/plain
|
||||
ide/codeexplopts.lfm svneol=native#text/plain
|
||||
ide/codeexplopts.lrs svneol=native#text/pascal
|
||||
ide/codeexplopts.pas svneol=native#text/pascal
|
||||
ide/codeexplorer.lfm svneol=native#text/plain
|
||||
ide/codeexplorer.lrs svneol=native#text/pascal
|
||||
@ -2612,6 +2610,12 @@ ide/frames/atom_checkboxes_options.pas svneol=native#text/pascal
|
||||
ide/frames/backup_options.lfm svneol=native#text/plain
|
||||
ide/frames/backup_options.lrs svneol=native#text/pascal
|
||||
ide/frames/backup_options.pas svneol=native#text/pascal
|
||||
ide/frames/codeexplorer_categories_options.lfm svneol=native#text/plain
|
||||
ide/frames/codeexplorer_categories_options.lrs svneol=native#text/pascal
|
||||
ide/frames/codeexplorer_categories_options.pas svneol=native#text/pascal
|
||||
ide/frames/codeexplorer_update_options.lfm svneol=native#text/plain
|
||||
ide/frames/codeexplorer_update_options.lrs svneol=native#text/pascal
|
||||
ide/frames/codeexplorer_update_options.pas svneol=native#text/pascal
|
||||
ide/frames/codetools_codecreation_options.lfm svneol=native#text/plain
|
||||
ide/frames/codetools_codecreation_options.lrs svneol=native#text/pascal
|
||||
ide/frames/codetools_codecreation_options.pas svneol=native#text/pascal
|
||||
|
@ -1,133 +0,0 @@
|
||||
object CodeExplorerDlg: TCodeExplorerDlg
|
||||
Left = 323
|
||||
Height = 340
|
||||
Top = 239
|
||||
Width = 321
|
||||
ActiveControl = MainNotebook
|
||||
BorderStyle = bsSizeToolWin
|
||||
Caption = 'CodeExplorerDlg'
|
||||
ClientHeight = 340
|
||||
ClientWidth = 321
|
||||
OnCreate = CodeExplorerDlgCreate
|
||||
OnDestroy = CodeExplorerDlgDestroy
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '0.9.27'
|
||||
object MainNotebook: TNotebook
|
||||
Left = 0
|
||||
Height = 302
|
||||
Top = 0
|
||||
Width = 321
|
||||
Align = alClient
|
||||
BorderSpacing.Bottom = 6
|
||||
PageIndex = 0
|
||||
TabOrder = 0
|
||||
object UpdatePage: TPage
|
||||
Caption = 'UpdatePage'
|
||||
ClientWidth = 313
|
||||
ClientHeight = 276
|
||||
object RefreshRadioGroup: TRadioGroup
|
||||
Left = 6
|
||||
Height = 144
|
||||
Top = 55
|
||||
Width = 301
|
||||
Align = alTop
|
||||
AutoFill = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'RefreshRadioGroup'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 126
|
||||
ClientWidth = 297
|
||||
Items.Strings = (
|
||||
'Manual'
|
||||
'SwitchPage'
|
||||
'Idle'
|
||||
)
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
end
|
||||
object FollowCursorCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = UpdatePage
|
||||
AnchorSideTop.Control = RefreshRadioGroup
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 32
|
||||
Top = 205
|
||||
Width = 301
|
||||
Align = alTop
|
||||
AutoSize = False
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'FollowCursorCheckBox'
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
end
|
||||
object ModeRadioGroup: TRadioGroup
|
||||
Left = 6
|
||||
Height = 43
|
||||
Top = 6
|
||||
Width = 301
|
||||
Align = alTop
|
||||
AutoFill = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'ModeRadioGroup'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
ClientHeight = 25
|
||||
ClientWidth = 297
|
||||
Columns = 2
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Category'
|
||||
'Source'
|
||||
)
|
||||
TabOrder = 2
|
||||
TabStop = True
|
||||
end
|
||||
end
|
||||
object CategoryPage: TPage
|
||||
Caption = 'CategoryPage'
|
||||
ClientWidth = 313
|
||||
ClientHeight = 260
|
||||
object CategoriesCheckGroup: TCheckGroup
|
||||
Left = 6
|
||||
Height = 248
|
||||
Top = 6
|
||||
Width = 301
|
||||
Align = alClient
|
||||
AutoFill = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'CategoriesCheckGroup'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 26
|
||||
Top = 308
|
||||
Width = 309
|
||||
TabOrder = 1
|
||||
ShowButtons = [pbOK, pbCancel, pbHelp]
|
||||
ShowBevel = False
|
||||
end
|
||||
end
|
@ -1,50 +0,0 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TCodeExplorerDlg','FORMDATA',[
|
||||
'TPF0'#16'TCodeExplorerDlg'#15'CodeExplorerDlg'#4'Left'#3'C'#1#6'Height'#3'T'
|
||||
+#1#3'Top'#3#239#0#5'Width'#3'A'#1#13'ActiveControl'#7#12'MainNotebook'#11'Bo'
|
||||
+'rderStyle'#7#13'bsSizeToolWin'#7'Caption'#6#15'CodeExplorerDlg'#12'ClientHe'
|
||||
+'ight'#3'T'#1#11'ClientWidth'#3'A'#1#8'OnCreate'#7#21'CodeExplorerDlgCreate'
|
||||
+#9'OnDestroy'#7#22'CodeExplorerDlgDestroy'#8'Position'#7#14'poScreenCenter'
|
||||
+#10'LCLVersion'#6#6'0.9.27'#0#9'TNotebook'#12'MainNotebook'#4'Left'#2#0#6'He'
|
||||
+'ight'#3'.'#1#3'Top'#2#0#5'Width'#3'A'#1#5'Align'#7#8'alClient'#20'BorderSpa'
|
||||
+'cing.Bottom'#2#6#9'PageIndex'#2#0#8'TabOrder'#2#0#0#5'TPage'#10'UpdatePage'
|
||||
+#7'Caption'#6#10'UpdatePage'#11'ClientWidth'#3'9'#1#12'ClientHeight'#3#20#1#0
|
||||
+#11'TRadioGroup'#17'RefreshRadioGroup'#4'Left'#2#6#6'Height'#3#144#0#3'Top'#2
|
||||
+'7'#5'Width'#3'-'#1#5'Align'#7#5'alTop'#8'AutoFill'#9#20'BorderSpacing.Aroun'
|
||||
+'d'#2#6#7'Caption'#6#17'RefreshRadioGroup'#28'ChildSizing.LeftRightSpacing'#2
|
||||
+#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7
|
||||
+#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomoge'
|
||||
+'nousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'C'
|
||||
+'hildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29
|
||||
+'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'Clien'
|
||||
+'tHeight'#2'~'#11'ClientWidth'#3')'#1#13'Items.Strings'#1#6#6'Manual'#6#10'S'
|
||||
+'witchPage'#6#4'Idle'#0#8'TabOrder'#2#0#7'TabStop'#9#0#0#9'TCheckBox'#20'Fol'
|
||||
+'lowCursorCheckBox'#22'AnchorSideLeft.Control'#7#10'UpdatePage'#21'AnchorSid'
|
||||
+'eTop.Control'#7#17'RefreshRadioGroup'#18'AnchorSideTop.Side'#7#9'asrBottom'
|
||||
+#4'Left'#2#6#6'Height'#2' '#3'Top'#3#205#0#5'Width'#3'-'#1#5'Align'#7#5'alTo'
|
||||
+'p'#8'AutoSize'#8#20'BorderSpacing.Around'#2#6#7'Caption'#6#20'FollowCursorC'
|
||||
+'heckBox'#8'TabOrder'#2#1#7'Visible'#8#0#0#11'TRadioGroup'#14'ModeRadioGroup'
|
||||
+#4'Left'#2#6#6'Height'#2'+'#3'Top'#2#6#5'Width'#3'-'#1#5'Align'#7#5'alTop'#8
|
||||
+'AutoFill'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#14'ModeRadioGroup'#28
|
||||
+'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'C'
|
||||
+'hildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing'
|
||||
+'.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHoriz'
|
||||
+'ontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChi'
|
||||
+'lds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSiz'
|
||||
+'ing.ControlsPerLine'#2#2#12'ClientHeight'#2#25#11'ClientWidth'#3')'#1#7'Col'
|
||||
+'umns'#2#2#9'ItemIndex'#2#0#13'Items.Strings'#1#6#8'Category'#6#6'Source'#0#8
|
||||
+'TabOrder'#2#2#7'TabStop'#9#0#0#0#5'TPage'#12'CategoryPage'#7'Caption'#6#12
|
||||
+'CategoryPage'#11'ClientWidth'#3'9'#1#12'ClientHeight'#3#4#1#0#11'TCheckGrou'
|
||||
+'p'#20'CategoriesCheckGroup'#4'Left'#2#6#6'Height'#3#248#0#3'Top'#2#6#5'Widt'
|
||||
+'h'#3'-'#1#5'Align'#7#8'alClient'#8'AutoFill'#9#20'BorderSpacing.Around'#2#6
|
||||
+#7'Caption'#6#20'CategoriesCheckGroup'#28'ChildSizing.LeftRightSpacing'#2#6
|
||||
+#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24
|
||||
+'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenou'
|
||||
+'sChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'Chil'
|
||||
+'dSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cc'
|
||||
+'lLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#8'TabOrder'
|
||||
+#2#0#0#0#0#0#12'TButtonPanel'#11'ButtonPanel'#4'Left'#2#6#6'Height'#2#26#3'T'
|
||||
+'op'#3'4'#1#5'Width'#3'5'#1#8'TabOrder'#2#1#11'ShowButtons'#11#4'pbOK'#8'pbC'
|
||||
+'ancel'#6'pbHelp'#0#9'ShowBevel'#8#0#0#0
|
||||
]);
|
@ -38,7 +38,7 @@ uses
|
||||
Buttons, ExtCtrls, FileUtil, StdCtrls, ButtonPanel, AvgLvlTree,
|
||||
CodeToolManager, Laz_XMLCfg, BasicCodeTools,
|
||||
IDEContextHelpEdit,
|
||||
LazConf, IDEProcs, LazarusIDEStrConsts;
|
||||
LazConf, IDEProcs, IDEOptionsIntf, LazarusIDEStrConsts;
|
||||
|
||||
type
|
||||
{ TCodeExplorerOptions }
|
||||
@ -93,7 +93,7 @@ const
|
||||
|
||||
type
|
||||
|
||||
TCodeExplorerOptions = class(TPersistent)
|
||||
TCodeExplorerOptions = class(TAbstractIDEOptions)
|
||||
private
|
||||
FCategories: TCodeExplorerCategories;
|
||||
FFigureCharConst: boolean;
|
||||
@ -136,31 +136,6 @@ type
|
||||
property NotFigureConstants: TAvgLvlTree read FNotFigureConstants;
|
||||
end;
|
||||
|
||||
{ TCodeExplorerDlg }
|
||||
|
||||
TCodeExplorerDlg = class(TForm)
|
||||
ButtonPanel1: TButtonPanel;
|
||||
ButtonPanel: TButtonPanel;
|
||||
CategoriesCheckGroup: TCheckGroup;
|
||||
FollowCursorCheckBox: TCheckBox;
|
||||
MainNotebook: TNotebook;
|
||||
ModeRadioGroup: TRadioGroup;
|
||||
CategoryPage: TPage;
|
||||
RefreshRadioGroup: TRadioGroup;
|
||||
UpdatePage: TPage;
|
||||
procedure CodeExplorerDlgCreate(Sender: TObject);
|
||||
procedure CodeExplorerDlgDestroy(Sender: TObject);
|
||||
procedure HelpButtonClick(Sender: TObject);
|
||||
procedure OkButtonClick(Sender: TObject);
|
||||
private
|
||||
FOptions: TCodeExplorerOptions;
|
||||
procedure SetOptions(const AValue: TCodeExplorerOptions);
|
||||
procedure LoadFormFromOptions;
|
||||
procedure SaveFormToOptions;
|
||||
public
|
||||
property Options: TCodeExplorerOptions read FOptions write SetOptions;
|
||||
end;
|
||||
|
||||
const
|
||||
CodeExplorerVersion = 1;
|
||||
|
||||
@ -199,9 +174,7 @@ const
|
||||
);
|
||||
|
||||
var
|
||||
CodeExplorerOptions: TCodeExplorerOptions;// set by the IDE
|
||||
|
||||
function ShowCodeExplorerOptions: TModalResult;
|
||||
CodeExplorerOptions: TCodeExplorerOptions = nil; // set by the IDE
|
||||
|
||||
function CodeExplorerRefreshNameToEnum(const s: string): TCodeExplorerRefresh;
|
||||
function CodeExplorerModeNameToEnum(const s: string): TCodeExplorerMode;
|
||||
@ -273,21 +246,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function ShowCodeExplorerOptions: TModalResult;
|
||||
var
|
||||
CodeExplorerDlg: TCodeExplorerDlg;
|
||||
begin
|
||||
CodeExplorerDlg:=TCodeExplorerDlg.Create(nil);
|
||||
try
|
||||
CodeExplorerDlg.Options:=CodeExplorerOptions;
|
||||
Result:=CodeExplorerDlg.ShowModal;
|
||||
if Result=mrOk then
|
||||
CodeExplorerOptions.Assign(CodeExplorerDlg.Options);
|
||||
finally
|
||||
CodeExplorerDlg.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TCodeExplorerOptions }
|
||||
|
||||
constructor TCodeExplorerOptions.Create;
|
||||
@ -565,119 +523,7 @@ begin
|
||||
and NotFigureConstant('1');
|
||||
end;
|
||||
|
||||
{ TCodeExplorerDlg }
|
||||
|
||||
procedure TCodeExplorerDlg.OkButtonClick(Sender: TObject);
|
||||
begin
|
||||
SaveFormToOptions;
|
||||
ModalResult:=mrOk;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerDlg.SetOptions(const AValue: TCodeExplorerOptions);
|
||||
begin
|
||||
if FOptions=AValue then exit;
|
||||
FOptions.Assign(AValue);
|
||||
LoadFormFromOptions;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerDlg.LoadFormFromOptions;
|
||||
var
|
||||
c: TCodeExplorerCategory;
|
||||
begin
|
||||
case Options.Refresh of
|
||||
cerManual: RefreshRadioGroup.ItemIndex:=0;
|
||||
cerSwitchEditorPage: RefreshRadioGroup.ItemIndex:=1;
|
||||
cerOnIdle: RefreshRadioGroup.ItemIndex:=2;
|
||||
else
|
||||
RefreshRadioGroup.ItemIndex:=1;
|
||||
end;
|
||||
|
||||
case Options.Mode of
|
||||
cemCategory: ModeRadioGroup.ItemIndex:=0;
|
||||
cemSource: ModeRadioGroup.ItemIndex:=1;
|
||||
else
|
||||
ModeRadioGroup.ItemIndex:=0;
|
||||
end;
|
||||
|
||||
FollowCursorCheckBox.Checked:=Options.FollowCursor;
|
||||
|
||||
for c:=FirstCodeExplorerCategory to high(TCodeExplorerCategory) do
|
||||
CategoriesCheckGroup.Checked[ord(c)-1]:=c in Options.Categories;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerDlg.SaveFormToOptions;
|
||||
var
|
||||
NewCategories: TCodeExplorerCategories;
|
||||
c: TCodeExplorerCategory;
|
||||
begin
|
||||
case RefreshRadioGroup.ItemIndex of
|
||||
0: FOptions.Refresh:=cerManual;
|
||||
1: FOptions.Refresh:=cerSwitchEditorPage;
|
||||
2: FOptions.Refresh:=cerOnIdle;
|
||||
end;
|
||||
|
||||
case ModeRadioGroup.ItemIndex of
|
||||
0: FOptions.Mode:=cemCategory;
|
||||
1: FOptions.Mode:=cemSource;
|
||||
end;
|
||||
|
||||
Options.FollowCursor:=FollowCursorCheckBox.Checked;
|
||||
|
||||
NewCategories:=[];
|
||||
for c:=FirstCodeExplorerCategory to high(TCodeExplorerCategory) do
|
||||
if CategoriesCheckGroup.Checked[ord(c)-1] then
|
||||
Include(NewCategories,c);
|
||||
Options.Categories:=NewCategories;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerDlg.CodeExplorerDlgCreate(Sender: TObject);
|
||||
var
|
||||
c: TCodeExplorerCategory;
|
||||
begin
|
||||
FOptions:=TCodeExplorerOptions.Create;
|
||||
Caption:=lisCEOCodeExplorer;
|
||||
|
||||
ButtonPanel.OKButton.OnClick := @OKButtonClick;
|
||||
ButtonPanel.HelpButton.OnClick := @HelpButtonClick;
|
||||
|
||||
UpdatePage.Caption:=lisCEOUpdate;
|
||||
RefreshRadioGroup.Caption:=lisCEORefreshAutomatically;
|
||||
with RefreshRadioGroup do begin
|
||||
Items[0]:=lisCEONeverOnlyManually;
|
||||
Items[1]:=lisCEOWhenSwitchingFile;
|
||||
Items[2]:=lisCEOOnIdle;
|
||||
end;
|
||||
ModeRadioGroup.Caption:=lisCEOMode;
|
||||
with ModeRadioGroup do begin
|
||||
Items[0]:=lisCEOModeCategory;
|
||||
Items[1]:=lisCEOModeSource;
|
||||
end;
|
||||
FollowCursorCheckBox.Caption:=lisCEFollowCursor;
|
||||
|
||||
CategoryPage.Caption:=lisCECategories;
|
||||
CategoriesCheckGroup.Caption:=lisCEOnlyUsedInCategoryMode;
|
||||
for c:=FirstCodeExplorerCategory to high(TCodeExplorerCategory) do
|
||||
CategoriesCheckGroup.Items.Add(CodeExplorerLocalizedString(c));
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerDlg.CodeExplorerDlgDestroy(Sender: TObject);
|
||||
begin
|
||||
FOptions.Free;
|
||||
FOptions:=nil;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerDlg.HelpButtonClick(Sender: TObject);
|
||||
begin
|
||||
ShowContextHelpForIDE(Self);
|
||||
end;
|
||||
|
||||
initialization
|
||||
CodeExplorerOptions:=nil;
|
||||
{$I codeexplopts.lrs}
|
||||
|
||||
finalization
|
||||
CodeExplorerOptions.Free;
|
||||
CodeExplorerOptions:=nil;
|
||||
|
||||
RegisterIDEOptionsGroup(GroupCodeExplorer, dlgGroupCodeExplorer);
|
||||
end.
|
||||
|
||||
|
@ -132,6 +132,7 @@ type
|
||||
FOnGetCodeTree: TOnGetCodeTree;
|
||||
FOnGetDirectivesTree: TOnGetDirectivesTree;
|
||||
FOnJumpToCode: TOnJumpToCode;
|
||||
FOnShowOptions: TNotifyEvent;
|
||||
FUpdateCount: integer;
|
||||
fSortCodeTool: TCodeTool;
|
||||
ImgIDClass: Integer;
|
||||
@ -210,6 +211,7 @@ type
|
||||
property OnGetDirectivesTree: TOnGetDirectivesTree read FOnGetDirectivesTree
|
||||
write FOnGetDirectivesTree;
|
||||
property OnJumpToCode: TOnJumpToCode read FOnJumpToCode write FOnJumpToCode;
|
||||
property OnShowOptions: TNotifyEvent read FOnShowOptions write FOnShowOptions;
|
||||
property Mode: TCodeExplorerMode read FMode write SetMode;
|
||||
property CodeFilename: string read FCodeFilename;
|
||||
property CodeFilter: string read GetCodeFilter write SetCodeFilter;
|
||||
@ -229,13 +231,8 @@ var
|
||||
CERefreshIDEMenuCommand: TIDEMenuCommand;
|
||||
CEDockingIDEMenuCommand: TIDEMenuCommand;
|
||||
|
||||
procedure InitCodeExplorerOptions;
|
||||
procedure LoadCodeExplorerOptions;
|
||||
procedure SaveCodeExplorerOptions;
|
||||
|
||||
procedure RegisterStandardCodeExplorerMenuItems;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
@ -277,23 +274,6 @@ begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
procedure InitCodeExplorerOptions;
|
||||
begin
|
||||
if CodeExplorerOptions=nil then
|
||||
CodeExplorerOptions:=TCodeExplorerOptions.Create;
|
||||
end;
|
||||
|
||||
procedure LoadCodeExplorerOptions;
|
||||
begin
|
||||
InitCodeExplorerOptions;
|
||||
CodeExplorerOptions.Load;
|
||||
end;
|
||||
|
||||
procedure SaveCodeExplorerOptions;
|
||||
begin
|
||||
CodeExplorerOptions.Save;
|
||||
end;
|
||||
|
||||
procedure RegisterStandardCodeExplorerMenuItems;
|
||||
var
|
||||
Path: String;
|
||||
@ -323,8 +303,6 @@ end;
|
||||
|
||||
procedure TCodeExplorerView.CodeExplorerViewCREATE(Sender: TObject);
|
||||
begin
|
||||
LoadCodeExplorerOptions;
|
||||
|
||||
FMode := CodeExplorerOptions.Mode;
|
||||
UpdateMode;
|
||||
|
||||
@ -348,7 +326,7 @@ begin
|
||||
|
||||
|
||||
RefreshSpeedButton.LoadGlyphFromLazarusResource('laz_refresh');
|
||||
OptionsSpeedButton.LoadGlyphFromLazarusResource('menu_editor_options');
|
||||
OptionsSpeedButton.LoadGlyphFromLazarusResource('menu_environment_options');
|
||||
|
||||
ImgIDDefault := Imagelist1.AddLazarusResource('ce_default');
|
||||
ImgIDProgram := Imagelist1.AddLazarusResource('ce_program');
|
||||
@ -473,10 +451,11 @@ end;
|
||||
|
||||
procedure TCodeExplorerView.OptionsSpeedButtonClick(Sender: TObject);
|
||||
begin
|
||||
if ShowCodeExplorerOptions=mrOk then begin
|
||||
SaveCodeExplorerOptions;
|
||||
FLastCodeValid:=false;
|
||||
Refresh(true);
|
||||
if Assigned(FOnShowOptions) then
|
||||
begin
|
||||
OnShowOptions(Self);
|
||||
FLastCodeValid := False;
|
||||
Refresh(True);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
34
ide/frames/codeexplorer_categories_options.lfm
Normal file
34
ide/frames/codeexplorer_categories_options.lfm
Normal file
@ -0,0 +1,34 @@
|
||||
object CodeExplorerCategoriesOptionsFrame: TCodeExplorerCategoriesOptionsFrame
|
||||
Left = 0
|
||||
Height = 300
|
||||
Top = 0
|
||||
Width = 400
|
||||
ClientHeight = 300
|
||||
ClientWidth = 400
|
||||
TabOrder = 0
|
||||
DesignLeft = 701
|
||||
DesignTop = 233
|
||||
object CategoriesCheckGroup: TCheckGroup
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 300
|
||||
Top = 0
|
||||
Width = 400
|
||||
AutoFill = True
|
||||
Caption = 'CategoriesCheckGroup'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
16
ide/frames/codeexplorer_categories_options.lrs
Normal file
16
ide/frames/codeexplorer_categories_options.lrs
Normal file
@ -0,0 +1,16 @@
|
||||
LazarusResources.Add('TCodeExplorerCategoriesOptionsFrame','FORMDATA',[
|
||||
'TPF0#TCodeExplorerCategoriesOptionsFrame"CodeExplorerCategoriesOptionsFrame'
|
||||
+#4'Left'#2#0#6'Height'#3','#1#3'Top'#2#0#5'Width'#3#144#1#12'ClientHeight'#3
|
||||
+','#1#11'ClientWidth'#3#144#1#8'TabOrder'#2#0#10'DesignLeft'#3#189#2#9'Desig'
|
||||
+'nTop'#3#233#0#0#11'TCheckGroup'#20'CategoriesCheckGroup'#22'AnchorSideLeft.'
|
||||
+'Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight'
|
||||
+'.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideB'
|
||||
+'ottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2
|
||||
+#0#6'Height'#3','#1#3'Top'#2#0#5'Width'#3#144#1#8'AutoFill'#9#7'Caption'#6#20
|
||||
+'CategoriesCheckGroup'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.T'
|
||||
+'opBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousCh'
|
||||
+'ildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28
|
||||
+'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVer'
|
||||
+'tical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenT'
|
||||
+'opToBottom'#27'ChildSizing.ControlsPerLine'#2#1#8'TabOrder'#2#0#0#0#0
|
||||
]);
|
100
ide/frames/codeexplorer_categories_options.pas
Normal file
100
ide/frames/codeexplorer_categories_options.pas
Normal file
@ -0,0 +1,100 @@
|
||||
{
|
||||
***************************************************************************
|
||||
* *
|
||||
* This source is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This code is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* General Public License for more details. *
|
||||
* *
|
||||
* A copy of the GNU General Public License is available on the World *
|
||||
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||
* obtain it by writing to the Free Software Foundation, *
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* *
|
||||
***************************************************************************
|
||||
}
|
||||
unit codeexplorer_categories_options;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, ExtCtrls,
|
||||
IDEOptionsIntf, LazarusIDEStrConsts, CodeExplOpts;
|
||||
|
||||
type
|
||||
|
||||
{ TCodeExplorerCategoriesOptionsFrame }
|
||||
|
||||
TCodeExplorerCategoriesOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
CategoriesCheckGroup: TCheckGroup;
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
function GetTitle: String; override;
|
||||
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
||||
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
|
||||
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
|
||||
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TCodeExplorerCategoriesOptionsFrame }
|
||||
|
||||
function TCodeExplorerCategoriesOptionsFrame.GetTitle: String;
|
||||
begin
|
||||
Result := lisCECategories;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerCategoriesOptionsFrame.Setup(
|
||||
ADialog: TAbstractOptionsEditorDialog);
|
||||
var
|
||||
c: TCodeExplorerCategory;
|
||||
begin
|
||||
CategoriesCheckGroup.Caption := lisCEOnlyUsedInCategoryMode;
|
||||
for c:=FirstCodeExplorerCategory to high(TCodeExplorerCategory) do
|
||||
CategoriesCheckGroup.Items.Add(CodeExplorerLocalizedString(c));
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerCategoriesOptionsFrame.ReadSettings(
|
||||
AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
c: TCodeExplorerCategory;
|
||||
begin
|
||||
with AOptions as TCodeExplorerOptions do
|
||||
for c := FirstCodeExplorerCategory to high(TCodeExplorerCategory) do
|
||||
CategoriesCheckGroup.Checked[ord(c) - 1] := c in Categories;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerCategoriesOptionsFrame.WriteSettings(
|
||||
AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
NewCategories: TCodeExplorerCategories;
|
||||
c: TCodeExplorerCategory;
|
||||
begin
|
||||
NewCategories:=[];
|
||||
for c := FirstCodeExplorerCategory to high(TCodeExplorerCategory) do
|
||||
if CategoriesCheckGroup.Checked[ord(c) - 1] then
|
||||
Include(NewCategories, c);
|
||||
with AOptions as TCodeExplorerOptions do
|
||||
Categories := NewCategories;
|
||||
end;
|
||||
|
||||
class function TCodeExplorerCategoriesOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TCodeExplorerOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I codeexplorer_categories_options.lrs}
|
||||
RegisterIDEOptionsEditor(GroupCodeExplorer, TCodeExplorerCategoriesOptionsFrame, cdeOptionsCategories);
|
||||
|
||||
end.
|
||||
|
87
ide/frames/codeexplorer_update_options.lfm
Normal file
87
ide/frames/codeexplorer_update_options.lfm
Normal file
@ -0,0 +1,87 @@
|
||||
object CodeExplorerUpdateOptionsFrame: TCodeExplorerUpdateOptionsFrame
|
||||
Left = 0
|
||||
Height = 300
|
||||
Top = 0
|
||||
Width = 400
|
||||
ClientHeight = 300
|
||||
ClientWidth = 400
|
||||
TabOrder = 0
|
||||
DesignLeft = 719
|
||||
DesignTop = 260
|
||||
object ModeRadioGroup: TRadioGroup
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 43
|
||||
Top = 0
|
||||
Width = 400
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoFill = True
|
||||
Caption = 'ModeRadioGroup'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
ClientHeight = 25
|
||||
ClientWidth = 396
|
||||
Columns = 2
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Category'
|
||||
'Source'
|
||||
)
|
||||
TabOrder = 1
|
||||
TabStop = True
|
||||
end
|
||||
object RefreshRadioGroup: TRadioGroup
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ModeRadioGroup
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 144
|
||||
Top = 49
|
||||
Width = 400
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoFill = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'RefreshRadioGroup'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 126
|
||||
ClientWidth = 396
|
||||
Items.Strings = (
|
||||
'Manual'
|
||||
'SwitchPage'
|
||||
'Idle'
|
||||
)
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
end
|
||||
object FollowCursorCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = RefreshRadioGroup
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 17
|
||||
Top = 199
|
||||
Width = 127
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'FollowCursorCheckBox'
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
end
|
34
ide/frames/codeexplorer_update_options.lrs
Normal file
34
ide/frames/codeexplorer_update_options.lrs
Normal file
@ -0,0 +1,34 @@
|
||||
LazarusResources.Add('TCodeExplorerUpdateOptionsFrame','FORMDATA',[
|
||||
'TPF0'#31'TCodeExplorerUpdateOptionsFrame'#30'CodeExplorerUpdateOptionsFrame'
|
||||
+#4'Left'#2#0#6'Height'#3','#1#3'Top'#2#0#5'Width'#3#144#1#12'ClientHeight'#3
|
||||
+','#1#11'ClientWidth'#3#144#1#8'TabOrder'#2#0#10'DesignLeft'#3#207#2#9'Desig'
|
||||
+'nTop'#3#4#1#0#11'TRadioGroup'#14'ModeRadioGroup'#22'AnchorSideLeft.Control'
|
||||
+#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'
|
||||
+#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#2
|
||||
+'+'#3'Top'#2#0#5'Width'#3#144#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0
|
||||
+#8'AutoFill'#9#7'Caption'#6#14'ModeRadioGroup'#28'ChildSizing.LeftRightSpaci'
|
||||
+'ng'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizont'
|
||||
+'al'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crs'
|
||||
+'HomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'
|
||||
+#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7
|
||||
+#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#2#12'Cl'
|
||||
+'ientHeight'#2#25#11'ClientWidth'#3#140#1#7'Columns'#2#2#9'ItemIndex'#2#0#13
|
||||
+'Items.Strings'#1#6#8'Category'#6#6'Source'#0#8'TabOrder'#2#1#7'TabStop'#9#0
|
||||
+#0#11'TRadioGroup'#17'RefreshRadioGroup'#22'AnchorSideLeft.Control'#7#5'Owne'
|
||||
+'r'#21'AnchorSideTop.Control'#7#14'ModeRadioGroup'#18'AnchorSideTop.Side'#7#9
|
||||
+'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7
|
||||
+#9'asrBottom'#4'Left'#2#0#6'Height'#3#144#0#3'Top'#2'1'#5'Width'#3#144#1#7'A'
|
||||
+'nchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoFill'#9#17'BorderSpacing.T'
|
||||
+'op'#2#6#7'Caption'#6#17'RefreshRadioGroup'#28'ChildSizing.LeftRightSpacing'
|
||||
+#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7
|
||||
+#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomoge'
|
||||
+'nousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'C'
|
||||
+'hildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29
|
||||
+'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'Clien'
|
||||
+'tHeight'#2'~'#11'ClientWidth'#3#140#1#13'Items.Strings'#1#6#6'Manual'#6#10
|
||||
+'SwitchPage'#6#4'Idle'#0#8'TabOrder'#2#0#7'TabStop'#9#0#0#9'TCheckBox'#20'Fo'
|
||||
+'llowCursorCheckBox'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.'
|
||||
+'Control'#7#17'RefreshRadioGroup'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Le'
|
||||
+'ft'#2#0#6'Height'#2#17#3'Top'#3#199#0#5'Width'#2''#17'BorderSpacing.Top'#2
|
||||
+#6#7'Caption'#6#20'FollowCursorCheckBox'#8'TabOrder'#2#2#7'Visible'#8#0#0#0
|
||||
]);
|
131
ide/frames/codeexplorer_update_options.pas
Normal file
131
ide/frames/codeexplorer_update_options.pas
Normal file
@ -0,0 +1,131 @@
|
||||
{
|
||||
***************************************************************************
|
||||
* *
|
||||
* This source is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This code is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* General Public License for more details. *
|
||||
* *
|
||||
* A copy of the GNU General Public License is available on the World *
|
||||
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||
* obtain it by writing to the Free Software Foundation, *
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* *
|
||||
***************************************************************************
|
||||
}
|
||||
unit codeexplorer_update_options;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, ExtCtrls, StdCtrls,
|
||||
IDEOptionsIntf, LazarusIDEStrConsts, CodeExplOpts;
|
||||
|
||||
type
|
||||
|
||||
{ TCodeExplorerUpdateOptionsFrame }
|
||||
|
||||
TCodeExplorerUpdateOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
FollowCursorCheckBox: TCheckBox;
|
||||
ModeRadioGroup: TRadioGroup;
|
||||
RefreshRadioGroup: TRadioGroup;
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
function GetTitle: String; override;
|
||||
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
||||
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
|
||||
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
|
||||
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TCodeExplorerUpdateOptionsFrame }
|
||||
|
||||
function TCodeExplorerUpdateOptionsFrame.GetTitle: String;
|
||||
begin
|
||||
Result := lisCEOUpdate;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerUpdateOptionsFrame.Setup(
|
||||
ADialog: TAbstractOptionsEditorDialog);
|
||||
begin
|
||||
ModeRadioGroup.Caption := lisCEOMode;
|
||||
with ModeRadioGroup do
|
||||
begin
|
||||
Items[0] := lisCEOModeCategory;
|
||||
Items[1] := lisCEOModeSource;
|
||||
end;
|
||||
RefreshRadioGroup.Caption := lisCEORefreshAutomatically;
|
||||
with RefreshRadioGroup do
|
||||
begin
|
||||
Items[0] := lisCEONeverOnlyManually;
|
||||
Items[1] := lisCEOWhenSwitchingFile;
|
||||
Items[2] := lisCEOOnIdle;
|
||||
end;
|
||||
FollowCursorCheckBox.Caption := lisCEFollowCursor;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerUpdateOptionsFrame.ReadSettings(
|
||||
AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TCodeExplorerOptions do
|
||||
begin
|
||||
case Refresh of
|
||||
cerManual: RefreshRadioGroup.ItemIndex := 0;
|
||||
cerSwitchEditorPage: RefreshRadioGroup.ItemIndex := 1;
|
||||
cerOnIdle: RefreshRadioGroup.ItemIndex := 2;
|
||||
else
|
||||
RefreshRadioGroup.ItemIndex := 1;
|
||||
end;
|
||||
|
||||
case Mode of
|
||||
cemCategory: ModeRadioGroup.ItemIndex := 0;
|
||||
cemSource: ModeRadioGroup.ItemIndex := 1;
|
||||
else
|
||||
ModeRadioGroup.ItemIndex := 0;
|
||||
end;
|
||||
|
||||
FollowCursorCheckBox.Checked := FollowCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerUpdateOptionsFrame.WriteSettings(
|
||||
AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TCodeExplorerOptions do
|
||||
begin
|
||||
case RefreshRadioGroup.ItemIndex of
|
||||
0: Refresh := cerManual;
|
||||
1: Refresh := cerSwitchEditorPage;
|
||||
2: Refresh := cerOnIdle;
|
||||
end;
|
||||
|
||||
case ModeRadioGroup.ItemIndex of
|
||||
0: Mode := cemCategory;
|
||||
1: Mode := cemSource;
|
||||
end;
|
||||
|
||||
FollowCursor := FollowCursorCheckBox.Checked;
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TCodeExplorerUpdateOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TCodeExplorerOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I codeexplorer_update_options.lrs}
|
||||
RegisterIDEOptionsEditor(GroupCodeExplorer, TCodeExplorerUpdateOptionsFrame, cdeOptionsUpdate);
|
||||
|
||||
end.
|
||||
|
@ -40,7 +40,7 @@
|
||||
<PackageName Value="SynEdit"/>
|
||||
</Item4>
|
||||
</RequiredPackages>
|
||||
<Units Count="63">
|
||||
<Units Count="65">
|
||||
<Unit0>
|
||||
<Filename Value="lazarus.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -486,6 +486,20 @@
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="options_fpdoc"/>
|
||||
</Unit62>
|
||||
<Unit63>
|
||||
<Filename Value="frames/codeexplorer_update_options.pas"/>
|
||||
<ComponentName Value="CodeExplorerUpdateOptionsFrame"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="codeexplorer_update_options"/>
|
||||
</Unit63>
|
||||
<Unit64>
|
||||
<Filename Value="frames/codeexplorer_categories_options.pas"/>
|
||||
<ComponentName Value="CodeExplorerCategoriesOptionsFrame"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="codeexplorer_categories_options"/>
|
||||
</Unit64>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
@ -864,6 +864,7 @@ resourcestring
|
||||
dlgGroupEnvironment = 'Environment';
|
||||
dlgGroupEditor = 'Editor';
|
||||
dlgGroupCodetools = 'Codetools';
|
||||
dlgGroupCodeExplorer = 'Code Explorer';
|
||||
dlgGroupDebugger = 'Debugger';
|
||||
|
||||
// Options dialog
|
||||
@ -3686,7 +3687,6 @@ resourcestring
|
||||
lisCEModeShowCategories = 'Show Categories';
|
||||
lisCEModeShowSourceNodes = 'Show Source Nodes';
|
||||
lisCEIn = '%s in %s';
|
||||
lisCEOCodeExplorer = 'CodeExplorer Options';
|
||||
lisCEOUpdate = 'Update';
|
||||
lisCEORefreshAutomatically = 'Refresh automatically';
|
||||
lisCEONeverOnlyManually = 'Never, only manually';
|
||||
|
23
ide/main.pp
23
ide/main.pp
@ -127,6 +127,7 @@ uses
|
||||
codetools_space_options, codetools_identifiercompletion_options,
|
||||
debugger_general_options, debugger_eventlog_options,
|
||||
debugger_language_exceptions_options, debugger_signals_options,
|
||||
codeexplorer_update_options, codeexplorer_categories_options,
|
||||
PublishModule, EnvironmentOpts, TransferMacros, KeyMapping,
|
||||
IDETranslations, IDEProcs, ExtToolDialog, ExtToolEditDlg, OutputFilter, JumpHistoryView,
|
||||
BuildLazDialog, MiscOptions, InputHistory, UnitDependencies, ClipBoardHistory,
|
||||
@ -135,7 +136,7 @@ uses
|
||||
ProcedureList, ExtractProcDlg, FindRenameIdentifier, AbstractsMethodsDlg,
|
||||
EmptyMethodsDlg, UnusedUnitsDlg, CleanDirDlg, CodeContextForm, AboutFrm,
|
||||
CompatibilityRestrictions, RestrictionBrowser, ProjectWizardDlg, IDECmdLine,
|
||||
BuildManager,
|
||||
BuildManager, CodeExplOpts,
|
||||
// main ide
|
||||
MainBar, MainIntf, MainBase;
|
||||
|
||||
@ -482,6 +483,7 @@ type
|
||||
var ADirectivesTool: TDirectivesTool);
|
||||
procedure OnCodeExplorerJumpToCode(Sender: TObject; const Filename: string;
|
||||
const Caret: TPoint; TopLine: integer);
|
||||
procedure OnCodeExplorerShowOptions(Sender: TObject);
|
||||
|
||||
// CodeToolBoss events
|
||||
procedure OnCodeToolNeedsExternalChanges(Manager: TCodeToolManager;
|
||||
@ -1096,6 +1098,9 @@ begin
|
||||
Load;
|
||||
end;
|
||||
|
||||
CodeExplorerOptions := TCodeExplorerOptions.Create;
|
||||
CodeExplorerOptions.Load;
|
||||
|
||||
MainBuildBoss.SetupInputHistories;
|
||||
ShowCompileDialog:=EnvironmentOptions.ShowCompileDialog;
|
||||
|
||||
@ -1278,6 +1283,7 @@ begin
|
||||
FreeThenNil(IDEMenuRoots);
|
||||
// IDE options objects
|
||||
FreeThenNil(CodeToolsOpts);
|
||||
FreeThenNil(CodeExplorerOptions);
|
||||
FreeThenNil(MiscellaneousOptions);
|
||||
FreeThenNil(EditorOpts);
|
||||
FreeThenNil(EnvironmentOptions);
|
||||
@ -4086,8 +4092,10 @@ begin
|
||||
ReadSettings(EnvironmentOptions);
|
||||
// load settings from EditorOptions to IDEOptionsDialog
|
||||
ReadSettings(EditorOpts);
|
||||
// load settings from CodetoolsOption to IDEOptionsDialog
|
||||
// load settings from CodetoolsOptions to IDEOptionsDialog
|
||||
ReadSettings(CodeToolsOpts);
|
||||
// load settings from CodeExplorerOptions to IDEOptionsDialog
|
||||
ReadSettings(CodeExplorerOptions);
|
||||
// load other settings that does not belong to any group
|
||||
ReadSettings(nil);
|
||||
end;
|
||||
@ -4102,6 +4110,7 @@ begin
|
||||
IDEOptionsDialog.WriteSettings(EnvironmentOptions);
|
||||
IDEOptionsDialog.WriteSettings(EditorOpts);
|
||||
IDEOptionsDialog.WriteSettings(CodeToolsOpts);
|
||||
IDEOptionsDialog.WriteSettings(CodeExplorerOptions);
|
||||
IDEOptionsDialog.WriteSettings(nil);
|
||||
ShowCompileDialog := EnvironmentOptions.ShowCompileDialog;
|
||||
|
||||
@ -4135,6 +4144,7 @@ begin
|
||||
EditorOpts.Save;
|
||||
CodeToolsOpts.AssignTo(CodeToolBoss);
|
||||
CodeToolsOpts.Save;
|
||||
CodeExplorerOptions.Save;
|
||||
|
||||
// update environment
|
||||
UpdateDesigners;
|
||||
@ -7959,11 +7969,13 @@ end;
|
||||
|
||||
procedure TMainIDE.DoShowCodeExplorer;
|
||||
begin
|
||||
if CodeExplorerView=nil then begin
|
||||
if CodeExplorerView=nil then
|
||||
begin
|
||||
CodeExplorerView:=TCodeExplorerView.Create(OwningComponent);
|
||||
CodeExplorerView.OnGetCodeTree:=@OnCodeExplorerGetCodeTree;
|
||||
CodeExplorerView.OnGetDirectivesTree:=@OnCodeExplorerGetDirectivesTree;
|
||||
CodeExplorerView.OnJumpToCode:=@OnCodeExplorerJumpToCode;
|
||||
CodeExplorerView.OnShowOptions:=@OnCodeExplorerShowOptions;
|
||||
end;
|
||||
|
||||
EnvironmentOptions.IDEWindowLayoutList.ItemByEnum(nmiwCodeExplorerName).Apply;
|
||||
@ -11831,6 +11843,11 @@ begin
|
||||
DoJumpToSourcePosition(Filename,Caret.X,Caret.Y,TopLine,true);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.OnCodeExplorerShowOptions(Sender: TObject);
|
||||
begin
|
||||
DoShowEnvGeneralOptions(TCodeExplorerUpdateOptionsFrame);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.OnCodeToolNeedsExternalChanges(Manager: TCodeToolManager;
|
||||
var Abort: boolean);
|
||||
var
|
||||
|
@ -117,7 +117,7 @@ function IDEEditorGroups: TIDEOptionsGroupList;
|
||||
|
||||
const
|
||||
// options groups
|
||||
GroupEnvironment = 100;
|
||||
GroupEnvironment = 100;
|
||||
EnvOptionsFiles = 100;
|
||||
EnvOptionsDesktop = 200;
|
||||
EnvOptionsWindow = 300;
|
||||
@ -127,7 +127,7 @@ const
|
||||
EnvOptionsNaming = 700;
|
||||
EnvOptionsFpDoc = 800;
|
||||
|
||||
GroupEditor = 200;
|
||||
GroupEditor = 200;
|
||||
EdtOptionsGeneral = 100;
|
||||
EdtOptionsGeneralMisc = 101;
|
||||
EdtOptionsDisplay = 200;
|
||||
@ -136,7 +136,7 @@ const
|
||||
EdtOptionsCodetools = 500;
|
||||
EdtOptionsCodeFolding = 600;
|
||||
|
||||
GroupCodetools = 300;
|
||||
GroupCodetools = 300;
|
||||
CdtOptionsGeneral = 100;
|
||||
CdtOptionsCodeCreation = 200;
|
||||
CdtOptionsWords = 300;
|
||||
@ -144,7 +144,12 @@ const
|
||||
CdtOptionsSpace = 500;
|
||||
CdtOptionsIdentCompletion = 600;
|
||||
|
||||
GroupDebugger = 400;
|
||||
GroupCodeExplorer = 350;
|
||||
cdeOptionsUpdate = 100;
|
||||
cdeOptionsCategories = 200;
|
||||
cdeOptionsFigures = 300;
|
||||
|
||||
GroupDebugger = 400;
|
||||
DbgOptionsGeneral = 100;
|
||||
DbgOptionsEventLog = 200;
|
||||
DbgOptionsLanguageExceptions = 300;
|
||||
|
Loading…
Reference in New Issue
Block a user