public void addFromStream(InputStream stream, boolean allowDuplicates) throws CoreException {
public void addFromStream(InputStream stream, boolean allowDuplicates, boolean doTranslations) throws CoreException {
	public void addFromStream(InputStream stream, boolean allowDuplicates) throws CoreException {		try {			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();			DocumentBuilder parser= factory.newDocumentBuilder();					Document document= parser.parse(new InputSource(stream));						NodeList elements= document.getElementsByTagName(getTemplateTag());						int count= elements.getLength();			for (int i= 0; i != count; i++) {				Node node= elements.item(i);									NamedNodeMap attributes= node.getAttributes();				if (attributes == null)					continue;				String name= getAttributeValue(attributes, NAME_ATTRIBUTE);				String description= getAttributeValue(attributes, DESCRIPTION_ATTRIBUTE);				String context= getAttributeValue(attributes, CONTEXT_ATTRIBUTE);				Node enabledNode= attributes.getNamedItem(ENABLED_ATTRIBUTE);				if (name == null || description == null || context == null)					throw new SAXException(TemplateMessages.getString("TemplateSet.error.missing.attribute")); //$NON-NLS-1$				boolean enabled= (enabledNode == null) || (enabledNode.getNodeValue().equals("true")); //$NON-NLS-1$				StringBuffer buffer= new StringBuffer();				NodeList children= node.getChildNodes();				for (int j= 0; j != children.getLength(); j++) {					String value= children.item(j).getNodeValue();					if (value != null)						buffer.append(value);				}				String pattern= buffer.toString().trim();				Template template= new Template(name, description, context, pattern);								String message= validateTemplate(template);				if (message == null) {					template.setEnabled(enabled);					if (!allowDuplicates) {						Template[] templates= getTemplates(name);						for (int k= 0; k < templates.length; k++) {							remove(templates[k]);						}					}					add(template);									} else {					JavaPlugin.logErrorMessage("Template " + name + " not added: " + message);  //$NON-NLS-1$ //$NON-NLS-2$				}			}		} catch (ParserConfigurationException e) {			throwReadException(e);		} catch (IOException e) {			throwReadException(e);		} catch (SAXException e) {			throwReadException(e);		}	}