mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 04:18:22 +01:00
IDE: Rename ExtendedFilter -> ContainsFilter, GUI: 'Include identifiers containing prefix'. Issue #32974.
git-svn-id: trunk@57072 -
This commit is contained in:
parent
d95cd50a49
commit
58eefa59cd
@ -244,7 +244,7 @@ type
|
||||
FIdentSearchItem: TIdentifierListSearchItem;
|
||||
FPrefix: string;
|
||||
FStartContext: TFindContext;
|
||||
FExtendedFilter: Boolean;
|
||||
FContainsFilter: Boolean;
|
||||
function CompareIdentListItems({%H-}Tree: TAvlTree; Data1, Data2: Pointer): integer;
|
||||
procedure SetHistory(const AValue: TIdentifierHistoryList);
|
||||
procedure SetSortForHistory(AValue: boolean);
|
||||
@ -274,23 +274,21 @@ type
|
||||
read FContextFlags write FContextFlags;
|
||||
property NewMemberVisibility: TCodeTreeNodeDesc // identifier is a class member, e.g. a variable or a procedure name
|
||||
read FNewMemberVisibility write FNewMemberVisibility;
|
||||
property FilteredItems[Index: integer]: TIdentifierListItem
|
||||
read GetFilteredItems;
|
||||
property FilteredItems[Index: integer]: TIdentifierListItem read GetFilteredItems;
|
||||
property History: TIdentifierHistoryList read FHistory write SetHistory;
|
||||
property Prefix: string read FPrefix write SetPrefix;
|
||||
property SortForHistory: boolean read FSortForHistory write SetSortForHistory;
|
||||
property SortForScope: boolean read FSortForScope write SetSortForScope;
|
||||
property StartAtom: TAtomPosition read FStartAtom write FStartAtom;
|
||||
property StartAtomInFront: TAtomPosition
|
||||
read FStartAtomInFront write FStartAtomInFront; // in front of variable, not only of identifier
|
||||
read FStartAtomInFront write FStartAtomInFront; // in front of variable, not only of identifier
|
||||
property StartAtomBehind: TAtomPosition
|
||||
read FStartAtomBehind write FStartAtomBehind; // directly behind
|
||||
property StartBracketLvl: integer
|
||||
read FStartBracketLvl write FStartBracketLvl;
|
||||
read FStartAtomBehind write FStartAtomBehind; // directly behind
|
||||
property StartBracketLvl: integer read FStartBracketLvl write FStartBracketLvl;
|
||||
property StartContext: TFindContext read FStartContext write FStartContext;
|
||||
property StartContextPos: TCodeXYPosition
|
||||
read FStartContextPos write FStartContextPos;
|
||||
property ExtendedFilter: Boolean read FExtendedFilter write FExtendedFilter;
|
||||
property ContainsFilter: Boolean read FContainsFilter write FContainsFilter;
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@ -634,7 +632,7 @@ begin
|
||||
CurItem:=TIdentifierListItem(AnAVLNode.Data);
|
||||
if CurItem.Identifier<>'' then
|
||||
begin
|
||||
if FExtendedFilter then
|
||||
if FContainsFilter then
|
||||
i:=IdentifierPos(PChar(Pointer(Prefix)),PChar(Pointer(CurItem.Identifier)))
|
||||
else if ComparePrefixIdent(PChar(Pointer(Prefix)),PChar(Pointer(CurItem.Identifier))) then
|
||||
i:=0
|
||||
|
||||
@ -1388,7 +1388,7 @@ type
|
||||
fCodeTemplateFileName: String;
|
||||
fCTemplIndentToTokenStart: Boolean;
|
||||
fAutoDisplayFuncPrototypes: Boolean;
|
||||
fUseExtendedFilter: Boolean;
|
||||
fUseContainsFilter: Boolean;
|
||||
fHighlightCodeCompletionPrefix: Boolean;
|
||||
|
||||
// Code Folding
|
||||
@ -1581,8 +1581,8 @@ type
|
||||
read fAutoToolTipSymbTools write fAutoToolTipSymbTools default True; // declaration hints
|
||||
property AutoDisplayFunctionPrototypes: Boolean
|
||||
read fAutoDisplayFuncPrototypes write fAutoDisplayFuncPrototypes default True;
|
||||
property ExtendedCompletionFilter: Boolean
|
||||
read fUseExtendedFilter write fUseExtendedFilter default True;
|
||||
property ContainsCompletionFilter: Boolean
|
||||
read fUseContainsFilter write fUseContainsFilter default True;
|
||||
property HighlightCodeCompletionPrefix: Boolean
|
||||
read fHighlightCodeCompletionPrefix write fHighlightCodeCompletionPrefix default True;
|
||||
|
||||
@ -4774,8 +4774,8 @@ begin
|
||||
FCompletionLongLineHintType := DefaultCompletionLongLineHintType;
|
||||
XMLConfig.ReadObject('EditorOptions/CodeTools/CompletionLongLineHintType',
|
||||
Self, Self, 'CompletionLongLineHintType');
|
||||
fUseExtendedFilter :=
|
||||
XMLConfig.GetValue('EditorOptions/CodeTools/ExtendedCompletionFilter', True);
|
||||
fUseContainsFilter :=
|
||||
XMLConfig.GetValue('EditorOptions/CodeTools/ContainsCompletionFilter', True);
|
||||
fHighlightCodeCompletionPrefix :=
|
||||
XMLConfig.GetValue('EditorOptions/CodeTools/HighlightCodeCompletionPrefix', True);
|
||||
|
||||
@ -4971,8 +4971,8 @@ begin
|
||||
FCompletionLongLineHintInMSec, 0);
|
||||
XMLConfig.WriteObject('EditorOptions/CodeTools/CompletionLongLineHintType',
|
||||
Self, nil, 'CompletionLongLineHintType');
|
||||
XMLConfig.SetDeleteValue('EditorOptions/CodeTools/ExtendedCompletionFilter'
|
||||
, fUseExtendedFilter, True);
|
||||
XMLConfig.SetDeleteValue('EditorOptions/CodeTools/ContainsCompletionFilter'
|
||||
, fUseContainsFilter, True);
|
||||
XMLConfig.SetDeleteValue('EditorOptions/CodeTools/HighlightCodeCompletionPrefix'
|
||||
, fHighlightCodeCompletionPrefix, True);
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
Height = 492
|
||||
Top = 0
|
||||
Width = 634
|
||||
HorzScrollBar.Page = 634
|
||||
VertScrollBar.Page = 492
|
||||
HorzScrollBar.Page = 1
|
||||
VertScrollBar.Page = 1
|
||||
AutoScroll = True
|
||||
ClientHeight = 492
|
||||
ClientWidth = 634
|
||||
@ -16,10 +16,10 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideLeft.Control = AutoHintAndCompletionDelayLabel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = AutoHintAndCompletionDelayLabel
|
||||
Left = 217
|
||||
Height = 15
|
||||
Top = 156
|
||||
Width = 83
|
||||
Left = 253
|
||||
Height = 19
|
||||
Top = 180
|
||||
Width = 101
|
||||
BorderSpacing.Left = 20
|
||||
Caption = 'AutoDelayLabel'
|
||||
ParentColor = False
|
||||
@ -32,7 +32,7 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 3
|
||||
Top = 56
|
||||
Top = 64
|
||||
Width = 634
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
@ -42,9 +42,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 19
|
||||
Height = 23
|
||||
Top = 6
|
||||
Width = 210
|
||||
Width = 255
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'AutoRemoveEmptyMethodsOnSave'
|
||||
@ -55,9 +55,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideTop.Control = AutoDisplayFuncProtoCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 87
|
||||
Width = 198
|
||||
Height = 23
|
||||
Top = 99
|
||||
Width = 236
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'AutoToolTipSymbToolsCheckBox'
|
||||
@ -68,9 +68,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideTop.Control = AutoRemoveEmptyMethodsOnSave
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 31
|
||||
Width = 179
|
||||
Height = 23
|
||||
Top = 35
|
||||
Width = 218
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'AutoCompleteBlockCheckBox'
|
||||
@ -81,9 +81,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideTop.Control = AutoToolTipSymbToolsCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 112
|
||||
Width = 182
|
||||
Height = 23
|
||||
Top = 128
|
||||
Width = 222
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'AutoToolTipExprEvalCheckBox'
|
||||
@ -97,7 +97,7 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 30
|
||||
Top = 172
|
||||
Top = 200
|
||||
Width = 622
|
||||
Frequency = 250
|
||||
Max = 4000
|
||||
@ -116,9 +116,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideTop.Control = DbgToolTipAutoCastClass
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 156
|
||||
Width = 191
|
||||
Height = 19
|
||||
Top = 180
|
||||
Width = 227
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'AutoHintAndCompletionDelayLabel'
|
||||
@ -132,7 +132,7 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 30
|
||||
Top = 224
|
||||
Top = 256
|
||||
Width = 622
|
||||
Frequency = 250
|
||||
Max = 4000
|
||||
@ -150,9 +150,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideTop.Control = AutoDelayTrackBar
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 208
|
||||
Width = 148
|
||||
Height = 19
|
||||
Top = 236
|
||||
Width = 177
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'CompletionDropDownLabel'
|
||||
@ -162,10 +162,10 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideLeft.Control = CompletionDropDownLabel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CompletionDropDownLabel
|
||||
Left = 174
|
||||
Height = 15
|
||||
Top = 208
|
||||
Width = 177
|
||||
Left = 203
|
||||
Height = 19
|
||||
Top = 236
|
||||
Width = 213
|
||||
BorderSpacing.Left = 20
|
||||
Caption = 'CompletionDropDownDelayLabel'
|
||||
ParentColor = False
|
||||
@ -177,12 +177,12 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 256
|
||||
Height = 33
|
||||
Top = 288
|
||||
Width = 220
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 2
|
||||
ItemHeight = 15
|
||||
ItemHeight = 19
|
||||
Style = csDropDownList
|
||||
TabOrder = 6
|
||||
end
|
||||
@ -192,9 +192,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideTop.Control = CompletionDropDownHint
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 232
|
||||
Height = 15
|
||||
Top = 260
|
||||
Width = 171
|
||||
Height = 19
|
||||
Top = 295
|
||||
Width = 205
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'CompletionDropDownHintLabel'
|
||||
ParentColor = False
|
||||
@ -204,9 +204,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideTop.Control = AutoToolTipExprEvalCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 26
|
||||
Height = 19
|
||||
Top = 131
|
||||
Width = 159
|
||||
Height = 23
|
||||
Top = 151
|
||||
Width = 191
|
||||
BorderSpacing.Left = 20
|
||||
Caption = 'DbgToolTipAutoCastClass'
|
||||
TabOrder = 7
|
||||
@ -215,35 +215,35 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ToolTipBevel
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 62
|
||||
Width = 191
|
||||
Height = 23
|
||||
Top = 70
|
||||
Width = 234
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'AutoDisplayFuncProtoCheckBox'
|
||||
TabOrder = 8
|
||||
end
|
||||
object ExtendedFilterCheckBox: TCheckBox
|
||||
object ContainsFilterCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = CompletionDropDownHint
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 9
|
||||
Height = 29
|
||||
Top = 435
|
||||
Width = 217
|
||||
Height = 23
|
||||
Top = 330
|
||||
Width = 181
|
||||
BorderSpacing.Left = 9
|
||||
BorderSpacing.Top = 9
|
||||
Caption = 'ExtendedFilterCheckBox'
|
||||
Caption = 'ContainsFilterCheckBox'
|
||||
TabOrder = 9
|
||||
end
|
||||
object HighlightPrefixCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ExtendedFilterCheckBox
|
||||
AnchorSideTop.Control = ContainsFilterCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 9
|
||||
Height = 29
|
||||
Top = 473
|
||||
Width = 222
|
||||
Height = 23
|
||||
Top = 362
|
||||
Width = 188
|
||||
BorderSpacing.Left = 9
|
||||
BorderSpacing.Top = 9
|
||||
Caption = 'HighlightPrefixCheckBox'
|
||||
|
||||
@ -49,7 +49,7 @@ type
|
||||
ToolTipBevel: TBevel;
|
||||
AutoToolTipSymbToolsCheckBox: TCheckBox;
|
||||
AutoRemoveEmptyMethodsOnSave: TCheckBox;
|
||||
ExtendedFilterCheckBox: TCheckBox;
|
||||
ContainsFilterCheckBox: TCheckBox;
|
||||
HighlightPrefixCheckBox: TCheckBox;
|
||||
procedure AutoDelayTrackBarChange(Sender: TObject);
|
||||
public
|
||||
@ -87,7 +87,7 @@ begin
|
||||
DbgToolTipAutoCastClass.Caption := lisDebugHintAutoTypeCastClass;
|
||||
AutoCompleteBlockCheckBox.Caption := dlgEdCompleteBlocks;
|
||||
AutoDisplayFuncProtoCheckBox.Caption := dlgAutoDisplayFuncProto;
|
||||
ExtendedFilterCheckBox.Caption := dlgExtendedFilterinCompletionBox;
|
||||
ContainsFilterCheckBox.Caption := dlgIncludeIdentifiersContainingPrefix;
|
||||
HighlightPrefixCheckBox.Caption := dlgHighlightPrefix;
|
||||
|
||||
AutoHintAndCompletionDelayLabel.Caption:=lisDelayForHintsAndCompletionBox;
|
||||
@ -111,7 +111,7 @@ begin
|
||||
AutoDelayTrackBar.Position := AutoDelayInMSec;
|
||||
AutoRemoveEmptyMethodsOnSave.Checked := AutoRemoveEmptyMethods;
|
||||
AutoDisplayFuncProtoCheckBox.Checked := AutoDisplayFunctionPrototypes;
|
||||
ExtendedFilterCheckBox.Checked := ExtendedCompletionFilter;
|
||||
ContainsFilterCheckBox.Checked := ContainsCompletionFilter;
|
||||
HighlightPrefixCheckBox.Checked := HighlightCodeCompletionPrefix;
|
||||
|
||||
CompletionDropDownHintTrackBar.Position := CompletionLongLineHintInMSec;
|
||||
@ -132,7 +132,7 @@ begin
|
||||
AutoDelayInMSec := AutoDelayTrackBar.Position;
|
||||
AutoRemoveEmptyMethods := AutoRemoveEmptyMethodsOnSave.Checked;
|
||||
AutoDisplayFunctionPrototypes := AutoDisplayFuncProtoCheckBox.Checked;
|
||||
ExtendedCompletionFilter := ExtendedFilterCheckBox.Checked;
|
||||
ContainsCompletionFilter := ContainsFilterCheckBox.Checked;
|
||||
HighlightCodeCompletionPrefix := HighlightPrefixCheckBox.Checked;
|
||||
|
||||
CompletionLongLineHintInMSec := CompletionDropDownHintTrackBar.Position;
|
||||
|
||||
@ -1967,7 +1967,7 @@ resourcestring
|
||||
lisCompletionLongLineHintTypeRightOnly = 'Extend right only';
|
||||
lisCompletionLongLineHintTypeLittleLeft = 'Extend some left';
|
||||
lisCompletionLongLineHintTypeFullLeft = 'Extend far left';
|
||||
dlgExtendedFilterinCompletionBox = 'Extended filter';
|
||||
dlgIncludeIdentifiersContainingPrefix = 'Include identifiers containing prefix';
|
||||
dlgHighlightPrefix = 'Highlight prefix';
|
||||
lisAutomaticFeatures = 'Completion and Hints';
|
||||
lisAutoMarkup = 'Markup and Matches';
|
||||
|
||||
@ -2449,7 +2449,7 @@ begin
|
||||
// rebuild completion list
|
||||
APosition:=0;
|
||||
CurStr:=CurrentString;
|
||||
CodeToolBoss.IdentifierList.ExtendedFilter := EditorOpts.ExtendedCompletionFilter;
|
||||
CodeToolBoss.IdentifierList.ContainsFilter := EditorOpts.ContainsCompletionFilter;
|
||||
CodeToolBoss.IdentifierList.Prefix:=CurStr;
|
||||
ItemCnt:=CodeToolBoss.IdentifierList.GetFilteredCount;
|
||||
SL:=TStringList.Create;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user