use of de.neemann.digital.hdl.vhdl2.entities.VHDLTemplate in project Digital by hneemann.
the class VHDLLibrary method getEntity.
/**
* Gets the entity of the given node
*
* @param node the node
* @return the entity
* @throws HDLException HDLException
*/
public VHDLEntity getEntity(HDLNode node) throws HDLException {
String elementName = node.getElementName();
VHDLEntity e = map.get(elementName);
if (e == null) {
try {
e = new VHDLTemplate(elementName);
map.put(elementName, e);
} catch (IOException ex) {
ex.printStackTrace();
LOGGER.info("could not load '" + VHDLTemplate.neededFileName(elementName) + "'");
}
}
if (e == null)
throw new HDLException(Lang.get("err_vhdlNoEntity_N", elementName));
return e;
}
Aggregations