fixed identifier completion comparing items without nodes

git-svn-id: trunk@8776 -
This commit is contained in:
mattias 2006-02-19 21:44:01 +00:00
parent fcf6f19164
commit 83c73c3f8e
2 changed files with 7 additions and 1 deletions

View File

@ -1392,6 +1392,7 @@ begin
Result:=0;
if Self=CompareItem then exit;
if (Node=CompareItem.Node) then exit;
if (Node=nil) or (CompareItem.Node=nil) then exit;
if (Node.Desc<>ctnProcedure) or (CompareItem.Node.Desc<>ctnProcedure) then
exit;
{DbgOut('TIdentifierListItem.CompareParamList ',GetIdentifier(Identifier),'=',GetIdentifier(CompareItem.Identifier));

View File

@ -249,7 +249,12 @@ begin
ctnConstDefinition:
begin
ANode:=IdentItem.Tool.FindTypeNodeOfDefinition(IdentItem.Node);
s:=' = '+IdentItem.Tool.ExtractNode(ANode,[]);
if ANode<>nil then
s:=' = '+IdentItem.Tool.ExtractNode(ANode,[])
else begin
s:=IdentItem.Tool.ExtractCode(IdentItem.Node.StartPos+length(s),
IdentItem.Node.EndPos,[]);
end;
end;
else