Codetools: revert changes in TStandardCodeTool.CheckLFM from r41948 #1182ff0df2. Caused regressions. Issue #24702

git-svn-id: trunk@41984 -
This commit is contained in:
juha 2013-07-03 13:57:04 +00:00
parent 06c4055b7c
commit 4f96dcd578

View File

@ -2269,16 +2269,17 @@ var
end;
end;
if (not Result) and ErrorOnNotFound then begin
if (IdentContext.Node<>nil) and (not IsPublished) then
if (IdentContext.Node<>nil) and (not IsPublished) then begin
LFMTree.AddError(lfmeIdentifierNotPublished,LFMNode,
'identifier '+IdentName+' is not published in class '
+'"'+ClassContext.Tool.ExtractClassName(ClassContext.Node,false,true)+'"',
DefaultErrorPosition);
//else -- CheckLFMChildObject adds lfmeIdentifierMissingInCode error for this.
// LFMTree.AddError(lfmeIdentifierNotFound,LFMNode,
// 'identifier '+IdentName+' not found in class '
// +'"'+ClassContext.Tool.ExtractClassName(ClassContext.Node,false,true)+'"',
// DefaultErrorPosition);
end else begin
LFMTree.AddError(lfmeIdentifierNotFound,LFMNode,
'identifier '+IdentName+' not found in class '
+'"'+ClassContext.Tool.ExtractClassName(ClassContext.Node,false,true)+'"',
DefaultErrorPosition);
end;
end;
end;
@ -2477,16 +2478,11 @@ var
end else begin
// try the object type
ClassContext:=FindClassContext(LFMObject.TypeName);
if ClassContext.Node=nil then
if ClassContext.Node=nil then begin
// object type not found
LFMTree.AddError(lfmeIdentifierNotFound,LFMObject,
'type '+LFMObject.TypeName+' not found',
LFMObject.TypeNamePosition)
else
// object type found but has no variable in code
LFMTree.AddError(lfmeIdentifierMissingInCode,LFMObject,
'no variable in code for '+LFMObjectName+', type '+LFMObject.TypeName,
LFMObject.TypeNamePosition);
'type '+LFMObject.TypeName+' not found',LFMObject.TypeNamePosition);
end;
end;
// check child LFM nodes
if ClassContext.Node<>nil then