cody: dictionary: if no implementation is present

git-svn-id: trunk@34693 -
This commit is contained in:
mattias 2012-01-10 15:16:18 +00:00
parent c68410912d
commit 31116fa467

View File

@ -1111,6 +1111,7 @@ function TCodyIdentifiersDlg.Init: boolean;
var
ErrorHandled: boolean;
Line: String;
ImplNode: TCodeTreeNode;
begin
Result:=true;
CurInitError:=ParseTilCursor(CurTool, CurCleanPos, CurNode, ErrorHandled, false, @CurCodePos);
@ -1125,9 +1126,12 @@ begin
CurIdentifier:=copy(Line,CurIdentStart,CurIdentEnd-CurIdentStart);
end;
CurInImplementation:=false;
if (CurNode<>nil) and (CurTool.FindImplementationNode.StartPos<=CurNode.StartPos)
then
CurInImplementation:=true;
if (CurNode<>nil) then begin
ImplNode:=CurTool.FindImplementationNode;
if (ImplNode<>nil) and (ImplNode.StartPos<=CurNode.StartPos)
then
CurInImplementation:=true;
end;
AddToImplementationUsesCheckBox.Enabled:=CurInImplementation;
AddToImplementationUsesCheckBox.Checked:=
CodyOptions.PreferImplementationUsesSection;