mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 12:09:32 +02:00
codetools: class completion: indexed properties, patch #19151
git-svn-id: trunk@30597 -
This commit is contained in:
parent
244f96a67c
commit
b7f0a998e7
@ -5616,7 +5616,9 @@ var AccessParam, AccessParamPrefix, CleanAccessFunc, AccessFunc,
|
||||
end;
|
||||
end;
|
||||
|
||||
IsGetterFunc:=(Parts[ppParamList].StartPos>0) or (Parts[ppIndexWord].StartPos>0)
|
||||
IsGetterFunc:=(Parts[ppParamList].StartPos>0)
|
||||
or ((Parts[ppIndexWord].StartPos>0)
|
||||
and not VarExistsInCodeCompleteClass(UpperCaseStr(AccessParam)))
|
||||
or (SysUtils.CompareText(AccessParamPrefix,
|
||||
LeftStr(AccessParam,length(AccessParamPrefix)))=0)
|
||||
or (CodeCompleteClassNode.Desc in AllClassInterfaces);
|
||||
@ -5645,7 +5647,7 @@ var AccessParam, AccessParamPrefix, CleanAccessFunc, AccessFunc,
|
||||
if ProcExistsInCodeCompleteClass(CleanAccessFunc) then exit;
|
||||
|
||||
// check if read access variable exists
|
||||
if (Parts[ppParamList].StartPos<1) and (Parts[ppIndexWord].StartPos<1)
|
||||
if (Parts[ppParamList].StartPos<1)
|
||||
and (CodeCompleteClassNode.Desc in AllClassObjects)
|
||||
and VarExistsInCodeCompleteClass(UpperCaseStr(AccessParam)) then exit;
|
||||
|
||||
@ -5772,12 +5774,14 @@ var AccessParam, AccessParamPrefix, CleanAccessFunc, AccessFunc,
|
||||
if ProcExistsInCodeCompleteClass(CleanAccessFunc) then exit;
|
||||
|
||||
// check if write variable exists
|
||||
if (Parts[ppParamList].StartPos<1) and (Parts[ppIndexWord].StartPos<1)
|
||||
if (Parts[ppParamList].StartPos<1)
|
||||
and (CodeCompleteClassNode.Desc in AllClassObjects)
|
||||
and VarExistsInCodeCompleteClass(UpperCaseStr(AccessParam)) then exit;
|
||||
|
||||
// complete class
|
||||
if (Parts[ppParamList].StartPos>0) or (Parts[ppIndexWord].StartPos>0)
|
||||
if (Parts[ppParamList].StartPos>0)
|
||||
or ((Parts[ppIndexWord].StartPos>0)
|
||||
and not VarExistsInCodeCompleteClass(UpperCaseStr(AccessParam)))
|
||||
or (SysUtils.CompareText(AccessParamPrefix,
|
||||
LeftStr(AccessParam,length(AccessParamPrefix)))=0)
|
||||
or (CodeCompleteClassNode.Desc in AllClassInterfaces) then
|
||||
|
Loading…
Reference in New Issue
Block a user