Include keywords option

This commit is contained in:
regs01 2021-11-30 00:03:37 +00:00 committed by Martin
parent cb225ab6f1
commit dcf91fa0b6
6 changed files with 37 additions and 7 deletions

View File

@ -141,6 +141,7 @@ type
FTabWidth: integer;
FUseTabs: boolean;
FIdentComplAutoInvokeOnType: Boolean;
FIdentComplIncludeKeywords: Boolean;
FVisibleEditorLines: integer;
FWriteExceptions: boolean;
FWriteLockCount: integer;// Set/Unset counter
@ -326,6 +327,7 @@ type
property TabWidth: integer read FTabWidth write SetTabWidth;
property UseTabs: boolean read FUseTabs write SetUseTabs;
property IdentComplAutoInvokeOnType: Boolean read FIdentComplAutoInvokeOnType write FIdentComplAutoInvokeOnType;
property IdentComplIncludeKeywords: Boolean read FIdentComplIncludeKeywords write FIdentComplIncludeKeywords;
property CompleteProperties: boolean
read FCompleteProperties write SetCompleteProperties;
property AddInheritedCodeToOverrideMethod: boolean

View File

@ -2085,7 +2085,7 @@ begin
ctnBeginBlock,ctnWithStatement,ctnWithVariable, ctnOnBlock,ctnOnIdentifier,ctnOnStatement:
//ctnInitialization,ctnFinalization: //AllPascalStatements
begin
if CodeToolBoss.IdentComplAutoInvokeOnType then
if CodeToolBoss.IdentComplIncludeKeywords then
if not (GatherContext.Node.Desc in AllClassObjects) then
begin
if not (ilcfDontAllowProcedures in CurrentIdentifierList.ContextFlags) then

View File

