mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 05:49:15 +02:00
codetools: identifier completion: add predefined procs only at statement starts
git-svn-id: trunk@19994 -
This commit is contained in:
parent
1b9d01b147
commit
c8bdd801da
@ -1044,6 +1044,9 @@ const
|
|||||||
var
|
var
|
||||||
NewItem: TIdentifierListItem;
|
NewItem: TIdentifierListItem;
|
||||||
begin
|
begin
|
||||||
|
//DebugLn(['AddCompilerProcedure ',AProcName,' ',ilcfStartIsLValue in CurrentIdentifierList.ContextFlags]);
|
||||||
|
if not (ilcfStartIsLValue in CurrentIdentifierList.ContextFlags) then exit;
|
||||||
|
|
||||||
NewItem:=TIdentifierListItem.Create(
|
NewItem:=TIdentifierListItem.Create(
|
||||||
icompUnknown,
|
icompUnknown,
|
||||||
false,
|
false,
|
||||||
@ -1714,12 +1717,6 @@ begin
|
|||||||
GatherContext.Tool.FindIdentifierInContext(Params);
|
GatherContext.Tool.FindIdentifierInContext(Params);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// add useful identifiers without context
|
|
||||||
{$IFDEF CTDEBUG}
|
|
||||||
DebugLn('TIdentCompletionTool.GatherIdentifiers G');
|
|
||||||
{$ENDIF}
|
|
||||||
GatherUsefulIdentifiers(IdentStartPos,CursorContext,BeautifyCodeOptions);
|
|
||||||
|
|
||||||
// check for incomplete context
|
// check for incomplete context
|
||||||
|
|
||||||
// context bracket level
|
// context bracket level
|
||||||
@ -1800,6 +1797,12 @@ begin
|
|||||||
|
|
||||||
// check for procedure/method declaration context
|
// check for procedure/method declaration context
|
||||||
CheckProcedureDeclarationContext;
|
CheckProcedureDeclarationContext;
|
||||||
|
|
||||||
|
// add useful identifiers
|
||||||
|
{$IFDEF CTDEBUG}
|
||||||
|
DebugLn('TIdentCompletionTool.GatherIdentifiers G');
|
||||||
|
{$ENDIF}
|
||||||
|
GatherUsefulIdentifiers(IdentStartPos,CursorContext,BeautifyCodeOptions);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result:=true;
|
Result:=true;
|
||||||
|
Loading…
Reference in New Issue
Block a user