currData.setTemplate(new Template(oldTemplate.getName(), oldTemplate.getDescription(), oldTemplate.getContextTypeId(), newComment));
currData.setTemplate(new Template(oldTemplate.getName(), oldTemplate.getDescription(), oldTemplate.getContextTypeId(), newComment, oldTemplate.isAutoInsertable()));
	public void testInstanceCodeTemplates() throws Exception {		ProjectTemplateStore store= new ProjectTemplateStore(null);		store.load();		TemplatePersistenceData[] allTemplateDatas= store.getTemplateData();		assertEquals(ALL_CODE_TEMPLATES.length, allTemplateDatas.length);		for (int i= 0; i < ALL_CODE_TEMPLATES.length; i++) {			// get it from the array			TemplatePersistenceData fromArray=  find(ALL_CODE_TEMPLATES[i], allTemplateDatas);			assertNotNull(fromArray);						// get it from the store by id			Template fromStore=  store.findTemplateById(ALL_CODE_TEMPLATES[i]);			assertNotNull(fromStore);			assertEquals(fromArray.getTemplate().getPattern(), fromStore.getPattern());		}		String newComment= "//Hello1";		String templateId= CodeTemplateContextType.SETTERCOMMENT_ID;		TemplatePersistenceData currData= find(templateId, allTemplateDatas);		Template oldTemplate= currData.getTemplate();		currData.setTemplate(new Template(oldTemplate.getName(), oldTemplate.getDescription(), oldTemplate.getContextTypeId(), newComment));				Template currTempl= store.findTemplateById(templateId);		assertTrue(currTempl.getPattern().equals(newComment));				store.restoreDefaults(); // restore		currTempl= store.findTemplateById(templateId);		assertFalse(currTempl.getPattern().equals(newComment));	}