IdentifierNode configNamespaceNode = (IdentifierNode)node.getNamespaceNode();
IDefinitionSet set = configScope.getASScope().getLocalDefinitionSetByName(configNamespaceNode.getName());
if (set == null)
{
IIdentifierNode namespaceNode = (IdentifierNode)node.getNamespaceNode();
ICompilerProblem problem = new UndefinedConfigNamespaceProblem(namespaceNode, namespaceNode.getName());
addProblem(problem);
return false;
}
configScope.addItemAfterNormalization(node);
DefinitionBase constDef = node.getDefinition();
configScope.getASScope().addDefinition(constDef);
if (constDef instanceof ConstantDefinition)
{
ConstantDefinition def = (ConstantDefinition)constDef;
Object value = def.resolveValue(backingProject);
if (value == ConfigConstNode.UNKNOWN_VALUE)
{
// Get the real source node for the problem.
// If there isn't one, then don't make a problem - assume
// someone else already found the cause and logged it.
IASNode problemLocationNode = node.getAssignedValueNode();
if (problemLocationNode != null)
{
ICompilerProblem problem = new NonConstantConfigInitProblem(
problemLocationNode);
addProblem(problem);
}
}
}