mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 09:07:31 +01:00
codetools: fixed class compltion for indexed property, patch #18416
git-svn-id: trunk@28877 -
This commit is contained in:
parent
e2a2b1c57f
commit
2a79108848
@ -5353,10 +5353,10 @@ var AccessParam, AccessParamPrefix, CleanAccessFunc, AccessFunc,
|
|||||||
AccessParam);
|
AccessParam);
|
||||||
end else begin
|
end else begin
|
||||||
// 'read' keyword does not exist -> insert behind index and type
|
// 'read' keyword does not exist -> insert behind index and type
|
||||||
if Parts[ppIndexWord].StartPos>0 then
|
if Parts[ppIndex].StartPos>0 then
|
||||||
InsertPos:=Parts[ppIndexWord].EndPos
|
|
||||||
else if Parts[ppIndex].StartPos>0 then
|
|
||||||
InsertPos:=Parts[ppIndex].EndPos
|
InsertPos:=Parts[ppIndex].EndPos
|
||||||
|
else if Parts[ppIndexWord].StartPos>0 then
|
||||||
|
InsertPos:=Parts[ppIndexWord].EndPos
|
||||||
else
|
else
|
||||||
InsertPos:=Parts[ppType].EndPos;
|
InsertPos:=Parts[ppType].EndPos;
|
||||||
ASourceChangeCache.Replace(gtSpace,gtNone,InsertPos,InsertPos,
|
ASourceChangeCache.Replace(gtSpace,gtNone,InsertPos,InsertPos,
|
||||||
@ -5378,7 +5378,7 @@ var AccessParam, AccessParamPrefix, CleanAccessFunc, AccessFunc,
|
|||||||
CleanAccessFunc:=UpperCaseStr(AccessParam)+'('+CleanParamList+');';
|
CleanAccessFunc:=UpperCaseStr(AccessParam)+'('+CleanParamList+');';
|
||||||
end else begin
|
end else begin
|
||||||
// index + param list
|
// index + param list
|
||||||
CleanAccessFunc:=UpperCaseStr(AccessParam)+'(:INTEGER;'
|
CleanAccessFunc:=UpperCaseStr(AccessParam)+'(INTEGER;'
|
||||||
+CleanParamList+');';
|
+CleanParamList+');';
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
@ -5387,7 +5387,7 @@ var AccessParam, AccessParamPrefix, CleanAccessFunc, AccessFunc,
|
|||||||
CleanAccessFunc:=UpperCaseStr(AccessParam)+';';
|
CleanAccessFunc:=UpperCaseStr(AccessParam)+';';
|
||||||
end else begin
|
end else begin
|
||||||
// index, no param list
|
// index, no param list
|
||||||
CleanAccessFunc:=UpperCaseStr(AccessParam)+'(:INTEGER);';
|
CleanAccessFunc:=UpperCaseStr(AccessParam)+'(INTEGER);';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if ProcExistsInCodeCompleteClass(CleanAccessFunc) then exit;
|
if ProcExistsInCodeCompleteClass(CleanAccessFunc) then exit;
|
||||||
@ -5484,10 +5484,10 @@ var AccessParam, AccessParamPrefix, CleanAccessFunc, AccessFunc,
|
|||||||
InsertPos:=Parts[ppRead].EndPos
|
InsertPos:=Parts[ppRead].EndPos
|
||||||
else if Parts[ppReadWord].StartPos>0 then
|
else if Parts[ppReadWord].StartPos>0 then
|
||||||
InsertPos:=Parts[ppReadWord].EndPos
|
InsertPos:=Parts[ppReadWord].EndPos
|
||||||
else if Parts[ppIndexWord].StartPos>0 then
|
|
||||||
InsertPos:=Parts[ppIndexWord].EndPos
|
|
||||||
else if Parts[ppIndex].StartPos>0 then
|
else if Parts[ppIndex].StartPos>0 then
|
||||||
InsertPos:=Parts[ppIndex].EndPos
|
InsertPos:=Parts[ppIndex].EndPos
|
||||||
|
else if Parts[ppIndexWord].StartPos>0 then
|
||||||
|
InsertPos:=Parts[ppIndexWord].EndPos
|
||||||
else
|
else
|
||||||
InsertPos:=Parts[ppType].EndPos;
|
InsertPos:=Parts[ppType].EndPos;
|
||||||
ASourceChangeCache.Replace(gtSpace,gtNone,InsertPos,InsertPos,
|
ASourceChangeCache.Replace(gtSpace,gtNone,InsertPos,InsertPos,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user