@ -128,6 +128,7 @@ type
FIdentComplAutoStartAfterPoint: boolean;
FIdentComplAutoUseSingleIdent: boolean;
FIdentComplUseContainsFilter: Boolean;
FIdentComplIncludeKeywords: Boolean;
FIdentComplIncludeCodeTemplates: Boolean;
FIdentComplIncludeWords: TIdentComplIncludeWords;
FIdentComplShowIcons: Boolean;
@ -269,6 +270,8 @@ type
write FIdentComplAutoUseSingleIdent;
property IdentComplUseContainsFilter: boolean read FIdentComplUseContainsFilter
write FIdentComplUseContainsFilter;
property IdentComplIncludeKeywords: Boolean read FIdentComplIncludeKeywords
write FIdentComplIncludeKeywords;
property IdentComplIncludeCodeTemplates: boolean read FIdentComplIncludeCodeTemplates
write FIdentComplIncludeCodeTemplates;
property IdentComplIncludeWords: TIdentComplIncludeWords read FIdentComplIncludeWords
@ -597,6 +600,8 @@ begin
'CodeToolsOptions/IdentifierCompletion/AutoUseSingleIdent',true);
FIdentComplUseContainsFilter:=XMLConfig.GetValue(
'CodeToolsOptions/IdentifierCompletion/UseContainsFilter',true);
FIdentComplIncludeKeywords:=XMLConfig.GetValue(
'CodeToolsOptions/IdentifierCompletion/IncludeKeywords',true);
FIdentComplIncludeCodeTemplates:=XMLConfig.GetValue(
'CodeToolsOptions/IdentifierCompletion/IncludeCodeTemplates',true);
FIdentComplIncludeWords:=IdentComplIncludeWordsNamesToEnum(XMLConfig.GetValue(
@ -782,6 +787,8 @@ begin
FIdentComplAutoUseSingleIdent,true);
XMLConfig.SetDeleteValue('CodeToolsOptions/IdentifierCompletion/UseContainsFilter',
FIdentComplUseContainsFilter,true);
XMLConfig.SetDeleteValue('CodeToolsOptions/IdentifierCompletion/IncludeKeywords',
FIdentComplIncludeKeywords,true);
XMLConfig.SetDeleteValue('CodeToolsOptions/IdentifierCompletion/IncludeCodeTemplates',
FIdentComplIncludeCodeTemplates,true);
XMLConfig.SetDeleteValue('CodeToolsOptions/IdentifierCompletion/IncludeWords',
@ -942,6 +949,7 @@ begin
FIdentComplAutoStartAfterPoint:=CodeToolsOpts.FIdentComplAutoStartAfterPoint;
FIdentComplAutoUseSingleIdent:=CodeToolsOpts.FIdentComplAutoUseSingleIdent;
FIdentComplUseContainsFilter:=CodeToolsOpts.FIdentComplUseContainsFilter;
FIdentComplIncludeKeywords := CodeToolsOpts.FIdentComplIncludeKeywords;
FIdentComplIncludeCodeTemplates:=CodeToolsOpts.FIdentComplIncludeCodeTemplates;
FIdentComplShowIcons:=CodeToolsOpts.FIdentComplShowIcons;
FIdentComplAddParameterBrackets:=CodeToolsOpts.FIdentComplAddParameterBrackets;
@ -1014,6 +1022,7 @@ begin
FIdentComplAutoStartAfterPoint:=true;
FIdentComplAutoUseSingleIdent:=true;
FIdentComplUseContainsFilter:=true;
FIdentComplIncludeKeywords := True;
FIdentComplIncludeCodeTemplates:=true;
FIdentComplShowIcons:=false;
FIdentComplAddParameterBrackets:=true;
@ -1105,6 +1114,7 @@ begin
and (FIdentComplAutoStartAfterPoint=CodeToolsOpts.FIdentComplAutoStartAfterPoint)
and (FIdentComplAutoUseSingleIdent=CodeToolsOpts.FIdentComplAutoUseSingleIdent)
and (FIdentComplUseContainsFilter=CodeToolsOpts.FIdentComplUseContainsFilter)
and (FIdentComplIncludeKeywords=CodeToolsOpts.FIdentComplIncludeKeywords)
and (FIdentComplIncludeCodeTemplates=CodeToolsOpts.FIdentComplIncludeCodeTemplates)
and (FIdentComplShowIcons=CodeToolsOpts.FIdentComplShowIcons)
and (FIdentComplAddParameterBrackets=CodeToolsOpts.FIdentComplAddParameterBrackets)
@ -1175,6 +1185,7 @@ begin
Boss.AddInheritedCodeToOverrideMethod:=AddInheritedCodeToOverrideMethod;
Boss.CompleteProperties:=CompleteProperties;
Boss.IdentComplAutoInvokeOnType:=IdentComplAutoInvokeOnType;
Boss.IdentComplIncludeKeywords:=IdentComplIncludeKeywords;
// CreateCode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AssignTo(Boss.SourceChangeCache.BeautifyCodeOptions);

View File

@ -95,7 +95,7 @@ object CodetoolsIndentifierCompletionOptionsFrame: TCodetoolsIndentifierCompleti
Caption = 'ICReplaceCheckBox'
ParentShowHint = False
ShowHint = True
TabOrder = 16
TabOrder = 17
end
object ICAddDoCheckBox: TCheckBox
AnchorSideLeft.Control = Owner
@ -206,7 +206,7 @@ object CodetoolsIndentifierCompletionOptionsFrame: TCodetoolsIndentifierCompleti
Caption = 'ICJumpToErrorCheckBox'
ParentShowHint = False
ShowHint = True
TabOrder = 17
TabOrder = 18
end
object ICAutoUseSingleIdent: TCheckBox
AnchorSideLeft.Control = Owner
@ -232,7 +232,7 @@ object CodetoolsIndentifierCompletionOptionsFrame: TCodetoolsIndentifierCompleti
Top = 327
Width = 157
Caption = 'ICContainsFilterCheckBox'
TabOrder = 18
TabOrder = 19
end
object ICAppearanceDividerBevel: TDividerBevel
AnchorSideLeft.Control = Owner
@ -259,7 +259,7 @@ object CodetoolsIndentifierCompletionOptionsFrame: TCodetoolsIndentifierCompleti
Top = 409
Width = 224
Caption = 'ICUseIconsInCompletionBoxCheckBox'
TabOrder = 15
TabOrder = 16
end
object ICContentDividerBevel: TDividerBevel
AnchorSideLeft.Control = Owner
@ -302,17 +302,29 @@ object CodetoolsIndentifierCompletionOptionsFrame: TCodetoolsIndentifierCompleti
Style = csDropDownList
TabOrder = 13
end
object ICIncludeCodeTemplatesCheckBox: TCheckBox
object ICIncludeKeywordsCheckBox: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = ICAddWordsComboBox
AnchorSideTop.Side = asrBottom
Left = 0
Height = 19
Top = 382
Width = 167
BorderSpacing.Top = 2
Caption = 'ICIncludeKeywordsCheckBox'
TabOrder = 14
end
object ICIncludeCodeTemplatesCheckBox: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = ICIncludeKeywordsCheckBox
AnchorSideTop.Side = asrBottom
Left = 0
Height = 19
Top = 373
Width = 205
BorderSpacing.Top = 2
Caption = 'ICIncludeCodeTemplatesCheckBox'
TabOrder = 14
TabOrder = 15
end
object ICAutoOnTypeUseTimer: TCheckBox
AnchorSideLeft.Control = Owner

View File

@ -46,6 +46,7 @@ type
ICContainsFilterCheckBox: TCheckBox;
ICAddDoCheckBox: TCheckBox;
ICAutoAddParameterBracketsCheckBox: TCheckBox;
ICIncludeKeywordsCheckBox: TCheckBox;
ICIncludeCodeTemplatesCheckBox: TCheckBox;
ICMiscDividerBevel: TDividerBevel;
ICOpenDividerBevel: TDividerBevel;
@ -120,6 +121,7 @@ begin
dlgIncludeWordsToIdentCompl_IncludeFromAllUnits+LineEnding+
dlgIncludeWordsToIdentCompl_IncludeFromCurrentUnit+LineEnding+
dlgIncludeWordsToIdentCompl_DontInclude;
ICIncludeKeywordsCheckBox.Caption := dlgIncludeKeywordsToIdentCompl;
ICIncludeCodeTemplatesCheckBox.Caption := dlgIncludeCodeTemplatesToIdentCompl;
ICAppearanceDividerBevel.Caption:=lisAppearance;
@ -153,6 +155,7 @@ begin
ICSortForHistoryCheckBox.Checked:=IdentComplSortForHistory;
ICSortForScopeCheckBox.Checked:=IdentComplSortForScope;
ICContainsFilterCheckBox.Checked:=IdentComplUseContainsFilter;
ICIncludeKeywordsCheckBox.Checked := IdentComplIncludeKeywords;
ICIncludeCodeTemplatesCheckBox.Checked:=IdentComplIncludeCodeTemplates;
ICUseIconsInCompletionBoxCheckBox.Checked:=IdentComplShowIcons;
case IdentComplIncludeWords of
@ -185,6 +188,7 @@ begin
IdentComplSortForHistory:=ICSortForHistoryCheckBox.Checked;
IdentComplSortForScope:=ICSortForScopeCheckBox.Checked;
IdentComplUseContainsFilter:=ICContainsFilterCheckBox.Checked;
IdentComplIncludeKeywords := ICIncludeKeywordsCheckBox.Checked;
IdentComplIncludeCodeTemplates:=ICIncludeCodeTemplatesCheckBox.Checked;
IdentComplShowIcons:=ICUseIconsInCompletionBoxCheckBox.Checked;
case ICAddWordsComboBox.ItemIndex of

View File

@ -2066,6 +2066,7 @@ resourcestring
dlgIncludeWordsToIdentCompl_IncludeFromAllUnits = 'from all units';
dlgIncludeWordsToIdentCompl_IncludeFromCurrentUnit = 'from current unit';
dlgIncludeWordsToIdentCompl_DontInclude = 'don''t include';
dlgIncludeKeywordsToIdentCompl = 'Include keywords';
dlgIncludeCodeTemplatesToIdentCompl = 'Include code templates';
dlgMarkupUserDefined = 'User defined markup';