* @param problems Any problems with the attributes
* @return an EmbedData
*/
public static EmbedData getEmbedData(CompilerProject project, String specifiedQName, String containingSourceFilename, ISourceLocation location, IMetaTagAttribute[] attributes, Collection<ICompilerProblem> problems)
{
EmbedData data = new EmbedData(containingSourceFilename, specifiedQName);
boolean hadError = false;
for (IMetaTagAttribute attribute : attributes)
{
String key = attribute.getKey();
String value = attribute.getValue();
if (data.addAttribute(project, location, key, value, problems))
{
hadError = true;
}
}
if (hadError || !data.createTranscoder(project, location, problems))
return null;
// get the canonical EmbedData, as there may already be an equivalent
// embed data sitting in the workspace
return project.getWorkspace().getCanonicalEmbedData(data);