codetools: identifier completion: do not show protected member when gather context is in another unit, more Delphi compatible, patch #18888

git-svn-id: trunk@29744 -
This commit is contained in:
mattias 2011-03-07 17:08:55 +00:00
parent 672a743b6d
commit a43c70c21f

View File

@ -2021,12 +2021,12 @@ begin
end else if CursorNode.Desc in AllSourceTypes then begin
GatherSourceNames(GatherContext);
end else begin
// find class and ancestors if existing (needed for protected identifiers)
FindContextClassAndAncestors(IdentStartXY,FICTClassAndAncestors);
FindCollectionContext(Params,IdentStartPos,CursorNode,
GatherContext,ContextExprStartPos,StartInSubContext);
if ContextExprStartPos=0 then ;
// find class and ancestors if existing (needed for protected identifiers)
if GatherContext.Tool = Self then
FindContextClassAndAncestors(IdentStartXY, FICTClassAndAncestors);
CursorContext:=CreateFindContext(Self,CursorNode);
GatherContextKeywords(CursorContext,IdentStartPos);